3 * Test Generated example demonstrating the PriceFieldValue.get API.
8 function price_field_value_get_example() {
10 'name' => 'contribution_amount',
14 $result = civicrm_api3('PriceFieldValue', '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 price_field_value_get_expectedresult() {
48 'price_field_id' => '1',
49 'name' => 'contribution_amount',
50 'label' => 'Contribution Amount',
51 'amount' => '1.000000000',
55 'financial_type_id' => '1',
56 'non_deductible_amount' => '0.00',
57 'visibility_id' => '1',
58 'contribution_type_id' => '1',
63 return $expectedResult;
67 * This example has been generated from the API test suite.
68 * The test that created it is called "testGetBasicPriceFieldValue"
69 * and can be found at:
70 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PriceFieldValueTest.php
72 * You can see the outcome of the API tests at
73 * https://test.civicrm.org/job/CiviCRM-Core-Matrix/
75 * To Learn about the API read
76 * https://docs.civicrm.org/dev/en/latest/api/
78 * Browse the API on your own site with the API Explorer. It is in the main
79 * CiviCRM menu, under: Support > Development > API Explorer.
81 * Read more about testing here
82 * https://docs.civicrm.org/dev/en/latest/testing/
84 * API Standards documentation:
85 * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/