Skip to content
Snippets Groups Projects
Commit 0382a83e authored by mattwire's avatar mattwire
Browse files

Share spec

parent 16b9a853
No related branches found
No related tags found
No related merge requests found
......@@ -17,14 +17,7 @@ use CRM_Stripe_ExtensionUtil as E;
* @param array $spec description of fields supported by this API call
*/
function _civicrm_api3_stripe_importallcustomers_spec(&$spec) {
$spec['ppid']['title'] = E::ts('Use the given Payment Processor ID');
$spec['ppid']['type'] = CRM_Utils_Type::T_INT;
$spec['ppid']['api.required'] = TRUE;
$spec['create_missing_contact']['title'] = E::ts('Create missing contact');
$spec['create_missing_contact']['description'] = E::ts('(default: true) If contact is not found in CiviCRM create it automatically');
$spec['create_missing_contact']['type'] = CRM_Utils_Type::T_BOOLEAN;
$spec['create_missing_contact']['api.required'] = FALSE;
$spec['create_missing_contact']['api.default'] = TRUE;
_civicrm_api3_stripe_importcustomer_shared_spec($spec);
}
/**
......
......@@ -17,12 +17,18 @@ use CRM_Stripe_ExtensionUtil as E;
* @param array $spec description of fields supported by this API call
*/
function _civicrm_api3_stripe_importcustomer_spec(&$spec) {
$spec['ppid']['title'] = E::ts('Use the given Payment Processor ID');
$spec['ppid']['type'] = CRM_Utils_Type::T_INT;
$spec['ppid']['api.required'] = TRUE;
$spec['customer']['title'] = E::ts('Import a specific customer');
$spec['customer']['type'] = CRM_Utils_Type::T_STRING;
$spec['customer']['api.required'] = TRUE;
_civicrm_api3_stripe_importcustomer_shared_spec($spec);
}
function _civicrm_api3_stripe_importcustomer_shared_spec(&$spec) {
$spec['ppid']['title'] = E::ts('Use the given Payment Processor ID');
$spec['ppid']['type'] = CRM_Utils_Type::T_INT;
$spec['ppid']['api.required'] = TRUE;
$spec['create_missing_contact']['title'] = E::ts('Create missing contact');
$spec['create_missing_contact']['description'] = E::ts('(default: true) If contact is not found in CiviCRM create it automatically');
$spec['create_missing_contact']['type'] = CRM_Utils_Type::T_BOOLEAN;
......
......@@ -17,23 +17,17 @@ use CRM_Stripe_ExtensionUtil as E;
* @param array $spec description of fields supported by this API call
*/
function _civicrm_api3_stripe_importcustomers_spec(&$spec) {
$spec['ppid']['title'] = E::ts('Use the given Payment Processor ID');
$spec['ppid']['type'] = CRM_Utils_Type::T_INT;
$spec['ppid']['api.required'] = TRUE;
$spec['limit']['title'] = E::ts('Limit number of Customers/Subscriptions to be imported');
$spec['limit']['type'] = CRM_Utils_Type::T_INT;
$spec['limit']['api.required'] = FALSE;
$spec['starting_after']['title'] = E::ts('Start importing customers after this one');
$spec['starting_after']['type'] = CRM_Utils_Type::T_STRING;
$spec['starting_after']['api.required'] = FALSE;
$spec['create_missing_contact']['title'] = E::ts('Create missing contact');
$spec['create_missing_contact']['description'] = E::ts('(default: true) If contact is not found in CiviCRM create it automatically');
$spec['create_missing_contact']['type'] = CRM_Utils_Type::T_BOOLEAN;
$spec['create_missing_contact']['api.required'] = FALSE;
$spec['create_missing_contact']['api.default'] = TRUE;
$spec['created']['type'] = CRM_Utils_Type::T_TIMESTAMP;
$spec['created']['title'] = E::ts('Import customers before/after this date');
$spec['created']['description'] = E::ts('Use the >,>=,<,<= operators to import customers before/after the specified date');
_civicrm_api3_stripe_importcustomer_shared_spec($spec);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment