6 function pledge_get_example(){
12 $result = civicrm_api( 'pledge','get',$params );
18 * Function returns array of result expected from previous function
20 function pledge_get_expectedresult(){
22 $expectedResult = array(
30 'contact_type' => 'Individual',
31 'contact_sub_type' => '',
32 'sort_name' => 'Anderson, Anthony',
33 'display_name' => 'Mr. Anthony Anderson II',
35 'pledge_amount' => '100.00',
36 'pledge_create_date' => '2013-02-04 00:00:00',
37 'pledge_status' => 'Pending',
38 'pledge_total_paid' => '',
39 'pledge_next_pay_date' => '2013-02-06 00:00:00',
40 'pledge_next_pay_amount' => '20.00',
41 'pledge_outstanding_amount' => '',
42 'pledge_financial_type' => 'Donation',
43 'pledge_contribution_page_id' => '',
44 'pledge_frequency_interval' => '5',
45 'pledge_frequency_unit' => 'year',
46 'pledge_is_test' => 0,
47 'pledge_campaign_id' => '',
48 'pledge_currency' => 'USD',
54 return $expectedResult ;
59 * This example has been generated from the API test suite. The test that created it is called
61 * testGetPledge and can be found in
62 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/PledgeTest.php
64 * You can see the outcome of the API tests at
65 * http://tests.dev.civicrm.org/trunk/results-api_v3
67 * To Learn about the API read
68 * http://book.civicrm.org/developer/current/techniques/api/
70 * and review the wiki at
71 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
73 * Read more about testing here
74 * http://wiki.civicrm.org/confluence/display/CRM/Testing
76 * API Standards documentation:
77 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards