3 * Test Generated example demonstrating the ContributionRecur.get API.
8 function contribution_recur_get_example() {
14 $result = civicrm_api3('ContributionRecur', 'get', $params);
16 catch (CiviCRM_API3_Exception
$e) {
18 $errorMessage = $e->getMessage();
19 $errorCode = $e->getErrorCode();
20 $errorData = $e->getExtraParams();
23 'error_message' => $errorMessage,
24 'error_code' => $errorCode,
25 'error_data' => $errorData,
33 * Function returns array of result expected from previous function.
38 function contribution_recur_get_expectedresult() {
51 'frequency_unit' => 'day',
52 'frequency_interval' => '1',
53 'installments' => '12',
54 'start_date' => '2013-07-29 00:00:00',
55 'create_date' => '20120130621222105',
56 'modified_date' => '2012-11-14 16:02:35',
57 'contribution_status_id' => '1',
62 'is_email_receipt' => '1',
67 return $expectedResult;
71 * This example has been generated from the API test suite.
72 * The test that created it is called "testGetContributionRecur"
73 * and can be found at:
74 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionRecurTest.php
76 * You can see the outcome of the API tests at
77 * https://test.civicrm.org/job/CiviCRM-Core-Matrix/
79 * To Learn about the API read
80 * https://docs.civicrm.org/dev/en/latest/api/
82 * Browse the API on your own site with the API Explorer. It is in the main
83 * CiviCRM menu, under: Support > Development > API Explorer.
85 * Read more about testing here
86 * https://docs.civicrm.org/dev/en/latest/testing/
88 * API Standards documentation:
89 * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/