Skip to content

Commit

Permalink
Published latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cardpay-ci committed Oct 17, 2024
1 parent cc6046d commit eb8ad60
Show file tree
Hide file tree
Showing 16 changed files with 1,161 additions and 70 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions lib/model/AuthDataRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down
90 changes: 90 additions & 0 deletions lib/model/AuthenticationData.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
*
Expand All @@ -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
*
Expand Down
45 changes: 45 additions & 0 deletions lib/model/OneclickData.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.";
}
Expand Down Expand Up @@ -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
*
Expand Down
30 changes: 0 additions & 30 deletions lib/model/PaymentRequestCustomer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
}
Expand All @@ -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.";
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit eb8ad60

Please sign in to comment.