From 5ab4f7d728ed58bd87271e6060d29d998bc8d929 Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Fri, 5 Jul 2019 14:21:07 +0200 Subject: [PATCH 1/2] [#3] Add missing parameter `user_country` --- api/v3/TwingleDonation/Submit.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/v3/TwingleDonation/Submit.php b/api/v3/TwingleDonation/Submit.php index 2a369b9..cc1d075 100644 --- a/api/v3/TwingleDonation/Submit.php +++ b/api/v3/TwingleDonation/Submit.php @@ -203,6 +203,13 @@ function _civicrm_api3_twingle_donation_Submit_spec(&$params) { 'api.required' => 0, 'description' => E::ts('The city of the contact.'), ); + $params['user_country'] = array( + 'name' => 'user_country', + 'title' => E::ts('Country'), + 'type' => CRM_Utils_Type::T_STRING, + 'api.required' => 0, + 'description' => E::ts('The country of the contact.'), + ); $params['user_telephone'] = array( 'name' => 'user_telephone', 'title' => E::ts('Telephone'), @@ -287,6 +294,7 @@ function civicrm_api3_twingle_donation_Submit($params) { 'user_street' => 'street_address', 'user_postal_code' => 'postal_code', 'user_city' => 'city', + 'user_country' => 'country', ) as $address_param => $address_component) { if (!empty($params[$address_param])) { $params[$address_component] = $params[$address_param]; From ad09cb7339473615869593f78c8275cc15b9f59d Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Fri, 5 Jul 2019 14:23:37 +0200 Subject: [PATCH 2/2] [#3] Update documentation with new `user_country` parameter --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 47d6cb6..2e3f346 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ The action accepts the following parameters: | `user_street` | String | The street address of the contact | | | | `user_postal_code` | String | The postal code of the contact | | | | `user_city` | String | The city of the contact | | | +| `user_country` | String | The country of the contact | [ISO 3166-1 Alpha-2 country codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) | | | `user_telephone` | String | The telephone number of the contact | | | | `user_company` | String | The company of the contact | | | | `user_extrafield` | String | Additional information of the contact | | |