From eb8ad60f8240781e82b7f430aca44a8bf0318461 Mon Sep 17 00:00:00 2001 From: cardpay-ci Date: Thu, 17 Oct 2024 12:16:22 +0000 Subject: [PATCH] Published latest changes --- README.md | 4 +- composer.json | 2 +- lib/Configuration.php | 4 +- lib/model/AuthDataRequest.php | 8 +- lib/model/AuthenticationData.php | 90 +++++ lib/model/OneclickData.php | 45 +++ lib/model/PaymentRequestCustomer.php | 30 -- lib/model/PaymentResponsePaymentData.php | 30 ++ lib/model/PayoutRequestPayoutData.php | 30 ++ lib/model/PayoutResponse.php | 30 ++ lib/model/PlanRetry.php | 441 +++++++++++++++++++++ lib/model/PlanRetryResponse.php | 425 ++++++++++++++++++++ lib/model/PlanUpdateRequest.php | 2 - lib/model/PlanUpdateRequestPlanData.php | 30 -- lib/model/RecurringPlanRequestPlanData.php | 30 ++ lib/model/ResponsePlanData.php | 30 ++ 16 files changed, 1161 insertions(+), 70 deletions(-) create mode 100644 lib/model/PlanRetry.php create mode 100644 lib/model/PlanRetryResponse.php diff --git a/README.md b/README.md index 8d93a42..6c7eb34 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The Unlimit API uses HTTP verbs and a RESTful endpoint structure. Request and response payloads are formatted as JSON. - API version: 3.0 -- PHP SDK version: 3.82.1 +- PHP SDK version: 3.87.5 For more information, please visit [https://integration.cardpay.com](https://integration.cardpay.com) @@ -192,6 +192,8 @@ composer install - [Plan](lib/model/Plan.php) - [PlanDataList](lib/model/PlanDataList.php) - [PlanQuantity](lib/model/PlanQuantity.php) + - [PlanRetry](lib/model/PlanRetry.php) + - [PlanRetryResponse](lib/model/PlanRetryResponse.php) - [PlanSubscriptionDeclineLogic](lib/model/PlanSubscriptionDeclineLogic.php) - [PlanUpdateRequest](lib/model/PlanUpdateRequest.php) - [PlanUpdateRequestPlanData](lib/model/PlanUpdateRequestPlanData.php) diff --git a/composer.json b/composer.json index 77f36c2..e8c37a2 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "cardpay/php-sdk-v3", - "version": "3.82.1", + "version": "3.87.5", "description": "PHP SDK for Unlimit API v3", "keywords": [ "unlimit", diff --git a/lib/Configuration.php b/lib/Configuration.php index 1ede5e1..ae5d019 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -59,7 +59,7 @@ class Configuration * * @var string */ - protected $userAgent = 'CardpaySdk/3.82.1/PHP'; + protected $userAgent = 'CardpaySdk/3.87.5/PHP'; /** * Debug switch (default set to false) @@ -371,7 +371,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' OpenAPI Spec Version: 3.0' . PHP_EOL; - $report .= ' SDK Package Version: 3.82.1' . PHP_EOL; + $report .= ' SDK Package Version: 3.87.5' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/model/AuthDataRequest.php b/lib/model/AuthDataRequest.php index b824a49..cb8eafe 100644 --- a/lib/model/AuthDataRequest.php +++ b/lib/model/AuthDataRequest.php @@ -261,8 +261,8 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'dynamic_descriptor', the character length must be bigger than or equal to 0."; } - if (!is_null($this->container['installment_type']) && !preg_match("/IF|MF_HOLD/", $this->container['installment_type'])) { - $invalidProperties[] = "invalid value for 'installment_type', must be conform to the pattern /IF|MF_HOLD/."; + if (!is_null($this->container['installment_type']) && !preg_match("/^(IF|MF_HOLD)?$/", $this->container['installment_type'])) { + $invalidProperties[] = "invalid value for 'installment_type', must be conform to the pattern /^(IF|MF_HOLD)?$/."; } if (!is_null($this->container['note']) && (mb_strlen($this->container['note']) > 100)) { @@ -455,8 +455,8 @@ public function getInstallmentType() public function setInstallmentType($installment_type) { - if (!is_null($installment_type) && (!preg_match("/IF|MF_HOLD/", $installment_type))) { - throw new \InvalidArgumentException("invalid value for $installment_type when calling AuthDataRequest., must conform to the pattern /IF|MF_HOLD/."); + if (!is_null($installment_type) && (!preg_match("/^(IF|MF_HOLD)?$/", $installment_type))) { + throw new \InvalidArgumentException("invalid value for $installment_type when calling AuthDataRequest., must conform to the pattern /^(IF|MF_HOLD)?$/."); } $this->container['installment_type'] = $installment_type; diff --git a/lib/model/AuthenticationData.php b/lib/model/AuthenticationData.php index ca36899..c9d01ed 100644 --- a/lib/model/AuthenticationData.php +++ b/lib/model/AuthenticationData.php @@ -32,7 +32,10 @@ class AuthenticationData implements ModelInterface, ArrayAccess 'decline_code' => 'string', 'decline_reason' => 'string', 'id' => 'string', + 'installment_type' => 'string', + 'installments' => 'string', 'invalid_data' => 'string[]', + 'recurring_data' => '\Cardpay\model\RecurringResponseRecurringData', 'status' => 'string', 'three_d_secure' => '\Cardpay\model\ThreeDSecureResponse', 'trans_type' => 'string', @@ -51,7 +54,10 @@ class AuthenticationData implements ModelInterface, ArrayAccess 'decline_code' => null, 'decline_reason' => null, 'id' => null, + 'installment_type' => null, + 'installments' => null, 'invalid_data' => null, + 'recurring_data' => null, 'status' => null, 'three_d_secure' => null, 'trans_type' => null, @@ -91,7 +97,10 @@ public static function swaggerFormats() 'decline_code' => 'decline_code', 'decline_reason' => 'decline_reason', 'id' => 'id', + 'installment_type' => 'installment_type', + 'installments' => 'installments', 'invalid_data' => 'invalid_data', + 'recurring_data' => 'recurring_data', 'status' => 'status', 'three_d_secure' => 'three_d_secure', 'trans_type' => 'trans_type', @@ -110,7 +119,10 @@ public static function swaggerFormats() 'decline_code' => 'setDeclineCode', 'decline_reason' => 'setDeclineReason', 'id' => 'setId', + 'installment_type' => 'setInstallmentType', + 'installments' => 'setInstallments', 'invalid_data' => 'setInvalidData', + 'recurring_data' => 'setRecurringData', 'status' => 'setStatus', 'three_d_secure' => 'setThreeDSecure', 'trans_type' => 'setTransType', @@ -129,7 +141,10 @@ public static function swaggerFormats() 'decline_code' => 'getDeclineCode', 'decline_reason' => 'getDeclineReason', 'id' => 'getId', + 'installment_type' => 'getInstallmentType', + 'installments' => 'getInstallments', 'invalid_data' => 'getInvalidData', + 'recurring_data' => 'getRecurringData', 'status' => 'getStatus', 'three_d_secure' => 'getThreeDSecure', 'trans_type' => 'getTransType', @@ -260,7 +275,10 @@ public function __construct(array $data = null) $this->container['decline_code'] = isset($data['decline_code']) ? $data['decline_code'] : null; $this->container['decline_reason'] = isset($data['decline_reason']) ? $data['decline_reason'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['installment_type'] = isset($data['installment_type']) ? $data['installment_type'] : null; + $this->container['installments'] = isset($data['installments']) ? $data['installments'] : null; $this->container['invalid_data'] = isset($data['invalid_data']) ? $data['invalid_data'] : null; + $this->container['recurring_data'] = isset($data['recurring_data']) ? $data['recurring_data'] : null; $this->container['status'] = isset($data['status']) ? $data['status'] : null; $this->container['three_d_secure'] = isset($data['three_d_secure']) ? $data['three_d_secure'] : null; $this->container['trans_type'] = isset($data['trans_type']) ? $data['trans_type'] : null; @@ -451,6 +469,54 @@ public function setId($id) return $this; } + /** + * Gets installment_type + * + * @return string + */ + public function getInstallmentType() + { + return $this->container['installment_type']; + } + + /** + * Sets installment_type + * + * @param string $installment_type Installment type, 2 possible values: `IF` - issuer financed `MF_HOLD' - merchant financed. For installment subscription with hold rest amount. + * + * @return $this + */ + public function setInstallmentType($installment_type) + { + $this->container['installment_type'] = $installment_type; + + return $this; + } + + /** + * Gets installments + * + * @return string + */ + public function getInstallments() + { + return $this->container['installments']; + } + + /** + * Sets installments + * + * @param string $installments Number of total installment payments. + * + * @return $this + */ + public function setInstallments($installments) + { + $this->container['installments'] = $installments; + + return $this; + } + /** * Gets invalid_data * @@ -475,6 +541,30 @@ public function setInvalidData($invalid_data) return $this; } + /** + * Gets recurring_data + * + * @return \Cardpay\model\RecurringResponseRecurringData + */ + public function getRecurringData() + { + return $this->container['recurring_data']; + } + + /** + * Sets recurring_data + * + * @param \Cardpay\model\RecurringResponseRecurringData $recurring_data Recurring data + * + * @return $this + */ + public function setRecurringData($recurring_data) + { + $this->container['recurring_data'] = $recurring_data; + + return $this; + } + /** * Gets status * diff --git a/lib/model/OneclickData.php b/lib/model/OneclickData.php index 62b7af3..b0af2f5 100644 --- a/lib/model/OneclickData.php +++ b/lib/model/OneclickData.php @@ -30,6 +30,7 @@ class OneclickData implements ModelInterface, ArrayAccess 'contract_number' => 'string', 'currency' => 'string', 'dynamic_descriptor' => 'string', + 'encrypted_data' => 'string', 'filing' => '\Cardpay\model\RecurringRequestFiling', 'generate_token' => 'bool', 'hold_period' => 'int', @@ -53,6 +54,7 @@ class OneclickData implements ModelInterface, ArrayAccess 'contract_number' => null, 'currency' => null, 'dynamic_descriptor' => null, + 'encrypted_data' => null, 'filing' => null, 'generate_token' => null, 'hold_period' => 'int32', @@ -97,6 +99,7 @@ public static function swaggerFormats() 'contract_number' => 'contract_number', 'currency' => 'currency', 'dynamic_descriptor' => 'dynamic_descriptor', + 'encrypted_data' => 'encrypted_data', 'filing' => 'filing', 'generate_token' => 'generate_token', 'hold_period' => 'hold_period', @@ -120,6 +123,7 @@ public static function swaggerFormats() 'contract_number' => 'setContractNumber', 'currency' => 'setCurrency', 'dynamic_descriptor' => 'setDynamicDescriptor', + 'encrypted_data' => 'setEncryptedData', 'filing' => 'setFiling', 'generate_token' => 'setGenerateToken', 'hold_period' => 'setHoldPeriod', @@ -143,6 +147,7 @@ public static function swaggerFormats() 'contract_number' => 'getContractNumber', 'currency' => 'getCurrency', 'dynamic_descriptor' => 'getDynamicDescriptor', + 'encrypted_data' => 'getEncryptedData', 'filing' => 'getFiling', 'generate_token' => 'getGenerateToken', 'hold_period' => 'getHoldPeriod', @@ -256,6 +261,7 @@ public function __construct(array $data = null) $this->container['contract_number'] = isset($data['contract_number']) ? $data['contract_number'] : null; $this->container['currency'] = isset($data['currency']) ? $data['currency'] : null; $this->container['dynamic_descriptor'] = isset($data['dynamic_descriptor']) ? $data['dynamic_descriptor'] : null; + $this->container['encrypted_data'] = isset($data['encrypted_data']) ? $data['encrypted_data'] : null; $this->container['filing'] = isset($data['filing']) ? $data['filing'] : null; $this->container['generate_token'] = isset($data['generate_token']) ? $data['generate_token'] : null; $this->container['hold_period'] = isset($data['hold_period']) ? $data['hold_period'] : null; @@ -297,6 +303,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'dynamic_descriptor', the character length must be bigger than or equal to 0."; } + if (!is_null($this->container['encrypted_data']) && (mb_strlen($this->container['encrypted_data']) > 10000)) { + $invalidProperties[] = "invalid value for 'encrypted_data', the character length must be smaller than or equal to 10000."; + } + + if (!is_null($this->container['encrypted_data']) && (mb_strlen($this->container['encrypted_data']) < 0)) { + $invalidProperties[] = "invalid value for 'encrypted_data', the character length must be bigger than or equal to 0."; + } + if (!is_null($this->container['hold_period']) && ($this->container['hold_period'] > 168)) { $invalidProperties[] = "invalid value for 'hold_period', must be smaller than or equal to 168."; } @@ -469,6 +483,37 @@ public function setDynamicDescriptor($dynamic_descriptor) return $this; } + /** + * Gets encrypted_data + * + * @return string + */ + public function getEncryptedData() + { + return $this->container['encrypted_data']; + } + + /** + * Sets encrypted_data + * + * @param string $encrypted_data The encrypted recurring credentials encoded in base64. *(for APPLEPAY payment method only)* + * + * @return $this + */ + public function setEncryptedData($encrypted_data) + { + if (!is_null($encrypted_data) && (mb_strlen($encrypted_data) > 10000)) { + throw new \InvalidArgumentException('invalid length for $encrypted_data when calling OneclickData., must be smaller than or equal to 10000.'); + } + if (!is_null($encrypted_data) && (mb_strlen($encrypted_data) < 0)) { + throw new \InvalidArgumentException('invalid length for $encrypted_data when calling OneclickData., must be bigger than or equal to 0.'); + } + + $this->container['encrypted_data'] = $encrypted_data; + + return $this; + } + /** * Gets filing * diff --git a/lib/model/PaymentRequestCustomer.php b/lib/model/PaymentRequestCustomer.php index 20a5305..ad2581d 100644 --- a/lib/model/PaymentRequestCustomer.php +++ b/lib/model/PaymentRequestCustomer.php @@ -248,14 +248,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if (!is_null($this->container['first_name']) && (mb_strlen($this->container['first_name']) > 256)) { - $invalidProperties[] = "invalid value for 'first_name', the character length must be smaller than or equal to 256."; - } - - if (!is_null($this->container['first_name']) && (mb_strlen($this->container['first_name']) < 1)) { - $invalidProperties[] = "invalid value for 'first_name', the character length must be bigger than or equal to 1."; - } - if (!is_null($this->container['home_phone']) && (mb_strlen($this->container['home_phone']) > 18)) { $invalidProperties[] = "invalid value for 'home_phone', the character length must be smaller than or equal to 18."; } @@ -280,14 +272,6 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'identity', the character length must be bigger than or equal to 0."; } - if (!is_null($this->container['last_name']) && (mb_strlen($this->container['last_name']) > 256)) { - $invalidProperties[] = "invalid value for 'last_name', the character length must be smaller than or equal to 256."; - } - - if (!is_null($this->container['last_name']) && (mb_strlen($this->container['last_name']) < 1)) { - $invalidProperties[] = "invalid value for 'last_name', the character length must be bigger than or equal to 1."; - } - if (!is_null($this->container['user_agent']) && (mb_strlen($this->container['user_agent']) > 2048)) { $invalidProperties[] = "invalid value for 'user_agent', the character length must be smaller than or equal to 2048."; } @@ -458,13 +442,6 @@ public function getFirstName() */ public function setFirstName($first_name) { - if (!is_null($first_name) && (mb_strlen($first_name) > 256)) { - throw new \InvalidArgumentException('invalid length for $first_name when calling PaymentRequestCustomer., must be smaller than or equal to 256.'); - } - if (!is_null($first_name) && (mb_strlen($first_name) < 1)) { - throw new \InvalidArgumentException('invalid length for $first_name when calling PaymentRequestCustomer., must be bigger than or equal to 1.'); - } - $this->container['first_name'] = $first_name; return $this; @@ -606,13 +583,6 @@ public function getLastName() */ public function setLastName($last_name) { - if (!is_null($last_name) && (mb_strlen($last_name) > 256)) { - throw new \InvalidArgumentException('invalid length for $last_name when calling PaymentRequestCustomer., must be smaller than or equal to 256.'); - } - if (!is_null($last_name) && (mb_strlen($last_name) < 1)) { - throw new \InvalidArgumentException('invalid length for $last_name when calling PaymentRequestCustomer., must be bigger than or equal to 1.'); - } - $this->container['last_name'] = $last_name; return $this; diff --git a/lib/model/PaymentResponsePaymentData.php b/lib/model/PaymentResponsePaymentData.php index 00fb06a..4c494f3 100644 --- a/lib/model/PaymentResponsePaymentData.php +++ b/lib/model/PaymentResponsePaymentData.php @@ -40,6 +40,7 @@ class PaymentResponsePaymentData implements ModelInterface, ArrayAccess 'installments' => 'string', 'invalid_data' => 'string[]', 'is_3d' => 'bool', + 'network_trans_id' => 'string', 'note' => 'string', 'postauth_status' => 'string', 'rrn' => 'string', @@ -68,6 +69,7 @@ class PaymentResponsePaymentData implements ModelInterface, ArrayAccess 'installments' => null, 'invalid_data' => null, 'is_3d' => null, + 'network_trans_id' => null, 'note' => null, 'postauth_status' => null, 'rrn' => null, @@ -117,6 +119,7 @@ public static function swaggerFormats() 'installments' => 'installments', 'invalid_data' => 'invalid_data', 'is_3d' => 'is_3d', + 'network_trans_id' => 'network_trans_id', 'note' => 'note', 'postauth_status' => 'postauth_status', 'rrn' => 'rrn', @@ -145,6 +148,7 @@ public static function swaggerFormats() 'installments' => 'setInstallments', 'invalid_data' => 'setInvalidData', 'is_3d' => 'setIs3d', + 'network_trans_id' => 'setNetworkTransId', 'note' => 'setNote', 'postauth_status' => 'setPostauthStatus', 'rrn' => 'setRrn', @@ -173,6 +177,7 @@ public static function swaggerFormats() 'installments' => 'getInstallments', 'invalid_data' => 'getInvalidData', 'is_3d' => 'getIs3d', + 'network_trans_id' => 'getNetworkTransId', 'note' => 'getNote', 'postauth_status' => 'getPostauthStatus', 'rrn' => 'getRrn', @@ -313,6 +318,7 @@ public function __construct(array $data = null) $this->container['installments'] = isset($data['installments']) ? $data['installments'] : null; $this->container['invalid_data'] = isset($data['invalid_data']) ? $data['invalid_data'] : null; $this->container['is_3d'] = isset($data['is_3d']) ? $data['is_3d'] : null; + $this->container['network_trans_id'] = isset($data['network_trans_id']) ? $data['network_trans_id'] : null; $this->container['note'] = isset($data['note']) ? $data['note'] : null; $this->container['postauth_status'] = isset($data['postauth_status']) ? $data['postauth_status'] : null; $this->container['rrn'] = isset($data['rrn']) ? $data['rrn'] : null; @@ -697,6 +703,30 @@ public function setIs3d($is_3d) return $this; } + /** + * Gets network_trans_id + * + * @return string + */ + public function getNetworkTransId() + { + return $this->container['network_trans_id']; + } + + /** + * Sets network_trans_id + * + * @param string $network_trans_id Network Reference Number of original transaction + * + * @return $this + */ + public function setNetworkTransId($network_trans_id) + { + $this->container['network_trans_id'] = $network_trans_id; + + return $this; + } + /** * Gets note * diff --git a/lib/model/PayoutRequestPayoutData.php b/lib/model/PayoutRequestPayoutData.php index 2368e3d..f25c249 100644 --- a/lib/model/PayoutRequestPayoutData.php +++ b/lib/model/PayoutRequestPayoutData.php @@ -30,6 +30,7 @@ class PayoutRequestPayoutData implements ModelInterface, ArrayAccess 'currency' => 'string', 'dynamic_descriptor' => 'string', 'generate_token' => 'bool', + 'network_trans_id' => 'string', 'note' => 'string' ]; @@ -43,6 +44,7 @@ class PayoutRequestPayoutData implements ModelInterface, ArrayAccess 'currency' => null, 'dynamic_descriptor' => null, 'generate_token' => null, + 'network_trans_id' => null, 'note' => null ]; @@ -77,6 +79,7 @@ public static function swaggerFormats() 'currency' => 'currency', 'dynamic_descriptor' => 'dynamic_descriptor', 'generate_token' => 'generate_token', + 'network_trans_id' => 'network_trans_id', 'note' => 'note' ]; @@ -90,6 +93,7 @@ public static function swaggerFormats() 'currency' => 'setCurrency', 'dynamic_descriptor' => 'setDynamicDescriptor', 'generate_token' => 'setGenerateToken', + 'network_trans_id' => 'setNetworkTransId', 'note' => 'setNote' ]; @@ -103,6 +107,7 @@ public static function swaggerFormats() 'currency' => 'getCurrency', 'dynamic_descriptor' => 'getDynamicDescriptor', 'generate_token' => 'getGenerateToken', + 'network_trans_id' => 'getNetworkTransId', 'note' => 'getNote' ]; @@ -170,6 +175,7 @@ public function __construct(array $data = null) $this->container['currency'] = isset($data['currency']) ? $data['currency'] : null; $this->container['dynamic_descriptor'] = isset($data['dynamic_descriptor']) ? $data['dynamic_descriptor'] : null; $this->container['generate_token'] = isset($data['generate_token']) ? $data['generate_token'] : null; + $this->container['network_trans_id'] = isset($data['network_trans_id']) ? $data['network_trans_id'] : null; $this->container['note'] = isset($data['note']) ? $data['note'] : null; } @@ -322,6 +328,30 @@ public function setGenerateToken($generate_token) return $this; } + /** + * Gets network_trans_id + * + * @return string + */ + public function getNetworkTransId() + { + return $this->container['network_trans_id']; + } + + /** + * Sets network_trans_id + * + * @param string $network_trans_id Network Reference Number of original transaction + * + * @return $this + */ + public function setNetworkTransId($network_trans_id) + { + $this->container['network_trans_id'] = $network_trans_id; + + return $this; + } + /** * Gets note * diff --git a/lib/model/PayoutResponse.php b/lib/model/PayoutResponse.php index 20b3f8c..1624431 100644 --- a/lib/model/PayoutResponse.php +++ b/lib/model/PayoutResponse.php @@ -26,6 +26,7 @@ class PayoutResponse implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'additional_data' => 'map[string,string]', 'card_account' => '\Cardpay\model\PayoutResponseCardAccount', 'cryptocurrency_account' => '\Cardpay\model\PayoutResponseCryptocurrencyAccount', 'customer' => '\Cardpay\model\PayoutResponseCustomer', @@ -43,6 +44,7 @@ class PayoutResponse implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ + 'additional_data' => null, 'card_account' => null, 'cryptocurrency_account' => null, 'customer' => null, @@ -81,6 +83,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ + 'additional_data' => 'additional_data', 'card_account' => 'card_account', 'cryptocurrency_account' => 'cryptocurrency_account', 'customer' => 'customer', @@ -98,6 +101,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ + 'additional_data' => 'setAdditionalData', 'card_account' => 'setCardAccount', 'cryptocurrency_account' => 'setCryptocurrencyAccount', 'customer' => 'setCustomer', @@ -115,6 +119,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ + 'additional_data' => 'getAdditionalData', 'card_account' => 'getCardAccount', 'cryptocurrency_account' => 'getCryptocurrencyAccount', 'customer' => 'getCustomer', @@ -186,6 +191,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['additional_data'] = isset($data['additional_data']) ? $data['additional_data'] : null; $this->container['card_account'] = isset($data['card_account']) ? $data['card_account'] : null; $this->container['cryptocurrency_account'] = isset($data['cryptocurrency_account']) ? $data['cryptocurrency_account'] : null; $this->container['customer'] = isset($data['customer']) ? $data['customer'] : null; @@ -224,6 +230,30 @@ public function valid() } + /** + * Gets additional_data + * + * @return map[string,string] + */ + public function getAdditionalData() + { + return $this->container['additional_data']; + } + + /** + * Sets additional_data + * + * @param map[string,string] $additional_data Arbitrary-formatted key-value structure + * + * @return $this + */ + public function setAdditionalData($additional_data) + { + $this->container['additional_data'] = $additional_data; + + return $this; + } + /** * Gets card_account * diff --git a/lib/model/PlanRetry.php b/lib/model/PlanRetry.php new file mode 100644 index 0000000..a7552ce --- /dev/null +++ b/lib/model/PlanRetry.php @@ -0,0 +1,441 @@ + 'int', + 'frequency' => 'int[]', + 'mode' => 'string', + 'retry_advice' => 'bool', + 'schedule' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'duration' => 'int32', + 'frequency' => 'int32', + 'mode' => null, + 'retry_advice' => null, + 'schedule' => 'int32' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'duration' => 'duration', + 'frequency' => 'frequency', + 'mode' => 'mode', + 'retry_advice' => 'retry_advice', + 'schedule' => 'schedule' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'duration' => 'setDuration', + 'frequency' => 'setFrequency', + 'mode' => 'setMode', + 'retry_advice' => 'setRetryAdvice', + 'schedule' => 'setSchedule' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'duration' => 'getDuration', + 'frequency' => 'getFrequency', + 'mode' => 'getMode', + 'retry_advice' => 'getRetryAdvice', + 'schedule' => 'getSchedule' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const MODE__DEFAULT = 'DEFAULT'; + const MODE_INTERVAL = 'INTERVAL'; + const MODE_CALENDAR = 'CALENDAR'; + const MODE_NO_RETRY = 'NO_RETRY'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getModeAllowableValues() + { + return [ + self::MODE__DEFAULT, + self::MODE_INTERVAL, + self::MODE_CALENDAR, + self::MODE_NO_RETRY, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['duration'] = isset($data['duration']) ? $data['duration'] : null; + $this->container['frequency'] = isset($data['frequency']) ? $data['frequency'] : null; + $this->container['mode'] = isset($data['mode']) ? $data['mode'] : null; + $this->container['retry_advice'] = isset($data['retry_advice']) ? $data['retry_advice'] : null; + $this->container['schedule'] = isset($data['schedule']) ? $data['schedule'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['duration']) && ($this->container['duration'] > 30)) { + $invalidProperties[] = "invalid value for 'duration', must be smaller than or equal to 30."; + } + + if (!is_null($this->container['duration']) && ($this->container['duration'] < 1)) { + $invalidProperties[] = "invalid value for 'duration', must be bigger than or equal to 1."; + } + + $allowedValues = $this->getModeAllowableValues(); + if (!is_null($this->container['mode']) && !in_array($this->container['mode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'mode', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets duration + * + * @return int + */ + public function getDuration() + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param int $duration Value of period time which is retry available for subscription in days. Mandatory, if mode = DEFAULT Possible values: min: 1 max: 30 + * + * @return $this + */ + public function setDuration($duration) + { + + if (!is_null($duration) && ($duration > 30)) { + throw new \InvalidArgumentException('invalid value for $duration when calling PlanRetry., must be smaller than or equal to 30.'); + } + if (!is_null($duration) && ($duration < 1)) { + throw new \InvalidArgumentException('invalid value for $duration when calling PlanRetry., must be bigger than or equal to 1.'); + } + + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets frequency + * + * @return int[] + */ + public function getFrequency() + { + return $this->container['frequency']; + } + + /** + * Sets frequency + * + * @param int[] $frequency Intervals for initiating reties. Mandatory, if mode = INTERVAL Possible element values in array: min: 1 max: 30 + * + * @return $this + */ + public function setFrequency($frequency) + { + $this->container['frequency'] = $frequency; + + return $this; + } + + /** + * Gets mode + * + * @return string + */ + public function getMode() + { + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param string $mode Retry mode + * + * @return $this + */ + public function setMode($mode) + { + $allowedValues = $this->getModeAllowableValues(); + if (!is_null($mode) && !in_array($mode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'mode', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['mode'] = $mode; + + return $this; + } + + /** + * Gets retry_advice + * + * @return bool + */ + public function getRetryAdvice() + { + return $this->container['retry_advice']; + } + + /** + * Sets retry_advice + * + * @param bool $retry_advice If value is true MAC recommendation will be applied, if false retry will be strictly according setting for retry Can be only for mode = INTERVAL (if not specified then default value is 'true') + * + * @return $this + */ + public function setRetryAdvice($retry_advice) + { + $this->container['retry_advice'] = $retry_advice; + + return $this; + } + + /** + * Gets schedule + * + * @return int[] + */ + public function getSchedule() + { + return $this->container['schedule']; + } + + /** + * Sets schedule + * + * @param int[] $schedule Intervals for initiating reties. Mandatory, if mode = CALENDAR Possible element values in array: min: 1 max: 30 + * + * @return $this + */ + public function setSchedule($schedule) + { + $this->container['schedule'] = $schedule; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + diff --git a/lib/model/PlanRetryResponse.php b/lib/model/PlanRetryResponse.php new file mode 100644 index 0000000..6c0b264 --- /dev/null +++ b/lib/model/PlanRetryResponse.php @@ -0,0 +1,425 @@ + 'int', + 'frequency' => 'int[]', + 'mode' => 'string', + 'retry_advice' => 'bool', + 'schedule' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'duration' => 'int32', + 'frequency' => 'int32', + 'mode' => null, + 'retry_advice' => null, + 'schedule' => 'int32' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'duration' => 'duration', + 'frequency' => 'frequency', + 'mode' => 'mode', + 'retry_advice' => 'retry_advice', + 'schedule' => 'schedule' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'duration' => 'setDuration', + 'frequency' => 'setFrequency', + 'mode' => 'setMode', + 'retry_advice' => 'setRetryAdvice', + 'schedule' => 'setSchedule' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'duration' => 'getDuration', + 'frequency' => 'getFrequency', + 'mode' => 'getMode', + 'retry_advice' => 'getRetryAdvice', + 'schedule' => 'getSchedule' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const MODE__DEFAULT = 'DEFAULT'; + const MODE_INTERVAL = 'INTERVAL'; + const MODE_CALENDAR = 'CALENDAR'; + const MODE_NO_RETRY = 'NO_RETRY'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getModeAllowableValues() + { + return [ + self::MODE__DEFAULT, + self::MODE_INTERVAL, + self::MODE_CALENDAR, + self::MODE_NO_RETRY, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['duration'] = isset($data['duration']) ? $data['duration'] : null; + $this->container['frequency'] = isset($data['frequency']) ? $data['frequency'] : null; + $this->container['mode'] = isset($data['mode']) ? $data['mode'] : null; + $this->container['retry_advice'] = isset($data['retry_advice']) ? $data['retry_advice'] : null; + $this->container['schedule'] = isset($data['schedule']) ? $data['schedule'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getModeAllowableValues(); + if (!is_null($this->container['mode']) && !in_array($this->container['mode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'mode', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets duration + * + * @return int + */ + public function getDuration() + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param int $duration Value of period time which is retry available for subscription in days. Mandatory, if mode = DEFAULT Possible values: min: 1 max: 30 + * + * @return $this + */ + public function setDuration($duration) + { + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets frequency + * + * @return int[] + */ + public function getFrequency() + { + return $this->container['frequency']; + } + + /** + * Sets frequency + * + * @param int[] $frequency Intervals for initiating reties. Mandatory, if mode = INTERVAL Possible element values in array: min: 1 max: 30 + * + * @return $this + */ + public function setFrequency($frequency) + { + $this->container['frequency'] = $frequency; + + return $this; + } + + /** + * Gets mode + * + * @return string + */ + public function getMode() + { + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param string $mode Retry mode + * + * @return $this + */ + public function setMode($mode) + { + $allowedValues = $this->getModeAllowableValues(); + if (!is_null($mode) && !in_array($mode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'mode', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['mode'] = $mode; + + return $this; + } + + /** + * Gets retry_advice + * + * @return bool + */ + public function getRetryAdvice() + { + return $this->container['retry_advice']; + } + + /** + * Sets retry_advice + * + * @param bool $retry_advice If value is true MAC recommendation will be applied, if false retry will be strictly according setting for retry Can be only for mode = INTERVAL (if not specified then default value is 'true') + * + * @return $this + */ + public function setRetryAdvice($retry_advice) + { + $this->container['retry_advice'] = $retry_advice; + + return $this; + } + + /** + * Gets schedule + * + * @return int[] + */ + public function getSchedule() + { + return $this->container['schedule']; + } + + /** + * Sets schedule + * + * @param int[] $schedule Intervals for initiating reties. Mandatory, if mode = CALENDAR Possible element values in array: min: 1 max: 30 + * + * @return $this + */ + public function setSchedule($schedule) + { + $this->container['schedule'] = $schedule; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + diff --git a/lib/model/PlanUpdateRequest.php b/lib/model/PlanUpdateRequest.php index 852bea0..8a19704 100644 --- a/lib/model/PlanUpdateRequest.php +++ b/lib/model/PlanUpdateRequest.php @@ -139,7 +139,6 @@ public function getModelName() const OPERATION_CHANGE_STATUS = 'CHANGE_STATUS'; const OPERATION_RENAME = 'RENAME'; - const OPERATION_CHANGE_QUANTITY = 'CHANGE_QUANTITY'; @@ -153,7 +152,6 @@ public function getOperationAllowableValues() return [ self::OPERATION_CHANGE_STATUS, self::OPERATION_RENAME, - self::OPERATION_CHANGE_QUANTITY, ]; } diff --git a/lib/model/PlanUpdateRequestPlanData.php b/lib/model/PlanUpdateRequestPlanData.php index efd5e14..ca24870 100644 --- a/lib/model/PlanUpdateRequestPlanData.php +++ b/lib/model/PlanUpdateRequestPlanData.php @@ -27,7 +27,6 @@ class PlanUpdateRequestPlanData implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'name_to' => 'string', - 'quantity' => '\Cardpay\model\PlanQuantity[]', 'status_to' => 'string' ]; @@ -38,7 +37,6 @@ class PlanUpdateRequestPlanData implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'name_to' => null, - 'quantity' => null, 'status_to' => null ]; @@ -70,7 +68,6 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'name_to' => 'name_to', - 'quantity' => 'quantity', 'status_to' => 'status_to' ]; @@ -81,7 +78,6 @@ public static function swaggerFormats() */ protected static $setters = [ 'name_to' => 'setNameTo', - 'quantity' => 'setQuantity', 'status_to' => 'setStatusTo' ]; @@ -92,7 +88,6 @@ public static function swaggerFormats() */ protected static $getters = [ 'name_to' => 'getNameTo', - 'quantity' => 'getQuantity', 'status_to' => 'getStatusTo' ]; @@ -172,7 +167,6 @@ public function getStatusToAllowableValues() public function __construct(array $data = null) { $this->container['name_to'] = isset($data['name_to']) ? $data['name_to'] : null; - $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; $this->container['status_to'] = isset($data['status_to']) ? $data['status_to'] : null; } @@ -247,30 +241,6 @@ public function setNameTo($name_to) return $this; } - /** - * Gets quantity - * - * @return \Cardpay\model\PlanQuantity[] - */ - public function getQuantity() - { - return $this->container['quantity']; - } - - /** - * Sets quantity - * - * @param \Cardpay\model\PlanQuantity[] $quantity Array with units params - * - * @return $this - */ - public function setQuantity($quantity) - { - $this->container['quantity'] = $quantity; - - return $this; - } - /** * Gets status_to * diff --git a/lib/model/RecurringPlanRequestPlanData.php b/lib/model/RecurringPlanRequestPlanData.php index e406319..aab6694 100644 --- a/lib/model/RecurringPlanRequestPlanData.php +++ b/lib/model/RecurringPlanRequestPlanData.php @@ -34,6 +34,7 @@ class RecurringPlanRequestPlanData implements ModelInterface, ArrayAccess 'pricing_model' => 'string', 'quantity' => '\Cardpay\model\PlanQuantity[]', 'retries' => 'int', + 'retry' => '\Cardpay\model\PlanRetry', 'subscription_decline_logic' => '\Cardpay\model\PlanSubscriptionDeclineLogic' ]; @@ -51,6 +52,7 @@ class RecurringPlanRequestPlanData implements ModelInterface, ArrayAccess 'pricing_model' => null, 'quantity' => null, 'retries' => 'int32', + 'retry' => null, 'subscription_decline_logic' => null ]; @@ -89,6 +91,7 @@ public static function swaggerFormats() 'pricing_model' => 'pricing_model', 'quantity' => 'quantity', 'retries' => 'retries', + 'retry' => 'retry', 'subscription_decline_logic' => 'subscription_decline_logic' ]; @@ -106,6 +109,7 @@ public static function swaggerFormats() 'pricing_model' => 'setPricingModel', 'quantity' => 'setQuantity', 'retries' => 'setRetries', + 'retry' => 'setRetry', 'subscription_decline_logic' => 'setSubscriptionDeclineLogic' ]; @@ -123,6 +127,7 @@ public static function swaggerFormats() 'pricing_model' => 'getPricingModel', 'quantity' => 'getQuantity', 'retries' => 'getRetries', + 'retry' => 'getRetry', 'subscription_decline_logic' => 'getSubscriptionDeclineLogic' ]; @@ -215,6 +220,7 @@ public function __construct(array $data = null) $this->container['pricing_model'] = isset($data['pricing_model']) ? $data['pricing_model'] : null; $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; $this->container['retries'] = isset($data['retries']) ? $data['retries'] : null; + $this->container['retry'] = isset($data['retry']) ? $data['retry'] : null; $this->container['subscription_decline_logic'] = isset($data['subscription_decline_logic']) ? $data['subscription_decline_logic'] : null; } @@ -529,6 +535,30 @@ public function setRetries($retries) return $this; } + /** + * Gets retry + * + * @return \Cardpay\model\PlanRetry + */ + public function getRetry() + { + return $this->container['retry']; + } + + /** + * Sets retry + * + * @param \Cardpay\model\PlanRetry $retry Structure for establishing the logic of retries for subscription based on created plan + * + * @return $this + */ + public function setRetry($retry) + { + $this->container['retry'] = $retry; + + return $this; + } + /** * Gets subscription_decline_logic * diff --git a/lib/model/ResponsePlanData.php b/lib/model/ResponsePlanData.php index 948de9f..1693ad1 100644 --- a/lib/model/ResponsePlanData.php +++ b/lib/model/ResponsePlanData.php @@ -37,6 +37,7 @@ class ResponsePlanData implements ModelInterface, ArrayAccess 'retries' => 'int', 'pricing_model' => 'string', 'quantity' => '\Cardpay\model\PlanQuantity[]', + 'retry' => '\Cardpay\model\PlanRetryResponse', 'subscription_decline_logic' => '\Cardpay\model\PlanSubscriptionDeclineLogic' ]; @@ -57,6 +58,7 @@ class ResponsePlanData implements ModelInterface, ArrayAccess 'retries' => 'int32', 'pricing_model' => null, 'quantity' => null, + 'retry' => null, 'subscription_decline_logic' => null ]; @@ -98,6 +100,7 @@ public static function swaggerFormats() 'retries' => 'retries', 'pricing_model' => 'pricing_model', 'quantity' => 'quantity', + 'retry' => 'retry', 'subscription_decline_logic' => 'subscription_decline_logic' ]; @@ -118,6 +121,7 @@ public static function swaggerFormats() 'retries' => 'setRetries', 'pricing_model' => 'setPricingModel', 'quantity' => 'setQuantity', + 'retry' => 'setRetry', 'subscription_decline_logic' => 'setSubscriptionDeclineLogic' ]; @@ -138,6 +142,7 @@ public static function swaggerFormats() 'retries' => 'getRetries', 'pricing_model' => 'getPricingModel', 'quantity' => 'getQuantity', + 'retry' => 'getRetry', 'subscription_decline_logic' => 'getSubscriptionDeclineLogic' ]; @@ -248,6 +253,7 @@ public function __construct(array $data = null) $this->container['retries'] = isset($data['retries']) ? $data['retries'] : null; $this->container['pricing_model'] = isset($data['pricing_model']) ? $data['pricing_model'] : null; $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; + $this->container['retry'] = isset($data['retry']) ? $data['retry'] : null; $this->container['subscription_decline_logic'] = isset($data['subscription_decline_logic']) ? $data['subscription_decline_logic'] : null; } @@ -573,6 +579,30 @@ public function setQuantity($quantity) return $this; } + /** + * Gets retry + * + * @return \Cardpay\model\PlanRetryResponse + */ + public function getRetry() + { + return $this->container['retry']; + } + + /** + * Sets retry + * + * @param \Cardpay\model\PlanRetryResponse $retry Retry + * + * @return $this + */ + public function setRetry($retry) + { + $this->container['retry'] = $retry; + + return $this; + } + /** * Gets subscription_decline_logic *