From edb0d67a5384286d3bcafb4c36f21a0c5b355dda Mon Sep 17 00:00:00 2001 From: eileen Date: Sat, 22 Jun 2013 20:38:09 +1200 Subject: [PATCH] update test generated examples --- .../Activity/ContactRefCustomField.php | 4 +- .../Activity/ContactRefCustomFieldGet.php | 4 +- api/v3/examples/Activity/DateTimeHigh.php | 2 +- api/v3/examples/Activity/DateTimeLow.php | 2 +- .../Activity/ReturnAssigneeContact.php | 5 +- api/v3/examples/ActivityCreate.php | 4 +- api/v3/examples/ActivityGet.php | 4 +- api/v3/examples/ActivityGetfields.php | 12 ----- api/v3/examples/ActivityTypeCreate.php | 14 ++--- api/v3/examples/ActivityTypeDelete.php | 6 +-- api/v3/examples/ActivityTypeGet.php | 13 ++--- api/v3/examples/Address/AddressLike.php | 10 ++-- api/v3/examples/Address/AddressParse.php | 8 +-- api/v3/examples/Address/AddressSort.php | 12 ++--- api/v3/examples/AddressCreate.php | 8 +-- api/v3/examples/AddressDelete.php | 6 +-- api/v3/examples/AddressGet.php | 8 +-- api/v3/examples/BatchCreate.php | 15 +++--- api/v3/examples/BatchDelete.php | 7 +-- api/v3/examples/BatchGet.php | 13 ++--- api/v3/examples/BatchUpdate.php | 17 +++--- api/v3/examples/CampaignCreate.php | 10 ++-- api/v3/examples/CampaignDelete.php | 4 +- api/v3/examples/CampaignGet.php | 10 ++-- api/v3/examples/ConstantGet.php | 8 +-- api/v3/examples/Contact/APIChainedArray.php | 35 ++++++------ .../Contact/APIChainedArrayFormats.php | 20 +++---- .../Contact/APIChainedArrayMultipleCustom.php | 54 +++++++++---------- ...IChainedArrayValuesFromSiblingFunction.php | 16 +++--- api/v3/examples/Contact/ChainTwoWebsites.php | 35 ++++++------ .../Contact/ChainTwoWebsitesSyntax2.php | 39 +++++++------- api/v3/examples/Contact/CustomFieldCreate.php | 10 ++-- api/v3/examples/Contact/CustomFieldGet.php | 14 ++--- .../CustomFieldGetReturnSyntaxVariation.php | 14 ++--- .../examples/Contact/FormatIsSuccess_Fail.php | 2 +- .../examples/Contact/FormatIsSuccess_True.php | 2 +- api/v3/examples/Contact/FormatOnlyID.php | 2 +- api/v3/examples/Contact/FormatSingleValue.php | 2 +- api/v3/examples/Contact/GetCountContact.php | 2 +- api/v3/examples/Contact/GetSingleContact.php | 10 +--- .../Contact/GroupFilterUsingContactAPI.php | 16 ++---- api/v3/examples/ContactDelete.php | 4 +- api/v3/examples/ContactGet.php | 14 ++--- api/v3/examples/ContributionPageCreate.php | 10 ++-- api/v3/examples/ContributionPageDelete.php | 4 +- api/v3/examples/ContributionPageGet.php | 8 +-- api/v3/examples/ContributionRecurCreate.php | 10 ++-- api/v3/examples/ContributionRecurDelete.php | 4 +- api/v3/examples/ContributionRecurGet.php | 10 ++-- api/v3/examples/ContributionSoftCreate.php | 8 +-- api/v3/examples/ContributionSoftDelete.php | 2 +- api/v3/examples/ContributionSoftGet.php | 8 +-- 52 files changed, 259 insertions(+), 302 deletions(-) diff --git a/api/v3/examples/Activity/ContactRefCustomField.php b/api/v3/examples/Activity/ContactRefCustomField.php index a1ae2ae600..01df6b00ba 100644 --- a/api/v3/examples/Activity/ContactRefCustomField.php +++ b/api/v3/examples/Activity/ContactRefCustomField.php @@ -6,7 +6,7 @@ function activity_create_example(){ $params = array( 'source_contact_id' => 17, - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'subject' => 'test activity type id', 'activity_date_time' => '2011-06-02 14:36:13', 'status_id' => 2, @@ -37,7 +37,7 @@ function activity_create_expectedresult(){ '1' => array( 'id' => '1', 'source_record_id' => '', - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'subject' => 'test activity type id', 'activity_date_time' => '20110602143613', 'duration' => '120', diff --git a/api/v3/examples/Activity/ContactRefCustomFieldGet.php b/api/v3/examples/Activity/ContactRefCustomFieldGet.php index 659b211266..cb43f90574 100644 --- a/api/v3/examples/Activity/ContactRefCustomFieldGet.php +++ b/api/v3/examples/Activity/ContactRefCustomFieldGet.php @@ -6,7 +6,7 @@ function activity_create_example(){ $params = array( 'source_contact_id' => 17, - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'subject' => 'test activity type id', 'activity_date_time' => '2011-06-02 14:36:13', 'status_id' => 2, @@ -36,7 +36,7 @@ function activity_create_expectedresult(){ 'values' => array( '1' => array( 'id' => '1', - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'subject' => 'test activity type id', 'activity_date_time' => '2011-06-02 14:36:13', 'duration' => '120', diff --git a/api/v3/examples/Activity/DateTimeHigh.php b/api/v3/examples/Activity/DateTimeHigh.php index dab7058a2a..31fa3ab788 100644 --- a/api/v3/examples/Activity/DateTimeHigh.php +++ b/api/v3/examples/Activity/DateTimeHigh.php @@ -29,7 +29,7 @@ function activity_get_expectedresult(){ 'values' => array( '0' => array( 'id' => '1', - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'subject' => 'Make-it-Happen Meeting', 'activity_date_time' => '2011-01-01 00:00:00', 'duration' => '120', diff --git a/api/v3/examples/Activity/DateTimeLow.php b/api/v3/examples/Activity/DateTimeLow.php index 7f47d8a7e2..a15ded6182 100644 --- a/api/v3/examples/Activity/DateTimeLow.php +++ b/api/v3/examples/Activity/DateTimeLow.php @@ -28,7 +28,7 @@ function activity_get_expectedresult(){ 'values' => array( '0' => array( 'id' => '2', - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'subject' => 'Make-it-Happen Meeting', 'activity_date_time' => '2012-02-16 00:00:00', 'duration' => '120', diff --git a/api/v3/examples/Activity/ReturnAssigneeContact.php b/api/v3/examples/Activity/ReturnAssigneeContact.php index 3f0a607a38..a69aea08ad 100644 --- a/api/v3/examples/Activity/ReturnAssigneeContact.php +++ b/api/v3/examples/Activity/ReturnAssigneeContact.php @@ -32,7 +32,7 @@ function activity_get_expectedresult(){ 'values' => array( '0' => array( 'id' => '1', - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'subject' => 'test activity type id', 'activity_date_time' => '2011-06-02 14:36:13', 'duration' => '120', @@ -50,9 +50,6 @@ function activity_get_expectedresult(){ 'source_contact_id' => '17', 'api.contact.get' => array( 'is_error' => 0, - 'undefined_fields' => array( - '0' => 'api.has_parent', - ), 'version' => 3, 'count' => 1, 'id' => 17, diff --git a/api/v3/examples/ActivityCreate.php b/api/v3/examples/ActivityCreate.php index 2123c40a69..3c58cdf409 100644 --- a/api/v3/examples/ActivityCreate.php +++ b/api/v3/examples/ActivityCreate.php @@ -6,7 +6,7 @@ function activity_create_example(){ $params = array( 'source_contact_id' => 17, - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'subject' => 'test activity type id', 'activity_date_time' => '2011-06-02 14:36:13', 'status_id' => 2, @@ -37,7 +37,7 @@ function activity_create_expectedresult(){ '1' => array( 'id' => '1', 'source_record_id' => '', - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'subject' => 'test activity type id', 'activity_date_time' => '20110602143613', 'duration' => '120', diff --git a/api/v3/examples/ActivityGet.php b/api/v3/examples/ActivityGet.php index cecdbe0348..81f92c4e69 100644 --- a/api/v3/examples/ActivityGet.php +++ b/api/v3/examples/ActivityGet.php @@ -6,7 +6,7 @@ function activity_get_example(){ $params = array( 'contact_id' => 17, - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'version' => 3, 'sequential' => 1, 'return.custom_1' => 1, @@ -31,7 +31,7 @@ function activity_get_expectedresult(){ '0' => array( 'source_contact_id' => '17', 'id' => '1', - 'activity_type_id' => '44', + 'activity_type_id' => '46', 'subject' => 'test activity type id', 'location' => 'Pensulvania', 'activity_date_time' => '2011-06-02 14:36:13', diff --git a/api/v3/examples/ActivityGetfields.php b/api/v3/examples/ActivityGetfields.php index 813cbd49b1..ae9f6996ed 100644 --- a/api/v3/examples/ActivityGetfields.php +++ b/api/v3/examples/ActivityGetfields.php @@ -40,9 +40,6 @@ function activity_getfields_expectedresult(){ 'pseudoconstant' => array( 'optionGroupName' => 'activity_type', ), - 'api.aliases' => array( - '0' => 'activity_type', - ), ), 'activity_date_time' => array( 'name' => 'activity_date_time', @@ -73,9 +70,6 @@ function activity_getfields_expectedresult(){ 'pseudoconstant' => array( 'optionGroupName' => 'priority', ), - 'api.aliases' => array( - '0' => 'priority', - ), ), 'parent_id' => array( 'name' => 'parent_id', @@ -185,9 +179,6 @@ function activity_getfields_expectedresult(){ 'optionGroupName' => 'activity_status', ), 'uniqueName' => 'activity_status_id', - 'api.aliases' => array( - '0' => 'status', - ), ), 'is_test' => array( 'name' => 'is_test', @@ -208,9 +199,6 @@ function activity_getfields_expectedresult(){ 'optionGroupName' => 'encounter_medium', ), 'uniqueName' => 'activity_medium_id', - 'api.aliases' => array( - '0' => 'medium', - ), ), 'result' => array( 'name' => 'result', diff --git a/api/v3/examples/ActivityTypeCreate.php b/api/v3/examples/ActivityTypeCreate.php index 63ea1d2844..e6323a3b5e 100644 --- a/api/v3/examples/ActivityTypeCreate.php +++ b/api/v3/examples/ActivityTypeCreate.php @@ -4,7 +4,7 @@ */ function activity_type_create_example(){ -$params = array( +$params = array( 'weight' => '2', 'label' => 'send out letters', 'version' => 3, @@ -24,17 +24,17 @@ $params = array( */ function activity_type_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 723, - 'values' => array( - '723' => array( - 'id' => '723', + 'id' => 720, + 'values' => array( + '720' => array( + 'id' => '720', 'option_group_id' => '2', 'label' => 'send out letters', - 'value' => '44', + 'value' => '46', 'name' => 'send out letters', 'grouping' => '', 'filter' => 0, diff --git a/api/v3/examples/ActivityTypeDelete.php b/api/v3/examples/ActivityTypeDelete.php index 58b8d8d7b8..b0c3598f86 100644 --- a/api/v3/examples/ActivityTypeDelete.php +++ b/api/v3/examples/ActivityTypeDelete.php @@ -4,8 +4,8 @@ */ function activity_type_delete_example(){ -$params = array( - 'activity_type_id' => 725, +$params = array( + 'activity_type_id' => 722, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function activity_type_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 1, 'error_message' => 'Undefined index: activity_type_id', ); diff --git a/api/v3/examples/ActivityTypeGet.php b/api/v3/examples/ActivityTypeGet.php index d99d1b4d5a..250250e7f2 100644 --- a/api/v3/examples/ActivityTypeGet.php +++ b/api/v3/examples/ActivityTypeGet.php @@ -4,7 +4,7 @@ */ function activity_type_get_example(){ -$params = array( +$params = array( 'version' => 3, ); @@ -18,15 +18,15 @@ $params = array( */ function activity_type_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 44, - 'values' => array( + 'count' => 45, + 'values' => array( '1' => 'Meeting', '2' => 'Phone Call', '3' => 'Email', - '4' => 'Text Message (SMS)', + '4' => 'Outbound SMS', '5' => 'Event Registration', '6' => 'Contribution', '7' => 'Membership Signup', @@ -66,7 +66,8 @@ function activity_type_get_expectedresult(){ '41' => 'Export Accounting Batch', '42' => 'Create Batch', '43' => 'Edit Batch', - '44' => 'Test activity type', + '44' => 'SMS delivery', + '45' => 'Inbound SMS', ), ); diff --git a/api/v3/examples/Address/AddressLike.php b/api/v3/examples/Address/AddressLike.php index e6a531d68d..26bfd074df 100644 --- a/api/v3/examples/Address/AddressLike.php +++ b/api/v3/examples/Address/AddressLike.php @@ -4,8 +4,8 @@ Demonstrates Use of Like */ function address_get_example(){ -$params = array( - 'street_address' => array( +$params = array( + 'street_address' => array( 'LIKE' => '%mb%', ), 'version' => 3, @@ -22,13 +22,13 @@ $params = array( */ function address_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 10, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '10', 'contact_id' => '12', 'location_type_id' => '15', diff --git a/api/v3/examples/Address/AddressParse.php b/api/v3/examples/Address/AddressParse.php index e929cbcb22..192e08894f 100644 --- a/api/v3/examples/Address/AddressParse.php +++ b/api/v3/examples/Address/AddressParse.php @@ -4,7 +4,7 @@ Demonstrates Use of address parsing param */ function address_create_example(){ -$params = array( +$params = array( 'version' => 3, 'street_parsing' => 1, 'street_address' => '54A Excelsior Ave. Apt 1C', @@ -22,13 +22,13 @@ $params = array( */ function address_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 3, - 'values' => array( - '3' => array( + 'values' => array( + '3' => array( 'id' => '3', 'contact_id' => '4', 'location_type_id' => '7', diff --git a/api/v3/examples/Address/AddressSort.php b/api/v3/examples/Address/AddressSort.php index f4e9c138b9..56e54f582c 100644 --- a/api/v3/examples/Address/AddressSort.php +++ b/api/v3/examples/Address/AddressSort.php @@ -4,8 +4,8 @@ Demonstrates Use of sort filter */ function address_get_example(){ -$params = array( - 'options' => array( +$params = array( + 'options' => array( 'sort' => 'street_address DESC', 'limit' => 2, ), @@ -23,12 +23,12 @@ $params = array( */ function address_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 2, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '9', 'contact_id' => '11', 'location_type_id' => '14', @@ -42,7 +42,7 @@ function address_get_expectedresult(){ 'country_id' => '1152', 'manual_geo_code' => 0, ), - '1' => array( + '1' => array( 'id' => '1', 'contact_id' => '2', 'location_type_id' => '1', diff --git a/api/v3/examples/AddressCreate.php b/api/v3/examples/AddressCreate.php index 5a43789e3f..4a5a648007 100644 --- a/api/v3/examples/AddressCreate.php +++ b/api/v3/examples/AddressCreate.php @@ -4,7 +4,7 @@ */ function address_create_example(){ -$params = array( +$params = array( 'contact_id' => 3, 'location_type_id' => 6, 'street_name' => 'Ambachtstraat', @@ -27,13 +27,13 @@ $params = array( */ function address_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'id' => '2', 'contact_id' => '3', 'location_type_id' => '6', diff --git a/api/v3/examples/AddressDelete.php b/api/v3/examples/AddressDelete.php index 297406badc..c1e9507756 100644 --- a/api/v3/examples/AddressDelete.php +++ b/api/v3/examples/AddressDelete.php @@ -4,7 +4,7 @@ */ function address_delete_example(){ -$params = array( +$params = array( 'contact_id' => 8, 'location_type_id' => 11, 'street_name' => 'Ambachtstraat', @@ -27,11 +27,11 @@ $params = array( */ function address_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => 1, + 'values' => true, ); return $expectedResult ; diff --git a/api/v3/examples/AddressGet.php b/api/v3/examples/AddressGet.php index f6a0c461bf..502aa18115 100644 --- a/api/v3/examples/AddressGet.php +++ b/api/v3/examples/AddressGet.php @@ -4,7 +4,7 @@ */ function address_get_example(){ -$params = array( +$params = array( 'contact_id' => 9, 'street_name' => 'Ambachtstraat', 'version' => 3, @@ -20,13 +20,13 @@ $params = array( */ function address_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 7, - 'values' => array( - '7' => array( + 'values' => array( + '7' => array( 'id' => '7', 'contact_id' => '9', 'location_type_id' => '12', diff --git a/api/v3/examples/BatchCreate.php b/api/v3/examples/BatchCreate.php index 0a5243b1b5..6b83ee7df9 100644 --- a/api/v3/examples/BatchCreate.php +++ b/api/v3/examples/BatchCreate.php @@ -4,7 +4,7 @@ */ function batch_create_example(){ -$params = array( +$params = array( 'name' => 'New_Batch_03', 'title' => 'New Batch 03', 'description' => 'This is description for New Batch 03', @@ -12,6 +12,7 @@ $params = array( 'item_count' => 3, 'status_id' => 1, 'version' => 3, + 'debug' => 0, ); $result = civicrm_api( 'batch','create',$params ); @@ -24,19 +25,19 @@ $params = array( */ function batch_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, - 'values' => array( - '2' => array( - 'id' => '2', + 'id' => 1, + 'values' => array( + '1' => array( + 'id' => '1', 'name' => 'New_Batch_03', 'title' => 'New Batch 03', 'description' => 'This is description for New Batch 03', 'created_id' => '', - 'created_date' => '', + 'created_date' => '20120130621222105', 'modified_id' => '', 'modified_date' => '2012-11-14 16:02:35', 'saved_search_id' => '', diff --git a/api/v3/examples/BatchDelete.php b/api/v3/examples/BatchDelete.php index b699f311b8..9830a487fb 100644 --- a/api/v3/examples/BatchDelete.php +++ b/api/v3/examples/BatchDelete.php @@ -4,9 +4,10 @@ */ function batch_delete_example(){ -$params = array( - 'id' => 5, +$params = array( + 'id' => 1, 'version' => 3, + 'debug' => 0, ); $result = civicrm_api( 'batch','delete',$params ); @@ -19,7 +20,7 @@ $params = array( */ function batch_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/BatchGet.php b/api/v3/examples/BatchGet.php index 814a7916bf..2b5c737023 100644 --- a/api/v3/examples/BatchGet.php +++ b/api/v3/examples/BatchGet.php @@ -4,9 +4,10 @@ */ function batch_get_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, + 'debug' => 0, ); $result = civicrm_api( 'batch','get',$params ); @@ -19,16 +20,16 @@ $params = array( */ function batch_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', - 'name' => 'Batch_985446', - 'title' => 'Batch_985446', + 'name' => 'Batch_433397', + 'title' => 'Batch_433397', 'status_id' => '1', ), ), diff --git a/api/v3/examples/BatchUpdate.php b/api/v3/examples/BatchUpdate.php index af057792cd..2b2fa50889 100644 --- a/api/v3/examples/BatchUpdate.php +++ b/api/v3/examples/BatchUpdate.php @@ -4,14 +4,15 @@ */ function batch_update_example(){ -$params = array( +$params = array( 'name' => 'New_Batch_04', 'title' => 'New Batch 04', 'description' => 'This is description for New Batch 04', 'total' => '400.44', 'item_count' => 4, + 'id' => 1, 'version' => 3, - 'id' => 3, + 'debug' => 0, ); $result = civicrm_api( 'batch','update',$params ); @@ -24,19 +25,19 @@ $params = array( */ function batch_update_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, - 'values' => array( - '3' => array( - 'id' => '3', + 'id' => 1, + 'values' => array( + '1' => array( + 'id' => '1', 'name' => 'New_Batch_04', 'title' => 'New Batch 04', 'description' => 'This is description for New Batch 04', 'created_id' => '', - 'created_date' => '', + 'created_date' => '20120130621222105', 'modified_id' => '', 'modified_date' => '2012-11-14 16:02:35', 'saved_search_id' => '', diff --git a/api/v3/examples/CampaignCreate.php b/api/v3/examples/CampaignCreate.php index 997099ef54..8fd508ba4b 100644 --- a/api/v3/examples/CampaignCreate.php +++ b/api/v3/examples/CampaignCreate.php @@ -4,7 +4,7 @@ Create a campaign - Note use of relative dates here http://www.php.net/manual/en/datetime.formats.relative.php */ function campaign_create_example(){ -$params = array( +$params = array( 'version' => 3, 'title' => 'campaign title', 'description' => 'Call people, ask for money', @@ -21,13 +21,13 @@ $params = array( */ function campaign_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'name' => 'campaign_title', 'title' => 'campaign title', @@ -40,7 +40,7 @@ function campaign_create_expectedresult(){ 'parent_id' => '', 'is_active' => '', 'created_id' => '', - 'created_date' => '20080705000000', + 'created_date' => '20120130621222105', 'last_modified_id' => '', 'last_modified_date' => '', 'goal_general' => '', diff --git a/api/v3/examples/CampaignDelete.php b/api/v3/examples/CampaignDelete.php index bc1ba7a562..e929d20327 100644 --- a/api/v3/examples/CampaignDelete.php +++ b/api/v3/examples/CampaignDelete.php @@ -4,7 +4,7 @@ */ function campaign_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 2, ); @@ -19,7 +19,7 @@ $params = array( */ function campaign_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/CampaignGet.php b/api/v3/examples/CampaignGet.php index d443728561..5a61b38983 100644 --- a/api/v3/examples/CampaignGet.php +++ b/api/v3/examples/CampaignGet.php @@ -4,7 +4,7 @@ */ function campaign_get_example(){ -$params = array( +$params = array( 'version' => 3, 'title' => 'campaign title', 'description' => 'Call people, ask for money', @@ -21,19 +21,19 @@ $params = array( */ function campaign_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '2' => array( + 'values' => array( + '2' => array( 'id' => '2', 'name' => 'campaign_title', 'title' => 'campaign title', 'description' => 'Call people, ask for money', 'is_active' => '1', - 'created_date' => '2008-07-05 00:00:00', + 'created_date' => '20120130621222105', ), ), ); diff --git a/api/v3/examples/ConstantGet.php b/api/v3/examples/ConstantGet.php index e141f8be1a..2a2b8fe60b 100644 --- a/api/v3/examples/ConstantGet.php +++ b/api/v3/examples/ConstantGet.php @@ -4,8 +4,8 @@ */ function constant_get_example(){ -$params = array( - 'name' => 'locationType', +$params = array( + 'field' => 'location_type_id', 'version' => 3, ); @@ -19,11 +19,11 @@ $params = array( */ function constant_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 5, - 'values' => array( + 'values' => array( '5' => 'Billing', '1' => 'Home', '3' => 'Main', diff --git a/api/v3/examples/Contact/APIChainedArray.php b/api/v3/examples/Contact/APIChainedArray.php index 8d6a144f1e..a14c048fde 100644 --- a/api/v3/examples/Contact/APIChainedArray.php +++ b/api/v3/examples/Contact/APIChainedArray.php @@ -4,11 +4,11 @@ /*this demonstrates the usage of chained api functions. In this case no notes or custom fields have been created */ function contact_get_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, 'api.website.get' => array(), - 'api.Contribution.get' => array( + 'api.Contribution.get' => array( 'total_amount' => '120.00', ), 'api.CustomValue.get' => 1, @@ -25,13 +25,13 @@ $params = array( */ function contact_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -60,12 +60,6 @@ function contact_get_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'contact_is_deleted' => 0, - 'gender_id' => '', - 'gender' => '', - 'prefix_id' => '', - 'prefix' => '', - 'suffix_id' => '', - 'suffix' => '', 'current_employer' => '', 'address_id' => '', 'street_address' => '', @@ -93,26 +87,26 @@ function contact_get_expectedresult(){ 'worldregion_id' => '', 'world_region' => '', 'id' => '1', - 'api.website.get' => array( + 'api.website.get' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'contact_id' => '1', 'url' => 'http://civicrm.org', ), ), ), - 'api.Contribution.get' => array( + 'api.Contribution.get' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'contact_id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -140,7 +134,7 @@ function contact_get_expectedresult(){ 'contribution_campaign_id' => '', 'financial_type_id' => '1', 'financial_type' => 'Donation', - 'instrument_id' => '79', + 'instrument_id' => '81', 'payment_instrument' => 'Credit Card', 'product_id' => '', 'product_name' => '', @@ -159,16 +153,17 @@ function contact_get_expectedresult(){ 'contribution_payment_instrument' => 'Credit Card', 'contribution_check_number' => '', 'id' => '2', + 'contribution_type_id' => '1', ), ), ), - 'api.CustomValue.get' => array( + 'api.CustomValue.get' => array( 'is_error' => 0, 'version' => 3, 'count' => 0, 'values' => array(), ), - 'api.Note.get' => array( + 'api.Note.get' => array( 'is_error' => 0, 'version' => 3, 'count' => 0, diff --git a/api/v3/examples/Contact/APIChainedArrayFormats.php b/api/v3/examples/Contact/APIChainedArrayFormats.php index 41a1c62b97..576cbbed3e 100644 --- a/api/v3/examples/Contact/APIChainedArrayFormats.php +++ b/api/v3/examples/Contact/APIChainedArrayFormats.php @@ -5,10 +5,10 @@ *custom fields or memberships exist */ function contact_get_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, - 'api.website.getValue' => array( + 'api.website.getValue' => array( 'return' => 'url', ), 'api.Contribution.getCount' => array(), @@ -27,13 +27,13 @@ $params = array( */ function contact_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -62,12 +62,6 @@ function contact_get_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'contact_is_deleted' => 0, - 'gender_id' => '', - 'gender' => '', - 'prefix_id' => '', - 'prefix' => '', - 'suffix_id' => '', - 'suffix' => '', 'current_employer' => '', 'address_id' => '', 'street_address' => '', @@ -97,13 +91,13 @@ function contact_get_expectedresult(){ 'id' => '1', 'api.website.getValue' => 'http://civicrm.org', 'api.Contribution.getCount' => 2, - 'api.CustomValue.get' => array( + 'api.CustomValue.get' => array( 'is_error' => 0, 'version' => 3, 'count' => 0, 'values' => array(), ), - 'api.Note.get' => array( + 'api.Note.get' => array( 'is_error' => 0, 'version' => 3, 'count' => 0, diff --git a/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php b/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php index 6e4f6419f9..320c448a73 100644 --- a/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php +++ b/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php @@ -4,10 +4,10 @@ /*this demonstrates the usage of chained api functions. A variety of techniques are used */ function contact_get_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, - 'api.website.getValue' => array( + 'api.website.getValue' => array( 'return' => 'url', ), 'api.Contribution.getCount' => array(), @@ -24,13 +24,13 @@ $params = array( */ function contact_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -59,12 +59,6 @@ function contact_get_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'contact_is_deleted' => 0, - 'gender_id' => '', - 'gender' => '', - 'prefix_id' => '', - 'prefix' => '', - 'suffix_id' => '', - 'suffix' => '', 'current_employer' => '', 'address_id' => '', 'street_address' => '', @@ -94,63 +88,63 @@ function contact_get_expectedresult(){ 'id' => '1', 'api.website.getValue' => 'http://civicrm.org', 'api.Contribution.getCount' => 2, - 'api.CustomValue.get' => array( + 'api.CustomValue.get' => array( 'is_error' => 0, 'version' => 3, 'count' => 10, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'entity_id' => '1', 'latest' => 'value 4', - 'id' => '12', + 'id' => '13', '0' => 'value 4', ), - '1' => array( + '1' => array( 'entity_table' => 'Contact', ), - '2' => array( + '2' => array( 'entity_id' => '1', 'latest' => 'value 3', - 'id' => '13', + 'id' => '14', '1' => 'value 2', '2' => 'value 3', ), - '3' => array( + '3' => array( 'entity_table' => 'Contact', ), - '4' => array( + '4' => array( 'entity_id' => '1', 'latest' => '', - 'id' => '14', + 'id' => '15', '1' => 'warm beer', '2' => '', ), - '5' => array( + '5' => array( 'entity_id' => '1', 'latest' => '', - 'id' => '15', + 'id' => '16', '1' => '', '2' => '', ), - '6' => array( + '6' => array( 'entity_table' => 'Contact', ), - '7' => array( + '7' => array( 'entity_id' => '1', 'latest' => '', - 'id' => '16', + 'id' => '17', '1' => '', ), - '8' => array( + '8' => array( 'entity_id' => '1', 'latest' => 'vegemite', - 'id' => '17', + 'id' => '18', '1' => 'vegemite', ), - '9' => array( + '9' => array( 'entity_id' => '1', 'latest' => '', - 'id' => '18', + 'id' => '19', '1' => '', ), ), diff --git a/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php b/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php index 59d2155067..d1fb46798a 100644 --- a/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php +++ b/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php @@ -5,16 +5,16 @@ 2 child functions - one receives values from the parent (Contact) and the other child (Tag). */ function contact_create_example(){ -$params = array( +$params = array( 'version' => 3, 'display_name' => 'batman', 'contact_type' => 'Individual', - 'api.tag.create' => array( + 'api.tag.create' => array( 'name' => '$value.id', 'description' => '$value.display_name', 'format.only_id' => 1, ), - 'api.entity_tag.create' => array( + 'api.entity_tag.create' => array( 'tag_id' => '$value.api.tag.create', ), ); @@ -29,13 +29,13 @@ $params = array( */ function contact_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -81,10 +81,10 @@ function contact_create_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'user_unique_id' => '', - 'created_date' => '2013-02-15 17:06:45', + 'created_date' => '20120130621222105', 'modified_date' => '2012-11-14 16:02:35', 'api.tag.create' => 6, - 'api.entity_tag.create' => array( + 'api.entity_tag.create' => array( 'is_error' => 0, 'not_added' => 1, 'added' => 1, diff --git a/api/v3/examples/Contact/ChainTwoWebsites.php b/api/v3/examples/Contact/ChainTwoWebsites.php index afffd8bd2f..3f7afaa34b 100644 --- a/api/v3/examples/Contact/ChainTwoWebsites.php +++ b/api/v3/examples/Contact/ChainTwoWebsites.php @@ -4,13 +4,13 @@ test demonstrates the syntax to create 2 chained entities */ function contact_create_example(){ -$params = array( +$params = array( 'first_name' => 'abc3', 'last_name' => 'xyz3', 'contact_type' => 'Individual', 'email' => 'man3@yahoo.com', 'version' => 3, - 'api.contribution.create' => array( + 'api.contribution.create' => array( 'receive_date' => '2010-01-01', 'total_amount' => '100', 'financial_type_id' => 1, @@ -23,10 +23,10 @@ $params = array( 'source' => 'SSF', 'contribution_status_id' => 1, ), - 'api.website.create' => array( + 'api.website.create' => array( 'url' => 'http://civicrm.org', ), - 'api.website.create.2' => array( + 'api.website.create.2' => array( 'url' => 'http://chained.org', ), ); @@ -41,13 +41,13 @@ $params = array( */ function contact_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -93,15 +93,15 @@ function contact_create_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'user_unique_id' => '', - 'created_date' => '2013-02-15 16:59:33', + 'created_date' => '20120130621222105', 'modified_date' => '2012-11-14 16:02:35', - 'api.contribution.create' => array( + 'api.contribution.create' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'contact_id' => '1', 'financial_type_id' => '1', @@ -130,16 +130,17 @@ function contact_create_expectedresult(){ 'address_id' => '', 'check_number' => 'null', 'campaign_id' => '', + 'contribution_type_id' => '1', ), ), ), - 'api.website.create' => array( + 'api.website.create' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'contact_id' => '1', 'url' => 'http://civicrm.org', @@ -147,13 +148,13 @@ function contact_create_expectedresult(){ ), ), ), - 'api.website.create.2' => array( + 'api.website.create.2' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '2', 'contact_id' => '1', 'url' => 'http://chained.org', diff --git a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php index 561c310fcb..a6480efee9 100644 --- a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php +++ b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php @@ -4,13 +4,13 @@ demonstrates creating two websites as an array */ function contact_create_example(){ -$params = array( +$params = array( 'first_name' => 'abc3', 'last_name' => 'xyz3', 'contact_type' => 'Individual', 'email' => 'man3@yahoo.com', 'version' => 3, - 'api.contribution.create' => array( + 'api.contribution.create' => array( 'receive_date' => '2010-01-01', 'total_amount' => '100', 'financial_type_id' => 1, @@ -23,11 +23,11 @@ $params = array( 'source' => 'SSF', 'contribution_status_id' => 1, ), - 'api.website.create' => array( - '0' => array( + 'api.website.create' => array( + '0' => array( 'url' => 'http://civicrm.org', ), - '1' => array( + '1' => array( 'url' => 'http://chained.org', 'website_type_id' => 2, ), @@ -44,13 +44,13 @@ $params = array( */ function contact_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -96,15 +96,15 @@ function contact_create_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'user_unique_id' => '', - 'created_date' => '2013-02-15 16:59:33', + 'created_date' => '20120130621222105', 'modified_date' => '2012-11-14 16:02:35', - 'api.contribution.create' => array( + 'api.contribution.create' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'contact_id' => '1', 'financial_type_id' => '1', @@ -133,17 +133,18 @@ function contact_create_expectedresult(){ 'address_id' => '', 'check_number' => 'null', 'campaign_id' => '', + 'contribution_type_id' => '1', ), ), ), - 'api.website.create' => array( - '0' => array( + 'api.website.create' => array( + '0' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '1', 'contact_id' => '1', 'url' => 'http://civicrm.org', @@ -151,13 +152,13 @@ function contact_create_expectedresult(){ ), ), ), - '1' => array( + '1' => array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 2, - 'values' => array( - '0' => array( + 'values' => array( + '0' => array( 'id' => '2', 'contact_id' => '1', 'url' => 'http://chained.org', diff --git a/api/v3/examples/Contact/CustomFieldCreate.php b/api/v3/examples/Contact/CustomFieldCreate.php index 930b33f951..6c2442336e 100644 --- a/api/v3/examples/Contact/CustomFieldCreate.php +++ b/api/v3/examples/Contact/CustomFieldCreate.php @@ -4,7 +4,7 @@ /*this demonstrates setting a custom field through the API */ function contact_create_example(){ -$params = array( +$params = array( 'first_name' => 'abc1', 'contact_type' => 'Individual', 'last_name' => 'xyz1', @@ -22,13 +22,13 @@ $params = array( */ function contact_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -74,7 +74,7 @@ function contact_create_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'user_unique_id' => '', - 'created_date' => '2013-02-15 16:58:30', + 'created_date' => '20120130621222105', 'modified_date' => '2012-11-14 16:02:35', ), ), diff --git a/api/v3/examples/Contact/CustomFieldGet.php b/api/v3/examples/Contact/CustomFieldGet.php index d9ba8f04d9..5806b7cb4c 100644 --- a/api/v3/examples/Contact/CustomFieldGet.php +++ b/api/v3/examples/Contact/CustomFieldGet.php @@ -4,12 +4,12 @@ /*this demonstrates setting a custom field through the API */ function contact_get_example(){ -$params = array( +$params = array( 'first_name' => 'abc1', 'contact_type' => 'Individual', 'last_name' => 'xyz1', 'version' => 3, - 'custom_2' => 'custom string', + 'custom_3' => 'custom string', ); $result = civicrm_api( 'contact','get',$params ); @@ -22,16 +22,16 @@ $params = array( */ function contact_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '1', - 'civicrm_value_testgetwithcu_2_id' => '1', - 'custom_2' => 'custom string', + 'civicrm_value_testgetwithcu_3_id' => '1', + 'custom_3' => 'custom string', 'id' => '1', ), ), diff --git a/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php b/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php index faac8aca56..3a1e9694ba 100644 --- a/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php +++ b/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php @@ -4,8 +4,8 @@ /*this demonstrates setting a custom field through the API */ function contact_get_example(){ -$params = array( - 'return' => 'custom_3', +$params = array( + 'return' => 'custom_4', 'version' => 3, 'id' => 1, ); @@ -20,16 +20,16 @@ $params = array( */ function contact_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '1', - 'civicrm_value_testgetwithcu_3_id' => '1', - 'custom_3' => 'custom string', + 'civicrm_value_testgetwithcu_4_id' => '1', + 'custom_4' => 'custom string', 'id' => '1', ), ), diff --git a/api/v3/examples/Contact/FormatIsSuccess_Fail.php b/api/v3/examples/Contact/FormatIsSuccess_Fail.php index af4e1cc5c1..481580e94f 100644 --- a/api/v3/examples/Contact/FormatIsSuccess_Fail.php +++ b/api/v3/examples/Contact/FormatIsSuccess_Fail.php @@ -5,7 +5,7 @@ This param causes only the success or otherwise of the function to be returned as BOOLEAN */ function contact_create_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 500, 'format.is_success' => 1, diff --git a/api/v3/examples/Contact/FormatIsSuccess_True.php b/api/v3/examples/Contact/FormatIsSuccess_True.php index cc21e9b5e3..51ae3d5c10 100644 --- a/api/v3/examples/Contact/FormatIsSuccess_True.php +++ b/api/v3/examples/Contact/FormatIsSuccess_True.php @@ -5,7 +5,7 @@ This param causes only the success or otherwise of the function to be returned as BOOLEAN */ function contact_get_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 17, 'format.is_success' => 1, diff --git a/api/v3/examples/Contact/FormatOnlyID.php b/api/v3/examples/Contact/FormatOnlyID.php index 3ecac096d2..e777c6e940 100644 --- a/api/v3/examples/Contact/FormatOnlyID.php +++ b/api/v3/examples/Contact/FormatOnlyID.php @@ -6,7 +6,7 @@ /* it will be ignored if there is not exactly 1 result */ function contact_get_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 17, 'format.only_id' => 1, diff --git a/api/v3/examples/Contact/FormatSingleValue.php b/api/v3/examples/Contact/FormatSingleValue.php index ef464db477..252829cdde 100644 --- a/api/v3/examples/Contact/FormatSingleValue.php +++ b/api/v3/examples/Contact/FormatSingleValue.php @@ -6,7 +6,7 @@ /* it will be ignored if there is not exactly 1 result */ function contact_getvalue_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 17, 'return' => 'display_name', diff --git a/api/v3/examples/Contact/GetCountContact.php b/api/v3/examples/Contact/GetCountContact.php index 11aa244900..f022c50db1 100644 --- a/api/v3/examples/Contact/GetCountContact.php +++ b/api/v3/examples/Contact/GetCountContact.php @@ -5,7 +5,7 @@ /* This param causes the count of the only function to be returned as an integer */ function contact_get_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 17, ); diff --git a/api/v3/examples/Contact/GetSingleContact.php b/api/v3/examples/Contact/GetSingleContact.php index 9745346a50..9512633955 100644 --- a/api/v3/examples/Contact/GetSingleContact.php +++ b/api/v3/examples/Contact/GetSingleContact.php @@ -6,7 +6,7 @@ /* it will be ignored if there is not exactly 1 result */ function contact_getsingle_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 17, ); @@ -21,7 +21,7 @@ $params = array( */ function contact_getsingle_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'contact_id' => '17', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -50,12 +50,6 @@ function contact_getsingle_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'contact_is_deleted' => 0, - 'gender_id' => '', - 'gender' => '', - 'prefix_id' => '', - 'prefix' => '', - 'suffix_id' => '', - 'suffix' => '', 'current_employer' => '', 'address_id' => '', 'street_address' => '', diff --git a/api/v3/examples/Contact/GroupFilterUsingContactAPI.php b/api/v3/examples/Contact/GroupFilterUsingContactAPI.php index f9150049d2..6e11f1bfb6 100644 --- a/api/v3/examples/Contact/GroupFilterUsingContactAPI.php +++ b/api/v3/examples/Contact/GroupFilterUsingContactAPI.php @@ -4,8 +4,8 @@ Get all from group and display contacts */ function contact_get_example(){ -$params = array( - 'filter.group_id' => array( +$params = array( + 'filter.group_id' => array( '0' => 1, '1' => 26, ), @@ -23,13 +23,13 @@ $params = array( */ function contact_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -58,12 +58,6 @@ function contact_get_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'contact_is_deleted' => 0, - 'gender_id' => '', - 'gender' => '', - 'prefix_id' => '', - 'prefix' => '', - 'suffix_id' => '', - 'suffix' => '', 'current_employer' => '', 'address_id' => '', 'street_address' => '', diff --git a/api/v3/examples/ContactDelete.php b/api/v3/examples/ContactDelete.php index 4d11b703b9..01bc26c2ec 100644 --- a/api/v3/examples/ContactDelete.php +++ b/api/v3/examples/ContactDelete.php @@ -4,7 +4,7 @@ */ function contact_delete_example(){ -$params = array( +$params = array( 'id' => 17, 'version' => 3, ); @@ -19,7 +19,7 @@ $params = array( */ function contact_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/ContactGet.php b/api/v3/examples/ContactGet.php index ca373a7e26..b4dc0bbe9a 100644 --- a/api/v3/examples/ContactGet.php +++ b/api/v3/examples/ContactGet.php @@ -4,7 +4,7 @@ */ function contact_get_example(){ -$params = array( +$params = array( 'email' => 'man2@yahoo.com', 'version' => 3, ); @@ -19,13 +19,13 @@ $params = array( */ function contact_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'contact_id' => '1', 'contact_type' => 'Individual', 'contact_sub_type' => '', @@ -54,12 +54,6 @@ function contact_get_expectedresult(){ 'organization_name' => '', 'sic_code' => '', 'contact_is_deleted' => 0, - 'gender_id' => '', - 'gender' => '', - 'prefix_id' => '', - 'prefix' => '', - 'suffix_id' => '', - 'suffix' => '', 'current_employer' => '', 'address_id' => '', 'street_address' => '', diff --git a/api/v3/examples/ContributionPageCreate.php b/api/v3/examples/ContributionPageCreate.php index c830a644a4..4ac57e44a9 100644 --- a/api/v3/examples/ContributionPageCreate.php +++ b/api/v3/examples/ContributionPageCreate.php @@ -4,7 +4,7 @@ */ function contribution_page_create_example(){ -$params = array( +$params = array( 'version' => 3, 'title' => 'Test Contribution Page', 'financial_type_id' => 1, @@ -22,13 +22,13 @@ $params = array( */ function contribution_page_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'title' => 'Test Contribution Page', 'intro_text' => '', @@ -73,7 +73,7 @@ function contribution_page_create_expectedresult(){ 'start_date' => '', 'end_date' => '', 'created_id' => '', - 'created_date' => '', + 'created_date' => '20120130621222105', 'currency' => 'NZD', 'campaign_id' => '', 'is_share' => '', diff --git a/api/v3/examples/ContributionPageDelete.php b/api/v3/examples/ContributionPageDelete.php index 7493e6f8a9..49735c77b1 100644 --- a/api/v3/examples/ContributionPageDelete.php +++ b/api/v3/examples/ContributionPageDelete.php @@ -4,7 +4,7 @@ */ function contribution_page_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 4, ); @@ -19,7 +19,7 @@ $params = array( */ function contribution_page_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/ContributionPageGet.php b/api/v3/examples/ContributionPageGet.php index 3c86da9742..aba7ccea51 100644 --- a/api/v3/examples/ContributionPageGet.php +++ b/api/v3/examples/ContributionPageGet.php @@ -4,7 +4,7 @@ */ function contribution_page_get_example(){ -$params = array( +$params = array( 'version' => 3, 'amount' => '34567', 'currency' => 'NZD', @@ -21,13 +21,13 @@ $params = array( */ function contribution_page_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 3, - 'values' => array( - '3' => array( + 'values' => array( + '3' => array( 'id' => '3', 'title' => 'Test Contribution Page', 'financial_type_id' => '1', diff --git a/api/v3/examples/ContributionRecurCreate.php b/api/v3/examples/ContributionRecurCreate.php index 2817956689..137259bc85 100644 --- a/api/v3/examples/ContributionRecurCreate.php +++ b/api/v3/examples/ContributionRecurCreate.php @@ -4,7 +4,7 @@ */ function contribution_recur_create_example(){ -$params = array( +$params = array( 'version' => 3, 'contact_id' => 3, 'installments' => '12', @@ -26,13 +26,13 @@ $params = array( */ function contribution_recur_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '3', 'amount' => '500', @@ -41,7 +41,7 @@ function contribution_recur_create_expectedresult(){ 'frequency_interval' => '1', 'installments' => '12', 'start_date' => '20120101000000', - 'create_date' => '20130204222627', + 'create_date' => '20130622083552', 'modified_date' => '2012-11-14 16:02:35', 'cancel_date' => '', 'end_date' => '', diff --git a/api/v3/examples/ContributionRecurDelete.php b/api/v3/examples/ContributionRecurDelete.php index 5a16e3cbc8..70848d36d9 100644 --- a/api/v3/examples/ContributionRecurDelete.php +++ b/api/v3/examples/ContributionRecurDelete.php @@ -4,7 +4,7 @@ */ function contribution_recur_delete_example(){ -$params = array( +$params = array( 'version' => 3, 'id' => 1, ); @@ -19,7 +19,7 @@ $params = array( */ function contribution_recur_delete_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, diff --git a/api/v3/examples/ContributionRecurGet.php b/api/v3/examples/ContributionRecurGet.php index 6fe8daf083..0b773fcd33 100644 --- a/api/v3/examples/ContributionRecurGet.php +++ b/api/v3/examples/ContributionRecurGet.php @@ -4,7 +4,7 @@ */ function contribution_recur_get_example(){ -$params = array( +$params = array( 'version' => 3, 'amount' => '500', ); @@ -19,13 +19,13 @@ $params = array( */ function contribution_recur_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contact_id' => '4', 'amount' => '500.00', @@ -34,7 +34,7 @@ function contribution_recur_get_expectedresult(){ 'frequency_interval' => '1', 'installments' => '12', 'start_date' => '2012-01-01 00:00:00', - 'create_date' => '2013-02-04 22:26:27', + 'create_date' => '2013-06-22 08:35:53', 'contribution_status_id' => '1', 'is_test' => 0, 'cycle_day' => '1', diff --git a/api/v3/examples/ContributionSoftCreate.php b/api/v3/examples/ContributionSoftCreate.php index 6290b9a3c9..3f042d8df8 100644 --- a/api/v3/examples/ContributionSoftCreate.php +++ b/api/v3/examples/ContributionSoftCreate.php @@ -4,7 +4,7 @@ */ function contribution_soft_create_example(){ -$params = array( +$params = array( 'contribution_id' => 1, 'contact_id' => 2, 'amount' => '10', @@ -22,13 +22,13 @@ $params = array( */ function contribution_soft_create_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contribution_id' => '1', 'contact_id' => '2', diff --git a/api/v3/examples/ContributionSoftDelete.php b/api/v3/examples/ContributionSoftDelete.php index 959cf4d79d..1948ac716c 100644 --- a/api/v3/examples/ContributionSoftDelete.php +++ b/api/v3/examples/ContributionSoftDelete.php @@ -4,7 +4,7 @@ */ function contribution_soft_delete_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); diff --git a/api/v3/examples/ContributionSoftGet.php b/api/v3/examples/ContributionSoftGet.php index 8d4b4766ca..ec8044630d 100644 --- a/api/v3/examples/ContributionSoftGet.php +++ b/api/v3/examples/ContributionSoftGet.php @@ -4,7 +4,7 @@ */ function contribution_soft_get_example(){ -$params = array( +$params = array( 'id' => 1, 'version' => 3, ); @@ -19,13 +19,13 @@ $params = array( */ function contribution_soft_get_expectedresult(){ - $expectedResult = array( + $expectedResult = array( 'is_error' => 0, 'version' => 3, 'count' => 1, 'id' => 1, - 'values' => array( - '1' => array( + 'values' => array( + '1' => array( 'id' => '1', 'contribution_id' => '1', 'contact_id' => '2', -- 2.25.1