From 7c9ef5a41559b731965534a2a7d41837d2350162 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Wed, 11 Oct 2023 14:53:28 +0000 Subject: [PATCH] [create-pull-request] automated change --- .../Model/BinLookup/DSPublicKeyDetail.php | 46 +- .../BillingAddress.php} | 231 +- src/Adyen/Model/Checkout/CardDetails.php | 6 - .../Model/Checkout/CheckoutPaymentMethod.php | 1456 ++--------- .../Checkout/CreateCheckoutSessionRequest.php | 12 +- .../CreateCheckoutSessionResponse.php | 12 +- src/Adyen/Model/Checkout/DeliveryAddress.php | 637 +++++ src/Adyen/Model/Checkout/DokuDetails.php | 4 + .../Model/Checkout/DonationPaymentRequest.php | 181 +- src/Adyen/Model/Checkout/PaymentRequest.php | 18 +- .../Checkout/PaymentRequestPaymentMethod.php | 2171 +++++++++++++++++ src/Adyen/Model/Checkout/SubMerchantInfo.php | 6 +- .../BankAccountV3AccountIdentification.php | 58 +- .../HKLocalAccountIdentification.php | 38 +- .../Model/TransferWebhooks/MerchantData.php | 34 + .../Model/TransferWebhooks/Modification.php | 677 +++++ .../NZLocalAccountIdentification.php | 76 +- .../Model/TransferWebhooks/TransferData.php | 50 +- .../Model/TransferWebhooks/TransferEvent.php | 150 +- .../{Transaction.php => TransactionData.php} | 6 +- .../Transfers/TransactionSearchResponse.php | 6 +- 21 files changed, 4335 insertions(+), 1540 deletions(-) rename src/Adyen/Model/{TransferWebhooks/TransferOperation.php => Checkout/BillingAddress.php} (57%) create mode 100644 src/Adyen/Model/Checkout/DeliveryAddress.php create mode 100644 src/Adyen/Model/Checkout/PaymentRequestPaymentMethod.php create mode 100644 src/Adyen/Model/TransferWebhooks/Modification.php rename src/Adyen/Model/Transfers/{Transaction.php => TransactionData.php} (99%) diff --git a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php index 2f4cdc052..52c30a926 100644 --- a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php +++ b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php @@ -47,7 +47,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => 'string', 'directoryServerId' => 'string', 'fromSDKVersion' => 'string', - 'publicKey' => 'string' + 'publicKey' => 'string', + 'rootCertificates' => 'string' ]; /** @@ -61,7 +62,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => null, 'directoryServerId' => null, 'fromSDKVersion' => null, - 'publicKey' => 'byte' + 'publicKey' => 'byte', + 'rootCertificates' => null ]; /** @@ -73,7 +75,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => false, 'directoryServerId' => false, 'fromSDKVersion' => false, - 'publicKey' => false + 'publicKey' => false, + 'rootCertificates' => false ]; /** @@ -165,7 +168,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'brand', 'directoryServerId' => 'directoryServerId', 'fromSDKVersion' => 'fromSDKVersion', - 'publicKey' => 'publicKey' + 'publicKey' => 'publicKey', + 'rootCertificates' => 'rootCertificates' ]; /** @@ -177,7 +181,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'setBrand', 'directoryServerId' => 'setDirectoryServerId', 'fromSDKVersion' => 'setFromSDKVersion', - 'publicKey' => 'setPublicKey' + 'publicKey' => 'setPublicKey', + 'rootCertificates' => 'setRootCertificates' ]; /** @@ -189,7 +194,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'getBrand', 'directoryServerId' => 'getDirectoryServerId', 'fromSDKVersion' => 'getFromSDKVersion', - 'publicKey' => 'getPublicKey' + 'publicKey' => 'getPublicKey', + 'rootCertificates' => 'getRootCertificates' ]; /** @@ -253,6 +259,7 @@ public function __construct(array $data = null) $this->setIfExists('directoryServerId', $data ?? [], null); $this->setIfExists('fromSDKVersion', $data ?? [], null); $this->setIfExists('publicKey', $data ?? [], null); + $this->setIfExists('rootCertificates', $data ?? [], null); } /** @@ -404,6 +411,33 @@ public function setPublicKey($publicKey) return $this; } + + /** + * Gets rootCertificates + * + * @return string|null + */ + public function getRootCertificates() + { + return $this->container['rootCertificates']; + } + + /** + * Sets rootCertificates + * + * @param string|null $rootCertificates Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates. + * + * @return self + */ + public function setRootCertificates($rootCertificates) + { + if (is_null($rootCertificates)) { + throw new \InvalidArgumentException('non-nullable rootCertificates cannot be null'); + } + $this->container['rootCertificates'] = $rootCertificates; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/TransferWebhooks/TransferOperation.php b/src/Adyen/Model/Checkout/BillingAddress.php similarity index 57% rename from src/Adyen/Model/TransferWebhooks/TransferOperation.php rename to src/Adyen/Model/Checkout/BillingAddress.php index e692922e6..9737f8435 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferOperation.php +++ b/src/Adyen/Model/Checkout/BillingAddress.php @@ -1,9 +1,9 @@ */ -class TransferOperation implements ModelInterface, ArrayAccess, \JsonSerializable +class BillingAddress implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class TransferOperation implements ModelInterface, ArrayAccess, \JsonSerializabl * * @var string */ - protected static $openAPIModelName = 'TransferOperation'; + protected static $openAPIModelName = 'BillingAddress'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,9 +44,12 @@ class TransferOperation implements ModelInterface, ArrayAccess, \JsonSerializabl * @var string[] */ protected static $openAPITypes = [ - 'direction' => 'string', - 'reference' => 'string', - 'type' => 'string' + 'city' => 'string', + 'country' => 'string', + 'houseNumberOrName' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string', + 'street' => 'string' ]; /** @@ -57,9 +60,12 @@ class TransferOperation implements ModelInterface, ArrayAccess, \JsonSerializabl * @psalm-var array */ protected static $openAPIFormats = [ - 'direction' => null, - 'reference' => null, - 'type' => null + 'city' => null, + 'country' => null, + 'houseNumberOrName' => null, + 'postalCode' => null, + 'stateOrProvince' => null, + 'street' => null ]; /** @@ -68,9 +74,12 @@ class TransferOperation implements ModelInterface, ArrayAccess, \JsonSerializabl * @var boolean[] */ protected static $openAPINullables = [ - 'direction' => false, - 'reference' => false, - 'type' => false + 'city' => false, + 'country' => false, + 'houseNumberOrName' => false, + 'postalCode' => false, + 'stateOrProvince' => false, + 'street' => false ]; /** @@ -159,9 +168,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'direction' => 'direction', - 'reference' => 'reference', - 'type' => 'type' + 'city' => 'city', + 'country' => 'country', + 'houseNumberOrName' => 'houseNumberOrName', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince', + 'street' => 'street' ]; /** @@ -170,9 +182,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'direction' => 'setDirection', - 'reference' => 'setReference', - 'type' => 'setType' + 'city' => 'setCity', + 'country' => 'setCountry', + 'houseNumberOrName' => 'setHouseNumberOrName', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince', + 'street' => 'setStreet' ]; /** @@ -181,9 +196,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'direction' => 'getDirection', - 'reference' => 'getReference', - 'type' => 'getType' + 'city' => 'getCity', + 'country' => 'getCountry', + 'houseNumberOrName' => 'getHouseNumberOrName', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince', + 'street' => 'getStreet' ]; /** @@ -243,9 +261,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('direction', $data ?? [], null); - $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('houseNumberOrName', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $data ?? [], null); + $this->setIfExists('street', $data ?? [], null); } /** @@ -275,6 +296,21 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + if ($this->container['houseNumberOrName'] === null) { + $invalidProperties[] = "'houseNumberOrName' can't be null"; + } + if ($this->container['postalCode'] === null) { + $invalidProperties[] = "'postalCode' can't be null"; + } + if ($this->container['street'] === null) { + $invalidProperties[] = "'street' can't be null"; + } return $invalidProperties; } @@ -291,82 +327,163 @@ public function valid() /** - * Gets direction + * Gets city * - * @return string|null + * @return string */ - public function getDirection() + public function getCity() { - return $this->container['direction']; + return $this->container['city']; } /** - * Sets direction + * Sets city * - * @param string|null $direction The direction of the money movement. + * @param string $city The name of the city. Maximum length: 3000 characters. * * @return self */ - public function setDirection($direction) + public function setCity($city) { - if (is_null($direction)) { - throw new \InvalidArgumentException('non-nullable direction cannot be null'); + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); } - $this->container['direction'] = $direction; + $this->container['city'] = $city; return $this; } /** - * Gets reference + * Gets country * - * @return string|null + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets houseNumberOrName + * + * @return string */ - public function getReference() + public function getHouseNumberOrName() { - return $this->container['reference']; + return $this->container['houseNumberOrName']; } /** - * Sets reference + * Sets houseNumberOrName * - * @param string|null $reference The reference returned when the amend was initiated. + * @param string $houseNumberOrName The number or name of the house. Maximum length: 3000 characters. * * @return self */ - public function setReference($reference) + public function setHouseNumberOrName($houseNumberOrName) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); + if (is_null($houseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); } - $this->container['reference'] = $reference; + $this->container['houseNumberOrName'] = $houseNumberOrName; return $this; } /** - * Gets type + * Gets postalCode + * + * @return string + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string $postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince * * @return string|null */ - public function getType() + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + return $this; + } + + /** + * Gets street + * + * @return string + */ + public function getStreet() { - return $this->container['type']; + return $this->container['street']; } /** - * Sets type + * Sets street * - * @param string|null $type The type of amend for the transfer. + * @param string $street The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. * * @return self */ - public function setType($type) + public function setStreet($street) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($street)) { + throw new \InvalidArgumentException('non-nullable street cannot be null'); } - $this->container['type'] = $type; + $this->container['street'] = $street; return $this; } diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 33974d5a1..7417472c2 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -324,11 +324,8 @@ public function getModelName() } public const FUNDING_SOURCE_DEBIT = 'debit'; - public const TYPE_BCMC = 'bcmc'; public const TYPE_SCHEME = 'scheme'; public const TYPE_NETWORK_TOKEN = 'networkToken'; - public const TYPE_GIFTCARD = 'giftcard'; - public const TYPE_ALLIANCEDATA = 'alliancedata'; public const TYPE_CARD = 'card'; /** @@ -350,11 +347,8 @@ public function getFundingSourceAllowableValues() public function getTypeAllowableValues() { return [ - self::TYPE_BCMC, self::TYPE_SCHEME, self::TYPE_NETWORK_TOKEN, - self::TYPE_GIFTCARD, - self::TYPE_ALLIANCEDATA, self::TYPE_CARD, ]; } diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 89166d867..1694bce5c 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -45,26 +45,12 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'bankAccountNumber' => 'string', - 'bankAccountType' => 'string', - 'bankLocationId' => 'string', + 'applePayToken' => 'string', 'checkoutAttemptId' => 'string', - 'encryptedBankAccountNumber' => 'string', - 'encryptedBankLocationId' => 'string', - 'ownerName' => 'string', + 'fundingSource' => 'string', 'recurringDetailReference' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string', - 'billingAddress' => 'string', - 'deliveryAddress' => 'string', - 'personalDetails' => 'string', - 'amazonPayToken' => 'string', - 'checkoutSessionId' => 'string', - 'applePayToken' => 'string', - 'fundingSource' => 'string', - 'holderName' => 'string', - 'issuer' => 'string', - 'blikCode' => 'string', 'brand' => 'string', 'cupsecureplusSmscode' => 'string', 'cvc' => 'string', @@ -74,29 +60,13 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', + 'holderName' => 'string', 'networkPaymentReference' => 'string', 'number' => 'string', 'shopperNotificationReference' => 'string', 'threeDS2SdkVersion' => 'string', - 'firstName' => 'string', - 'lastName' => 'string', - 'shopperEmail' => 'string', - 'telephoneNumber' => 'string', 'googlePayToken' => 'string', - 'subtype' => 'string', - 'masterpassTransactionId' => 'string', - 'orderID' => 'string', - 'payeePreferred' => 'string', - 'payerID' => 'string', - 'payerSelected' => 'string', - 'virtualPaymentAddress' => 'string', - 'samsungPayToken' => 'string', - 'iban' => 'string', - 'billingSequenceNumber' => 'string', - 'visaCheckoutCallId' => 'string', - 'appId' => 'string', - 'openid' => 'string', - 'clickAndCollect' => 'string' + 'issuer' => 'string' ]; /** @@ -107,26 +77,12 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'bankAccountNumber' => null, - 'bankAccountType' => null, - 'bankLocationId' => null, + 'applePayToken' => null, 'checkoutAttemptId' => null, - 'encryptedBankAccountNumber' => null, - 'encryptedBankLocationId' => null, - 'ownerName' => null, + 'fundingSource' => null, 'recurringDetailReference' => null, 'storedPaymentMethodId' => null, 'type' => null, - 'billingAddress' => null, - 'deliveryAddress' => null, - 'personalDetails' => null, - 'amazonPayToken' => null, - 'checkoutSessionId' => null, - 'applePayToken' => null, - 'fundingSource' => null, - 'holderName' => null, - 'issuer' => null, - 'blikCode' => null, 'brand' => null, 'cupsecureplusSmscode' => null, 'cvc' => null, @@ -136,29 +92,13 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, + 'holderName' => null, 'networkPaymentReference' => null, 'number' => null, 'shopperNotificationReference' => null, 'threeDS2SdkVersion' => null, - 'firstName' => null, - 'lastName' => null, - 'shopperEmail' => null, - 'telephoneNumber' => null, 'googlePayToken' => null, - 'subtype' => null, - 'masterpassTransactionId' => null, - 'orderID' => null, - 'payeePreferred' => null, - 'payerID' => null, - 'payerSelected' => null, - 'virtualPaymentAddress' => null, - 'samsungPayToken' => null, - 'iban' => null, - 'billingSequenceNumber' => null, - 'visaCheckoutCallId' => null, - 'appId' => null, - 'openid' => null, - 'clickAndCollect' => null + 'issuer' => null ]; /** @@ -167,26 +107,12 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static $openAPINullables = [ - 'bankAccountNumber' => false, - 'bankAccountType' => false, - 'bankLocationId' => false, + 'applePayToken' => false, 'checkoutAttemptId' => false, - 'encryptedBankAccountNumber' => false, - 'encryptedBankLocationId' => false, - 'ownerName' => false, + 'fundingSource' => false, 'recurringDetailReference' => false, 'storedPaymentMethodId' => false, 'type' => false, - 'billingAddress' => false, - 'deliveryAddress' => false, - 'personalDetails' => false, - 'amazonPayToken' => false, - 'checkoutSessionId' => false, - 'applePayToken' => false, - 'fundingSource' => false, - 'holderName' => false, - 'issuer' => false, - 'blikCode' => false, 'brand' => false, 'cupsecureplusSmscode' => false, 'cvc' => false, @@ -196,29 +122,13 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, + 'holderName' => false, 'networkPaymentReference' => false, 'number' => false, 'shopperNotificationReference' => false, 'threeDS2SdkVersion' => false, - 'firstName' => false, - 'lastName' => false, - 'shopperEmail' => false, - 'telephoneNumber' => false, 'googlePayToken' => false, - 'subtype' => false, - 'masterpassTransactionId' => false, - 'orderID' => false, - 'payeePreferred' => false, - 'payerID' => false, - 'payerSelected' => false, - 'virtualPaymentAddress' => false, - 'samsungPayToken' => false, - 'iban' => false, - 'billingSequenceNumber' => false, - 'visaCheckoutCallId' => false, - 'appId' => false, - 'openid' => false, - 'clickAndCollect' => false + 'issuer' => false ]; /** @@ -307,26 +217,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'bankAccountNumber' => 'bankAccountNumber', - 'bankAccountType' => 'bankAccountType', - 'bankLocationId' => 'bankLocationId', + 'applePayToken' => 'applePayToken', 'checkoutAttemptId' => 'checkoutAttemptId', - 'encryptedBankAccountNumber' => 'encryptedBankAccountNumber', - 'encryptedBankLocationId' => 'encryptedBankLocationId', - 'ownerName' => 'ownerName', + 'fundingSource' => 'fundingSource', 'recurringDetailReference' => 'recurringDetailReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type', - 'billingAddress' => 'billingAddress', - 'deliveryAddress' => 'deliveryAddress', - 'personalDetails' => 'personalDetails', - 'amazonPayToken' => 'amazonPayToken', - 'checkoutSessionId' => 'checkoutSessionId', - 'applePayToken' => 'applePayToken', - 'fundingSource' => 'fundingSource', - 'holderName' => 'holderName', - 'issuer' => 'issuer', - 'blikCode' => 'blikCode', 'brand' => 'brand', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', 'cvc' => 'cvc', @@ -336,29 +232,13 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', + 'holderName' => 'holderName', 'networkPaymentReference' => 'networkPaymentReference', 'number' => 'number', 'shopperNotificationReference' => 'shopperNotificationReference', 'threeDS2SdkVersion' => 'threeDS2SdkVersion', - 'firstName' => 'firstName', - 'lastName' => 'lastName', - 'shopperEmail' => 'shopperEmail', - 'telephoneNumber' => 'telephoneNumber', 'googlePayToken' => 'googlePayToken', - 'subtype' => 'subtype', - 'masterpassTransactionId' => 'masterpassTransactionId', - 'orderID' => 'orderID', - 'payeePreferred' => 'payeePreferred', - 'payerID' => 'payerID', - 'payerSelected' => 'payerSelected', - 'virtualPaymentAddress' => 'virtualPaymentAddress', - 'samsungPayToken' => 'samsungPayToken', - 'iban' => 'iban', - 'billingSequenceNumber' => 'billingSequenceNumber', - 'visaCheckoutCallId' => 'visaCheckoutCallId', - 'appId' => 'appId', - 'openid' => 'openid', - 'clickAndCollect' => 'clickAndCollect' + 'issuer' => 'issuer' ]; /** @@ -367,26 +247,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'bankAccountNumber' => 'setBankAccountNumber', - 'bankAccountType' => 'setBankAccountType', - 'bankLocationId' => 'setBankLocationId', + 'applePayToken' => 'setApplePayToken', 'checkoutAttemptId' => 'setCheckoutAttemptId', - 'encryptedBankAccountNumber' => 'setEncryptedBankAccountNumber', - 'encryptedBankLocationId' => 'setEncryptedBankLocationId', - 'ownerName' => 'setOwnerName', + 'fundingSource' => 'setFundingSource', 'recurringDetailReference' => 'setRecurringDetailReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType', - 'billingAddress' => 'setBillingAddress', - 'deliveryAddress' => 'setDeliveryAddress', - 'personalDetails' => 'setPersonalDetails', - 'amazonPayToken' => 'setAmazonPayToken', - 'checkoutSessionId' => 'setCheckoutSessionId', - 'applePayToken' => 'setApplePayToken', - 'fundingSource' => 'setFundingSource', - 'holderName' => 'setHolderName', - 'issuer' => 'setIssuer', - 'blikCode' => 'setBlikCode', 'brand' => 'setBrand', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', 'cvc' => 'setCvc', @@ -396,29 +262,13 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', + 'holderName' => 'setHolderName', 'networkPaymentReference' => 'setNetworkPaymentReference', 'number' => 'setNumber', 'shopperNotificationReference' => 'setShopperNotificationReference', 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', - 'firstName' => 'setFirstName', - 'lastName' => 'setLastName', - 'shopperEmail' => 'setShopperEmail', - 'telephoneNumber' => 'setTelephoneNumber', 'googlePayToken' => 'setGooglePayToken', - 'subtype' => 'setSubtype', - 'masterpassTransactionId' => 'setMasterpassTransactionId', - 'orderID' => 'setOrderID', - 'payeePreferred' => 'setPayeePreferred', - 'payerID' => 'setPayerID', - 'payerSelected' => 'setPayerSelected', - 'virtualPaymentAddress' => 'setVirtualPaymentAddress', - 'samsungPayToken' => 'setSamsungPayToken', - 'iban' => 'setIban', - 'billingSequenceNumber' => 'setBillingSequenceNumber', - 'visaCheckoutCallId' => 'setVisaCheckoutCallId', - 'appId' => 'setAppId', - 'openid' => 'setOpenid', - 'clickAndCollect' => 'setClickAndCollect' + 'issuer' => 'setIssuer' ]; /** @@ -427,26 +277,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'bankAccountNumber' => 'getBankAccountNumber', - 'bankAccountType' => 'getBankAccountType', - 'bankLocationId' => 'getBankLocationId', + 'applePayToken' => 'getApplePayToken', 'checkoutAttemptId' => 'getCheckoutAttemptId', - 'encryptedBankAccountNumber' => 'getEncryptedBankAccountNumber', - 'encryptedBankLocationId' => 'getEncryptedBankLocationId', - 'ownerName' => 'getOwnerName', + 'fundingSource' => 'getFundingSource', 'recurringDetailReference' => 'getRecurringDetailReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType', - 'billingAddress' => 'getBillingAddress', - 'deliveryAddress' => 'getDeliveryAddress', - 'personalDetails' => 'getPersonalDetails', - 'amazonPayToken' => 'getAmazonPayToken', - 'checkoutSessionId' => 'getCheckoutSessionId', - 'applePayToken' => 'getApplePayToken', - 'fundingSource' => 'getFundingSource', - 'holderName' => 'getHolderName', - 'issuer' => 'getIssuer', - 'blikCode' => 'getBlikCode', 'brand' => 'getBrand', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', 'cvc' => 'getCvc', @@ -456,29 +292,13 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', + 'holderName' => 'getHolderName', 'networkPaymentReference' => 'getNetworkPaymentReference', 'number' => 'getNumber', 'shopperNotificationReference' => 'getShopperNotificationReference', 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', - 'firstName' => 'getFirstName', - 'lastName' => 'getLastName', - 'shopperEmail' => 'getShopperEmail', - 'telephoneNumber' => 'getTelephoneNumber', 'googlePayToken' => 'getGooglePayToken', - 'subtype' => 'getSubtype', - 'masterpassTransactionId' => 'getMasterpassTransactionId', - 'orderID' => 'getOrderID', - 'payeePreferred' => 'getPayeePreferred', - 'payerID' => 'getPayerID', - 'payerSelected' => 'getPayerSelected', - 'virtualPaymentAddress' => 'getVirtualPaymentAddress', - 'samsungPayToken' => 'getSamsungPayToken', - 'iban' => 'getIban', - 'billingSequenceNumber' => 'getBillingSequenceNumber', - 'visaCheckoutCallId' => 'getVisaCheckoutCallId', - 'appId' => 'getAppId', - 'openid' => 'getOpenid', - 'clickAndCollect' => 'getClickAndCollect' + 'issuer' => 'getIssuer' ]; /** @@ -537,26 +357,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('bankAccountNumber', $data ?? [], null); - $this->setIfExists('bankAccountType', $data ?? [], null); - $this->setIfExists('bankLocationId', $data ?? [], null); + $this->setIfExists('applePayToken', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); - $this->setIfExists('encryptedBankAccountNumber', $data ?? [], null); - $this->setIfExists('encryptedBankLocationId', $data ?? [], null); - $this->setIfExists('ownerName', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'zip'); - $this->setIfExists('billingAddress', $data ?? [], null); - $this->setIfExists('deliveryAddress', $data ?? [], null); - $this->setIfExists('personalDetails', $data ?? [], null); - $this->setIfExists('amazonPayToken', $data ?? [], null); - $this->setIfExists('checkoutSessionId', $data ?? [], null); - $this->setIfExists('applePayToken', $data ?? [], null); - $this->setIfExists('fundingSource', $data ?? [], null); - $this->setIfExists('holderName', $data ?? [], null); - $this->setIfExists('issuer', $data ?? [], null); - $this->setIfExists('blikCode', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'paywithgoogle'); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); $this->setIfExists('cvc', $data ?? [], null); @@ -566,29 +372,13 @@ public function __construct(array $data = null) $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('networkPaymentReference', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); - $this->setIfExists('firstName', $data ?? [], null); - $this->setIfExists('lastName', $data ?? [], null); - $this->setIfExists('shopperEmail', $data ?? [], null); - $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('googlePayToken', $data ?? [], null); - $this->setIfExists('subtype', $data ?? [], null); - $this->setIfExists('masterpassTransactionId', $data ?? [], null); - $this->setIfExists('orderID', $data ?? [], null); - $this->setIfExists('payeePreferred', $data ?? [], null); - $this->setIfExists('payerID', $data ?? [], null); - $this->setIfExists('payerSelected', $data ?? [], null); - $this->setIfExists('virtualPaymentAddress', $data ?? [], null); - $this->setIfExists('samsungPayToken', $data ?? [], null); - $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('billingSequenceNumber', $data ?? [], null); - $this->setIfExists('visaCheckoutCallId', $data ?? [], null); - $this->setIfExists('appId', $data ?? [], null); - $this->setIfExists('openid', $data ?? [], null); - $this->setIfExists('clickAndCollect', $data ?? [], null); + $this->setIfExists('issuer', $data ?? [], null); } /** @@ -618,54 +408,16 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['bankAccountNumber'] === null) { - $invalidProperties[] = "'bankAccountNumber' can't be null"; - } - - if ($this->container['ownerName'] === null) { - $invalidProperties[] = "'ownerName' can't be null"; - } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ($this->container['applePayToken'] === null) { $invalidProperties[] = "'applePayToken' can't be null"; } - if ($this->container['issuer'] === null) { - $invalidProperties[] = "'issuer' can't be null"; - } - if ($this->container['firstName'] === null) { - $invalidProperties[] = "'firstName' can't be null"; - } - if ($this->container['lastName'] === null) { - $invalidProperties[] = "'lastName' can't be null"; - } - if ($this->container['shopperEmail'] === null) { - $invalidProperties[] = "'shopperEmail' can't be null"; - } - if ($this->container['telephoneNumber'] === null) { - $invalidProperties[] = "'telephoneNumber' can't be null"; - } + if ($this->container['googlePayToken'] === null) { $invalidProperties[] = "'googlePayToken' can't be null"; } - - if ($this->container['masterpassTransactionId'] === null) { - $invalidProperties[] = "'masterpassTransactionId' can't be null"; - } - if ($this->container['samsungPayToken'] === null) { - $invalidProperties[] = "'samsungPayToken' can't be null"; - } - if ($this->container['iban'] === null) { - $invalidProperties[] = "'iban' can't be null"; - } - if ($this->container['billingSequenceNumber'] === null) { - $invalidProperties[] = "'billingSequenceNumber' can't be null"; - } - if ($this->container['visaCheckoutCallId'] === null) { - $invalidProperties[] = "'visaCheckoutCallId' can't be null"; + if ($this->container['issuer'] === null) { + $invalidProperties[] = "'issuer' can't be null"; } return $invalidProperties; } @@ -683,82 +435,28 @@ public function valid() /** - * Gets bankAccountNumber + * Gets applePayToken * * @return string */ - public function getBankAccountNumber() - { - return $this->container['bankAccountNumber']; - } - - /** - * Sets bankAccountNumber - * - * @param string $bankAccountNumber The bank account number (without separators). - * - * @return self - */ - public function setBankAccountNumber($bankAccountNumber) - { - if (is_null($bankAccountNumber)) { - throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); - } - $this->container['bankAccountNumber'] = $bankAccountNumber; - - return $this; - } - - /** - * Gets bankAccountType - * - * @return string|null - */ - public function getBankAccountType() - { - return $this->container['bankAccountType']; - } - - /** - * Sets bankAccountType - * - * @param string|null $bankAccountType The bank account type (checking, savings...). - * - * @return self - */ - public function setBankAccountType($bankAccountType) - { - if (is_null($bankAccountType)) { - throw new \InvalidArgumentException('non-nullable bankAccountType cannot be null'); - } - $this->container['bankAccountType'] = $bankAccountType; - - return $this; - } - - /** - * Gets bankLocationId - * - * @return string|null - */ - public function getBankLocationId() + public function getApplePayToken() { - return $this->container['bankLocationId']; + return $this->container['applePayToken']; } /** - * Sets bankLocationId + * Sets applePayToken * - * @param string|null $bankLocationId The bank routing number of the account. + * @param string $applePayToken The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. * * @return self */ - public function setBankLocationId($bankLocationId) + public function setApplePayToken($applePayToken) { - if (is_null($bankLocationId)) { - throw new \InvalidArgumentException('non-nullable bankLocationId cannot be null'); + if (is_null($applePayToken)) { + throw new \InvalidArgumentException('non-nullable applePayToken cannot be null'); } - $this->container['bankLocationId'] = $bankLocationId; + $this->container['applePayToken'] = $applePayToken; return $this; } @@ -791,82 +489,28 @@ public function setCheckoutAttemptId($checkoutAttemptId) } /** - * Gets encryptedBankAccountNumber - * - * @return string|null - */ - public function getEncryptedBankAccountNumber() - { - return $this->container['encryptedBankAccountNumber']; - } - - /** - * Sets encryptedBankAccountNumber - * - * @param string|null $encryptedBankAccountNumber Encrypted bank account number. The bank account number (without separators). - * - * @return self - */ - public function setEncryptedBankAccountNumber($encryptedBankAccountNumber) - { - if (is_null($encryptedBankAccountNumber)) { - throw new \InvalidArgumentException('non-nullable encryptedBankAccountNumber cannot be null'); - } - $this->container['encryptedBankAccountNumber'] = $encryptedBankAccountNumber; - - return $this; - } - - /** - * Gets encryptedBankLocationId + * Gets fundingSource * * @return string|null */ - public function getEncryptedBankLocationId() - { - return $this->container['encryptedBankLocationId']; - } - - /** - * Sets encryptedBankLocationId - * - * @param string|null $encryptedBankLocationId Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases. - * - * @return self - */ - public function setEncryptedBankLocationId($encryptedBankLocationId) - { - if (is_null($encryptedBankLocationId)) { - throw new \InvalidArgumentException('non-nullable encryptedBankLocationId cannot be null'); - } - $this->container['encryptedBankLocationId'] = $encryptedBankLocationId; - - return $this; - } - - /** - * Gets ownerName - * - * @return string - */ - public function getOwnerName() + public function getFundingSource() { - return $this->container['ownerName']; + return $this->container['fundingSource']; } /** - * Sets ownerName + * Sets fundingSource * - * @param string $ownerName The name of the bank account holder. + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. * * @return self */ - public function setOwnerName($ownerName) + public function setFundingSource($fundingSource) { - if (is_null($ownerName)) { - throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); } - $this->container['ownerName'] = $ownerName; + $this->container['fundingSource'] = $fundingSource; return $this; } @@ -930,7 +574,7 @@ public function setStoredPaymentMethodId($storedPaymentMethodId) /** * Gets type * - * @return string + * @return string|null */ public function getType() { @@ -940,7 +584,7 @@ public function getType() /** * Sets type * - * @param string $type **zip** + * @param string|null $type **paywithgoogle** * * @return self */ @@ -955,1137 +599,435 @@ public function setType($type) } /** - * Gets billingAddress + * Gets brand * * @return string|null */ - public function getBillingAddress() + public function getBrand() { - return $this->container['billingAddress']; + return $this->container['brand']; } /** - * Sets billingAddress + * Sets brand * - * @param string|null $billingAddress The address where to send the invoice. + * @param string|null $brand Secondary brand of the card. For example: **plastix**, **hmclub**. * * @return self */ - public function setBillingAddress($billingAddress) + public function setBrand($brand) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); + if (is_null($brand)) { + throw new \InvalidArgumentException('non-nullable brand cannot be null'); } - $this->container['billingAddress'] = $billingAddress; + $this->container['brand'] = $brand; return $this; } /** - * Gets deliveryAddress + * Gets cupsecureplusSmscode * * @return string|null + * @deprecated */ - public function getDeliveryAddress() + public function getCupsecureplusSmscode() { - return $this->container['deliveryAddress']; + return $this->container['cupsecureplusSmscode']; } /** - * Sets deliveryAddress + * Sets cupsecureplusSmscode * - * @param string|null $deliveryAddress The address where the goods should be delivered. + * @param string|null $cupsecureplusSmscode cupsecureplusSmscode * * @return self + * @deprecated */ - public function setDeliveryAddress($deliveryAddress) + public function setCupsecureplusSmscode($cupsecureplusSmscode) { - if (is_null($deliveryAddress)) { - throw new \InvalidArgumentException('non-nullable deliveryAddress cannot be null'); + if (is_null($cupsecureplusSmscode)) { + throw new \InvalidArgumentException('non-nullable cupsecureplusSmscode cannot be null'); } - $this->container['deliveryAddress'] = $deliveryAddress; + $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; return $this; } /** - * Gets personalDetails + * Gets cvc * * @return string|null */ - public function getPersonalDetails() + public function getCvc() { - return $this->container['personalDetails']; + return $this->container['cvc']; } /** - * Sets personalDetails + * Sets cvc * - * @param string|null $personalDetails Shopper name, date of birth, phone number, and email address. + * @param string|null $cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). * * @return self */ - public function setPersonalDetails($personalDetails) + public function setCvc($cvc) { - if (is_null($personalDetails)) { - throw new \InvalidArgumentException('non-nullable personalDetails cannot be null'); + if (is_null($cvc)) { + throw new \InvalidArgumentException('non-nullable cvc cannot be null'); } - $this->container['personalDetails'] = $personalDetails; + $this->container['cvc'] = $cvc; return $this; } /** - * Gets amazonPayToken + * Gets encryptedCardNumber * * @return string|null */ - public function getAmazonPayToken() + public function getEncryptedCardNumber() { - return $this->container['amazonPayToken']; + return $this->container['encryptedCardNumber']; } /** - * Sets amazonPayToken + * Sets encryptedCardNumber * - * @param string|null $amazonPayToken This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically. + * @param string|null $encryptedCardNumber The encrypted card number. * * @return self */ - public function setAmazonPayToken($amazonPayToken) + public function setEncryptedCardNumber($encryptedCardNumber) { - if (is_null($amazonPayToken)) { - throw new \InvalidArgumentException('non-nullable amazonPayToken cannot be null'); + if (is_null($encryptedCardNumber)) { + throw new \InvalidArgumentException('non-nullable encryptedCardNumber cannot be null'); } - $this->container['amazonPayToken'] = $amazonPayToken; + $this->container['encryptedCardNumber'] = $encryptedCardNumber; return $this; } /** - * Gets checkoutSessionId + * Gets encryptedExpiryMonth * * @return string|null */ - public function getCheckoutSessionId() + public function getEncryptedExpiryMonth() { - return $this->container['checkoutSessionId']; + return $this->container['encryptedExpiryMonth']; } /** - * Sets checkoutSessionId + * Sets encryptedExpiryMonth * - * @param string|null $checkoutSessionId The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken. + * @param string|null $encryptedExpiryMonth The encrypted card expiry month. * * @return self */ - public function setCheckoutSessionId($checkoutSessionId) + public function setEncryptedExpiryMonth($encryptedExpiryMonth) { - if (is_null($checkoutSessionId)) { - throw new \InvalidArgumentException('non-nullable checkoutSessionId cannot be null'); + if (is_null($encryptedExpiryMonth)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryMonth cannot be null'); } - $this->container['checkoutSessionId'] = $checkoutSessionId; + $this->container['encryptedExpiryMonth'] = $encryptedExpiryMonth; return $this; } /** - * Gets applePayToken + * Gets encryptedExpiryYear * - * @return string + * @return string|null */ - public function getApplePayToken() + public function getEncryptedExpiryYear() { - return $this->container['applePayToken']; + return $this->container['encryptedExpiryYear']; } /** - * Sets applePayToken + * Sets encryptedExpiryYear * - * @param string $applePayToken The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. + * @param string|null $encryptedExpiryYear The encrypted card expiry year. * * @return self */ - public function setApplePayToken($applePayToken) + public function setEncryptedExpiryYear($encryptedExpiryYear) { - if (is_null($applePayToken)) { - throw new \InvalidArgumentException('non-nullable applePayToken cannot be null'); + if (is_null($encryptedExpiryYear)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryYear cannot be null'); } - $this->container['applePayToken'] = $applePayToken; + $this->container['encryptedExpiryYear'] = $encryptedExpiryYear; return $this; } /** - * Gets fundingSource + * Gets encryptedSecurityCode * * @return string|null */ - public function getFundingSource() + public function getEncryptedSecurityCode() { - return $this->container['fundingSource']; + return $this->container['encryptedSecurityCode']; } /** - * Sets fundingSource + * Sets encryptedSecurityCode * - * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * @param string|null $encryptedSecurityCode The encrypted card verification code. * * @return self */ - public function setFundingSource($fundingSource) + public function setEncryptedSecurityCode($encryptedSecurityCode) { - if (is_null($fundingSource)) { - throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + if (is_null($encryptedSecurityCode)) { + throw new \InvalidArgumentException('non-nullable encryptedSecurityCode cannot be null'); } - $this->container['fundingSource'] = $fundingSource; + $this->container['encryptedSecurityCode'] = $encryptedSecurityCode; return $this; } /** - * Gets holderName + * Gets expiryMonth * * @return string|null */ - public function getHolderName() + public function getExpiryMonth() { - return $this->container['holderName']; + return $this->container['expiryMonth']; } /** - * Sets holderName + * Sets expiryMonth * - * @param string|null $holderName The name of the card holder. + * @param string|null $expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). * * @return self */ - public function setHolderName($holderName) + public function setExpiryMonth($expiryMonth) { - if (is_null($holderName)) { - throw new \InvalidArgumentException('non-nullable holderName cannot be null'); - } - $this->container['holderName'] = $holderName; - - return $this; - } - - /** - * Gets issuer - * - * @return string - */ - public function getIssuer() - { - return $this->container['issuer']; - } - - /** - * Sets issuer - * - * @param string $issuer The shopper's bank. Specify this with the issuer value that corresponds to this bank. - * - * @return self - */ - public function setIssuer($issuer) - { - if (is_null($issuer)) { - throw new \InvalidArgumentException('non-nullable issuer cannot be null'); - } - $this->container['issuer'] = $issuer; - - return $this; - } - - /** - * Gets blikCode - * - * @return string|null - */ - public function getBlikCode() - { - return $this->container['blikCode']; - } - - /** - * Sets blikCode - * - * @param string|null $blikCode BLIK code consisting of 6 digits. - * - * @return self - */ - public function setBlikCode($blikCode) - { - if (is_null($blikCode)) { - throw new \InvalidArgumentException('non-nullable blikCode cannot be null'); - } - $this->container['blikCode'] = $blikCode; - - return $this; - } - - /** - * Gets brand - * - * @return string|null - */ - public function getBrand() - { - return $this->container['brand']; - } - - /** - * Sets brand - * - * @param string|null $brand Secondary brand of the card. For example: **plastix**, **hmclub**. - * - * @return self - */ - public function setBrand($brand) - { - if (is_null($brand)) { - throw new \InvalidArgumentException('non-nullable brand cannot be null'); - } - $this->container['brand'] = $brand; - - return $this; - } - - /** - * Gets cupsecureplusSmscode - * - * @return string|null - * @deprecated - */ - public function getCupsecureplusSmscode() - { - return $this->container['cupsecureplusSmscode']; - } - - /** - * Sets cupsecureplusSmscode - * - * @param string|null $cupsecureplusSmscode cupsecureplusSmscode - * - * @return self - * @deprecated - */ - public function setCupsecureplusSmscode($cupsecureplusSmscode) - { - if (is_null($cupsecureplusSmscode)) { - throw new \InvalidArgumentException('non-nullable cupsecureplusSmscode cannot be null'); - } - $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; - - return $this; - } - - /** - * Gets cvc - * - * @return string|null - */ - public function getCvc() - { - return $this->container['cvc']; - } - - /** - * Sets cvc - * - * @param string|null $cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - * - * @return self - */ - public function setCvc($cvc) - { - if (is_null($cvc)) { - throw new \InvalidArgumentException('non-nullable cvc cannot be null'); - } - $this->container['cvc'] = $cvc; - - return $this; - } - - /** - * Gets encryptedCardNumber - * - * @return string|null - */ - public function getEncryptedCardNumber() - { - return $this->container['encryptedCardNumber']; - } - - /** - * Sets encryptedCardNumber - * - * @param string|null $encryptedCardNumber The encrypted card number. - * - * @return self - */ - public function setEncryptedCardNumber($encryptedCardNumber) - { - if (is_null($encryptedCardNumber)) { - throw new \InvalidArgumentException('non-nullable encryptedCardNumber cannot be null'); - } - $this->container['encryptedCardNumber'] = $encryptedCardNumber; - - return $this; - } - - /** - * Gets encryptedExpiryMonth - * - * @return string|null - */ - public function getEncryptedExpiryMonth() - { - return $this->container['encryptedExpiryMonth']; - } - - /** - * Sets encryptedExpiryMonth - * - * @param string|null $encryptedExpiryMonth The encrypted card expiry month. - * - * @return self - */ - public function setEncryptedExpiryMonth($encryptedExpiryMonth) - { - if (is_null($encryptedExpiryMonth)) { - throw new \InvalidArgumentException('non-nullable encryptedExpiryMonth cannot be null'); - } - $this->container['encryptedExpiryMonth'] = $encryptedExpiryMonth; - - return $this; - } - - /** - * Gets encryptedExpiryYear - * - * @return string|null - */ - public function getEncryptedExpiryYear() - { - return $this->container['encryptedExpiryYear']; - } - - /** - * Sets encryptedExpiryYear - * - * @param string|null $encryptedExpiryYear The encrypted card expiry year. - * - * @return self - */ - public function setEncryptedExpiryYear($encryptedExpiryYear) - { - if (is_null($encryptedExpiryYear)) { - throw new \InvalidArgumentException('non-nullable encryptedExpiryYear cannot be null'); - } - $this->container['encryptedExpiryYear'] = $encryptedExpiryYear; - - return $this; - } - - /** - * Gets encryptedSecurityCode - * - * @return string|null - */ - public function getEncryptedSecurityCode() - { - return $this->container['encryptedSecurityCode']; - } - - /** - * Sets encryptedSecurityCode - * - * @param string|null $encryptedSecurityCode The encrypted card verification code. - * - * @return self - */ - public function setEncryptedSecurityCode($encryptedSecurityCode) - { - if (is_null($encryptedSecurityCode)) { - throw new \InvalidArgumentException('non-nullable encryptedSecurityCode cannot be null'); - } - $this->container['encryptedSecurityCode'] = $encryptedSecurityCode; - - return $this; - } - - /** - * Gets expiryMonth - * - * @return string|null - */ - public function getExpiryMonth() - { - return $this->container['expiryMonth']; - } - - /** - * Sets expiryMonth - * - * @param string|null $expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - * - * @return self - */ - public function setExpiryMonth($expiryMonth) - { - if (is_null($expiryMonth)) { - throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); - } - $this->container['expiryMonth'] = $expiryMonth; - - return $this; - } - - /** - * Gets expiryYear - * - * @return string|null - */ - public function getExpiryYear() - { - return $this->container['expiryYear']; - } - - /** - * Sets expiryYear - * - * @param string|null $expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - * - * @return self - */ - public function setExpiryYear($expiryYear) - { - if (is_null($expiryYear)) { - throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); - } - $this->container['expiryYear'] = $expiryYear; - - return $this; - } - - /** - * Gets networkPaymentReference - * - * @return string|null - */ - public function getNetworkPaymentReference() - { - return $this->container['networkPaymentReference']; - } - - /** - * Sets networkPaymentReference - * - * @param string|null $networkPaymentReference The network token reference. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. - * - * @return self - */ - public function setNetworkPaymentReference($networkPaymentReference) - { - if (is_null($networkPaymentReference)) { - throw new \InvalidArgumentException('non-nullable networkPaymentReference cannot be null'); - } - $this->container['networkPaymentReference'] = $networkPaymentReference; - - return $this; - } - - /** - * Gets number - * - * @return string|null - */ - public function getNumber() - { - return $this->container['number']; - } - - /** - * Sets number - * - * @param string|null $number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - * - * @return self - */ - public function setNumber($number) - { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } - $this->container['number'] = $number; - - return $this; - } - - /** - * Gets shopperNotificationReference - * - * @return string|null - */ - public function getShopperNotificationReference() - { - return $this->container['shopperNotificationReference']; - } - - /** - * Sets shopperNotificationReference - * - * @param string|null $shopperNotificationReference The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. - * - * @return self - */ - public function setShopperNotificationReference($shopperNotificationReference) - { - if (is_null($shopperNotificationReference)) { - throw new \InvalidArgumentException('non-nullable shopperNotificationReference cannot be null'); - } - $this->container['shopperNotificationReference'] = $shopperNotificationReference; - - return $this; - } - - /** - * Gets threeDS2SdkVersion - * - * @return string|null - */ - public function getThreeDS2SdkVersion() - { - return $this->container['threeDS2SdkVersion']; - } - - /** - * Sets threeDS2SdkVersion - * - * @param string|null $threeDS2SdkVersion Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - * - * @return self - */ - public function setThreeDS2SdkVersion($threeDS2SdkVersion) - { - if (is_null($threeDS2SdkVersion)) { - throw new \InvalidArgumentException('non-nullable threeDS2SdkVersion cannot be null'); - } - $this->container['threeDS2SdkVersion'] = $threeDS2SdkVersion; - - return $this; - } - - /** - * Gets firstName - * - * @return string - */ - public function getFirstName() - { - return $this->container['firstName']; - } - - /** - * Sets firstName - * - * @param string $firstName The shopper's first name. - * - * @return self - */ - public function setFirstName($firstName) - { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } - $this->container['firstName'] = $firstName; - - return $this; - } - - /** - * Gets lastName - * - * @return string - */ - public function getLastName() - { - return $this->container['lastName']; - } - - /** - * Sets lastName - * - * @param string $lastName The shopper's last name. - * - * @return self - */ - public function setLastName($lastName) - { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } - $this->container['lastName'] = $lastName; - - return $this; - } - - /** - * Gets shopperEmail - * - * @return string - */ - public function getShopperEmail() - { - return $this->container['shopperEmail']; - } - - /** - * Sets shopperEmail - * - * @param string $shopperEmail - * - * @return self - */ - public function setShopperEmail($shopperEmail) - { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } - $this->container['shopperEmail'] = $shopperEmail; - - return $this; - } - - /** - * Gets telephoneNumber - * - * @return string - */ - public function getTelephoneNumber() - { - return $this->container['telephoneNumber']; - } - - /** - * Sets telephoneNumber - * - * @param string $telephoneNumber - * - * @return self - */ - public function setTelephoneNumber($telephoneNumber) - { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } - $this->container['telephoneNumber'] = $telephoneNumber; - - return $this; - } - - /** - * Gets googlePayToken - * - * @return string - */ - public function getGooglePayToken() - { - return $this->container['googlePayToken']; - } - - /** - * Sets googlePayToken - * - * @param string $googlePayToken The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. - * - * @return self - */ - public function setGooglePayToken($googlePayToken) - { - if (is_null($googlePayToken)) { - throw new \InvalidArgumentException('non-nullable googlePayToken cannot be null'); + if (is_null($expiryMonth)) { + throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); } - $this->container['googlePayToken'] = $googlePayToken; + $this->container['expiryMonth'] = $expiryMonth; return $this; } /** - * Gets subtype + * Gets expiryYear * * @return string|null */ - public function getSubtype() - { - return $this->container['subtype']; - } - - /** - * Sets subtype - * - * @param string|null $subtype The type of flow to initiate. - * - * @return self - */ - public function setSubtype($subtype) - { - if (is_null($subtype)) { - throw new \InvalidArgumentException('non-nullable subtype cannot be null'); - } - $this->container['subtype'] = $subtype; - - return $this; - } - - /** - * Gets masterpassTransactionId - * - * @return string - */ - public function getMasterpassTransactionId() + public function getExpiryYear() { - return $this->container['masterpassTransactionId']; + return $this->container['expiryYear']; } /** - * Sets masterpassTransactionId + * Sets expiryYear * - * @param string $masterpassTransactionId The Masterpass transaction ID. + * @param string|null $expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). * * @return self */ - public function setMasterpassTransactionId($masterpassTransactionId) + public function setExpiryYear($expiryYear) { - if (is_null($masterpassTransactionId)) { - throw new \InvalidArgumentException('non-nullable masterpassTransactionId cannot be null'); + if (is_null($expiryYear)) { + throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); } - $this->container['masterpassTransactionId'] = $masterpassTransactionId; + $this->container['expiryYear'] = $expiryYear; return $this; } /** - * Gets orderID + * Gets holderName * * @return string|null */ - public function getOrderID() + public function getHolderName() { - return $this->container['orderID']; + return $this->container['holderName']; } /** - * Sets orderID + * Sets holderName * - * @param string|null $orderID The unique ID associated with the order. + * @param string|null $holderName The name of the card holder. * * @return self */ - public function setOrderID($orderID) + public function setHolderName($holderName) { - if (is_null($orderID)) { - throw new \InvalidArgumentException('non-nullable orderID cannot be null'); + if (is_null($holderName)) { + throw new \InvalidArgumentException('non-nullable holderName cannot be null'); } - $this->container['orderID'] = $orderID; + $this->container['holderName'] = $holderName; return $this; } /** - * Gets payeePreferred + * Gets networkPaymentReference * * @return string|null */ - public function getPayeePreferred() + public function getNetworkPaymentReference() { - return $this->container['payeePreferred']; + return $this->container['networkPaymentReference']; } /** - * Sets payeePreferred + * Sets networkPaymentReference * - * @param string|null $payeePreferred IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED + * @param string|null $networkPaymentReference The network token reference. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. * * @return self */ - public function setPayeePreferred($payeePreferred) + public function setNetworkPaymentReference($networkPaymentReference) { - if (is_null($payeePreferred)) { - throw new \InvalidArgumentException('non-nullable payeePreferred cannot be null'); + if (is_null($networkPaymentReference)) { + throw new \InvalidArgumentException('non-nullable networkPaymentReference cannot be null'); } - $this->container['payeePreferred'] = $payeePreferred; + $this->container['networkPaymentReference'] = $networkPaymentReference; return $this; } /** - * Gets payerID + * Gets number * * @return string|null */ - public function getPayerID() + public function getNumber() { - return $this->container['payerID']; + return $this->container['number']; } /** - * Sets payerID + * Sets number * - * @param string|null $payerID The unique ID associated with the payer. + * @param string|null $number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). * * @return self */ - public function setPayerID($payerID) + public function setNumber($number) { - if (is_null($payerID)) { - throw new \InvalidArgumentException('non-nullable payerID cannot be null'); + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); } - $this->container['payerID'] = $payerID; + $this->container['number'] = $number; return $this; } /** - * Gets payerSelected + * Gets shopperNotificationReference * * @return string|null */ - public function getPayerSelected() + public function getShopperNotificationReference() { - return $this->container['payerSelected']; + return $this->container['shopperNotificationReference']; } /** - * Sets payerSelected + * Sets shopperNotificationReference * - * @param string|null $payerSelected PAYPAL or PAYPAL_CREDIT + * @param string|null $shopperNotificationReference The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. * * @return self */ - public function setPayerSelected($payerSelected) + public function setShopperNotificationReference($shopperNotificationReference) { - if (is_null($payerSelected)) { - throw new \InvalidArgumentException('non-nullable payerSelected cannot be null'); + if (is_null($shopperNotificationReference)) { + throw new \InvalidArgumentException('non-nullable shopperNotificationReference cannot be null'); } - $this->container['payerSelected'] = $payerSelected; + $this->container['shopperNotificationReference'] = $shopperNotificationReference; return $this; } /** - * Gets virtualPaymentAddress + * Gets threeDS2SdkVersion * * @return string|null */ - public function getVirtualPaymentAddress() - { - return $this->container['virtualPaymentAddress']; - } - - /** - * Sets virtualPaymentAddress - * - * @param string|null $virtualPaymentAddress The virtual payment address for UPI. - * - * @return self - */ - public function setVirtualPaymentAddress($virtualPaymentAddress) - { - if (is_null($virtualPaymentAddress)) { - throw new \InvalidArgumentException('non-nullable virtualPaymentAddress cannot be null'); - } - $this->container['virtualPaymentAddress'] = $virtualPaymentAddress; - - return $this; - } - - /** - * Gets samsungPayToken - * - * @return string - */ - public function getSamsungPayToken() - { - return $this->container['samsungPayToken']; - } - - /** - * Sets samsungPayToken - * - * @param string $samsungPayToken The payload you received from the Samsung Pay SDK response. - * - * @return self - */ - public function setSamsungPayToken($samsungPayToken) - { - if (is_null($samsungPayToken)) { - throw new \InvalidArgumentException('non-nullable samsungPayToken cannot be null'); - } - $this->container['samsungPayToken'] = $samsungPayToken; - - return $this; - } - - /** - * Gets iban - * - * @return string - */ - public function getIban() + public function getThreeDS2SdkVersion() { - return $this->container['iban']; + return $this->container['threeDS2SdkVersion']; } /** - * Sets iban + * Sets threeDS2SdkVersion * - * @param string $iban The International Bank Account Number (IBAN). + * @param string|null $threeDS2SdkVersion Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. * * @return self */ - public function setIban($iban) + public function setThreeDS2SdkVersion($threeDS2SdkVersion) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); + if (is_null($threeDS2SdkVersion)) { + throw new \InvalidArgumentException('non-nullable threeDS2SdkVersion cannot be null'); } - $this->container['iban'] = $iban; + $this->container['threeDS2SdkVersion'] = $threeDS2SdkVersion; return $this; } /** - * Gets billingSequenceNumber + * Gets googlePayToken * * @return string */ - public function getBillingSequenceNumber() + public function getGooglePayToken() { - return $this->container['billingSequenceNumber']; + return $this->container['googlePayToken']; } /** - * Sets billingSequenceNumber + * Sets googlePayToken * - * @param string $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * @param string $googlePayToken The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. * * @return self */ - public function setBillingSequenceNumber($billingSequenceNumber) + public function setGooglePayToken($googlePayToken) { - if (is_null($billingSequenceNumber)) { - throw new \InvalidArgumentException('non-nullable billingSequenceNumber cannot be null'); + if (is_null($googlePayToken)) { + throw new \InvalidArgumentException('non-nullable googlePayToken cannot be null'); } - $this->container['billingSequenceNumber'] = $billingSequenceNumber; + $this->container['googlePayToken'] = $googlePayToken; return $this; } /** - * Gets visaCheckoutCallId + * Gets issuer * * @return string */ - public function getVisaCheckoutCallId() - { - return $this->container['visaCheckoutCallId']; - } - - /** - * Sets visaCheckoutCallId - * - * @param string $visaCheckoutCallId The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID. - * - * @return self - */ - public function setVisaCheckoutCallId($visaCheckoutCallId) - { - if (is_null($visaCheckoutCallId)) { - throw new \InvalidArgumentException('non-nullable visaCheckoutCallId cannot be null'); - } - $this->container['visaCheckoutCallId'] = $visaCheckoutCallId; - - return $this; - } - - /** - * Gets appId - * - * @return string|null - */ - public function getAppId() - { - return $this->container['appId']; - } - - /** - * Sets appId - * - * @param string|null $appId appId - * - * @return self - */ - public function setAppId($appId) - { - if (is_null($appId)) { - throw new \InvalidArgumentException('non-nullable appId cannot be null'); - } - $this->container['appId'] = $appId; - - return $this; - } - - /** - * Gets openid - * - * @return string|null - */ - public function getOpenid() - { - return $this->container['openid']; - } - - /** - * Sets openid - * - * @param string|null $openid openid - * - * @return self - */ - public function setOpenid($openid) - { - if (is_null($openid)) { - throw new \InvalidArgumentException('non-nullable openid cannot be null'); - } - $this->container['openid'] = $openid; - - return $this; - } - - /** - * Gets clickAndCollect - * - * @return string|null - */ - public function getClickAndCollect() + public function getIssuer() { - return $this->container['clickAndCollect']; + return $this->container['issuer']; } /** - * Sets clickAndCollect + * Sets issuer * - * @param string|null $clickAndCollect Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them. + * @param string $issuer The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. * * @return self */ - public function setClickAndCollect($clickAndCollect) + public function setIssuer($issuer) { - if (is_null($clickAndCollect)) { - throw new \InvalidArgumentException('non-nullable clickAndCollect cannot be null'); + if (is_null($issuer)) { + throw new \InvalidArgumentException('non-nullable issuer cannot be null'); } - $this->container['clickAndCollect'] = $clickAndCollect; + $this->container['issuer'] = $issuer; return $this; } diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index faaa4cc9b..83b32294b 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -51,7 +51,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', 'blockedPaymentMethods' => 'string[]', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -59,7 +59,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'enableOneClick' => 'bool', 'enablePayOut' => 'bool', 'enableRecurring' => 'bool', @@ -960,7 +960,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -970,7 +970,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1184,7 +1184,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1194,7 +1194,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 5927126c1..b71d1e6a9 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -51,7 +51,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', 'blockedPaymentMethods' => 'string[]', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -59,7 +59,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'enableOneClick' => 'bool', 'enablePayOut' => 'bool', 'enableRecurring' => 'bool', @@ -1010,7 +1010,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -1020,7 +1020,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1234,7 +1234,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1244,7 +1244,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ diff --git a/src/Adyen/Model/Checkout/DeliveryAddress.php b/src/Adyen/Model/Checkout/DeliveryAddress.php new file mode 100644 index 000000000..079dc1f63 --- /dev/null +++ b/src/Adyen/Model/Checkout/DeliveryAddress.php @@ -0,0 +1,637 @@ + + */ +class DeliveryAddress implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DeliveryAddress'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => 'string', + 'firstName' => 'string', + 'houseNumberOrName' => 'string', + 'lastName' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string', + 'street' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'country' => null, + 'firstName' => null, + 'houseNumberOrName' => null, + 'lastName' => null, + 'postalCode' => null, + 'stateOrProvince' => null, + 'street' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => false, + 'firstName' => false, + 'houseNumberOrName' => false, + 'lastName' => false, + 'postalCode' => false, + 'stateOrProvince' => false, + 'street' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'city' => 'city', + 'country' => 'country', + 'firstName' => 'firstName', + 'houseNumberOrName' => 'houseNumberOrName', + 'lastName' => 'lastName', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince', + 'street' => 'street' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'firstName' => 'setFirstName', + 'houseNumberOrName' => 'setHouseNumberOrName', + 'lastName' => 'setLastName', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince', + 'street' => 'setStreet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + 'firstName' => 'getFirstName', + 'houseNumberOrName' => 'getHouseNumberOrName', + 'lastName' => 'getLastName', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince', + 'street' => 'getStreet' + ]; + + /** + * 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::$openAPIModelName; + } + + + /** + * 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->setIfExists('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('firstName', $data ?? [], null); + $this->setIfExists('houseNumberOrName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $data ?? [], null); + $this->setIfExists('street', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + if ($this->container['houseNumberOrName'] === null) { + $invalidProperties[] = "'houseNumberOrName' can't be null"; + } + if ($this->container['postalCode'] === null) { + $invalidProperties[] = "'postalCode' can't be null"; + } + if ($this->container['street'] === null) { + $invalidProperties[] = "'street' can't be null"; + } + 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 city + * + * @return string + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city The name of the city. Maximum length: 3000 characters. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets firstName + * + * @return string|null + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName firstName + * + * @return self + */ + public function setFirstName($firstName) + { + if (is_null($firstName)) { + throw new \InvalidArgumentException('non-nullable firstName cannot be null'); + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets houseNumberOrName + * + * @return string + */ + public function getHouseNumberOrName() + { + return $this->container['houseNumberOrName']; + } + + /** + * Sets houseNumberOrName + * + * @param string $houseNumberOrName The number or name of the house. Maximum length: 3000 characters. + * + * @return self + */ + public function setHouseNumberOrName($houseNumberOrName) + { + if (is_null($houseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); + } + $this->container['houseNumberOrName'] = $houseNumberOrName; + + return $this; + } + + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName lastName + * + * @return self + */ + public function setLastName($lastName) + { + if (is_null($lastName)) { + throw new \InvalidArgumentException('non-nullable lastName cannot be null'); + } + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets postalCode + * + * @return string + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string $postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince + * + * @return string|null + */ + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + return $this; + } + + /** + * Gets street + * + * @return string + */ + public function getStreet() + { + return $this->container['street']; + } + + /** + * Sets street + * + * @param string $street The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + * + * @return self + */ + public function setStreet($street) + { + if (is_null($street)) { + throw new \InvalidArgumentException('non-nullable street cannot be null'); + } + $this->container['street'] = $street; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/DokuDetails.php b/src/Adyen/Model/Checkout/DokuDetails.php index ee312f037..380af0987 100644 --- a/src/Adyen/Model/Checkout/DokuDetails.php +++ b/src/Adyen/Model/Checkout/DokuDetails.php @@ -248,6 +248,8 @@ public function getModelName() public const TYPE_BCA_VA = 'doku_bca_va'; public const TYPE_ALFAMART = 'doku_alfamart'; public const TYPE_INDOMARET = 'doku_indomaret'; + public const TYPE_WALLET = 'doku_wallet'; + public const TYPE_OVO = 'doku_ovo'; /** * Gets allowable values of the enum @@ -266,6 +268,8 @@ public function getTypeAllowableValues() self::TYPE_BCA_VA, self::TYPE_ALFAMART, self::TYPE_INDOMARET, + self::TYPE_WALLET, + self::TYPE_OVO, ]; } /** diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index 566e4c719..c73b846de 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -47,10 +47,12 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo', 'additionalAmount' => '\Adyen\Model\Checkout\Amount', 'additionalData' => 'array', + 'allowedPaymentMethods' => 'string[]', 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', + 'blockedPaymentMethods' => 'string[]', 'browserInfo' => '\Adyen\Model\Checkout\BrowserInfo', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -61,7 +63,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'dateOfBirth' => '\DateTime', 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'deliveryDate' => '\DateTime', 'deviceFingerprint' => 'string', 'donationAccount' => 'string', @@ -74,6 +76,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'fraudOffset' => 'int', 'fundOrigin' => '\Adyen\Model\Checkout\FundOrigin', 'fundRecipient' => '\Adyen\Model\Checkout\FundRecipient', + 'fundingSource' => 'string', 'industryUsage' => 'string', 'installments' => '\Adyen\Model\Checkout\Installments', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', @@ -98,6 +101,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'reference' => 'string', 'returnUrl' => 'string', 'riskData' => '\Adyen\Model\Checkout\RiskData', + 'selectedRecurringDetailReference' => 'string', 'sessionValidity' => 'string', 'shopperEmail' => 'string', 'shopperIP' => 'string', @@ -127,10 +131,12 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'accountInfo' => null, 'additionalAmount' => null, 'additionalData' => null, + 'allowedPaymentMethods' => null, 'amount' => null, 'applicationInfo' => null, 'authenticationData' => null, 'billingAddress' => null, + 'blockedPaymentMethods' => null, 'browserInfo' => null, 'captureDelayHours' => 'int32', 'channel' => null, @@ -154,6 +160,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'fraudOffset' => 'int32', 'fundOrigin' => null, 'fundRecipient' => null, + 'fundingSource' => null, 'industryUsage' => null, 'installments' => null, 'lineItems' => null, @@ -178,6 +185,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'reference' => null, 'returnUrl' => null, 'riskData' => null, + 'selectedRecurringDetailReference' => null, 'sessionValidity' => null, 'shopperEmail' => null, 'shopperIP' => null, @@ -205,10 +213,12 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'accountInfo' => false, 'additionalAmount' => false, 'additionalData' => false, + 'allowedPaymentMethods' => false, 'amount' => false, 'applicationInfo' => false, 'authenticationData' => false, 'billingAddress' => false, + 'blockedPaymentMethods' => false, 'browserInfo' => false, 'captureDelayHours' => true, 'channel' => false, @@ -232,6 +242,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'fraudOffset' => true, 'fundOrigin' => false, 'fundRecipient' => false, + 'fundingSource' => false, 'industryUsage' => false, 'installments' => false, 'lineItems' => false, @@ -256,6 +267,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'reference' => false, 'returnUrl' => false, 'riskData' => false, + 'selectedRecurringDetailReference' => false, 'sessionValidity' => false, 'shopperEmail' => false, 'shopperIP' => false, @@ -363,10 +375,12 @@ public function isNullableSetToNull(string $property): bool 'accountInfo' => 'accountInfo', 'additionalAmount' => 'additionalAmount', 'additionalData' => 'additionalData', + 'allowedPaymentMethods' => 'allowedPaymentMethods', 'amount' => 'amount', 'applicationInfo' => 'applicationInfo', 'authenticationData' => 'authenticationData', 'billingAddress' => 'billingAddress', + 'blockedPaymentMethods' => 'blockedPaymentMethods', 'browserInfo' => 'browserInfo', 'captureDelayHours' => 'captureDelayHours', 'channel' => 'channel', @@ -390,6 +404,7 @@ public function isNullableSetToNull(string $property): bool 'fraudOffset' => 'fraudOffset', 'fundOrigin' => 'fundOrigin', 'fundRecipient' => 'fundRecipient', + 'fundingSource' => 'fundingSource', 'industryUsage' => 'industryUsage', 'installments' => 'installments', 'lineItems' => 'lineItems', @@ -414,6 +429,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'reference', 'returnUrl' => 'returnUrl', 'riskData' => 'riskData', + 'selectedRecurringDetailReference' => 'selectedRecurringDetailReference', 'sessionValidity' => 'sessionValidity', 'shopperEmail' => 'shopperEmail', 'shopperIP' => 'shopperIP', @@ -441,10 +457,12 @@ public function isNullableSetToNull(string $property): bool 'accountInfo' => 'setAccountInfo', 'additionalAmount' => 'setAdditionalAmount', 'additionalData' => 'setAdditionalData', + 'allowedPaymentMethods' => 'setAllowedPaymentMethods', 'amount' => 'setAmount', 'applicationInfo' => 'setApplicationInfo', 'authenticationData' => 'setAuthenticationData', 'billingAddress' => 'setBillingAddress', + 'blockedPaymentMethods' => 'setBlockedPaymentMethods', 'browserInfo' => 'setBrowserInfo', 'captureDelayHours' => 'setCaptureDelayHours', 'channel' => 'setChannel', @@ -468,6 +486,7 @@ public function isNullableSetToNull(string $property): bool 'fraudOffset' => 'setFraudOffset', 'fundOrigin' => 'setFundOrigin', 'fundRecipient' => 'setFundRecipient', + 'fundingSource' => 'setFundingSource', 'industryUsage' => 'setIndustryUsage', 'installments' => 'setInstallments', 'lineItems' => 'setLineItems', @@ -492,6 +511,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'setReference', 'returnUrl' => 'setReturnUrl', 'riskData' => 'setRiskData', + 'selectedRecurringDetailReference' => 'setSelectedRecurringDetailReference', 'sessionValidity' => 'setSessionValidity', 'shopperEmail' => 'setShopperEmail', 'shopperIP' => 'setShopperIP', @@ -519,10 +539,12 @@ public function isNullableSetToNull(string $property): bool 'accountInfo' => 'getAccountInfo', 'additionalAmount' => 'getAdditionalAmount', 'additionalData' => 'getAdditionalData', + 'allowedPaymentMethods' => 'getAllowedPaymentMethods', 'amount' => 'getAmount', 'applicationInfo' => 'getApplicationInfo', 'authenticationData' => 'getAuthenticationData', 'billingAddress' => 'getBillingAddress', + 'blockedPaymentMethods' => 'getBlockedPaymentMethods', 'browserInfo' => 'getBrowserInfo', 'captureDelayHours' => 'getCaptureDelayHours', 'channel' => 'getChannel', @@ -546,6 +568,7 @@ public function isNullableSetToNull(string $property): bool 'fraudOffset' => 'getFraudOffset', 'fundOrigin' => 'getFundOrigin', 'fundRecipient' => 'getFundRecipient', + 'fundingSource' => 'getFundingSource', 'industryUsage' => 'getIndustryUsage', 'installments' => 'getInstallments', 'lineItems' => 'getLineItems', @@ -570,6 +593,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'getReference', 'returnUrl' => 'getReturnUrl', 'riskData' => 'getRiskData', + 'selectedRecurringDetailReference' => 'getSelectedRecurringDetailReference', 'sessionValidity' => 'getSessionValidity', 'shopperEmail' => 'getShopperEmail', 'shopperIP' => 'getShopperIP', @@ -634,6 +658,7 @@ public function getModelName() public const CHANNEL_WEB = 'Web'; public const ENTITY_TYPE_NATURAL_PERSON = 'NaturalPerson'; public const ENTITY_TYPE_COMPANY_NAME = 'CompanyName'; + public const FUNDING_SOURCE_DEBIT = 'debit'; public const INDUSTRY_USAGE_DELAYED_CHARGE = 'delayedCharge'; public const INDUSTRY_USAGE_INSTALLMENT = 'installment'; public const INDUSTRY_USAGE_NO_SHOW = 'noShow'; @@ -670,6 +695,17 @@ public function getEntityTypeAllowableValues() self::ENTITY_TYPE_COMPANY_NAME, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_DEBIT, + ]; + } /** * Gets allowable values of the enum * @@ -728,10 +764,12 @@ public function __construct(array $data = null) $this->setIfExists('accountInfo', $data ?? [], null); $this->setIfExists('additionalAmount', $data ?? [], null); $this->setIfExists('additionalData', $data ?? [], null); + $this->setIfExists('allowedPaymentMethods', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('applicationInfo', $data ?? [], null); $this->setIfExists('authenticationData', $data ?? [], null); $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('blockedPaymentMethods', $data ?? [], null); $this->setIfExists('browserInfo', $data ?? [], null); $this->setIfExists('captureDelayHours', $data ?? [], null); $this->setIfExists('channel', $data ?? [], null); @@ -755,6 +793,7 @@ public function __construct(array $data = null) $this->setIfExists('fraudOffset', $data ?? [], null); $this->setIfExists('fundOrigin', $data ?? [], null); $this->setIfExists('fundRecipient', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('industryUsage', $data ?? [], null); $this->setIfExists('installments', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); @@ -779,6 +818,7 @@ public function __construct(array $data = null) $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('returnUrl', $data ?? [], null); $this->setIfExists('riskData', $data ?? [], null); + $this->setIfExists('selectedRecurringDetailReference', $data ?? [], null); $this->setIfExists('sessionValidity', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('shopperIP', $data ?? [], null); @@ -848,6 +888,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!is_null($this->container['fundingSource']) && !in_array($this->container['fundingSource'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fundingSource', must be one of '%s'", + $this->container['fundingSource'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getIndustryUsageAllowableValues(); if (!is_null($this->container['industryUsage']) && !in_array($this->container['industryUsage'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -983,6 +1032,33 @@ public function setAdditionalData($additionalData) return $this; } + /** + * Gets allowedPaymentMethods + * + * @return string[]|null + */ + public function getAllowedPaymentMethods() + { + return $this->container['allowedPaymentMethods']; + } + + /** + * Sets allowedPaymentMethods + * + * @param string[]|null $allowedPaymentMethods List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` + * + * @return self + */ + public function setAllowedPaymentMethods($allowedPaymentMethods) + { + if (is_null($allowedPaymentMethods)) { + throw new \InvalidArgumentException('non-nullable allowedPaymentMethods cannot be null'); + } + $this->container['allowedPaymentMethods'] = $allowedPaymentMethods; + + return $this; + } + /** * Gets amount * @@ -1067,7 +1143,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -1077,7 +1153,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1091,6 +1167,33 @@ public function setBillingAddress($billingAddress) return $this; } + /** + * Gets blockedPaymentMethods + * + * @return string[]|null + */ + public function getBlockedPaymentMethods() + { + return $this->container['blockedPaymentMethods']; + } + + /** + * Sets blockedPaymentMethods + * + * @param string[]|null $blockedPaymentMethods List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` + * + * @return self + */ + public function setBlockedPaymentMethods($blockedPaymentMethods) + { + if (is_null($blockedPaymentMethods)) { + throw new \InvalidArgumentException('non-nullable blockedPaymentMethods cannot be null'); + } + $this->container['blockedPaymentMethods'] = $blockedPaymentMethods; + + return $this; + } + /** * Gets browserInfo * @@ -1374,7 +1477,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1384,7 +1487,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ @@ -1402,7 +1505,6 @@ public function setDeliveryAddress($deliveryAddress) * Gets deliveryDate * * @return \DateTime|null - * @deprecated */ public function getDeliveryDate() { @@ -1415,7 +1517,6 @@ public function getDeliveryDate() * @param \DateTime|null $deliveryDate The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 * * @return self - * @deprecated */ public function setDeliveryDate($deliveryDate) { @@ -1732,6 +1833,43 @@ public function setFundRecipient($fundRecipient) return $this; } + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!in_array($fundingSource, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fundingSource', must be one of '%s'", + $fundingSource, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + /** * Gets industryUsage * @@ -2400,6 +2538,33 @@ public function setRiskData($riskData) return $this; } + /** + * Gets selectedRecurringDetailReference + * + * @return string|null + */ + public function getSelectedRecurringDetailReference() + { + return $this->container['selectedRecurringDetailReference']; + } + + /** + * Sets selectedRecurringDetailReference + * + * @param string|null $selectedRecurringDetailReference The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. + * + * @return self + */ + public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) + { + if (is_null($selectedRecurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); + } + $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; + + return $this; + } + /** * Gets sessionValidity * diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index 7d6e6d4b7..6b00a2254 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -50,7 +50,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', 'browserInfo' => '\Adyen\Model\Checkout\BrowserInfo', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -61,7 +61,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'dateOfBirth' => '\DateTime', 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'deliveryDate' => '\DateTime', 'deviceFingerprint' => 'string', 'enableOneClick' => 'bool', @@ -85,7 +85,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'order' => '\Adyen\Model\Checkout\EncryptedOrderData', 'orderReference' => 'string', 'origin' => 'string', - 'paymentMethod' => '\Adyen\Model\Checkout\CheckoutPaymentMethod', + 'paymentMethod' => '\Adyen\Model\Checkout\PaymentRequestPaymentMethod', 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', 'recurringExpiry' => 'string', 'recurringFrequency' => 'string', @@ -1043,7 +1043,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -1053,7 +1053,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1350,7 +1350,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1360,7 +1360,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ @@ -2018,7 +2018,7 @@ public function setOrigin($origin) /** * Gets paymentMethod * - * @return \Adyen\Model\Checkout\CheckoutPaymentMethod + * @return \Adyen\Model\Checkout\PaymentRequestPaymentMethod */ public function getPaymentMethod() { @@ -2028,7 +2028,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Adyen\Model\Checkout\CheckoutPaymentMethod $paymentMethod paymentMethod + * @param \Adyen\Model\Checkout\PaymentRequestPaymentMethod $paymentMethod paymentMethod * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentRequestPaymentMethod.php b/src/Adyen/Model/Checkout/PaymentRequestPaymentMethod.php new file mode 100644 index 000000000..a2a4f740c --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentRequestPaymentMethod.php @@ -0,0 +1,2171 @@ + + */ +class PaymentRequestPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentRequest_paymentMethod'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bankAccountNumber' => 'string', + 'bankAccountType' => 'string', + 'bankLocationId' => 'string', + 'checkoutAttemptId' => 'string', + 'encryptedBankAccountNumber' => 'string', + 'encryptedBankLocationId' => 'string', + 'ownerName' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string', + 'billingAddress' => 'string', + 'deliveryAddress' => 'string', + 'personalDetails' => 'string', + 'amazonPayToken' => 'string', + 'checkoutSessionId' => 'string', + 'applePayToken' => 'string', + 'fundingSource' => 'string', + 'holderName' => 'string', + 'issuer' => 'string', + 'blikCode' => 'string', + 'brand' => 'string', + 'cupsecureplusSmscode' => 'string', + 'cvc' => 'string', + 'encryptedCardNumber' => 'string', + 'encryptedExpiryMonth' => 'string', + 'encryptedExpiryYear' => 'string', + 'encryptedSecurityCode' => 'string', + 'expiryMonth' => 'string', + 'expiryYear' => 'string', + 'networkPaymentReference' => 'string', + 'number' => 'string', + 'shopperNotificationReference' => 'string', + 'threeDS2SdkVersion' => 'string', + 'firstName' => 'string', + 'lastName' => 'string', + 'shopperEmail' => 'string', + 'telephoneNumber' => 'string', + 'googlePayToken' => 'string', + 'subtype' => 'string', + 'masterpassTransactionId' => 'string', + 'orderID' => 'string', + 'payeePreferred' => 'string', + 'payerID' => 'string', + 'payerSelected' => 'string', + 'virtualPaymentAddress' => 'string', + 'samsungPayToken' => 'string', + 'iban' => 'string', + 'billingSequenceNumber' => 'string', + 'visaCheckoutCallId' => 'string', + 'appId' => 'string', + 'openid' => 'string', + 'clickAndCollect' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bankAccountNumber' => null, + 'bankAccountType' => null, + 'bankLocationId' => null, + 'checkoutAttemptId' => null, + 'encryptedBankAccountNumber' => null, + 'encryptedBankLocationId' => null, + 'ownerName' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null, + 'billingAddress' => null, + 'deliveryAddress' => null, + 'personalDetails' => null, + 'amazonPayToken' => null, + 'checkoutSessionId' => null, + 'applePayToken' => null, + 'fundingSource' => null, + 'holderName' => null, + 'issuer' => null, + 'blikCode' => null, + 'brand' => null, + 'cupsecureplusSmscode' => null, + 'cvc' => null, + 'encryptedCardNumber' => null, + 'encryptedExpiryMonth' => null, + 'encryptedExpiryYear' => null, + 'encryptedSecurityCode' => null, + 'expiryMonth' => null, + 'expiryYear' => null, + 'networkPaymentReference' => null, + 'number' => null, + 'shopperNotificationReference' => null, + 'threeDS2SdkVersion' => null, + 'firstName' => null, + 'lastName' => null, + 'shopperEmail' => null, + 'telephoneNumber' => null, + 'googlePayToken' => null, + 'subtype' => null, + 'masterpassTransactionId' => null, + 'orderID' => null, + 'payeePreferred' => null, + 'payerID' => null, + 'payerSelected' => null, + 'virtualPaymentAddress' => null, + 'samsungPayToken' => null, + 'iban' => null, + 'billingSequenceNumber' => null, + 'visaCheckoutCallId' => null, + 'appId' => null, + 'openid' => null, + 'clickAndCollect' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'bankAccountNumber' => false, + 'bankAccountType' => false, + 'bankLocationId' => false, + 'checkoutAttemptId' => false, + 'encryptedBankAccountNumber' => false, + 'encryptedBankLocationId' => false, + 'ownerName' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false, + 'billingAddress' => false, + 'deliveryAddress' => false, + 'personalDetails' => false, + 'amazonPayToken' => false, + 'checkoutSessionId' => false, + 'applePayToken' => false, + 'fundingSource' => false, + 'holderName' => false, + 'issuer' => false, + 'blikCode' => false, + 'brand' => false, + 'cupsecureplusSmscode' => false, + 'cvc' => false, + 'encryptedCardNumber' => false, + 'encryptedExpiryMonth' => false, + 'encryptedExpiryYear' => false, + 'encryptedSecurityCode' => false, + 'expiryMonth' => false, + 'expiryYear' => false, + 'networkPaymentReference' => false, + 'number' => false, + 'shopperNotificationReference' => false, + 'threeDS2SdkVersion' => false, + 'firstName' => false, + 'lastName' => false, + 'shopperEmail' => false, + 'telephoneNumber' => false, + 'googlePayToken' => false, + 'subtype' => false, + 'masterpassTransactionId' => false, + 'orderID' => false, + 'payeePreferred' => false, + 'payerID' => false, + 'payerSelected' => false, + 'virtualPaymentAddress' => false, + 'samsungPayToken' => false, + 'iban' => false, + 'billingSequenceNumber' => false, + 'visaCheckoutCallId' => false, + 'appId' => false, + 'openid' => false, + 'clickAndCollect' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'bankAccountNumber' => 'bankAccountNumber', + 'bankAccountType' => 'bankAccountType', + 'bankLocationId' => 'bankLocationId', + 'checkoutAttemptId' => 'checkoutAttemptId', + 'encryptedBankAccountNumber' => 'encryptedBankAccountNumber', + 'encryptedBankLocationId' => 'encryptedBankLocationId', + 'ownerName' => 'ownerName', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type', + 'billingAddress' => 'billingAddress', + 'deliveryAddress' => 'deliveryAddress', + 'personalDetails' => 'personalDetails', + 'amazonPayToken' => 'amazonPayToken', + 'checkoutSessionId' => 'checkoutSessionId', + 'applePayToken' => 'applePayToken', + 'fundingSource' => 'fundingSource', + 'holderName' => 'holderName', + 'issuer' => 'issuer', + 'blikCode' => 'blikCode', + 'brand' => 'brand', + 'cupsecureplusSmscode' => 'cupsecureplus.smscode', + 'cvc' => 'cvc', + 'encryptedCardNumber' => 'encryptedCardNumber', + 'encryptedExpiryMonth' => 'encryptedExpiryMonth', + 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedSecurityCode' => 'encryptedSecurityCode', + 'expiryMonth' => 'expiryMonth', + 'expiryYear' => 'expiryYear', + 'networkPaymentReference' => 'networkPaymentReference', + 'number' => 'number', + 'shopperNotificationReference' => 'shopperNotificationReference', + 'threeDS2SdkVersion' => 'threeDS2SdkVersion', + 'firstName' => 'firstName', + 'lastName' => 'lastName', + 'shopperEmail' => 'shopperEmail', + 'telephoneNumber' => 'telephoneNumber', + 'googlePayToken' => 'googlePayToken', + 'subtype' => 'subtype', + 'masterpassTransactionId' => 'masterpassTransactionId', + 'orderID' => 'orderID', + 'payeePreferred' => 'payeePreferred', + 'payerID' => 'payerID', + 'payerSelected' => 'payerSelected', + 'virtualPaymentAddress' => 'virtualPaymentAddress', + 'samsungPayToken' => 'samsungPayToken', + 'iban' => 'iban', + 'billingSequenceNumber' => 'billingSequenceNumber', + 'visaCheckoutCallId' => 'visaCheckoutCallId', + 'appId' => 'appId', + 'openid' => 'openid', + 'clickAndCollect' => 'clickAndCollect' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bankAccountNumber' => 'setBankAccountNumber', + 'bankAccountType' => 'setBankAccountType', + 'bankLocationId' => 'setBankLocationId', + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'encryptedBankAccountNumber' => 'setEncryptedBankAccountNumber', + 'encryptedBankLocationId' => 'setEncryptedBankLocationId', + 'ownerName' => 'setOwnerName', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType', + 'billingAddress' => 'setBillingAddress', + 'deliveryAddress' => 'setDeliveryAddress', + 'personalDetails' => 'setPersonalDetails', + 'amazonPayToken' => 'setAmazonPayToken', + 'checkoutSessionId' => 'setCheckoutSessionId', + 'applePayToken' => 'setApplePayToken', + 'fundingSource' => 'setFundingSource', + 'holderName' => 'setHolderName', + 'issuer' => 'setIssuer', + 'blikCode' => 'setBlikCode', + 'brand' => 'setBrand', + 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', + 'cvc' => 'setCvc', + 'encryptedCardNumber' => 'setEncryptedCardNumber', + 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedSecurityCode' => 'setEncryptedSecurityCode', + 'expiryMonth' => 'setExpiryMonth', + 'expiryYear' => 'setExpiryYear', + 'networkPaymentReference' => 'setNetworkPaymentReference', + 'number' => 'setNumber', + 'shopperNotificationReference' => 'setShopperNotificationReference', + 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName', + 'shopperEmail' => 'setShopperEmail', + 'telephoneNumber' => 'setTelephoneNumber', + 'googlePayToken' => 'setGooglePayToken', + 'subtype' => 'setSubtype', + 'masterpassTransactionId' => 'setMasterpassTransactionId', + 'orderID' => 'setOrderID', + 'payeePreferred' => 'setPayeePreferred', + 'payerID' => 'setPayerID', + 'payerSelected' => 'setPayerSelected', + 'virtualPaymentAddress' => 'setVirtualPaymentAddress', + 'samsungPayToken' => 'setSamsungPayToken', + 'iban' => 'setIban', + 'billingSequenceNumber' => 'setBillingSequenceNumber', + 'visaCheckoutCallId' => 'setVisaCheckoutCallId', + 'appId' => 'setAppId', + 'openid' => 'setOpenid', + 'clickAndCollect' => 'setClickAndCollect' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bankAccountNumber' => 'getBankAccountNumber', + 'bankAccountType' => 'getBankAccountType', + 'bankLocationId' => 'getBankLocationId', + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'encryptedBankAccountNumber' => 'getEncryptedBankAccountNumber', + 'encryptedBankLocationId' => 'getEncryptedBankLocationId', + 'ownerName' => 'getOwnerName', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType', + 'billingAddress' => 'getBillingAddress', + 'deliveryAddress' => 'getDeliveryAddress', + 'personalDetails' => 'getPersonalDetails', + 'amazonPayToken' => 'getAmazonPayToken', + 'checkoutSessionId' => 'getCheckoutSessionId', + 'applePayToken' => 'getApplePayToken', + 'fundingSource' => 'getFundingSource', + 'holderName' => 'getHolderName', + 'issuer' => 'getIssuer', + 'blikCode' => 'getBlikCode', + 'brand' => 'getBrand', + 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', + 'cvc' => 'getCvc', + 'encryptedCardNumber' => 'getEncryptedCardNumber', + 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedSecurityCode' => 'getEncryptedSecurityCode', + 'expiryMonth' => 'getExpiryMonth', + 'expiryYear' => 'getExpiryYear', + 'networkPaymentReference' => 'getNetworkPaymentReference', + 'number' => 'getNumber', + 'shopperNotificationReference' => 'getShopperNotificationReference', + 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName', + 'shopperEmail' => 'getShopperEmail', + 'telephoneNumber' => 'getTelephoneNumber', + 'googlePayToken' => 'getGooglePayToken', + 'subtype' => 'getSubtype', + 'masterpassTransactionId' => 'getMasterpassTransactionId', + 'orderID' => 'getOrderID', + 'payeePreferred' => 'getPayeePreferred', + 'payerID' => 'getPayerID', + 'payerSelected' => 'getPayerSelected', + 'virtualPaymentAddress' => 'getVirtualPaymentAddress', + 'samsungPayToken' => 'getSamsungPayToken', + 'iban' => 'getIban', + 'billingSequenceNumber' => 'getBillingSequenceNumber', + 'visaCheckoutCallId' => 'getVisaCheckoutCallId', + 'appId' => 'getAppId', + 'openid' => 'getOpenid', + 'clickAndCollect' => 'getClickAndCollect' + ]; + + /** + * 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::$openAPIModelName; + } + + /** + * 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->setIfExists('bankAccountNumber', $data ?? [], null); + $this->setIfExists('bankAccountType', $data ?? [], null); + $this->setIfExists('bankLocationId', $data ?? [], null); + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('encryptedBankAccountNumber', $data ?? [], null); + $this->setIfExists('encryptedBankLocationId', $data ?? [], null); + $this->setIfExists('ownerName', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'zip'); + $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('deliveryAddress', $data ?? [], null); + $this->setIfExists('personalDetails', $data ?? [], null); + $this->setIfExists('amazonPayToken', $data ?? [], null); + $this->setIfExists('checkoutSessionId', $data ?? [], null); + $this->setIfExists('applePayToken', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('holderName', $data ?? [], null); + $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('blikCode', $data ?? [], null); + $this->setIfExists('brand', $data ?? [], null); + $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); + $this->setIfExists('cvc', $data ?? [], null); + $this->setIfExists('encryptedCardNumber', $data ?? [], null); + $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); + $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedSecurityCode', $data ?? [], null); + $this->setIfExists('expiryMonth', $data ?? [], null); + $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('networkPaymentReference', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); + $this->setIfExists('shopperNotificationReference', $data ?? [], null); + $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); + $this->setIfExists('firstName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('shopperEmail', $data ?? [], null); + $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('googlePayToken', $data ?? [], null); + $this->setIfExists('subtype', $data ?? [], null); + $this->setIfExists('masterpassTransactionId', $data ?? [], null); + $this->setIfExists('orderID', $data ?? [], null); + $this->setIfExists('payeePreferred', $data ?? [], null); + $this->setIfExists('payerID', $data ?? [], null); + $this->setIfExists('payerSelected', $data ?? [], null); + $this->setIfExists('virtualPaymentAddress', $data ?? [], null); + $this->setIfExists('samsungPayToken', $data ?? [], null); + $this->setIfExists('iban', $data ?? [], null); + $this->setIfExists('billingSequenceNumber', $data ?? [], null); + $this->setIfExists('visaCheckoutCallId', $data ?? [], null); + $this->setIfExists('appId', $data ?? [], null); + $this->setIfExists('openid', $data ?? [], null); + $this->setIfExists('clickAndCollect', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['bankAccountNumber'] === null) { + $invalidProperties[] = "'bankAccountNumber' can't be null"; + } + + if ($this->container['ownerName'] === null) { + $invalidProperties[] = "'ownerName' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + + if ($this->container['applePayToken'] === null) { + $invalidProperties[] = "'applePayToken' can't be null"; + } + + if ($this->container['issuer'] === null) { + $invalidProperties[] = "'issuer' can't be null"; + } + if ($this->container['firstName'] === null) { + $invalidProperties[] = "'firstName' can't be null"; + } + if ($this->container['lastName'] === null) { + $invalidProperties[] = "'lastName' can't be null"; + } + if ($this->container['shopperEmail'] === null) { + $invalidProperties[] = "'shopperEmail' can't be null"; + } + if ($this->container['telephoneNumber'] === null) { + $invalidProperties[] = "'telephoneNumber' can't be null"; + } + if ($this->container['googlePayToken'] === null) { + $invalidProperties[] = "'googlePayToken' can't be null"; + } + + if ($this->container['masterpassTransactionId'] === null) { + $invalidProperties[] = "'masterpassTransactionId' can't be null"; + } + if ($this->container['samsungPayToken'] === null) { + $invalidProperties[] = "'samsungPayToken' can't be null"; + } + if ($this->container['iban'] === null) { + $invalidProperties[] = "'iban' can't be null"; + } + if ($this->container['billingSequenceNumber'] === null) { + $invalidProperties[] = "'billingSequenceNumber' can't be null"; + } + if ($this->container['visaCheckoutCallId'] === null) { + $invalidProperties[] = "'visaCheckoutCallId' can't be null"; + } + 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 bankAccountNumber + * + * @return string + */ + public function getBankAccountNumber() + { + return $this->container['bankAccountNumber']; + } + + /** + * Sets bankAccountNumber + * + * @param string $bankAccountNumber The bank account number (without separators). + * + * @return self + */ + public function setBankAccountNumber($bankAccountNumber) + { + if (is_null($bankAccountNumber)) { + throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); + } + $this->container['bankAccountNumber'] = $bankAccountNumber; + + return $this; + } + + /** + * Gets bankAccountType + * + * @return string|null + */ + public function getBankAccountType() + { + return $this->container['bankAccountType']; + } + + /** + * Sets bankAccountType + * + * @param string|null $bankAccountType The bank account type (checking, savings...). + * + * @return self + */ + public function setBankAccountType($bankAccountType) + { + if (is_null($bankAccountType)) { + throw new \InvalidArgumentException('non-nullable bankAccountType cannot be null'); + } + $this->container['bankAccountType'] = $bankAccountType; + + return $this; + } + + /** + * Gets bankLocationId + * + * @return string|null + */ + public function getBankLocationId() + { + return $this->container['bankLocationId']; + } + + /** + * Sets bankLocationId + * + * @param string|null $bankLocationId The bank routing number of the account. + * + * @return self + */ + public function setBankLocationId($bankLocationId) + { + if (is_null($bankLocationId)) { + throw new \InvalidArgumentException('non-nullable bankLocationId cannot be null'); + } + $this->container['bankLocationId'] = $bankLocationId; + + return $this; + } + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + if (is_null($checkoutAttemptId)) { + throw new \InvalidArgumentException('non-nullable checkoutAttemptId cannot be null'); + } + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets encryptedBankAccountNumber + * + * @return string|null + */ + public function getEncryptedBankAccountNumber() + { + return $this->container['encryptedBankAccountNumber']; + } + + /** + * Sets encryptedBankAccountNumber + * + * @param string|null $encryptedBankAccountNumber Encrypted bank account number. The bank account number (without separators). + * + * @return self + */ + public function setEncryptedBankAccountNumber($encryptedBankAccountNumber) + { + if (is_null($encryptedBankAccountNumber)) { + throw new \InvalidArgumentException('non-nullable encryptedBankAccountNumber cannot be null'); + } + $this->container['encryptedBankAccountNumber'] = $encryptedBankAccountNumber; + + return $this; + } + + /** + * Gets encryptedBankLocationId + * + * @return string|null + */ + public function getEncryptedBankLocationId() + { + return $this->container['encryptedBankLocationId']; + } + + /** + * Sets encryptedBankLocationId + * + * @param string|null $encryptedBankLocationId Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases. + * + * @return self + */ + public function setEncryptedBankLocationId($encryptedBankLocationId) + { + if (is_null($encryptedBankLocationId)) { + throw new \InvalidArgumentException('non-nullable encryptedBankLocationId cannot be null'); + } + $this->container['encryptedBankLocationId'] = $encryptedBankLocationId; + + return $this; + } + + /** + * Gets ownerName + * + * @return string + */ + public function getOwnerName() + { + return $this->container['ownerName']; + } + + /** + * Sets ownerName + * + * @param string $ownerName The name of the bank account holder. + * + * @return self + */ + public function setOwnerName($ownerName) + { + if (is_null($ownerName)) { + throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); + } + $this->container['ownerName'] = $ownerName; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated + */ + public function setRecurringDetailReference($recurringDetailReference) + { + if (is_null($recurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); + } + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + if (is_null($storedPaymentMethodId)) { + throw new \InvalidArgumentException('non-nullable storedPaymentMethodId cannot be null'); + } + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **zip** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets billingAddress + * + * @return string|null + */ + public function getBillingAddress() + { + return $this->container['billingAddress']; + } + + /** + * Sets billingAddress + * + * @param string|null $billingAddress The address where to send the invoice. + * + * @return self + */ + public function setBillingAddress($billingAddress) + { + if (is_null($billingAddress)) { + throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); + } + $this->container['billingAddress'] = $billingAddress; + + return $this; + } + + /** + * Gets deliveryAddress + * + * @return string|null + */ + public function getDeliveryAddress() + { + return $this->container['deliveryAddress']; + } + + /** + * Sets deliveryAddress + * + * @param string|null $deliveryAddress The address where the goods should be delivered. + * + * @return self + */ + public function setDeliveryAddress($deliveryAddress) + { + if (is_null($deliveryAddress)) { + throw new \InvalidArgumentException('non-nullable deliveryAddress cannot be null'); + } + $this->container['deliveryAddress'] = $deliveryAddress; + + return $this; + } + + /** + * Gets personalDetails + * + * @return string|null + */ + public function getPersonalDetails() + { + return $this->container['personalDetails']; + } + + /** + * Sets personalDetails + * + * @param string|null $personalDetails Shopper name, date of birth, phone number, and email address. + * + * @return self + */ + public function setPersonalDetails($personalDetails) + { + if (is_null($personalDetails)) { + throw new \InvalidArgumentException('non-nullable personalDetails cannot be null'); + } + $this->container['personalDetails'] = $personalDetails; + + return $this; + } + + /** + * Gets amazonPayToken + * + * @return string|null + */ + public function getAmazonPayToken() + { + return $this->container['amazonPayToken']; + } + + /** + * Sets amazonPayToken + * + * @param string|null $amazonPayToken This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically. + * + * @return self + */ + public function setAmazonPayToken($amazonPayToken) + { + if (is_null($amazonPayToken)) { + throw new \InvalidArgumentException('non-nullable amazonPayToken cannot be null'); + } + $this->container['amazonPayToken'] = $amazonPayToken; + + return $this; + } + + /** + * Gets checkoutSessionId + * + * @return string|null + */ + public function getCheckoutSessionId() + { + return $this->container['checkoutSessionId']; + } + + /** + * Sets checkoutSessionId + * + * @param string|null $checkoutSessionId The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken. + * + * @return self + */ + public function setCheckoutSessionId($checkoutSessionId) + { + if (is_null($checkoutSessionId)) { + throw new \InvalidArgumentException('non-nullable checkoutSessionId cannot be null'); + } + $this->container['checkoutSessionId'] = $checkoutSessionId; + + return $this; + } + + /** + * Gets applePayToken + * + * @return string + */ + public function getApplePayToken() + { + return $this->container['applePayToken']; + } + + /** + * Sets applePayToken + * + * @param string $applePayToken The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. + * + * @return self + */ + public function setApplePayToken($applePayToken) + { + if (is_null($applePayToken)) { + throw new \InvalidArgumentException('non-nullable applePayToken cannot be null'); + } + $this->container['applePayToken'] = $applePayToken; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets holderName + * + * @return string|null + */ + public function getHolderName() + { + return $this->container['holderName']; + } + + /** + * Sets holderName + * + * @param string|null $holderName The name of the card holder. + * + * @return self + */ + public function setHolderName($holderName) + { + if (is_null($holderName)) { + throw new \InvalidArgumentException('non-nullable holderName cannot be null'); + } + $this->container['holderName'] = $holderName; + + return $this; + } + + /** + * Gets issuer + * + * @return string + */ + public function getIssuer() + { + return $this->container['issuer']; + } + + /** + * Sets issuer + * + * @param string $issuer The shopper's bank. Specify this with the issuer value that corresponds to this bank. + * + * @return self + */ + public function setIssuer($issuer) + { + if (is_null($issuer)) { + throw new \InvalidArgumentException('non-nullable issuer cannot be null'); + } + $this->container['issuer'] = $issuer; + + return $this; + } + + /** + * Gets blikCode + * + * @return string|null + */ + public function getBlikCode() + { + return $this->container['blikCode']; + } + + /** + * Sets blikCode + * + * @param string|null $blikCode BLIK code consisting of 6 digits. + * + * @return self + */ + public function setBlikCode($blikCode) + { + if (is_null($blikCode)) { + throw new \InvalidArgumentException('non-nullable blikCode cannot be null'); + } + $this->container['blikCode'] = $blikCode; + + return $this; + } + + /** + * Gets brand + * + * @return string|null + */ + public function getBrand() + { + return $this->container['brand']; + } + + /** + * Sets brand + * + * @param string|null $brand Secondary brand of the card. For example: **plastix**, **hmclub**. + * + * @return self + */ + public function setBrand($brand) + { + if (is_null($brand)) { + throw new \InvalidArgumentException('non-nullable brand cannot be null'); + } + $this->container['brand'] = $brand; + + return $this; + } + + /** + * Gets cupsecureplusSmscode + * + * @return string|null + * @deprecated + */ + public function getCupsecureplusSmscode() + { + return $this->container['cupsecureplusSmscode']; + } + + /** + * Sets cupsecureplusSmscode + * + * @param string|null $cupsecureplusSmscode cupsecureplusSmscode + * + * @return self + * @deprecated + */ + public function setCupsecureplusSmscode($cupsecureplusSmscode) + { + if (is_null($cupsecureplusSmscode)) { + throw new \InvalidArgumentException('non-nullable cupsecureplusSmscode cannot be null'); + } + $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; + + return $this; + } + + /** + * Gets cvc + * + * @return string|null + */ + public function getCvc() + { + return $this->container['cvc']; + } + + /** + * Sets cvc + * + * @param string|null $cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setCvc($cvc) + { + if (is_null($cvc)) { + throw new \InvalidArgumentException('non-nullable cvc cannot be null'); + } + $this->container['cvc'] = $cvc; + + return $this; + } + + /** + * Gets encryptedCardNumber + * + * @return string|null + */ + public function getEncryptedCardNumber() + { + return $this->container['encryptedCardNumber']; + } + + /** + * Sets encryptedCardNumber + * + * @param string|null $encryptedCardNumber The encrypted card number. + * + * @return self + */ + public function setEncryptedCardNumber($encryptedCardNumber) + { + if (is_null($encryptedCardNumber)) { + throw new \InvalidArgumentException('non-nullable encryptedCardNumber cannot be null'); + } + $this->container['encryptedCardNumber'] = $encryptedCardNumber; + + return $this; + } + + /** + * Gets encryptedExpiryMonth + * + * @return string|null + */ + public function getEncryptedExpiryMonth() + { + return $this->container['encryptedExpiryMonth']; + } + + /** + * Sets encryptedExpiryMonth + * + * @param string|null $encryptedExpiryMonth The encrypted card expiry month. + * + * @return self + */ + public function setEncryptedExpiryMonth($encryptedExpiryMonth) + { + if (is_null($encryptedExpiryMonth)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryMonth cannot be null'); + } + $this->container['encryptedExpiryMonth'] = $encryptedExpiryMonth; + + return $this; + } + + /** + * Gets encryptedExpiryYear + * + * @return string|null + */ + public function getEncryptedExpiryYear() + { + return $this->container['encryptedExpiryYear']; + } + + /** + * Sets encryptedExpiryYear + * + * @param string|null $encryptedExpiryYear The encrypted card expiry year. + * + * @return self + */ + public function setEncryptedExpiryYear($encryptedExpiryYear) + { + if (is_null($encryptedExpiryYear)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryYear cannot be null'); + } + $this->container['encryptedExpiryYear'] = $encryptedExpiryYear; + + return $this; + } + + /** + * Gets encryptedSecurityCode + * + * @return string|null + */ + public function getEncryptedSecurityCode() + { + return $this->container['encryptedSecurityCode']; + } + + /** + * Sets encryptedSecurityCode + * + * @param string|null $encryptedSecurityCode The encrypted card verification code. + * + * @return self + */ + public function setEncryptedSecurityCode($encryptedSecurityCode) + { + if (is_null($encryptedSecurityCode)) { + throw new \InvalidArgumentException('non-nullable encryptedSecurityCode cannot be null'); + } + $this->container['encryptedSecurityCode'] = $encryptedSecurityCode; + + return $this; + } + + /** + * Gets expiryMonth + * + * @return string|null + */ + public function getExpiryMonth() + { + return $this->container['expiryMonth']; + } + + /** + * Sets expiryMonth + * + * @param string|null $expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setExpiryMonth($expiryMonth) + { + if (is_null($expiryMonth)) { + throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); + } + $this->container['expiryMonth'] = $expiryMonth; + + return $this; + } + + /** + * Gets expiryYear + * + * @return string|null + */ + public function getExpiryYear() + { + return $this->container['expiryYear']; + } + + /** + * Sets expiryYear + * + * @param string|null $expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setExpiryYear($expiryYear) + { + if (is_null($expiryYear)) { + throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); + } + $this->container['expiryYear'] = $expiryYear; + + return $this; + } + + /** + * Gets networkPaymentReference + * + * @return string|null + */ + public function getNetworkPaymentReference() + { + return $this->container['networkPaymentReference']; + } + + /** + * Sets networkPaymentReference + * + * @param string|null $networkPaymentReference The network token reference. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. + * + * @return self + */ + public function setNetworkPaymentReference($networkPaymentReference) + { + if (is_null($networkPaymentReference)) { + throw new \InvalidArgumentException('non-nullable networkPaymentReference cannot be null'); + } + $this->container['networkPaymentReference'] = $networkPaymentReference; + + return $this; + } + + /** + * Gets number + * + * @return string|null + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string|null $number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setNumber($number) + { + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); + } + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets shopperNotificationReference + * + * @return string|null + */ + public function getShopperNotificationReference() + { + return $this->container['shopperNotificationReference']; + } + + /** + * Sets shopperNotificationReference + * + * @param string|null $shopperNotificationReference The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. + * + * @return self + */ + public function setShopperNotificationReference($shopperNotificationReference) + { + if (is_null($shopperNotificationReference)) { + throw new \InvalidArgumentException('non-nullable shopperNotificationReference cannot be null'); + } + $this->container['shopperNotificationReference'] = $shopperNotificationReference; + + return $this; + } + + /** + * Gets threeDS2SdkVersion + * + * @return string|null + */ + public function getThreeDS2SdkVersion() + { + return $this->container['threeDS2SdkVersion']; + } + + /** + * Sets threeDS2SdkVersion + * + * @param string|null $threeDS2SdkVersion Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. + * + * @return self + */ + public function setThreeDS2SdkVersion($threeDS2SdkVersion) + { + if (is_null($threeDS2SdkVersion)) { + throw new \InvalidArgumentException('non-nullable threeDS2SdkVersion cannot be null'); + } + $this->container['threeDS2SdkVersion'] = $threeDS2SdkVersion; + + return $this; + } + + /** + * Gets firstName + * + * @return string + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string $firstName The shopper's first name. + * + * @return self + */ + public function setFirstName($firstName) + { + if (is_null($firstName)) { + throw new \InvalidArgumentException('non-nullable firstName cannot be null'); + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string $lastName The shopper's last name. + * + * @return self + */ + public function setLastName($lastName) + { + if (is_null($lastName)) { + throw new \InvalidArgumentException('non-nullable lastName cannot be null'); + } + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets shopperEmail + * + * @return string + */ + public function getShopperEmail() + { + return $this->container['shopperEmail']; + } + + /** + * Sets shopperEmail + * + * @param string $shopperEmail + * + * @return self + */ + public function setShopperEmail($shopperEmail) + { + if (is_null($shopperEmail)) { + throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); + } + $this->container['shopperEmail'] = $shopperEmail; + + return $this; + } + + /** + * Gets telephoneNumber + * + * @return string + */ + public function getTelephoneNumber() + { + return $this->container['telephoneNumber']; + } + + /** + * Sets telephoneNumber + * + * @param string $telephoneNumber + * + * @return self + */ + public function setTelephoneNumber($telephoneNumber) + { + if (is_null($telephoneNumber)) { + throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); + } + $this->container['telephoneNumber'] = $telephoneNumber; + + return $this; + } + + /** + * Gets googlePayToken + * + * @return string + */ + public function getGooglePayToken() + { + return $this->container['googlePayToken']; + } + + /** + * Sets googlePayToken + * + * @param string $googlePayToken The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. + * + * @return self + */ + public function setGooglePayToken($googlePayToken) + { + if (is_null($googlePayToken)) { + throw new \InvalidArgumentException('non-nullable googlePayToken cannot be null'); + } + $this->container['googlePayToken'] = $googlePayToken; + + return $this; + } + + /** + * Gets subtype + * + * @return string|null + */ + public function getSubtype() + { + return $this->container['subtype']; + } + + /** + * Sets subtype + * + * @param string|null $subtype The type of flow to initiate. + * + * @return self + */ + public function setSubtype($subtype) + { + if (is_null($subtype)) { + throw new \InvalidArgumentException('non-nullable subtype cannot be null'); + } + $this->container['subtype'] = $subtype; + + return $this; + } + + /** + * Gets masterpassTransactionId + * + * @return string + */ + public function getMasterpassTransactionId() + { + return $this->container['masterpassTransactionId']; + } + + /** + * Sets masterpassTransactionId + * + * @param string $masterpassTransactionId The Masterpass transaction ID. + * + * @return self + */ + public function setMasterpassTransactionId($masterpassTransactionId) + { + if (is_null($masterpassTransactionId)) { + throw new \InvalidArgumentException('non-nullable masterpassTransactionId cannot be null'); + } + $this->container['masterpassTransactionId'] = $masterpassTransactionId; + + return $this; + } + + /** + * Gets orderID + * + * @return string|null + */ + public function getOrderID() + { + return $this->container['orderID']; + } + + /** + * Sets orderID + * + * @param string|null $orderID The unique ID associated with the order. + * + * @return self + */ + public function setOrderID($orderID) + { + if (is_null($orderID)) { + throw new \InvalidArgumentException('non-nullable orderID cannot be null'); + } + $this->container['orderID'] = $orderID; + + return $this; + } + + /** + * Gets payeePreferred + * + * @return string|null + */ + public function getPayeePreferred() + { + return $this->container['payeePreferred']; + } + + /** + * Sets payeePreferred + * + * @param string|null $payeePreferred IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED + * + * @return self + */ + public function setPayeePreferred($payeePreferred) + { + if (is_null($payeePreferred)) { + throw new \InvalidArgumentException('non-nullable payeePreferred cannot be null'); + } + $this->container['payeePreferred'] = $payeePreferred; + + return $this; + } + + /** + * Gets payerID + * + * @return string|null + */ + public function getPayerID() + { + return $this->container['payerID']; + } + + /** + * Sets payerID + * + * @param string|null $payerID The unique ID associated with the payer. + * + * @return self + */ + public function setPayerID($payerID) + { + if (is_null($payerID)) { + throw new \InvalidArgumentException('non-nullable payerID cannot be null'); + } + $this->container['payerID'] = $payerID; + + return $this; + } + + /** + * Gets payerSelected + * + * @return string|null + */ + public function getPayerSelected() + { + return $this->container['payerSelected']; + } + + /** + * Sets payerSelected + * + * @param string|null $payerSelected PAYPAL or PAYPAL_CREDIT + * + * @return self + */ + public function setPayerSelected($payerSelected) + { + if (is_null($payerSelected)) { + throw new \InvalidArgumentException('non-nullable payerSelected cannot be null'); + } + $this->container['payerSelected'] = $payerSelected; + + return $this; + } + + /** + * Gets virtualPaymentAddress + * + * @return string|null + */ + public function getVirtualPaymentAddress() + { + return $this->container['virtualPaymentAddress']; + } + + /** + * Sets virtualPaymentAddress + * + * @param string|null $virtualPaymentAddress The virtual payment address for UPI. + * + * @return self + */ + public function setVirtualPaymentAddress($virtualPaymentAddress) + { + if (is_null($virtualPaymentAddress)) { + throw new \InvalidArgumentException('non-nullable virtualPaymentAddress cannot be null'); + } + $this->container['virtualPaymentAddress'] = $virtualPaymentAddress; + + return $this; + } + + /** + * Gets samsungPayToken + * + * @return string + */ + public function getSamsungPayToken() + { + return $this->container['samsungPayToken']; + } + + /** + * Sets samsungPayToken + * + * @param string $samsungPayToken The payload you received from the Samsung Pay SDK response. + * + * @return self + */ + public function setSamsungPayToken($samsungPayToken) + { + if (is_null($samsungPayToken)) { + throw new \InvalidArgumentException('non-nullable samsungPayToken cannot be null'); + } + $this->container['samsungPayToken'] = $samsungPayToken; + + return $this; + } + + /** + * Gets iban + * + * @return string + */ + public function getIban() + { + return $this->container['iban']; + } + + /** + * Sets iban + * + * @param string $iban The International Bank Account Number (IBAN). + * + * @return self + */ + public function setIban($iban) + { + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); + } + $this->container['iban'] = $iban; + + return $this; + } + + /** + * Gets billingSequenceNumber + * + * @return string + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * + * @return self + */ + public function setBillingSequenceNumber($billingSequenceNumber) + { + if (is_null($billingSequenceNumber)) { + throw new \InvalidArgumentException('non-nullable billingSequenceNumber cannot be null'); + } + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + + /** + * Gets visaCheckoutCallId + * + * @return string + */ + public function getVisaCheckoutCallId() + { + return $this->container['visaCheckoutCallId']; + } + + /** + * Sets visaCheckoutCallId + * + * @param string $visaCheckoutCallId The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID. + * + * @return self + */ + public function setVisaCheckoutCallId($visaCheckoutCallId) + { + if (is_null($visaCheckoutCallId)) { + throw new \InvalidArgumentException('non-nullable visaCheckoutCallId cannot be null'); + } + $this->container['visaCheckoutCallId'] = $visaCheckoutCallId; + + return $this; + } + + /** + * Gets appId + * + * @return string|null + */ + public function getAppId() + { + return $this->container['appId']; + } + + /** + * Sets appId + * + * @param string|null $appId appId + * + * @return self + */ + public function setAppId($appId) + { + if (is_null($appId)) { + throw new \InvalidArgumentException('non-nullable appId cannot be null'); + } + $this->container['appId'] = $appId; + + return $this; + } + + /** + * Gets openid + * + * @return string|null + */ + public function getOpenid() + { + return $this->container['openid']; + } + + /** + * Sets openid + * + * @param string|null $openid openid + * + * @return self + */ + public function setOpenid($openid) + { + if (is_null($openid)) { + throw new \InvalidArgumentException('non-nullable openid cannot be null'); + } + $this->container['openid'] = $openid; + + return $this; + } + + /** + * Gets clickAndCollect + * + * @return string|null + */ + public function getClickAndCollect() + { + return $this->container['clickAndCollect']; + } + + /** + * Sets clickAndCollect + * + * @param string|null $clickAndCollect Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them. + * + * @return self + */ + public function setClickAndCollect($clickAndCollect) + { + if (is_null($clickAndCollect)) { + throw new \InvalidArgumentException('non-nullable clickAndCollect cannot be null'); + } + $this->container['clickAndCollect'] = $clickAndCollect; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/SubMerchantInfo.php b/src/Adyen/Model/Checkout/SubMerchantInfo.php index e41e335da..2a95eb4db 100644 --- a/src/Adyen/Model/Checkout/SubMerchantInfo.php +++ b/src/Adyen/Model/Checkout/SubMerchantInfo.php @@ -44,7 +44,7 @@ class SubMerchantInfo implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'address' => '\Adyen\Model\Checkout\Address', + 'address' => '\Adyen\Model\Checkout\BillingAddress', 'id' => 'string', 'mcc' => 'string', 'name' => 'string', @@ -307,7 +307,7 @@ public function valid() /** * Gets address * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getAddress() { @@ -317,7 +317,7 @@ public function getAddress() /** * Sets address * - * @param \Adyen\Model\Checkout\Address|null $address address + * @param \Adyen\Model\Checkout\BillingAddress|null $address address * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php index 1164f9dca..41dc31064 100644 --- a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php @@ -53,8 +53,8 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'accountType' => 'string', 'institutionNumber' => 'string', 'transitNumber' => 'string', + 'clearingCode' => 'string', 'iban' => 'string', - 'accountSuffix' => 'string', 'additionalBankIdentification' => '\Adyen\Model\TransferWebhooks\AdditionalBankIdentification', 'bic' => 'string', 'clearingNumber' => 'string', @@ -78,8 +78,8 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'accountType' => null, 'institutionNumber' => null, 'transitNumber' => null, + 'clearingCode' => null, 'iban' => null, - 'accountSuffix' => null, 'additionalBankIdentification' => null, 'bic' => null, 'clearingNumber' => null, @@ -101,8 +101,8 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'accountType' => false, 'institutionNumber' => false, 'transitNumber' => false, + 'clearingCode' => false, 'iban' => false, - 'accountSuffix' => false, 'additionalBankIdentification' => false, 'bic' => false, 'clearingNumber' => false, @@ -204,8 +204,8 @@ public function isNullableSetToNull(string $property): bool 'accountType' => 'accountType', 'institutionNumber' => 'institutionNumber', 'transitNumber' => 'transitNumber', + 'clearingCode' => 'clearingCode', 'iban' => 'iban', - 'accountSuffix' => 'accountSuffix', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', 'clearingNumber' => 'clearingNumber', @@ -227,8 +227,8 @@ public function isNullableSetToNull(string $property): bool 'accountType' => 'setAccountType', 'institutionNumber' => 'setInstitutionNumber', 'transitNumber' => 'setTransitNumber', + 'clearingCode' => 'setClearingCode', 'iban' => 'setIban', - 'accountSuffix' => 'setAccountSuffix', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', 'clearingNumber' => 'setClearingNumber', @@ -250,8 +250,8 @@ public function isNullableSetToNull(string $property): bool 'accountType' => 'getAccountType', 'institutionNumber' => 'getInstitutionNumber', 'transitNumber' => 'getTransitNumber', + 'clearingCode' => 'getClearingCode', 'iban' => 'getIban', - 'accountSuffix' => 'getAccountSuffix', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', 'clearingNumber' => 'getClearingNumber', @@ -323,8 +323,8 @@ public function __construct(array $data = null) $this->setIfExists('accountType', $data ?? [], 'checking'); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); + $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); @@ -382,12 +382,12 @@ public function listInvalidProperties() if ($this->container['transitNumber'] === null) { $invalidProperties[] = "'transitNumber' can't be null"; } + if ($this->container['clearingCode'] === null) { + $invalidProperties[] = "'clearingCode' can't be null"; + } if ($this->container['iban'] === null) { $invalidProperties[] = "'iban' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } if ($this->container['bic'] === null) { $invalidProperties[] = "'bic' can't be null"; } @@ -509,7 +509,7 @@ public function getBankCode() /** * Sets bankCode * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (without separators or whitespace). * * @return self */ @@ -632,55 +632,55 @@ public function setTransitNumber($transitNumber) } /** - * Gets iban + * Gets clearingCode * * @return string */ - public function getIban() + public function getClearingCode() { - return $this->container['iban']; + return $this->container['clearingCode']; } /** - * Sets iban + * Sets clearingCode * - * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + * @param string $clearingCode The 3-digit clearing code, without separators or whitespace. * * @return self */ - public function setIban($iban) + public function setClearingCode($clearingCode) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); + if (is_null($clearingCode)) { + throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); } - $this->container['iban'] = $iban; + $this->container['clearingCode'] = $clearingCode; return $this; } /** - * Gets accountSuffix + * Gets iban * * @return string */ - public function getAccountSuffix() + public function getIban() { - return $this->container['accountSuffix']; + return $this->container['iban']; } /** - * Sets accountSuffix + * Sets iban * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. + * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. * * @return self */ - public function setAccountSuffix($accountSuffix) + public function setIban($iban) { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); } - $this->container['accountSuffix'] = $accountSuffix; + $this->container['iban'] = $iban; return $this; } diff --git a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php index 5b00648b2..a4389434e 100644 --- a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php @@ -45,7 +45,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', - 'bankCode' => 'string', + 'clearingCode' => 'string', 'type' => 'string' ]; @@ -58,7 +58,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, - 'bankCode' => null, + 'clearingCode' => null, 'type' => null ]; @@ -69,7 +69,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, - 'bankCode' => false, + 'clearingCode' => false, 'type' => false ]; @@ -160,7 +160,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', - 'bankCode' => 'bankCode', + 'clearingCode' => 'clearingCode', 'type' => 'type' ]; @@ -171,7 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', - 'bankCode' => 'setBankCode', + 'clearingCode' => 'setClearingCode', 'type' => 'setType' ]; @@ -182,7 +182,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', - 'bankCode' => 'getBankCode', + 'clearingCode' => 'getClearingCode', 'type' => 'getType' ]; @@ -256,7 +256,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('bankCode', $data ?? [], null); + $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'hkLocal'); } @@ -290,8 +290,8 @@ public function listInvalidProperties() if ($this->container['accountNumber'] === null) { $invalidProperties[] = "'accountNumber' can't be null"; } - if ($this->container['bankCode'] === null) { - $invalidProperties[] = "'bankCode' can't be null"; + if ($this->container['clearingCode'] === null) { + $invalidProperties[] = "'clearingCode' can't be null"; } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; @@ -333,7 +333,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + * @param string $accountNumber The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * * @return self */ @@ -348,28 +348,28 @@ public function setAccountNumber($accountNumber) } /** - * Gets bankCode + * Gets clearingCode * * @return string */ - public function getBankCode() + public function getClearingCode() { - return $this->container['bankCode']; + return $this->container['clearingCode']; } /** - * Sets bankCode + * Sets clearingCode * - * @param string $bankCode The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. + * @param string $clearingCode The 3-digit clearing code, without separators or whitespace. * * @return self */ - public function setBankCode($bankCode) + public function setClearingCode($clearingCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); + if (is_null($clearingCode)) { + throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); } - $this->container['bankCode'] = $bankCode; + $this->container['clearingCode'] = $clearingCode; return $this; } diff --git a/src/Adyen/Model/TransferWebhooks/MerchantData.php b/src/Adyen/Model/TransferWebhooks/MerchantData.php index a856431dc..52161903d 100644 --- a/src/Adyen/Model/TransferWebhooks/MerchantData.php +++ b/src/Adyen/Model/TransferWebhooks/MerchantData.php @@ -44,6 +44,7 @@ class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'acquirerId' => 'string', 'mcc' => 'string', 'merchantId' => 'string', 'nameLocation' => '\Adyen\Model\TransferWebhooks\NameLocation', @@ -58,6 +59,7 @@ class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'acquirerId' => null, 'mcc' => null, 'merchantId' => null, 'nameLocation' => null, @@ -70,6 +72,7 @@ class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'acquirerId' => false, 'mcc' => false, 'merchantId' => false, 'nameLocation' => false, @@ -162,6 +165,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'acquirerId' => 'acquirerId', 'mcc' => 'mcc', 'merchantId' => 'merchantId', 'nameLocation' => 'nameLocation', @@ -174,6 +178,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'acquirerId' => 'setAcquirerId', 'mcc' => 'setMcc', 'merchantId' => 'setMerchantId', 'nameLocation' => 'setNameLocation', @@ -186,6 +191,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'acquirerId' => 'getAcquirerId', 'mcc' => 'getMcc', 'merchantId' => 'getMerchantId', 'nameLocation' => 'getNameLocation', @@ -249,6 +255,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('acquirerId', $data ?? [], null); $this->setIfExists('mcc', $data ?? [], null); $this->setIfExists('merchantId', $data ?? [], null); $this->setIfExists('nameLocation', $data ?? [], null); @@ -297,6 +304,33 @@ public function valid() } + /** + * Gets acquirerId + * + * @return string|null + */ + public function getAcquirerId() + { + return $this->container['acquirerId']; + } + + /** + * Sets acquirerId + * + * @param string|null $acquirerId The unique identifier of the merchant's acquirer. + * + * @return self + */ + public function setAcquirerId($acquirerId) + { + if (is_null($acquirerId)) { + throw new \InvalidArgumentException('non-nullable acquirerId cannot be null'); + } + $this->container['acquirerId'] = $acquirerId; + + return $this; + } + /** * Gets mcc * diff --git a/src/Adyen/Model/TransferWebhooks/Modification.php b/src/Adyen/Model/TransferWebhooks/Modification.php new file mode 100644 index 000000000..834de52d7 --- /dev/null +++ b/src/Adyen/Model/TransferWebhooks/Modification.php @@ -0,0 +1,677 @@ + + */ +class Modification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Modification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'direction' => 'string', + 'id' => 'string', + 'reference' => 'string', + 'status' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'direction' => null, + 'id' => null, + 'reference' => null, + 'status' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'direction' => false, + 'id' => false, + 'reference' => false, + 'status' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'direction' => 'direction', + 'id' => 'id', + 'reference' => 'reference', + 'status' => 'status', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'direction' => 'setDirection', + 'id' => 'setId', + 'reference' => 'setReference', + 'status' => 'setStatus', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'direction' => 'getDirection', + 'id' => 'getId', + 'reference' => 'getReference', + 'status' => 'getStatus', + 'type' => 'getType' + ]; + + /** + * 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::$openAPIModelName; + } + + public const STATUS_APPROVAL_PENDING = 'approvalPending'; + public const STATUS_ATM_WITHDRAWAL = 'atmWithdrawal'; + public const STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING = 'atmWithdrawalReversalPending'; + public const STATUS_ATM_WITHDRAWAL_REVERSED = 'atmWithdrawalReversed'; + public const STATUS_AUTH_ADJUSTMENT_AUTHORISED = 'authAdjustmentAuthorised'; + public const STATUS_AUTH_ADJUSTMENT_ERROR = 'authAdjustmentError'; + public const STATUS_AUTH_ADJUSTMENT_REFUSED = 'authAdjustmentRefused'; + public const STATUS_AUTHORISED = 'authorised'; + public const STATUS_BANK_TRANSFER = 'bankTransfer'; + public const STATUS_BANK_TRANSFER_PENDING = 'bankTransferPending'; + public const STATUS_BOOKED = 'booked'; + public const STATUS_BOOKING_PENDING = 'bookingPending'; + public const STATUS_CANCELLED = 'cancelled'; + public const STATUS_CAPTURE_PENDING = 'capturePending'; + public const STATUS_CAPTURE_REVERSAL_PENDING = 'captureReversalPending'; + public const STATUS_CAPTURE_REVERSED = 'captureReversed'; + public const STATUS_CAPTURED = 'captured'; + public const STATUS_CAPTURED_EXTERNALLY = 'capturedExternally'; + public const STATUS_CHARGEBACK = 'chargeback'; + public const STATUS_CHARGEBACK_EXTERNALLY = 'chargebackExternally'; + public const STATUS_CHARGEBACK_PENDING = 'chargebackPending'; + public const STATUS_CHARGEBACK_REVERSAL_PENDING = 'chargebackReversalPending'; + public const STATUS_CHARGEBACK_REVERSED = 'chargebackReversed'; + public const STATUS_CREDITED = 'credited'; + public const STATUS_DEPOSIT_CORRECTION = 'depositCorrection'; + public const STATUS_DEPOSIT_CORRECTION_PENDING = 'depositCorrectionPending'; + public const STATUS_DISPUTE = 'dispute'; + public const STATUS_DISPUTE_CLOSED = 'disputeClosed'; + public const STATUS_DISPUTE_EXPIRED = 'disputeExpired'; + public const STATUS_DISPUTE_NEEDS_REVIEW = 'disputeNeedsReview'; + public const STATUS_ERROR = 'error'; + public const STATUS_EXPIRED = 'expired'; + public const STATUS_FAILED = 'failed'; + public const STATUS_FEE = 'fee'; + public const STATUS_FEE_PENDING = 'feePending'; + public const STATUS_INTERNAL_TRANSFER = 'internalTransfer'; + public const STATUS_INTERNAL_TRANSFER_PENDING = 'internalTransferPending'; + public const STATUS_INVOICE_DEDUCTION = 'invoiceDeduction'; + public const STATUS_INVOICE_DEDUCTION_PENDING = 'invoiceDeductionPending'; + public const STATUS_MANUAL_CORRECTION_PENDING = 'manualCorrectionPending'; + public const STATUS_MANUALLY_CORRECTED = 'manuallyCorrected'; + public const STATUS_MATCHED_STATEMENT = 'matchedStatement'; + public const STATUS_MATCHED_STATEMENT_PENDING = 'matchedStatementPending'; + public const STATUS_MERCHANT_PAYIN = 'merchantPayin'; + public const STATUS_MERCHANT_PAYIN_PENDING = 'merchantPayinPending'; + public const STATUS_MERCHANT_PAYIN_REVERSED = 'merchantPayinReversed'; + public const STATUS_MERCHANT_PAYIN_REVERSED_PENDING = 'merchantPayinReversedPending'; + public const STATUS_MISC_COST = 'miscCost'; + public const STATUS_MISC_COST_PENDING = 'miscCostPending'; + public const STATUS_PAYMENT_COST = 'paymentCost'; + public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_RECEIVED = 'received'; + public const STATUS_REFUND_PENDING = 'refundPending'; + public const STATUS_REFUND_REVERSAL_PENDING = 'refundReversalPending'; + public const STATUS_REFUND_REVERSED = 'refundReversed'; + public const STATUS_REFUNDED = 'refunded'; + public const STATUS_REFUNDED_EXTERNALLY = 'refundedExternally'; + public const STATUS_REFUSED = 'refused'; + public const STATUS_RESERVE_ADJUSTMENT = 'reserveAdjustment'; + public const STATUS_RESERVE_ADJUSTMENT_PENDING = 'reserveAdjustmentPending'; + public const STATUS_RETURNED = 'returned'; + public const STATUS_SECOND_CHARGEBACK = 'secondChargeback'; + public const STATUS_SECOND_CHARGEBACK_PENDING = 'secondChargebackPending'; + public const STATUS_UNDEFINED = 'undefined'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_APPROVAL_PENDING, + self::STATUS_ATM_WITHDRAWAL, + self::STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING, + self::STATUS_ATM_WITHDRAWAL_REVERSED, + self::STATUS_AUTH_ADJUSTMENT_AUTHORISED, + self::STATUS_AUTH_ADJUSTMENT_ERROR, + self::STATUS_AUTH_ADJUSTMENT_REFUSED, + self::STATUS_AUTHORISED, + self::STATUS_BANK_TRANSFER, + self::STATUS_BANK_TRANSFER_PENDING, + self::STATUS_BOOKED, + self::STATUS_BOOKING_PENDING, + self::STATUS_CANCELLED, + self::STATUS_CAPTURE_PENDING, + self::STATUS_CAPTURE_REVERSAL_PENDING, + self::STATUS_CAPTURE_REVERSED, + self::STATUS_CAPTURED, + self::STATUS_CAPTURED_EXTERNALLY, + self::STATUS_CHARGEBACK, + self::STATUS_CHARGEBACK_EXTERNALLY, + self::STATUS_CHARGEBACK_PENDING, + self::STATUS_CHARGEBACK_REVERSAL_PENDING, + self::STATUS_CHARGEBACK_REVERSED, + self::STATUS_CREDITED, + self::STATUS_DEPOSIT_CORRECTION, + self::STATUS_DEPOSIT_CORRECTION_PENDING, + self::STATUS_DISPUTE, + self::STATUS_DISPUTE_CLOSED, + self::STATUS_DISPUTE_EXPIRED, + self::STATUS_DISPUTE_NEEDS_REVIEW, + self::STATUS_ERROR, + self::STATUS_EXPIRED, + self::STATUS_FAILED, + self::STATUS_FEE, + self::STATUS_FEE_PENDING, + self::STATUS_INTERNAL_TRANSFER, + self::STATUS_INTERNAL_TRANSFER_PENDING, + self::STATUS_INVOICE_DEDUCTION, + self::STATUS_INVOICE_DEDUCTION_PENDING, + self::STATUS_MANUAL_CORRECTION_PENDING, + self::STATUS_MANUALLY_CORRECTED, + self::STATUS_MATCHED_STATEMENT, + self::STATUS_MATCHED_STATEMENT_PENDING, + self::STATUS_MERCHANT_PAYIN, + self::STATUS_MERCHANT_PAYIN_PENDING, + self::STATUS_MERCHANT_PAYIN_REVERSED, + self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING, + self::STATUS_MISC_COST, + self::STATUS_MISC_COST_PENDING, + self::STATUS_PAYMENT_COST, + self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_RECEIVED, + self::STATUS_REFUND_PENDING, + self::STATUS_REFUND_REVERSAL_PENDING, + self::STATUS_REFUND_REVERSED, + self::STATUS_REFUNDED, + self::STATUS_REFUNDED_EXTERNALLY, + self::STATUS_REFUSED, + self::STATUS_RESERVE_ADJUSTMENT, + self::STATUS_RESERVE_ADJUSTMENT_PENDING, + self::STATUS_RETURNED, + self::STATUS_SECOND_CHARGEBACK, + self::STATUS_SECOND_CHARGEBACK_PENDING, + self::STATUS_UNDEFINED, + ]; + } + /** + * 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->setIfExists('direction', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + 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 direction + * + * @return string|null + */ + public function getDirection() + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param string|null $direction The direction of the money movement. + * + * @return self + */ + public function setDirection($direction) + { + if (is_null($direction)) { + throw new \InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Our reference for the modification. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the modification, used internally within your platform. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the transfer event. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of transfer modification. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php index 6e5793946..2b9efd6b1 100644 --- a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php @@ -45,8 +45,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', - 'accountSuffix' => 'string', - 'bankCode' => 'string', 'type' => 'string' ]; @@ -59,8 +57,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, - 'accountSuffix' => null, - 'bankCode' => null, 'type' => null ]; @@ -71,8 +67,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, - 'accountSuffix' => false, - 'bankCode' => false, 'type' => false ]; @@ -163,8 +157,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', - 'accountSuffix' => 'accountSuffix', - 'bankCode' => 'bankCode', 'type' => 'type' ]; @@ -175,8 +167,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', - 'accountSuffix' => 'setAccountSuffix', - 'bankCode' => 'setBankCode', 'type' => 'setType' ]; @@ -187,8 +177,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', - 'accountSuffix' => 'getAccountSuffix', - 'bankCode' => 'getBankCode', 'type' => 'getType' ]; @@ -262,8 +250,6 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); - $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'nzLocal'); } @@ -297,12 +283,6 @@ public function listInvalidProperties() if ($this->container['accountNumber'] === null) { $invalidProperties[] = "'accountNumber' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } - if ($this->container['bankCode'] === null) { - $invalidProperties[] = "'bankCode' can't be null"; - } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -343,7 +323,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 7-digit bank account number, without separators or whitespace. + * @param string $accountNumber The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. * * @return self */ @@ -357,60 +337,6 @@ public function setAccountNumber($accountNumber) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - - /** - * Gets bankCode - * - * @return string - */ - public function getBankCode() - { - return $this->container['bankCode']; - } - - /** - * Sets bankCode - * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - * - * @return self - */ - public function setBankCode($bankCode) - { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } - $this->container['bankCode'] = $bankCode; - - return $this; - } - /** * Gets type * diff --git a/src/Adyen/Model/TransferWebhooks/TransferData.php b/src/Adyen/Model/TransferWebhooks/TransferData.php index 8fd621927..bedc32804 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferData.php @@ -426,10 +426,18 @@ public function getModelName() public const PAN_ENTRY_MODE_MAGSTRIPE = 'magstripe'; public const PAN_ENTRY_MODE_MANUAL = 'manual'; public const PAN_ENTRY_MODE_TOKEN = 'token'; + public const PLATFORM_PAYMENT_TYPE_ACQUIRING_FEES = 'AcquiringFees'; + public const PLATFORM_PAYMENT_TYPE_ADYEN_COMMISSION = 'AdyenCommission'; + public const PLATFORM_PAYMENT_TYPE_ADYEN_FEES = 'AdyenFees'; + public const PLATFORM_PAYMENT_TYPE_ADYEN_MARKUP = 'AdyenMarkup'; public const PLATFORM_PAYMENT_TYPE_BALANCE_ACCOUNT = 'BalanceAccount'; public const PLATFORM_PAYMENT_TYPE_COMMISSION = 'Commission'; public const PLATFORM_PAYMENT_TYPE__DEFAULT = 'Default'; + public const PLATFORM_PAYMENT_TYPE_INTERCHANGE = 'Interchange'; public const PLATFORM_PAYMENT_TYPE_PAYMENT_FEE = 'PaymentFee'; + public const PLATFORM_PAYMENT_TYPE_REMAINDER = 'Remainder'; + public const PLATFORM_PAYMENT_TYPE_SCHEME_FEE = 'SchemeFee'; + public const PLATFORM_PAYMENT_TYPE_TOP_UP = 'TopUp'; public const PLATFORM_PAYMENT_TYPE_VAT = 'VAT'; public const PRIORITY_CROSS_BORDER = 'crossBorder'; public const PRIORITY_DIRECT_DEBIT = 'directDebit'; @@ -448,16 +456,19 @@ public function getModelName() public const PROCESSING_TYPE_TOKEN = 'token'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_APPROVAL_PENDING = 'approvalPending'; public const STATUS_ATM_WITHDRAWAL = 'atmWithdrawal'; @@ -508,10 +519,6 @@ public function getModelName() public const STATUS_MERCHANT_PAYIN_REVERSED_PENDING = 'merchantPayinReversedPending'; public const STATUS_MISC_COST = 'miscCost'; public const STATUS_MISC_COST_PENDING = 'miscCostPending'; - public const STATUS_OPERATION_AUTHORIZED = 'operationAuthorized'; - public const STATUS_OPERATION_BOOKED = 'operationBooked'; - public const STATUS_OPERATION_PENDING = 'operationPending'; - public const STATUS_OPERATION_RECEIVED = 'operationReceived'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; public const STATUS_RECEIVED = 'received'; @@ -530,13 +537,19 @@ public function getModelName() public const TYPE_ATM_WITHDRAWAL = 'atmWithdrawal'; public const TYPE_ATM_WITHDRAWAL_REVERSAL = 'atmWithdrawalReversal'; public const TYPE_BALANCE_ADJUSTMENT = 'balanceAdjustment'; + public const TYPE_BALANCE_MIGRATION = 'balanceMigration'; public const TYPE_BALANCE_ROLLOVER = 'balanceRollover'; public const TYPE_BANK_TRANSFER = 'bankTransfer'; public const TYPE_CAPTURE = 'capture'; public const TYPE_CAPTURE_REVERSAL = 'captureReversal'; public const TYPE_CARD_TRANSFER = 'cardTransfer'; + public const TYPE_CASH_OUT_FEE = 'cashOutFee'; + public const TYPE_CASH_OUT_FUNDING = 'cashOutFunding'; + public const TYPE_CASH_OUT_INSTRUCTION = 'cashOutInstruction'; public const TYPE_CHARGEBACK = 'chargeback'; + public const TYPE_CHARGEBACK_CORRECTION = 'chargebackCorrection'; public const TYPE_CHARGEBACK_REVERSAL = 'chargebackReversal'; + public const TYPE_CHARGEBACK_REVERSAL_CORRECTION = 'chargebackReversalCorrection'; public const TYPE_DEPOSIT_CORRECTION = 'depositCorrection'; public const TYPE_FEE = 'fee'; public const TYPE_GRANT = 'grant'; @@ -554,6 +567,7 @@ public function getModelName() public const TYPE_REPAYMENT = 'repayment'; public const TYPE_RESERVE_ADJUSTMENT = 'reserveAdjustment'; public const TYPE_SECOND_CHARGEBACK = 'secondChargeback'; + public const TYPE_SECOND_CHARGEBACK_CORRECTION = 'secondChargebackCorrection'; /** * Gets allowable values of the enum @@ -606,10 +620,18 @@ public function getPanEntryModeAllowableValues() public function getPlatformPaymentTypeAllowableValues() { return [ + self::PLATFORM_PAYMENT_TYPE_ACQUIRING_FEES, + self::PLATFORM_PAYMENT_TYPE_ADYEN_COMMISSION, + self::PLATFORM_PAYMENT_TYPE_ADYEN_FEES, + self::PLATFORM_PAYMENT_TYPE_ADYEN_MARKUP, self::PLATFORM_PAYMENT_TYPE_BALANCE_ACCOUNT, self::PLATFORM_PAYMENT_TYPE_COMMISSION, self::PLATFORM_PAYMENT_TYPE__DEFAULT, + self::PLATFORM_PAYMENT_TYPE_INTERCHANGE, self::PLATFORM_PAYMENT_TYPE_PAYMENT_FEE, + self::PLATFORM_PAYMENT_TYPE_REMAINDER, + self::PLATFORM_PAYMENT_TYPE_SCHEME_FEE, + self::PLATFORM_PAYMENT_TYPE_TOP_UP, self::PLATFORM_PAYMENT_TYPE_VAT, ]; } @@ -658,16 +680,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } @@ -728,10 +753,6 @@ public function getStatusAllowableValues() self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING, self::STATUS_MISC_COST, self::STATUS_MISC_COST_PENDING, - self::STATUS_OPERATION_AUTHORIZED, - self::STATUS_OPERATION_BOOKED, - self::STATUS_OPERATION_PENDING, - self::STATUS_OPERATION_RECEIVED, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, self::STATUS_RECEIVED, @@ -760,13 +781,19 @@ public function getTypeAllowableValues() self::TYPE_ATM_WITHDRAWAL, self::TYPE_ATM_WITHDRAWAL_REVERSAL, self::TYPE_BALANCE_ADJUSTMENT, + self::TYPE_BALANCE_MIGRATION, self::TYPE_BALANCE_ROLLOVER, self::TYPE_BANK_TRANSFER, self::TYPE_CAPTURE, self::TYPE_CAPTURE_REVERSAL, self::TYPE_CARD_TRANSFER, + self::TYPE_CASH_OUT_FEE, + self::TYPE_CASH_OUT_FUNDING, + self::TYPE_CASH_OUT_INSTRUCTION, self::TYPE_CHARGEBACK, + self::TYPE_CHARGEBACK_CORRECTION, self::TYPE_CHARGEBACK_REVERSAL, + self::TYPE_CHARGEBACK_REVERSAL_CORRECTION, self::TYPE_DEPOSIT_CORRECTION, self::TYPE_FEE, self::TYPE_GRANT, @@ -784,6 +811,7 @@ public function getTypeAllowableValues() self::TYPE_REPAYMENT, self::TYPE_RESERVE_ADJUSTMENT, self::TYPE_SECOND_CHARGEBACK, + self::TYPE_SECOND_CHARGEBACK_CORRECTION, ]; } /** @@ -1146,7 +1174,7 @@ public function getCategory() /** * Sets category * - * @param string $category The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + * @param string $category The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. * * @return self */ @@ -1538,7 +1566,7 @@ public function getPlatformPaymentType() /** * Sets platformPaymentType * - * @param string|null $platformPaymentType The type of the related split. + * @param string|null $platformPaymentType Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the [Balance Platform Accounting Report](https://docs.adyen.com/marketplaces-and-platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **BalanceAccount**: for the sale amount of the transaction. * **Commission**: for your platform's commission on the transaction. * **PaymentFee**: for the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **VAT**: for the Value Added Tax. * * @return self * @deprecated @@ -1576,7 +1604,7 @@ public function getPriority() /** * Sets priority * - * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/TransferEvent.php b/src/Adyen/Model/TransferWebhooks/TransferEvent.php index be692dbdf..8826632e4 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferEvent.php +++ b/src/Adyen/Model/TransferWebhooks/TransferEvent.php @@ -49,12 +49,14 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable 'bookingDate' => '\DateTime', 'estimatedArrivalTime' => '\DateTime', 'id' => 'string', + 'modification' => '\Adyen\Model\TransferWebhooks\Modification', 'mutations' => '\Adyen\Model\TransferWebhooks\BalanceMutation[]', 'originalAmount' => '\Adyen\Model\TransferWebhooks\Amount', 'reason' => 'string', + 'schemeTraceID' => 'string', + 'schemeUniqueTransactionID' => 'string', 'status' => 'string', 'transactionId' => 'string', - 'transferOperation' => '\Adyen\Model\TransferWebhooks\TransferOperation', 'type' => 'string', 'updateDate' => '\DateTime', 'valueDate' => '\DateTime' @@ -73,12 +75,14 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable 'bookingDate' => 'date-time', 'estimatedArrivalTime' => 'date-time', 'id' => null, + 'modification' => null, 'mutations' => null, 'originalAmount' => null, 'reason' => null, + 'schemeTraceID' => null, + 'schemeUniqueTransactionID' => null, 'status' => null, 'transactionId' => null, - 'transferOperation' => null, 'type' => null, 'updateDate' => 'date-time', 'valueDate' => 'date-time' @@ -95,12 +99,14 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable 'bookingDate' => false, 'estimatedArrivalTime' => false, 'id' => false, + 'modification' => false, 'mutations' => false, 'originalAmount' => false, 'reason' => false, + 'schemeTraceID' => false, + 'schemeUniqueTransactionID' => false, 'status' => false, 'transactionId' => false, - 'transferOperation' => false, 'type' => false, 'updateDate' => false, 'valueDate' => false @@ -197,12 +203,14 @@ public function isNullableSetToNull(string $property): bool 'bookingDate' => 'bookingDate', 'estimatedArrivalTime' => 'estimatedArrivalTime', 'id' => 'id', + 'modification' => 'modification', 'mutations' => 'mutations', 'originalAmount' => 'originalAmount', 'reason' => 'reason', + 'schemeTraceID' => 'schemeTraceID', + 'schemeUniqueTransactionID' => 'schemeUniqueTransactionID', 'status' => 'status', 'transactionId' => 'transactionId', - 'transferOperation' => 'transferOperation', 'type' => 'type', 'updateDate' => 'updateDate', 'valueDate' => 'valueDate' @@ -219,12 +227,14 @@ public function isNullableSetToNull(string $property): bool 'bookingDate' => 'setBookingDate', 'estimatedArrivalTime' => 'setEstimatedArrivalTime', 'id' => 'setId', + 'modification' => 'setModification', 'mutations' => 'setMutations', 'originalAmount' => 'setOriginalAmount', 'reason' => 'setReason', + 'schemeTraceID' => 'setSchemeTraceID', + 'schemeUniqueTransactionID' => 'setSchemeUniqueTransactionID', 'status' => 'setStatus', 'transactionId' => 'setTransactionId', - 'transferOperation' => 'setTransferOperation', 'type' => 'setType', 'updateDate' => 'setUpdateDate', 'valueDate' => 'setValueDate' @@ -241,12 +251,14 @@ public function isNullableSetToNull(string $property): bool 'bookingDate' => 'getBookingDate', 'estimatedArrivalTime' => 'getEstimatedArrivalTime', 'id' => 'getId', + 'modification' => 'getModification', 'mutations' => 'getMutations', 'originalAmount' => 'getOriginalAmount', 'reason' => 'getReason', + 'schemeTraceID' => 'getSchemeTraceID', + 'schemeUniqueTransactionID' => 'getSchemeUniqueTransactionID', 'status' => 'getStatus', 'transactionId' => 'getTransactionId', - 'transferOperation' => 'getTransferOperation', 'type' => 'getType', 'updateDate' => 'getUpdateDate', 'valueDate' => 'getValueDate' @@ -295,16 +307,19 @@ public function getModelName() public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_APPROVAL_PENDING = 'approvalPending'; public const STATUS_ATM_WITHDRAWAL = 'atmWithdrawal'; @@ -355,10 +370,6 @@ public function getModelName() public const STATUS_MERCHANT_PAYIN_REVERSED_PENDING = 'merchantPayinReversedPending'; public const STATUS_MISC_COST = 'miscCost'; public const STATUS_MISC_COST_PENDING = 'miscCostPending'; - public const STATUS_OPERATION_AUTHORIZED = 'operationAuthorized'; - public const STATUS_OPERATION_BOOKED = 'operationBooked'; - public const STATUS_OPERATION_PENDING = 'operationPending'; - public const STATUS_OPERATION_RECEIVED = 'operationReceived'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; public const STATUS_RECEIVED = 'received'; @@ -387,16 +398,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } @@ -457,10 +471,6 @@ public function getStatusAllowableValues() self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING, self::STATUS_MISC_COST, self::STATUS_MISC_COST_PENDING, - self::STATUS_OPERATION_AUTHORIZED, - self::STATUS_OPERATION_BOOKED, - self::STATUS_OPERATION_PENDING, - self::STATUS_OPERATION_RECEIVED, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, self::STATUS_RECEIVED, @@ -510,12 +520,14 @@ public function __construct(array $data = null) $this->setIfExists('bookingDate', $data ?? [], null); $this->setIfExists('estimatedArrivalTime', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('modification', $data ?? [], null); $this->setIfExists('mutations', $data ?? [], null); $this->setIfExists('originalAmount', $data ?? [], null); $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('schemeTraceID', $data ?? [], null); + $this->setIfExists('schemeUniqueTransactionID', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('transactionId', $data ?? [], null); - $this->setIfExists('transferOperation', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('updateDate', $data ?? [], null); $this->setIfExists('valueDate', $data ?? [], null); @@ -725,6 +737,33 @@ public function setId($id) return $this; } + /** + * Gets modification + * + * @return \Adyen\Model\TransferWebhooks\Modification|null + */ + public function getModification() + { + return $this->container['modification']; + } + + /** + * Sets modification + * + * @param \Adyen\Model\TransferWebhooks\Modification|null $modification modification + * + * @return self + */ + public function setModification($modification) + { + if (is_null($modification)) { + throw new \InvalidArgumentException('non-nullable modification cannot be null'); + } + $this->container['modification'] = $modification; + + return $this; + } + /** * Gets mutations * @@ -816,6 +855,60 @@ public function setReason($reason) return $this; } + /** + * Gets schemeTraceID + * + * @return string|null + */ + public function getSchemeTraceID() + { + return $this->container['schemeTraceID']; + } + + /** + * Sets schemeTraceID + * + * @param string|null $schemeTraceID SchemeTraceID retrieved from scheme. + * + * @return self + */ + public function setSchemeTraceID($schemeTraceID) + { + if (is_null($schemeTraceID)) { + throw new \InvalidArgumentException('non-nullable schemeTraceID cannot be null'); + } + $this->container['schemeTraceID'] = $schemeTraceID; + + return $this; + } + + /** + * Gets schemeUniqueTransactionID + * + * @return string|null + */ + public function getSchemeUniqueTransactionID() + { + return $this->container['schemeUniqueTransactionID']; + } + + /** + * Sets schemeUniqueTransactionID + * + * @param string|null $schemeUniqueTransactionID SchemeUniqueTransactionID retrieved from scheme. + * + * @return self + */ + public function setSchemeUniqueTransactionID($schemeUniqueTransactionID) + { + if (is_null($schemeUniqueTransactionID)) { + throw new \InvalidArgumentException('non-nullable schemeUniqueTransactionID cannot be null'); + } + $this->container['schemeUniqueTransactionID'] = $schemeUniqueTransactionID; + + return $this; + } + /** * Gets status * @@ -880,33 +973,6 @@ public function setTransactionId($transactionId) return $this; } - /** - * Gets transferOperation - * - * @return \Adyen\Model\TransferWebhooks\TransferOperation|null - */ - public function getTransferOperation() - { - return $this->container['transferOperation']; - } - - /** - * Sets transferOperation - * - * @param \Adyen\Model\TransferWebhooks\TransferOperation|null $transferOperation transferOperation - * - * @return self - */ - public function setTransferOperation($transferOperation) - { - if (is_null($transferOperation)) { - throw new \InvalidArgumentException('non-nullable transferOperation cannot be null'); - } - $this->container['transferOperation'] = $transferOperation; - - return $this; - } - /** * Gets type * diff --git a/src/Adyen/Model/Transfers/Transaction.php b/src/Adyen/Model/Transfers/TransactionData.php similarity index 99% rename from src/Adyen/Model/Transfers/Transaction.php rename to src/Adyen/Model/Transfers/TransactionData.php index f915158db..6f0715dd3 100644 --- a/src/Adyen/Model/Transfers/Transaction.php +++ b/src/Adyen/Model/Transfers/TransactionData.php @@ -19,7 +19,7 @@ use Adyen\Model\Transfers\ObjectSerializer; /** - * Transaction Class Doc Comment + * TransactionData Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable +class TransactionData implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'Transaction'; + protected static $openAPIModelName = 'TransactionData'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/src/Adyen/Model/Transfers/TransactionSearchResponse.php b/src/Adyen/Model/Transfers/TransactionSearchResponse.php index 3c586955c..d3d36d62c 100644 --- a/src/Adyen/Model/Transfers/TransactionSearchResponse.php +++ b/src/Adyen/Model/Transfers/TransactionSearchResponse.php @@ -45,7 +45,7 @@ class TransactionSearchResponse implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPITypes = [ 'links' => '\Adyen\Model\Transfers\Links', - 'data' => '\Adyen\Model\Transfers\Transaction[]' + 'data' => '\Adyen\Model\Transfers\TransactionData[]' ]; /** @@ -313,7 +313,7 @@ public function setLinks($links) /** * Gets data * - * @return \Adyen\Model\Transfers\Transaction[]|null + * @return \Adyen\Model\Transfers\TransactionData[]|null */ public function getData() { @@ -323,7 +323,7 @@ public function getData() /** * Sets data * - * @param \Adyen\Model\Transfers\Transaction[]|null $data Contains the transactions that match the query parameters. + * @param \Adyen\Model\Transfers\TransactionData[]|null $data Contains the transactions that match the query parameters. * * @return self */