6 function pledge_create_example(){
9 'pledge_create_date' => '20130204',
10 'start_date' => '20130204',
11 'scheduled_date' => '20130206',
13 'pledge_status_id' => '2',
14 'pledge_financial_type_id' => '1',
15 'pledge_original_installment_amount' => 20,
16 'frequency_interval' => 5,
17 'frequency_unit' => 'year',
18 'frequency_day' => 15,
24 $result = civicrm_api( 'pledge','create',$params );
30 * Function returns array of result expected from previous function
32 function pledge_create_expectedresult(){
34 $expectedResult = array(
43 'financial_type_id' => '1',
44 'contribution_page_id' => '',
46 'original_installment_amount' => '20',
48 'frequency_unit' => 'year',
49 'frequency_interval' => '5',
50 'frequency_day' => '15',
51 'installments' => '5',
52 'start_date' => '20130204000000',
53 'create_date' => '20130204000000',
54 'acknowledge_date' => '',
55 'modified_date' => '2012-11-14 16:02:35',
58 'honor_contact_id' => '',
59 'honor_type_id' => '',
60 'max_reminders' => '',
61 'initial_reminder_day' => '',
62 'additional_reminder_day' => '',
70 return $expectedResult ;
75 * This example has been generated from the API test suite. The test that created it is called
77 * testCreatePledge and can be found in
78 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/PledgeTest.php
80 * You can see the outcome of the API tests at
81 * http://tests.dev.civicrm.org/trunk/results-api_v3
83 * To Learn about the API read
84 * http://book.civicrm.org/developer/current/techniques/api/
86 * and review the wiki at
87 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
89 * Read more about testing here
90 * http://wiki.civicrm.org/confluence/display/CRM/Testing
92 * API Standards documentation:
93 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards