From fdd0e1277f11a937ed7d18c513d6bfdc2715bc28 Mon Sep 17 00:00:00 2001 From: Ingenico ePayments Date: Thu, 26 Oct 2023 14:56:05 +0200 Subject: [PATCH] Release 6.44.0. --- .../Connect/Sdk/RequestHeaderGenerator.php | 2 +- .../Definitions/AccountFundingRecipient.php | 110 ++++++++++++++++++ .../Definitions/AdditionalOrderInput.php | 16 +++ .../Domain/Payment/Definitions/AfrName.php | 57 +++++++++ .../Domain/Payment/Definitions/Customer.php | 11 ++ .../Payment/Definitions/LoanRecipient.php | 6 + .../Definitions/OrderTypeInformation.php | 11 ++ .../Definitions/PersonalIdentification.php | 68 +++++++++++ .../Definitions/PersonalInformation.php | 15 +++ 9 files changed, 295 insertions(+), 1 deletion(-) create mode 100644 src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AccountFundingRecipient.php create mode 100644 src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AfrName.php create mode 100644 src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/PersonalIdentification.php diff --git a/lib/Ingenico/Connect/Sdk/RequestHeaderGenerator.php b/lib/Ingenico/Connect/Sdk/RequestHeaderGenerator.php index 569806fc..329949ed 100644 --- a/lib/Ingenico/Connect/Sdk/RequestHeaderGenerator.php +++ b/lib/Ingenico/Connect/Sdk/RequestHeaderGenerator.php @@ -11,7 +11,7 @@ */ class RequestHeaderGenerator { - const SDK_VERSION = '6.43.0'; + const SDK_VERSION = '6.44.0'; const AUTHORIZATION_ID = 'GCS'; diff --git a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AccountFundingRecipient.php b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AccountFundingRecipient.php new file mode 100644 index 00000000..3bea3e0a --- /dev/null +++ b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AccountFundingRecipient.php @@ -0,0 +1,110 @@ +accountNumber)) { + $object->accountNumber = $this->accountNumber; + } + if (!is_null($this->accountNumberType)) { + $object->accountNumberType = $this->accountNumberType; + } + if (!is_null($this->address)) { + $object->address = $this->address->toObject(); + } + if (!is_null($this->dateOfBirth)) { + $object->dateOfBirth = $this->dateOfBirth; + } + if (!is_null($this->name)) { + $object->name = $this->name->toObject(); + } + if (!is_null($this->partialPan)) { + $object->partialPan = $this->partialPan; + } + return $object; + } + + /** + * @param object $object + * @return $this + * @throws UnexpectedValueException + */ + public function fromObject($object) + { + parent::fromObject($object); + if (property_exists($object, 'accountNumber')) { + $this->accountNumber = $object->accountNumber; + } + if (property_exists($object, 'accountNumberType')) { + $this->accountNumberType = $object->accountNumberType; + } + if (property_exists($object, 'address')) { + if (!is_object($object->address)) { + throw new UnexpectedValueException('value \'' . print_r($object->address, true) . '\' is not an object'); + } + $value = new Address(); + $this->address = $value->fromObject($object->address); + } + if (property_exists($object, 'dateOfBirth')) { + $this->dateOfBirth = $object->dateOfBirth; + } + if (property_exists($object, 'name')) { + if (!is_object($object->name)) { + throw new UnexpectedValueException('value \'' . print_r($object->name, true) . '\' is not an object'); + } + $value = new AfrName(); + $this->name = $value->fromObject($object->name); + } + if (property_exists($object, 'partialPan')) { + $this->partialPan = $object->partialPan; + } + return $this; + } +} diff --git a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AdditionalOrderInput.php b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AdditionalOrderInput.php index 125b2284..f98c1e8d 100644 --- a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AdditionalOrderInput.php +++ b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AdditionalOrderInput.php @@ -15,6 +15,11 @@ */ class AdditionalOrderInput extends DataObject { + /** + * @var AccountFundingRecipient + */ + public $accountFundingRecipient = null; + /** * @var AirlineData */ @@ -33,6 +38,7 @@ class AdditionalOrderInput extends DataObject /** * @var LoanRecipient + * @deprecated No replacement */ public $loanRecipient = null; @@ -63,6 +69,9 @@ class AdditionalOrderInput extends DataObject public function toObject() { $object = parent::toObject(); + if (!is_null($this->accountFundingRecipient)) { + $object->accountFundingRecipient = $this->accountFundingRecipient->toObject(); + } if (!is_null($this->airlineData)) { $object->airlineData = $this->airlineData->toObject(); } @@ -98,6 +107,13 @@ public function toObject() public function fromObject($object) { parent::fromObject($object); + if (property_exists($object, 'accountFundingRecipient')) { + if (!is_object($object->accountFundingRecipient)) { + throw new UnexpectedValueException('value \'' . print_r($object->accountFundingRecipient, true) . '\' is not an object'); + } + $value = new AccountFundingRecipient(); + $this->accountFundingRecipient = $value->fromObject($object->accountFundingRecipient); + } if (property_exists($object, 'airlineData')) { if (!is_object($object->airlineData)) { throw new UnexpectedValueException('value \'' . print_r($object->airlineData, true) . '\' is not an object'); diff --git a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AfrName.php b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AfrName.php new file mode 100644 index 00000000..747f54c2 --- /dev/null +++ b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/AfrName.php @@ -0,0 +1,57 @@ +firstName)) { + $object->firstName = $this->firstName; + } + if (!is_null($this->surname)) { + $object->surname = $this->surname; + } + return $object; + } + + /** + * @param object $object + * @return $this + * @throws UnexpectedValueException + */ + public function fromObject($object) + { + parent::fromObject($object); + if (property_exists($object, 'firstName')) { + $this->firstName = $object->firstName; + } + if (property_exists($object, 'surname')) { + $this->surname = $object->surname; + } + return $this; + } +} diff --git a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/Customer.php b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/Customer.php index 2d6fc304..17594cdb 100644 --- a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/Customer.php +++ b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/Customer.php @@ -44,6 +44,11 @@ class Customer extends CustomerBase */ public $fiscalNumber = null; + /** + * @var bool + */ + public $isCompany = null; + /** * @var bool */ @@ -89,6 +94,9 @@ public function toObject() if (!is_null($this->fiscalNumber)) { $object->fiscalNumber = $this->fiscalNumber; } + if (!is_null($this->isCompany)) { + $object->isCompany = $this->isCompany; + } if (!is_null($this->isPreviousCustomer)) { $object->isPreviousCustomer = $this->isPreviousCustomer; } @@ -146,6 +154,9 @@ public function fromObject($object) if (property_exists($object, 'fiscalNumber')) { $this->fiscalNumber = $object->fiscalNumber; } + if (property_exists($object, 'isCompany')) { + $this->isCompany = $object->isCompany; + } if (property_exists($object, 'isPreviousCustomer')) { $this->isPreviousCustomer = $object->isPreviousCustomer; } diff --git a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/LoanRecipient.php b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/LoanRecipient.php index 7a2e3215..f3451afc 100644 --- a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/LoanRecipient.php +++ b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/LoanRecipient.php @@ -10,31 +10,37 @@ /** * @package Ingenico\Connect\Sdk\Domain\Payment\Definitions + * @deprecated No replacement */ class LoanRecipient extends DataObject { /** * @var string + * @deprecated No replacement */ public $accountNumber = null; /** * @var string + * @deprecated No replacement */ public $dateOfBirth = null; /** * @var string + * @deprecated No replacement */ public $partialPan = null; /** * @var string + * @deprecated No replacement */ public $surname = null; /** * @var string + * @deprecated No replacement */ public $zip = null; diff --git a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/OrderTypeInformation.php b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/OrderTypeInformation.php index 85ddd4cf..be204d6d 100644 --- a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/OrderTypeInformation.php +++ b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/OrderTypeInformation.php @@ -13,6 +13,11 @@ */ class OrderTypeInformation extends DataObject { + /** + * @var string + */ + public $fundingType = null; + /** * @var string */ @@ -34,6 +39,9 @@ class OrderTypeInformation extends DataObject public function toObject() { $object = parent::toObject(); + if (!is_null($this->fundingType)) { + $object->fundingType = $this->fundingType; + } if (!is_null($this->purchaseType)) { $object->purchaseType = $this->purchaseType; } @@ -54,6 +62,9 @@ public function toObject() public function fromObject($object) { parent::fromObject($object); + if (property_exists($object, 'fundingType')) { + $this->fundingType = $object->fundingType; + } if (property_exists($object, 'purchaseType')) { $this->purchaseType = $object->purchaseType; } diff --git a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/PersonalIdentification.php b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/PersonalIdentification.php new file mode 100644 index 00000000..bc62305e --- /dev/null +++ b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/PersonalIdentification.php @@ -0,0 +1,68 @@ +idIssuingCountryCode)) { + $object->idIssuingCountryCode = $this->idIssuingCountryCode; + } + if (!is_null($this->idType)) { + $object->idType = $this->idType; + } + if (!is_null($this->idValue)) { + $object->idValue = $this->idValue; + } + return $object; + } + + /** + * @param object $object + * @return $this + * @throws UnexpectedValueException + */ + public function fromObject($object) + { + parent::fromObject($object); + if (property_exists($object, 'idIssuingCountryCode')) { + $this->idIssuingCountryCode = $object->idIssuingCountryCode; + } + if (property_exists($object, 'idType')) { + $this->idType = $object->idType; + } + if (property_exists($object, 'idValue')) { + $this->idValue = $object->idValue; + } + return $this; + } +} diff --git a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/PersonalInformation.php b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/PersonalInformation.php index b0539757..babf72a6 100644 --- a/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/PersonalInformation.php +++ b/src/Ingenico/Connect/Sdk/Domain/Payment/Definitions/PersonalInformation.php @@ -23,6 +23,11 @@ class PersonalInformation extends DataObject */ public $gender = null; + /** + * @var PersonalIdentification + */ + public $identification = null; + /** * @var PersonalName */ @@ -40,6 +45,9 @@ public function toObject() if (!is_null($this->gender)) { $object->gender = $this->gender; } + if (!is_null($this->identification)) { + $object->identification = $this->identification->toObject(); + } if (!is_null($this->name)) { $object->name = $this->name->toObject(); } @@ -60,6 +68,13 @@ public function fromObject($object) if (property_exists($object, 'gender')) { $this->gender = $object->gender; } + if (property_exists($object, 'identification')) { + if (!is_object($object->identification)) { + throw new UnexpectedValueException('value \'' . print_r($object->identification, true) . '\' is not an object'); + } + $value = new PersonalIdentification(); + $this->identification = $value->fromObject($object->identification); + } if (property_exists($object, 'name')) { if (!is_object($object->name)) { throw new UnexpectedValueException('value \'' . print_r($object->name, true) . '\' is not an object');