3 * Test Generated example demonstrating the ContributionSoft.get API.
8 function contribution_soft_get_example() {
14 $result = civicrm_api3('ContributionSoft', '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_soft_get_expectedresult() {
48 'contribution_id' => '1',
52 'pcp_display_in_roll' => 0,
53 'soft_credit_type_id' => '4',
58 return $expectedResult;
62 * This example has been generated from the API test suite.
63 * The test that created it is called "testGetContributionSoft"
64 * and can be found at:
65 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionSoftTest.php
67 * You can see the outcome of the API tests at
68 * https://test.civicrm.org/job/CiviCRM-Core-Matrix/
70 * To Learn about the API read
71 * https://docs.civicrm.org/dev/en/latest/api/
73 * Browse the API on your own site with the API Explorer. It is in the main
74 * CiviCRM menu, under: Support > Development > API Explorer.
76 * Read more about testing here
77 * https://docs.civicrm.org/dev/en/latest/testing/
79 * API Standards documentation:
80 * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/