6 function line_item_create_example(){
9 'price_field_value_id' => 1,
10 'price_field_id' => 1,
11 'entity_table' => 'civicrm_contribution',
18 $result = civicrm_api( 'line_item','create',$params );
24 * Function returns array of result expected from previous function
26 function line_item_create_expectedresult(){
28 $expectedResult = array(
30 'undefined_fields' => array(
32 '1' => 'price_field_value_id',
33 '2' => 'price_field_id',
34 '3' => 'entity_table',
46 'entity_table' => 'civicrm_contribution',
48 'price_field_id' => '1',
49 'label' => 'line item',
53 'participant_count' => '',
54 'price_field_value_id' => '1',
55 'financial_type_id' => '',
56 'deductible_amount' => '',
60 'peakMemory' => 144948640,
61 'memory' => 131358352,
62 'timeIndex' => '1877.7615101337',
66 return $expectedResult ;
71 * This example has been generated from the API test suite. The test that created it is called
73 * testCreateLineItem and can be found in
74 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/LineItemTest.php
76 * You can see the outcome of the API tests at
77 * http://tests.dev.civicrm.org/trunk/results-api_v3
79 * To Learn about the API read
80 * http://book.civicrm.org/developer/current/techniques/api/
82 * and review the wiki at
83 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
85 * Read more about testing here
86 * http://wiki.civicrm.org/confluence/display/CRM/Testing
88 * API Standards documentation:
89 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards