diff --git a/src/Adyen/Model/BinLookup/Recurring.php b/src/Adyen/Model/BinLookup/Recurring.php index 2aef2714c..ea17995ab 100644 --- a/src/Adyen/Model/BinLookup/Recurring.php +++ b/src/Adyen/Model/BinLookup/Recurring.php @@ -237,8 +237,10 @@ public function getModelName() } public const CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_ONECLICKRECURRING = 'ONECLICK,RECURRING'; public const CONTRACT_RECURRING = 'RECURRING'; public const CONTRACT_PAYOUT = 'PAYOUT'; + public const CONTRACT_EXTERNAL = 'EXTERNAL'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; @@ -253,8 +255,10 @@ public function getContractAllowableValues() { return [ self::CONTRACT_ONECLICK, + self::CONTRACT_ONECLICKRECURRING, self::CONTRACT_RECURRING, self::CONTRACT_PAYOUT, + self::CONTRACT_EXTERNAL, ]; } /** @@ -366,7 +370,7 @@ public function getContract() /** * Sets contract * - * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php index adc11d915..019cd7aca 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php @@ -542,7 +542,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrCommodityCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrCommodityCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.unspsc.org/) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.ungm.org/public/unspsc) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. * * @return self */ @@ -782,7 +782,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. + * @param string|null $enhancedSchemeDataTotalTaxAmount The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * For L2 data: must not be all zeroes. * For L3 data: can be zero. * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php index 0044c3500..4ba084592 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php +++ b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php @@ -531,7 +531,7 @@ public function getSubMerchantSubSellerSubSellerNrPhoneNumber() /** * Sets subMerchantSubSellerSubSellerNrPhoneNumber * - * @param string|null $subMerchantSubSellerSubSellerNrPhoneNumber Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters + * @param string|null $subMerchantSubSellerSubSellerNrPhoneNumber Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant. * Format: Alphanumeric and special characters * Maximum length: 20 characters * * @return self */ diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 29c5d6c5d..353569f41 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -41,6 +41,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'billingSequenceNumber' => 'string', 'brand' => 'string', 'checkoutAttemptId' => 'string', 'cupsecureplusSmscode' => 'string', @@ -49,6 +50,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => 'string', 'encryptedExpiryMonth' => 'string', 'encryptedExpiryYear' => 'string', + 'encryptedPassword' => 'string', 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', @@ -76,6 +78,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'billingSequenceNumber' => null, 'brand' => null, 'checkoutAttemptId' => null, 'cupsecureplusSmscode' => null, @@ -84,6 +87,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => null, 'encryptedExpiryMonth' => null, 'encryptedExpiryYear' => null, + 'encryptedPassword' => null, 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, @@ -109,6 +113,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'billingSequenceNumber' => false, 'brand' => false, 'checkoutAttemptId' => false, 'cupsecureplusSmscode' => false, @@ -117,6 +122,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => false, 'encryptedExpiryMonth' => false, 'encryptedExpiryYear' => false, + 'encryptedPassword' => false, 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, @@ -222,6 +228,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'billingSequenceNumber' => 'billingSequenceNumber', 'brand' => 'brand', 'checkoutAttemptId' => 'checkoutAttemptId', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', @@ -230,6 +237,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'encryptedCardNumber', 'encryptedExpiryMonth' => 'encryptedExpiryMonth', 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedPassword' => 'encryptedPassword', 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', @@ -255,6 +263,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'billingSequenceNumber' => 'setBillingSequenceNumber', 'brand' => 'setBrand', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', @@ -263,6 +272,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'setEncryptedCardNumber', 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedPassword' => 'setEncryptedPassword', 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', @@ -288,6 +298,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'billingSequenceNumber' => 'getBillingSequenceNumber', 'brand' => 'getBrand', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', @@ -296,6 +307,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'getEncryptedCardNumber', 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedPassword' => 'getEncryptedPassword', 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', @@ -408,6 +420,7 @@ public function getTypeAllowableValues() */ public function __construct(?array $data = null) { + $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); @@ -416,6 +429,7 @@ public function __construct(?array $data = null) $this->setIfExists('encryptedCardNumber', $data ?? [], null); $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedPassword', $data ?? [], null); $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); @@ -495,6 +509,30 @@ public function valid() } + /** + * Gets billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $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) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + /** * Gets brand * @@ -689,6 +727,30 @@ public function setEncryptedExpiryYear($encryptedExpiryYear) return $this; } + /** + * Gets encryptedPassword + * + * @return string|null + */ + public function getEncryptedPassword() + { + return $this->container['encryptedPassword']; + } + + /** + * Sets encryptedPassword + * + * @param string|null $encryptedPassword This field contains an encrypted, one-time password or an authentication code provided by the cardholder. + * + * @return self + */ + public function setEncryptedPassword($encryptedPassword) + { + $this->container['encryptedPassword'] = $encryptedPassword; + + return $this; + } + /** * Gets encryptedSecurityCode * diff --git a/src/Adyen/Model/Checkout/CardDetailsRequest.php b/src/Adyen/Model/Checkout/CardDetailsRequest.php index 5939266ab..e067d8ad3 100644 --- a/src/Adyen/Model/Checkout/CardDetailsRequest.php +++ b/src/Adyen/Model/Checkout/CardDetailsRequest.php @@ -286,9 +286,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['cardNumber'] === null) { - $invalidProperties[] = "'cardNumber' can't be null"; - } if ($this->container['merchantAccount'] === null) { $invalidProperties[] = "'merchantAccount' can't be null"; } @@ -310,7 +307,7 @@ public function valid() /** * Gets cardNumber * - * @return string + * @return string|null */ public function getCardNumber() { @@ -320,7 +317,7 @@ public function getCardNumber() /** * Sets cardNumber * - * @param string $cardNumber A minimum of the first eight digits of the card number. The full card number gives the best result. You must be [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect raw card data. Alternatively, you can use the `encryptedCardNumber` field. + * @param string|null $cardNumber A minimum of the first six digits of the card number. The full card number gives the best result. You must be [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect raw card data. Alternatively, you can use the `encryptedCardNumber` field. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CardDonations.php b/src/Adyen/Model/Checkout/CardDonations.php index ce330d4f3..ac4ee1808 100644 --- a/src/Adyen/Model/Checkout/CardDonations.php +++ b/src/Adyen/Model/Checkout/CardDonations.php @@ -41,6 +41,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'billingSequenceNumber' => 'string', 'brand' => 'string', 'checkoutAttemptId' => 'string', 'cupsecureplusSmscode' => 'string', @@ -49,6 +50,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => 'string', 'encryptedExpiryMonth' => 'string', 'encryptedExpiryYear' => 'string', + 'encryptedPassword' => 'string', 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', @@ -76,6 +78,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'billingSequenceNumber' => null, 'brand' => null, 'checkoutAttemptId' => null, 'cupsecureplusSmscode' => null, @@ -84,6 +87,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => null, 'encryptedExpiryMonth' => null, 'encryptedExpiryYear' => null, + 'encryptedPassword' => null, 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, @@ -109,6 +113,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'billingSequenceNumber' => false, 'brand' => false, 'checkoutAttemptId' => false, 'cupsecureplusSmscode' => false, @@ -117,6 +122,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedCardNumber' => false, 'encryptedExpiryMonth' => false, 'encryptedExpiryYear' => false, + 'encryptedPassword' => false, 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, @@ -222,6 +228,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'billingSequenceNumber' => 'billingSequenceNumber', 'brand' => 'brand', 'checkoutAttemptId' => 'checkoutAttemptId', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', @@ -230,6 +237,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'encryptedCardNumber', 'encryptedExpiryMonth' => 'encryptedExpiryMonth', 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedPassword' => 'encryptedPassword', 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', @@ -255,6 +263,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'billingSequenceNumber' => 'setBillingSequenceNumber', 'brand' => 'setBrand', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', @@ -263,6 +272,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'setEncryptedCardNumber', 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedPassword' => 'setEncryptedPassword', 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', @@ -288,6 +298,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'billingSequenceNumber' => 'getBillingSequenceNumber', 'brand' => 'getBrand', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', @@ -296,6 +307,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'getEncryptedCardNumber', 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedPassword' => 'getEncryptedPassword', 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', @@ -408,6 +420,7 @@ public function getTypeAllowableValues() */ public function __construct(?array $data = null) { + $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); @@ -416,6 +429,7 @@ public function __construct(?array $data = null) $this->setIfExists('encryptedCardNumber', $data ?? [], null); $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedPassword', $data ?? [], null); $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); @@ -495,6 +509,30 @@ public function valid() } + /** + * Gets billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $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) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + /** * Gets brand * @@ -689,6 +727,30 @@ public function setEncryptedExpiryYear($encryptedExpiryYear) return $this; } + /** + * Gets encryptedPassword + * + * @return string|null + */ + public function getEncryptedPassword() + { + return $this->container['encryptedPassword']; + } + + /** + * Sets encryptedPassword + * + * @param string|null $encryptedPassword This field contains an encrypted, one-time password or an authentication code provided by the cardholder. + * + * @return self + */ + public function setEncryptedPassword($encryptedPassword) + { + $this->container['encryptedPassword'] = $encryptedPassword; + + return $this; + } + /** * Gets encryptedSecurityCode * diff --git a/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php b/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php index 9ab2e50f9..3781653b0 100644 --- a/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php +++ b/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php @@ -42,8 +42,10 @@ class CheckoutBankTransferAction implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPITypes = [ 'accountNumber' => 'string', + 'bankCode' => 'string', 'beneficiary' => 'string', 'bic' => 'string', + 'branchCode' => 'string', 'downloadUrl' => 'string', 'iban' => 'string', 'paymentMethodType' => 'string', @@ -65,8 +67,10 @@ class CheckoutBankTransferAction implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPIFormats = [ 'accountNumber' => null, + 'bankCode' => null, 'beneficiary' => null, 'bic' => null, + 'branchCode' => null, 'downloadUrl' => null, 'iban' => null, 'paymentMethodType' => null, @@ -86,8 +90,10 @@ class CheckoutBankTransferAction implements ModelInterface, ArrayAccess, \JsonSe */ protected static $openAPINullables = [ 'accountNumber' => false, + 'bankCode' => false, 'beneficiary' => false, 'bic' => false, + 'branchCode' => false, 'downloadUrl' => false, 'iban' => false, 'paymentMethodType' => false, @@ -187,8 +193,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', + 'bankCode' => 'bankCode', 'beneficiary' => 'beneficiary', 'bic' => 'bic', + 'branchCode' => 'branchCode', 'downloadUrl' => 'downloadUrl', 'iban' => 'iban', 'paymentMethodType' => 'paymentMethodType', @@ -208,8 +216,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', + 'bankCode' => 'setBankCode', 'beneficiary' => 'setBeneficiary', 'bic' => 'setBic', + 'branchCode' => 'setBranchCode', 'downloadUrl' => 'setDownloadUrl', 'iban' => 'setIban', 'paymentMethodType' => 'setPaymentMethodType', @@ -229,8 +239,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', + 'bankCode' => 'getBankCode', 'beneficiary' => 'getBeneficiary', 'bic' => 'getBic', + 'branchCode' => 'getBranchCode', 'downloadUrl' => 'getDownloadUrl', 'iban' => 'getIban', 'paymentMethodType' => 'getPaymentMethodType', @@ -313,8 +325,10 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('beneficiary', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('branchCode', $data ?? [], null); $this->setIfExists('downloadUrl', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('paymentMethodType', $data ?? [], null); @@ -405,6 +419,30 @@ public function setAccountNumber($accountNumber) return $this; } + /** + * Gets bankCode + * + * @return string|null + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string|null $bankCode The bank code of the bank transfer. + * + * @return self + */ + public function setBankCode($bankCode) + { + $this->container['bankCode'] = $bankCode; + + return $this; + } + /** * Gets beneficiary * @@ -453,6 +491,30 @@ public function setBic($bic) return $this; } + /** + * Gets branchCode + * + * @return string|null + */ + public function getBranchCode() + { + return $this->container['branchCode']; + } + + /** + * Sets branchCode + * + * @param string|null $branchCode The branch code of the bank transfer. + * + * @return self + */ + public function setBranchCode($branchCode) + { + $this->container['branchCode'] = $branchCode; + + return $this; + } + /** * Gets downloadUrl * diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 269d51815..a2bd3985b 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -66,6 +66,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'holderName' => 'string', 'issuer' => 'string', 'blikCode' => 'string', + 'billingSequenceNumber' => 'string', 'brand' => 'string', 'cupsecureplusSmscode' => 'string', 'cvc' => 'string', @@ -73,6 +74,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => 'string', 'encryptedExpiryMonth' => 'string', 'encryptedExpiryYear' => 'string', + 'encryptedPassword' => 'string', 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', @@ -113,7 +115,6 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'deviceFingerprint' => 'string', 'iban' => 'string', 'samsungPayToken' => 'string', - 'billingSequenceNumber' => 'string', 'appId' => 'string', 'visaCheckoutCallId' => 'string', 'openid' => 'string', @@ -151,6 +152,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'holderName' => null, 'issuer' => null, 'blikCode' => null, + 'billingSequenceNumber' => null, 'brand' => null, 'cupsecureplusSmscode' => null, 'cvc' => null, @@ -158,6 +160,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => null, 'encryptedExpiryMonth' => null, 'encryptedExpiryYear' => null, + 'encryptedPassword' => null, 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, @@ -198,7 +201,6 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'deviceFingerprint' => null, 'iban' => null, 'samsungPayToken' => null, - 'billingSequenceNumber' => null, 'appId' => null, 'visaCheckoutCallId' => null, 'openid' => null, @@ -234,6 +236,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'holderName' => false, 'issuer' => false, 'blikCode' => false, + 'billingSequenceNumber' => false, 'brand' => false, 'cupsecureplusSmscode' => false, 'cvc' => false, @@ -241,6 +244,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => false, 'encryptedExpiryMonth' => false, 'encryptedExpiryYear' => false, + 'encryptedPassword' => false, 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, @@ -281,7 +285,6 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'deviceFingerprint' => false, 'iban' => false, 'samsungPayToken' => false, - 'billingSequenceNumber' => false, 'appId' => false, 'visaCheckoutCallId' => false, 'openid' => false, @@ -397,6 +400,7 @@ public function isNullableSetToNull(string $property): bool 'holderName' => 'holderName', 'issuer' => 'issuer', 'blikCode' => 'blikCode', + 'billingSequenceNumber' => 'billingSequenceNumber', 'brand' => 'brand', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', 'cvc' => 'cvc', @@ -404,6 +408,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'encryptedCardNumber', 'encryptedExpiryMonth' => 'encryptedExpiryMonth', 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedPassword' => 'encryptedPassword', 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', @@ -444,7 +449,6 @@ public function isNullableSetToNull(string $property): bool 'deviceFingerprint' => 'deviceFingerprint', 'iban' => 'iban', 'samsungPayToken' => 'samsungPayToken', - 'billingSequenceNumber' => 'billingSequenceNumber', 'appId' => 'appId', 'visaCheckoutCallId' => 'visaCheckoutCallId', 'openid' => 'openid', @@ -480,6 +484,7 @@ public function isNullableSetToNull(string $property): bool 'holderName' => 'setHolderName', 'issuer' => 'setIssuer', 'blikCode' => 'setBlikCode', + 'billingSequenceNumber' => 'setBillingSequenceNumber', 'brand' => 'setBrand', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', 'cvc' => 'setCvc', @@ -487,6 +492,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'setEncryptedCardNumber', 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedPassword' => 'setEncryptedPassword', 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', @@ -527,7 +533,6 @@ public function isNullableSetToNull(string $property): bool 'deviceFingerprint' => 'setDeviceFingerprint', 'iban' => 'setIban', 'samsungPayToken' => 'setSamsungPayToken', - 'billingSequenceNumber' => 'setBillingSequenceNumber', 'appId' => 'setAppId', 'visaCheckoutCallId' => 'setVisaCheckoutCallId', 'openid' => 'setOpenid', @@ -563,6 +568,7 @@ public function isNullableSetToNull(string $property): bool 'holderName' => 'getHolderName', 'issuer' => 'getIssuer', 'blikCode' => 'getBlikCode', + 'billingSequenceNumber' => 'getBillingSequenceNumber', 'brand' => 'getBrand', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', 'cvc' => 'getCvc', @@ -570,6 +576,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'getEncryptedCardNumber', 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedPassword' => 'getEncryptedPassword', 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', @@ -610,7 +617,6 @@ public function isNullableSetToNull(string $property): bool 'deviceFingerprint' => 'getDeviceFingerprint', 'iban' => 'getIban', 'samsungPayToken' => 'getSamsungPayToken', - 'billingSequenceNumber' => 'getBillingSequenceNumber', 'appId' => 'getAppId', 'visaCheckoutCallId' => 'getVisaCheckoutCallId', 'openid' => 'getOpenid', @@ -696,6 +702,7 @@ public function __construct(?array $data = null) $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); $this->setIfExists('blikCode', $data ?? [], null); + $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); $this->setIfExists('cvc', $data ?? [], null); @@ -703,6 +710,7 @@ public function __construct(?array $data = null) $this->setIfExists('encryptedCardNumber', $data ?? [], null); $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedPassword', $data ?? [], null); $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); @@ -743,7 +751,6 @@ public function __construct(?array $data = null) $this->setIfExists('deviceFingerprint', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('samsungPayToken', $data ?? [], null); - $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('appId', $data ?? [], null); $this->setIfExists('visaCheckoutCallId', $data ?? [], null); $this->setIfExists('openid', $data ?? [], null); @@ -832,9 +839,6 @@ public function listInvalidProperties() if ($this->container['samsungPayToken'] === null) { $invalidProperties[] = "'samsungPayToken' 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"; } @@ -1407,6 +1411,30 @@ public function setBlikCode($blikCode) return $this; } + /** + * Gets billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $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) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + /** * Gets brand * @@ -1577,6 +1605,30 @@ public function setEncryptedExpiryYear($encryptedExpiryYear) return $this; } + /** + * Gets encryptedPassword + * + * @return string|null + */ + public function getEncryptedPassword() + { + return $this->container['encryptedPassword']; + } + + /** + * Sets encryptedPassword + * + * @param string|null $encryptedPassword This field contains an encrypted, one-time password or an authentication code provided by the cardholder. + * + * @return self + */ + public function setEncryptedPassword($encryptedPassword) + { + $this->container['encryptedPassword'] = $encryptedPassword; + + return $this; + } + /** * Gets encryptedSecurityCode * @@ -2537,30 +2589,6 @@ public function setSamsungPayToken($samsungPayToken) 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) - { - $this->container['billingSequenceNumber'] = $billingSequenceNumber; - - return $this; - } - /** * Gets appId * diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index d0d7adb67..ebd89a84b 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -85,7 +85,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\ShopperName', 'shopperReference' => 'string', 'shopperStatement' => 'string', 'showInstallmentAmount' => 'bool', @@ -1954,7 +1954,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\ShopperName|null */ public function getShopperName() { @@ -1964,7 +1964,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\ShopperName|null $shopperName shopperName * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 93194c0d9..769e5b6cf 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -87,7 +87,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\ShopperName', 'shopperReference' => 'string', 'shopperStatement' => 'string', 'showInstallmentAmount' => 'bool', @@ -2029,7 +2029,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\ShopperName|null */ public function getShopperName() { @@ -2039,7 +2039,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\ShopperName|null $shopperName shopperName * * @return self */ diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index e90481a51..a2d212366 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -21,7 +21,7 @@ /** * DonationPaymentMethod Class Doc Comment * - * The type and required details of a payment method to use. + * The type and required details of a payment method to use. When `donationToken` is provided, the payment method is derived from the token and this field becomes optional. If you are [PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide), and make donations using raw card details, you must explicitly provide the payment method details. * * @package Adyen * @implements ArrayAccess @@ -49,6 +49,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'recurringDetailReference' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string', + 'billingSequenceNumber' => 'string', 'brand' => 'string', 'cupsecureplusSmscode' => 'string', 'cvc' => 'string', @@ -56,6 +57,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => 'string', 'encryptedExpiryMonth' => 'string', 'encryptedExpiryYear' => 'string', + 'encryptedPassword' => 'string', 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', @@ -88,6 +90,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'recurringDetailReference' => null, 'storedPaymentMethodId' => null, 'type' => null, + 'billingSequenceNumber' => null, 'brand' => null, 'cupsecureplusSmscode' => null, 'cvc' => null, @@ -95,6 +98,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => null, 'encryptedExpiryMonth' => null, 'encryptedExpiryYear' => null, + 'encryptedPassword' => null, 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, @@ -125,6 +129,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'recurringDetailReference' => false, 'storedPaymentMethodId' => false, 'type' => false, + 'billingSequenceNumber' => false, 'brand' => false, 'cupsecureplusSmscode' => false, 'cvc' => false, @@ -132,6 +137,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedCardNumber' => false, 'encryptedExpiryMonth' => false, 'encryptedExpiryYear' => false, + 'encryptedPassword' => false, 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, @@ -242,6 +248,7 @@ public function isNullableSetToNull(string $property): bool 'recurringDetailReference' => 'recurringDetailReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type', + 'billingSequenceNumber' => 'billingSequenceNumber', 'brand' => 'brand', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', 'cvc' => 'cvc', @@ -249,6 +256,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'encryptedCardNumber', 'encryptedExpiryMonth' => 'encryptedExpiryMonth', 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedPassword' => 'encryptedPassword', 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', @@ -279,6 +287,7 @@ public function isNullableSetToNull(string $property): bool 'recurringDetailReference' => 'setRecurringDetailReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType', + 'billingSequenceNumber' => 'setBillingSequenceNumber', 'brand' => 'setBrand', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', 'cvc' => 'setCvc', @@ -286,6 +295,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'setEncryptedCardNumber', 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedPassword' => 'setEncryptedPassword', 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', @@ -316,6 +326,7 @@ public function isNullableSetToNull(string $property): bool 'recurringDetailReference' => 'getRecurringDetailReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType', + 'billingSequenceNumber' => 'getBillingSequenceNumber', 'brand' => 'getBrand', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', 'cvc' => 'getCvc', @@ -323,6 +334,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedCardNumber' => 'getEncryptedCardNumber', 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedPassword' => 'getEncryptedPassword', 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', @@ -403,6 +415,7 @@ public function __construct(?array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); $this->setIfExists('cvc', $data ?? [], null); @@ -410,6 +423,7 @@ public function __construct(?array $data = null) $this->setIfExists('encryptedCardNumber', $data ?? [], null); $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedPassword', $data ?? [], null); $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); @@ -624,6 +638,30 @@ public function setType($type) return $this; } + /** + * Gets billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $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) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + /** * Gets brand * @@ -794,6 +832,30 @@ public function setEncryptedExpiryYear($encryptedExpiryYear) return $this; } + /** + * Gets encryptedPassword + * + * @return string|null + */ + public function getEncryptedPassword() + { + return $this->container['encryptedPassword']; + } + + /** + * Sets encryptedPassword + * + * @param string|null $encryptedPassword This field contains an encrypted, one-time password or an authentication code provided by the cardholder. + * + * @return self + */ + public function setEncryptedPassword($encryptedPassword) + { + $this->container['encryptedPassword'] = $encryptedPassword; + + return $this; + } + /** * Gets encryptedSecurityCode * diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index ecc0c164f..d3f7cc374 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -77,7 +77,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\ShopperName', 'shopperReference' => 'string', 'socialSecurityNumber' => 'string', 'telephoneNumber' => 'string', @@ -610,9 +610,6 @@ public function listInvalidProperties() if ($this->container['merchantAccount'] === null) { $invalidProperties[] = "'merchantAccount' can't be null"; } - if ($this->container['paymentMethod'] === null) { - $invalidProperties[] = "'paymentMethod' can't be null"; - } $allowedValues = $this->getRecurringProcessingModelAllowableValues(); if (!is_null($this->container['recurringProcessingModel']) && !in_array($this->container['recurringProcessingModel'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -1267,7 +1264,7 @@ public function setOrigin($origin) /** * Gets paymentMethod * - * @return \Adyen\Model\Checkout\DonationPaymentMethod + * @return \Adyen\Model\Checkout\DonationPaymentMethod|null */ public function getPaymentMethod() { @@ -1277,7 +1274,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Adyen\Model\Checkout\DonationPaymentMethod $paymentMethod paymentMethod + * @param \Adyen\Model\Checkout\DonationPaymentMethod|null $paymentMethod paymentMethod * * @return self */ @@ -1551,7 +1548,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\ShopperName|null */ public function getShopperName() { @@ -1561,7 +1558,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\ShopperName|null $shopperName shopperName * * @return self */ diff --git a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php index 14c0d0265..1d7d5b131 100644 --- a/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.php @@ -240,6 +240,7 @@ public function getModelName() public const TYPE_EPS = 'eps'; public const TYPE_ONLINE_BANKING_SK = 'onlineBanking_SK'; public const TYPE_ONLINE_BANKING_CZ = 'onlineBanking_CZ'; + public const TYPE_ONLINEBANKING_IN = 'onlinebanking_IN'; /** * Gets allowable values of the enum @@ -253,6 +254,7 @@ public function getTypeAllowableValues() self::TYPE_EPS, self::TYPE_ONLINE_BANKING_SK, self::TYPE_ONLINE_BANKING_CZ, + self::TYPE_ONLINEBANKING_IN, ]; } /** diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index 86cec7623..4c2a4178a 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -220,10 +220,12 @@ public function getModelName() public const TYPE_ALIPAY = 'alipay'; public const TYPE_MULTIBANCO = 'multibanco'; + public const TYPE_BANK_TRANSFER = 'bankTransfer'; public const TYPE_BANK_TRANSFER_IBAN = 'bankTransfer_IBAN'; public const TYPE_PAYBRIGHT = 'paybright'; public const TYPE_PAYNOW = 'paynow'; public const TYPE_AFFIRM_POS = 'affirm_pos'; + public const TYPE_IRIS = 'iris'; public const TYPE_TRUSTLY = 'trustly'; public const TYPE_TRUSTLYVECTOR = 'trustlyvector'; public const TYPE_ONEY = 'oney'; @@ -244,7 +246,6 @@ public function getModelName() public const TYPE_WALLET_IN = 'wallet_IN'; public const TYPE_PAYU_IN_CASHCARD = 'payu_IN_cashcard'; public const TYPE_PAYU_IN_NB = 'payu_IN_nb'; - public const TYPE_UPI_QR = 'upi_qr'; public const TYPE_PAYTM = 'paytm'; public const TYPE_MOLPAY_EBANKING_VN = 'molpay_ebanking_VN'; public const TYPE_MOLPAY_EBANKING_MY = 'molpay_ebanking_MY'; @@ -277,7 +278,6 @@ public function getModelName() public const TYPE_OMANNET = 'omannet'; public const TYPE_GOPAY_WALLET = 'gopay_wallet'; public const TYPE_KCP_NAVERPAY = 'kcp_naverpay'; - public const TYPE_ONLINEBANKING_IN = 'onlinebanking_IN'; public const TYPE_FAWRY = 'fawry'; public const TYPE_ATOME = 'atome'; public const TYPE_MONEYBOOKERS = 'moneybookers'; @@ -318,10 +318,12 @@ public function getTypeAllowableValues() return [ self::TYPE_ALIPAY, self::TYPE_MULTIBANCO, + self::TYPE_BANK_TRANSFER, self::TYPE_BANK_TRANSFER_IBAN, self::TYPE_PAYBRIGHT, self::TYPE_PAYNOW, self::TYPE_AFFIRM_POS, + self::TYPE_IRIS, self::TYPE_TRUSTLY, self::TYPE_TRUSTLYVECTOR, self::TYPE_ONEY, @@ -342,7 +344,6 @@ public function getTypeAllowableValues() self::TYPE_WALLET_IN, self::TYPE_PAYU_IN_CASHCARD, self::TYPE_PAYU_IN_NB, - self::TYPE_UPI_QR, self::TYPE_PAYTM, self::TYPE_MOLPAY_EBANKING_VN, self::TYPE_MOLPAY_EBANKING_MY, @@ -375,7 +376,6 @@ public function getTypeAllowableValues() self::TYPE_OMANNET, self::TYPE_GOPAY_WALLET, self::TYPE_KCP_NAVERPAY, - self::TYPE_ONLINEBANKING_IN, self::TYPE_FAWRY, self::TYPE_ATOME, self::TYPE_MONEYBOOKERS, diff --git a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php index 3b8a8d1d5..e01ec29b6 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsResponse.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsResponse.php @@ -49,6 +49,7 @@ class PaymentDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial 'merchantReference' => 'string', 'order' => '\Adyen\Model\Checkout\CheckoutOrderResponse', 'paymentMethod' => '\Adyen\Model\Checkout\ResponsePaymentMethod', + 'paymentValidations' => '\Adyen\Model\Checkout\PaymentValidationsResponse', 'pspReference' => 'string', 'refusalReason' => 'string', 'refusalReasonCode' => 'string', @@ -75,6 +76,7 @@ class PaymentDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial 'merchantReference' => null, 'order' => null, 'paymentMethod' => null, + 'paymentValidations' => null, 'pspReference' => null, 'refusalReason' => null, 'refusalReasonCode' => null, @@ -99,6 +101,7 @@ class PaymentDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial 'merchantReference' => false, 'order' => false, 'paymentMethod' => false, + 'paymentValidations' => false, 'pspReference' => false, 'refusalReason' => false, 'refusalReasonCode' => false, @@ -203,6 +206,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'merchantReference', 'order' => 'order', 'paymentMethod' => 'paymentMethod', + 'paymentValidations' => 'paymentValidations', 'pspReference' => 'pspReference', 'refusalReason' => 'refusalReason', 'refusalReasonCode' => 'refusalReasonCode', @@ -227,6 +231,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'setMerchantReference', 'order' => 'setOrder', 'paymentMethod' => 'setPaymentMethod', + 'paymentValidations' => 'setPaymentValidations', 'pspReference' => 'setPspReference', 'refusalReason' => 'setRefusalReason', 'refusalReasonCode' => 'setRefusalReasonCode', @@ -251,6 +256,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'getMerchantReference', 'order' => 'getOrder', 'paymentMethod' => 'getPaymentMethod', + 'paymentValidations' => 'getPaymentValidations', 'pspReference' => 'getPspReference', 'refusalReason' => 'getRefusalReason', 'refusalReasonCode' => 'getRefusalReasonCode', @@ -364,6 +370,7 @@ public function __construct(?array $data = null) $this->setIfExists('merchantReference', $data ?? [], null); $this->setIfExists('order', $data ?? [], null); $this->setIfExists('paymentMethod', $data ?? [], null); + $this->setIfExists('paymentValidations', $data ?? [], null); $this->setIfExists('pspReference', $data ?? [], null); $this->setIfExists('refusalReason', $data ?? [], null); $this->setIfExists('refusalReasonCode', $data ?? [], null); @@ -617,6 +624,30 @@ public function setPaymentMethod($paymentMethod) return $this; } + /** + * Gets paymentValidations + * + * @return \Adyen\Model\Checkout\PaymentValidationsResponse|null + */ + public function getPaymentValidations() + { + return $this->container['paymentValidations']; + } + + /** + * Sets paymentValidations + * + * @param \Adyen\Model\Checkout\PaymentValidationsResponse|null $paymentValidations paymentValidations + * + * @return self + */ + public function setPaymentValidations($paymentValidations) + { + $this->container['paymentValidations'] = $paymentValidations; + + return $this; + } + /** * Gets pspReference * diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index 605242e19..5b67fc65a 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -94,13 +94,14 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => 'string', 'returnUrl' => 'string', 'riskData' => '\Adyen\Model\Checkout\RiskData', + 'sdkData' => 'string', 'sessionValidity' => 'string', 'shopperConversionId' => 'string', 'shopperEmail' => 'string', 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\ShopperName', 'shopperReference' => 'string', 'shopperStatement' => 'string', 'socialSecurityNumber' => 'string', @@ -176,6 +177,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => null, 'returnUrl' => null, 'riskData' => null, + 'sdkData' => null, 'sessionValidity' => null, 'shopperConversionId' => null, 'shopperEmail' => null, @@ -256,6 +258,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => false, 'returnUrl' => false, 'riskData' => false, + 'sdkData' => false, 'sessionValidity' => false, 'shopperConversionId' => false, 'shopperEmail' => false, @@ -416,6 +419,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'reference', 'returnUrl' => 'returnUrl', 'riskData' => 'riskData', + 'sdkData' => 'sdkData', 'sessionValidity' => 'sessionValidity', 'shopperConversionId' => 'shopperConversionId', 'shopperEmail' => 'shopperEmail', @@ -496,6 +500,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'setReference', 'returnUrl' => 'setReturnUrl', 'riskData' => 'setRiskData', + 'sdkData' => 'setSdkData', 'sessionValidity' => 'setSessionValidity', 'shopperConversionId' => 'setShopperConversionId', 'shopperEmail' => 'setShopperEmail', @@ -576,6 +581,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'getReference', 'returnUrl' => 'getReturnUrl', 'riskData' => 'getRiskData', + 'sdkData' => 'getSdkData', 'sessionValidity' => 'getSessionValidity', 'shopperConversionId' => 'getShopperConversionId', 'shopperEmail' => 'getShopperEmail', @@ -787,6 +793,7 @@ public function __construct(?array $data = null) $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('returnUrl', $data ?? [], null); $this->setIfExists('riskData', $data ?? [], null); + $this->setIfExists('sdkData', $data ?? [], null); $this->setIfExists('sessionValidity', $data ?? [], null); $this->setIfExists('shopperConversionId', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); @@ -2226,6 +2233,30 @@ public function setRiskData($riskData) return $this; } + /** + * Gets sdkData + * + * @return string|null + */ + public function getSdkData() + { + return $this->container['sdkData']; + } + + /** + * Sets sdkData + * + * @param string|null $sdkData Base64-encoded JSON object containing SDK related parameters required by the SDK to function optimally. Clients must not add unrelated or sensitive personal information. + * + * @return self + */ + public function setSdkData($sdkData) + { + $this->container['sdkData'] = $sdkData; + + return $this; + } + /** * Gets sessionValidity * @@ -2383,7 +2414,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\ShopperName|null */ public function getShopperName() { @@ -2393,7 +2424,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\ShopperName|null $shopperName shopperName * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentResponse.php b/src/Adyen/Model/Checkout/PaymentResponse.php index a7655e357..9832d1d97 100644 --- a/src/Adyen/Model/Checkout/PaymentResponse.php +++ b/src/Adyen/Model/Checkout/PaymentResponse.php @@ -49,6 +49,7 @@ class PaymentResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'merchantReference' => 'string', 'order' => '\Adyen\Model\Checkout\CheckoutOrderResponse', 'paymentMethod' => '\Adyen\Model\Checkout\ResponsePaymentMethod', + 'paymentValidations' => '\Adyen\Model\Checkout\PaymentValidationsResponse', 'pspReference' => 'string', 'refusalReason' => 'string', 'refusalReasonCode' => 'string', @@ -74,6 +75,7 @@ class PaymentResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'merchantReference' => null, 'order' => null, 'paymentMethod' => null, + 'paymentValidations' => null, 'pspReference' => null, 'refusalReason' => null, 'refusalReasonCode' => null, @@ -97,6 +99,7 @@ class PaymentResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'merchantReference' => false, 'order' => false, 'paymentMethod' => false, + 'paymentValidations' => false, 'pspReference' => false, 'refusalReason' => false, 'refusalReasonCode' => false, @@ -200,6 +203,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'merchantReference', 'order' => 'order', 'paymentMethod' => 'paymentMethod', + 'paymentValidations' => 'paymentValidations', 'pspReference' => 'pspReference', 'refusalReason' => 'refusalReason', 'refusalReasonCode' => 'refusalReasonCode', @@ -223,6 +227,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'setMerchantReference', 'order' => 'setOrder', 'paymentMethod' => 'setPaymentMethod', + 'paymentValidations' => 'setPaymentValidations', 'pspReference' => 'setPspReference', 'refusalReason' => 'setRefusalReason', 'refusalReasonCode' => 'setRefusalReasonCode', @@ -246,6 +251,7 @@ public function isNullableSetToNull(string $property): bool 'merchantReference' => 'getMerchantReference', 'order' => 'getOrder', 'paymentMethod' => 'getPaymentMethod', + 'paymentValidations' => 'getPaymentValidations', 'pspReference' => 'getPspReference', 'refusalReason' => 'getRefusalReason', 'refusalReasonCode' => 'getRefusalReasonCode', @@ -358,6 +364,7 @@ public function __construct(?array $data = null) $this->setIfExists('merchantReference', $data ?? [], null); $this->setIfExists('order', $data ?? [], null); $this->setIfExists('paymentMethod', $data ?? [], null); + $this->setIfExists('paymentValidations', $data ?? [], null); $this->setIfExists('pspReference', $data ?? [], null); $this->setIfExists('refusalReason', $data ?? [], null); $this->setIfExists('refusalReasonCode', $data ?? [], null); @@ -610,6 +617,30 @@ public function setPaymentMethod($paymentMethod) return $this; } + /** + * Gets paymentValidations + * + * @return \Adyen\Model\Checkout\PaymentValidationsResponse|null + */ + public function getPaymentValidations() + { + return $this->container['paymentValidations']; + } + + /** + * Sets paymentValidations + * + * @param \Adyen\Model\Checkout\PaymentValidationsResponse|null $paymentValidations paymentValidations + * + * @return self + */ + public function setPaymentValidations($paymentValidations) + { + $this->container['paymentValidations'] = $paymentValidations; + + return $this; + } + /** * Gets pspReference * diff --git a/src/Adyen/Model/Checkout/PaymentResponseAction.php b/src/Adyen/Model/Checkout/PaymentResponseAction.php index 5e3ace006..10a7a036a 100644 --- a/src/Adyen/Model/Checkout/PaymentResponseAction.php +++ b/src/Adyen/Model/Checkout/PaymentResponseAction.php @@ -48,8 +48,10 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'type' => 'string', 'url' => 'string', 'accountNumber' => 'string', + 'bankCode' => 'string', 'beneficiary' => 'string', 'bic' => 'string', + 'branchCode' => 'string', 'downloadUrl' => 'string', 'iban' => 'string', 'reference' => 'string', @@ -93,8 +95,10 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'type' => null, 'url' => null, 'accountNumber' => null, + 'bankCode' => null, 'beneficiary' => null, 'bic' => null, + 'branchCode' => null, 'downloadUrl' => null, 'iban' => null, 'reference' => null, @@ -136,8 +140,10 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'type' => false, 'url' => false, 'accountNumber' => false, + 'bankCode' => false, 'beneficiary' => false, 'bic' => false, + 'branchCode' => false, 'downloadUrl' => false, 'iban' => false, 'reference' => false, @@ -259,8 +265,10 @@ public function isNullableSetToNull(string $property): bool 'type' => 'type', 'url' => 'url', 'accountNumber' => 'accountNumber', + 'bankCode' => 'bankCode', 'beneficiary' => 'beneficiary', 'bic' => 'bic', + 'branchCode' => 'branchCode', 'downloadUrl' => 'downloadUrl', 'iban' => 'iban', 'reference' => 'reference', @@ -302,8 +310,10 @@ public function isNullableSetToNull(string $property): bool 'type' => 'setType', 'url' => 'setUrl', 'accountNumber' => 'setAccountNumber', + 'bankCode' => 'setBankCode', 'beneficiary' => 'setBeneficiary', 'bic' => 'setBic', + 'branchCode' => 'setBranchCode', 'downloadUrl' => 'setDownloadUrl', 'iban' => 'setIban', 'reference' => 'setReference', @@ -345,8 +355,10 @@ public function isNullableSetToNull(string $property): bool 'type' => 'getType', 'url' => 'getUrl', 'accountNumber' => 'getAccountNumber', + 'bankCode' => 'getBankCode', 'beneficiary' => 'getBeneficiary', 'bic' => 'getBic', + 'branchCode' => 'getBranchCode', 'downloadUrl' => 'getDownloadUrl', 'iban' => 'getIban', 'reference' => 'getReference', @@ -438,8 +450,10 @@ public function __construct(?array $data = null) $this->setIfExists('type', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); $this->setIfExists('accountNumber', $data ?? [], null); + $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('beneficiary', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); + $this->setIfExists('branchCode', $data ?? [], null); $this->setIfExists('downloadUrl', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); @@ -636,6 +650,30 @@ public function setAccountNumber($accountNumber) return $this; } + /** + * Gets bankCode + * + * @return string|null + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string|null $bankCode The bank code of the bank transfer. + * + * @return self + */ + public function setBankCode($bankCode) + { + $this->container['bankCode'] = $bankCode; + + return $this; + } + /** * Gets beneficiary * @@ -684,6 +722,30 @@ public function setBic($bic) return $this; } + /** + * Gets branchCode + * + * @return string|null + */ + public function getBranchCode() + { + return $this->container['branchCode']; + } + + /** + * Sets branchCode + * + * @param string|null $branchCode The branch code of the bank transfer. + * + * @return self + */ + public function setBranchCode($branchCode) + { + $this->container['branchCode'] = $branchCode; + + return $this; + } + /** * Gets downloadUrl * diff --git a/src/Adyen/Model/Checkout/PaymentValidationsNameResponse.php b/src/Adyen/Model/Checkout/PaymentValidationsNameResponse.php new file mode 100644 index 000000000..565679612 --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentValidationsNameResponse.php @@ -0,0 +1,501 @@ + + */ +class PaymentValidationsNameResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentValidationsNameResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'rawResponse' => '\Adyen\Model\Checkout\PaymentValidationsNameResultRawResponse', + 'result' => '\Adyen\Model\Checkout\PaymentValidationsNameResultResponse', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'rawResponse' => null, + 'result' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'rawResponse' => false, + 'result' => false, + 'status' => 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 = [ + 'rawResponse' => 'rawResponse', + 'result' => 'result', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'rawResponse' => 'setRawResponse', + 'result' => 'setResult', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'rawResponse' => 'getRawResponse', + 'result' => 'getResult', + 'status' => 'getStatus' + ]; + + /** + * 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_NOT_PERFORMED = 'notPerformed'; + public const STATUS_NOT_SUPPORTED = 'notSupported'; + public const STATUS_PERFORMED = 'performed'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_NOT_PERFORMED, + self::STATUS_NOT_SUPPORTED, + self::STATUS_PERFORMED, + ]; + } + /** + * 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('rawResponse', $data ?? [], null); + $this->setIfExists('result', $data ?? [], null); + $this->setIfExists('status', $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 rawResponse + * + * @return \Adyen\Model\Checkout\PaymentValidationsNameResultRawResponse|null + */ + public function getRawResponse() + { + return $this->container['rawResponse']; + } + + /** + * Sets rawResponse + * + * @param \Adyen\Model\Checkout\PaymentValidationsNameResultRawResponse|null $rawResponse rawResponse + * + * @return self + */ + public function setRawResponse($rawResponse) + { + $this->container['rawResponse'] = $rawResponse; + + return $this; + } + + /** + * Gets result + * + * @return \Adyen\Model\Checkout\PaymentValidationsNameResultResponse|null + */ + public function getResult() + { + return $this->container['result']; + } + + /** + * Sets result + * + * @param \Adyen\Model\Checkout\PaymentValidationsNameResultResponse|null $result result + * + * @return self + */ + public function setResult($result) + { + $this->container['result'] = $result; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Name Validation status result + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + error_log( + sprintf( + "status: unexpected enum value '%s' - Supported values are [%s]", + $status, + implode(', ', $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/PaymentValidationsNameResultRawResponse.php b/src/Adyen/Model/Checkout/PaymentValidationsNameResultRawResponse.php new file mode 100644 index 000000000..ed6a1cfcf --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentValidationsNameResultRawResponse.php @@ -0,0 +1,528 @@ + + */ +class PaymentValidationsNameResultRawResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentValidationsNameResultRawResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'firstName' => 'string', + 'fullName' => 'string', + 'lastName' => 'string', + 'middleName' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'firstName' => null, + 'fullName' => null, + 'lastName' => null, + 'middleName' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'firstName' => false, + 'fullName' => false, + 'lastName' => false, + 'middleName' => false, + 'status' => 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 = [ + 'firstName' => 'firstName', + 'fullName' => 'fullName', + 'lastName' => 'lastName', + 'middleName' => 'middleName', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'firstName' => 'setFirstName', + 'fullName' => 'setFullName', + 'lastName' => 'setLastName', + 'middleName' => 'setMiddleName', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'firstName' => 'getFirstName', + 'fullName' => 'getFullName', + 'lastName' => 'getLastName', + 'middleName' => 'getMiddleName', + 'status' => 'getStatus' + ]; + + /** + * 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('firstName', $data ?? [], null); + $this->setIfExists('fullName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('middleName', $data ?? [], null); + $this->setIfExists('status', $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 = []; + + 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 firstName + * + * @return string|null + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName Name Validation Raw firstName Result + * + * @return self + */ + public function setFirstName($firstName) + { + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets fullName + * + * @return string|null + */ + public function getFullName() + { + return $this->container['fullName']; + } + + /** + * Sets fullName + * + * @param string|null $fullName Name Validation Raw fullName Result + * + * @return self + */ + public function setFullName($fullName) + { + $this->container['fullName'] = $fullName; + + return $this; + } + + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName Name Validation Raw lastName Result + * + * @return self + */ + public function setLastName($lastName) + { + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets middleName + * + * @return string|null + */ + public function getMiddleName() + { + return $this->container['middleName']; + } + + /** + * Sets middleName + * + * @param string|null $middleName Name Validation Raw middleName Result + * + * @return self + */ + public function setMiddleName($middleName) + { + $this->container['middleName'] = $middleName; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status Name Validation Raw status result + * + * @return self + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/PaymentValidationsNameResultResponse.php b/src/Adyen/Model/Checkout/PaymentValidationsNameResultResponse.php new file mode 100644 index 000000000..1708fba69 --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentValidationsNameResultResponse.php @@ -0,0 +1,497 @@ + + */ +class PaymentValidationsNameResultResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentValidationsNameResultResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'firstName' => 'string', + 'fullName' => 'string', + 'lastName' => 'string', + 'middleName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'firstName' => null, + 'fullName' => null, + 'lastName' => null, + 'middleName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'firstName' => false, + 'fullName' => false, + 'lastName' => false, + 'middleName' => 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 = [ + 'firstName' => 'firstName', + 'fullName' => 'fullName', + 'lastName' => 'lastName', + 'middleName' => 'middleName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'firstName' => 'setFirstName', + 'fullName' => 'setFullName', + 'lastName' => 'setLastName', + 'middleName' => 'setMiddleName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'firstName' => 'getFirstName', + 'fullName' => 'getFullName', + 'lastName' => 'getLastName', + 'middleName' => 'getMiddleName' + ]; + + /** + * 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('firstName', $data ?? [], null); + $this->setIfExists('fullName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('middleName', $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 = []; + + 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 firstName + * + * @return string|null + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName Name Validation firstName result + * + * @return self + */ + public function setFirstName($firstName) + { + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets fullName + * + * @return string|null + */ + public function getFullName() + { + return $this->container['fullName']; + } + + /** + * Sets fullName + * + * @param string|null $fullName Name Validation fullName result + * + * @return self + */ + public function setFullName($fullName) + { + $this->container['fullName'] = $fullName; + + return $this; + } + + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName Name Validation lastName result + * + * @return self + */ + public function setLastName($lastName) + { + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets middleName + * + * @return string|null + */ + public function getMiddleName() + { + return $this->container['middleName']; + } + + /** + * Sets middleName + * + * @param string|null $middleName Name Validation middleName result + * + * @return self + */ + public function setMiddleName($middleName) + { + $this->container['middleName'] = $middleName; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/PaymentValidationsResponse.php b/src/Adyen/Model/Checkout/PaymentValidationsResponse.php new file mode 100644 index 000000000..cf4246d95 --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentValidationsResponse.php @@ -0,0 +1,404 @@ + + */ +class PaymentValidationsResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentValidationsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => '\Adyen\Model\Checkout\PaymentValidationsNameResponse' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'name' => 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 = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * 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('name', $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 = []; + + 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 name + * + * @return \Adyen\Model\Checkout\PaymentValidationsNameResponse|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param \Adyen\Model\Checkout\PaymentValidationsNameResponse|null $name name + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/Recurring.php b/src/Adyen/Model/Checkout/Recurring.php index 0c1cd0553..831f2fc28 100644 --- a/src/Adyen/Model/Checkout/Recurring.php +++ b/src/Adyen/Model/Checkout/Recurring.php @@ -237,8 +237,10 @@ public function getModelName() } public const CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_ONECLICKRECURRING = 'ONECLICK,RECURRING'; public const CONTRACT_RECURRING = 'RECURRING'; public const CONTRACT_PAYOUT = 'PAYOUT'; + public const CONTRACT_EXTERNAL = 'EXTERNAL'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; @@ -253,8 +255,10 @@ public function getContractAllowableValues() { return [ self::CONTRACT_ONECLICK, + self::CONTRACT_ONECLICKRECURRING, self::CONTRACT_RECURRING, self::CONTRACT_PAYOUT, + self::CONTRACT_EXTERNAL, ]; } /** @@ -366,7 +370,7 @@ public function getContract() /** * Sets contract * - * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. * * @return self */ diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataSwish.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataSwish.php new file mode 100644 index 000000000..bd559d77e --- /dev/null +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataSwish.php @@ -0,0 +1,404 @@ + + */ +class ResponseAdditionalDataSwish implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataSwish'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'swishPayerAlias' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'swishPayerAlias' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'swishPayerAlias' => 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 = [ + 'swishPayerAlias' => 'swish.payerAlias' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'swishPayerAlias' => 'setSwishPayerAlias' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'swishPayerAlias' => 'getSwishPayerAlias' + ]; + + /** + * 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('swishPayerAlias', $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 = []; + + 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 swishPayerAlias + * + * @return string|null + */ + public function getSwishPayerAlias() + { + return $this->container['swishPayerAlias']; + } + + /** + * Sets swishPayerAlias + * + * @param string|null $swishPayerAlias A Swish shopper's telephone number. + * + * @return self + */ + public function setSwishPayerAlias($swishPayerAlias) + { + $this->container['swishPayerAlias'] = $swishPayerAlias; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/ShopperName.php b/src/Adyen/Model/Checkout/ShopperName.php new file mode 100644 index 000000000..030316823 --- /dev/null +++ b/src/Adyen/Model/Checkout/ShopperName.php @@ -0,0 +1,441 @@ + + */ +class ShopperName implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ShopperName'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'firstName' => 'string', + 'lastName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'firstName' => null, + 'lastName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'firstName' => false, + 'lastName' => 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 = [ + 'firstName' => 'firstName', + 'lastName' => 'lastName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName' + ]; + + /** + * 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('firstName', $data ?? [], null); + $this->setIfExists('lastName', $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['firstName'] === null) { + $invalidProperties[] = "'firstName' can't be null"; + } + if ($this->container['lastName'] === null) { + $invalidProperties[] = "'lastName' 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 firstName + * + * @return string + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string $firstName The first name. + * + * @return self + */ + public function setFirstName($firstName) + { + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string $lastName The last name. + * + * @return self + */ + public function setLastName($lastName) + { + $this->container['lastName'] = $lastName; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/Split.php b/src/Adyen/Model/Checkout/Split.php index 1954b93fb..0da00ce8a 100644 --- a/src/Adyen/Model/Checkout/Split.php +++ b/src/Adyen/Model/Checkout/Split.php @@ -464,7 +464,7 @@ public function getType() /** * Sets type * - * @param string $type The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. + * @param string $type The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. * * @return self */ diff --git a/src/Adyen/Model/Checkout/UpiCollectDetails.php b/src/Adyen/Model/Checkout/UpiCollectDetails.php index c6f896863..c742b92a8 100644 --- a/src/Adyen/Model/Checkout/UpiCollectDetails.php +++ b/src/Adyen/Model/Checkout/UpiCollectDetails.php @@ -312,9 +312,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['billingSequenceNumber'] === null) { - $invalidProperties[] = "'billingSequenceNumber' can't be null"; - } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -345,7 +342,7 @@ public function valid() /** * Gets billingSequenceNumber * - * @return string + * @return string|null */ public function getBillingSequenceNumber() { @@ -355,7 +352,7 @@ public function getBillingSequenceNumber() /** * 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. + * @param string|null $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 */ diff --git a/src/Adyen/Model/Checkout/UpiIntentDetails.php b/src/Adyen/Model/Checkout/UpiIntentDetails.php index d1eff89b4..4c29c4b93 100644 --- a/src/Adyen/Model/Checkout/UpiIntentDetails.php +++ b/src/Adyen/Model/Checkout/UpiIntentDetails.php @@ -42,6 +42,7 @@ class UpiIntentDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'appId' => 'string', + 'billingSequenceNumber' => 'string', 'checkoutAttemptId' => 'string', 'recurringDetailReference' => 'string', 'shopperNotificationReference' => 'string', @@ -58,6 +59,7 @@ class UpiIntentDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'appId' => null, + 'billingSequenceNumber' => null, 'checkoutAttemptId' => null, 'recurringDetailReference' => null, 'shopperNotificationReference' => null, @@ -72,6 +74,7 @@ class UpiIntentDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'appId' => false, + 'billingSequenceNumber' => false, 'checkoutAttemptId' => false, 'recurringDetailReference' => false, 'shopperNotificationReference' => false, @@ -166,6 +169,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'appId' => 'appId', + 'billingSequenceNumber' => 'billingSequenceNumber', 'checkoutAttemptId' => 'checkoutAttemptId', 'recurringDetailReference' => 'recurringDetailReference', 'shopperNotificationReference' => 'shopperNotificationReference', @@ -180,6 +184,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'appId' => 'setAppId', + 'billingSequenceNumber' => 'setBillingSequenceNumber', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'recurringDetailReference' => 'setRecurringDetailReference', 'shopperNotificationReference' => 'setShopperNotificationReference', @@ -194,6 +199,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'appId' => 'getAppId', + 'billingSequenceNumber' => 'getBillingSequenceNumber', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'recurringDetailReference' => 'getRecurringDetailReference', 'shopperNotificationReference' => 'getShopperNotificationReference', @@ -271,6 +277,7 @@ public function getTypeAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('appId', $data ?? [], null); + $this->setIfExists('billingSequenceNumber', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); @@ -356,6 +363,30 @@ public function setAppId($appId) return $this; } + /** + * Gets billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $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) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + /** * Gets checkoutAttemptId * diff --git a/src/Adyen/Model/Checkout/UpiQrDetails.php b/src/Adyen/Model/Checkout/UpiQrDetails.php new file mode 100644 index 000000000..be0a85d6b --- /dev/null +++ b/src/Adyen/Model/Checkout/UpiQrDetails.php @@ -0,0 +1,595 @@ + + */ +class UpiQrDetails implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'UpiQrDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'billingSequenceNumber' => 'string', + 'checkoutAttemptId' => 'string', + 'recurringDetailReference' => 'string', + 'shopperNotificationReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'billingSequenceNumber' => null, + 'checkoutAttemptId' => null, + 'recurringDetailReference' => null, + 'shopperNotificationReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'billingSequenceNumber' => false, + 'checkoutAttemptId' => false, + 'recurringDetailReference' => false, + 'shopperNotificationReference' => false, + 'storedPaymentMethodId' => 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 = [ + 'billingSequenceNumber' => 'billingSequenceNumber', + 'checkoutAttemptId' => 'checkoutAttemptId', + 'recurringDetailReference' => 'recurringDetailReference', + 'shopperNotificationReference' => 'shopperNotificationReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'billingSequenceNumber' => 'setBillingSequenceNumber', + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'shopperNotificationReference' => 'setShopperNotificationReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'billingSequenceNumber' => 'getBillingSequenceNumber', + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'shopperNotificationReference' => 'getShopperNotificationReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + '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 TYPE_UPI_QR = 'upi_qr'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_UPI_QR, + ]; + } + /** + * 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('billingSequenceNumber', $data ?? [], null); + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('shopperNotificationReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $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 = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + 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 billingSequenceNumber + * + * @return string|null + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string|null $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) + { + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + 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) + { + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + 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 since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + public function setRecurringDetailReference($recurringDetailReference) + { + $this->container['recurringDetailReference'] = $recurringDetailReference; + + 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) + { + $this->container['shopperNotificationReference'] = $shopperNotificationReference; + + 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) + { + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **upi_qr** + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + error_log( + sprintf( + "type: unexpected enum value '%s' - Supported values are [%s]", + $type, + implode(', ', $allowedValues) + ) + ); + } + $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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/ValidateShopperIdResponse.php b/src/Adyen/Model/Checkout/ValidateShopperIdResponse.php index 1815a1fad..be310d2b5 100644 --- a/src/Adyen/Model/Checkout/ValidateShopperIdResponse.php +++ b/src/Adyen/Model/Checkout/ValidateShopperIdResponse.php @@ -293,7 +293,7 @@ public function getReason() /** * Sets reason * - * @param string|null $reason reason + * @param string|null $reason Reason for the result. * * @return self */ diff --git a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php index 6743b7319..09f4f488a 100644 --- a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php @@ -44,6 +44,8 @@ class WeChatPayMiniProgramDetails implements ModelInterface, ArrayAccess, \JsonS 'appId' => 'string', 'checkoutAttemptId' => 'string', 'openid' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', 'type' => 'string' ]; @@ -58,6 +60,8 @@ class WeChatPayMiniProgramDetails implements ModelInterface, ArrayAccess, \JsonS 'appId' => null, 'checkoutAttemptId' => null, 'openid' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, 'type' => null ]; @@ -70,6 +74,8 @@ class WeChatPayMiniProgramDetails implements ModelInterface, ArrayAccess, \JsonS 'appId' => false, 'checkoutAttemptId' => false, 'openid' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, 'type' => false ]; @@ -162,6 +168,8 @@ public function isNullableSetToNull(string $property): bool 'appId' => 'appId', 'checkoutAttemptId' => 'checkoutAttemptId', 'openid' => 'openid', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type' ]; @@ -174,6 +182,8 @@ public function isNullableSetToNull(string $property): bool 'appId' => 'setAppId', 'checkoutAttemptId' => 'setCheckoutAttemptId', 'openid' => 'setOpenid', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType' ]; @@ -186,6 +196,8 @@ public function isNullableSetToNull(string $property): bool 'appId' => 'getAppId', 'checkoutAttemptId' => 'getCheckoutAttemptId', 'openid' => 'getOpenid', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType' ]; @@ -261,6 +273,8 @@ public function __construct(?array $data = null) $this->setIfExists('appId', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('openid', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -387,6 +401,56 @@ public function setOpenid($openid) return $this; } + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + 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 since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + public function setRecurringDetailReference($recurringDetailReference) + { + $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) + { + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Payments/AdditionalDataLevel23.php b/src/Adyen/Model/Payments/AdditionalDataLevel23.php index 524e9541a..86376368d 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Payments/AdditionalDataLevel23.php @@ -782,7 +782,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. + * @param string|null $enhancedSchemeDataTotalTaxAmount The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * For L2 data: must not be all zeroes. * For L3 data: can be zero. * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php b/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php index 19f267341..e9f8e5872 100644 --- a/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php +++ b/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php @@ -531,7 +531,7 @@ public function getSubMerchantSubSellerSubSellerNrPhoneNumber() /** * Sets subMerchantSubSellerSubSellerNrPhoneNumber * - * @param string|null $subMerchantSubSellerSubSellerNrPhoneNumber Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters + * @param string|null $subMerchantSubSellerSubSellerNrPhoneNumber Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant. * Format: Alphanumeric and special characters * Maximum length: 20 characters * * @return self */ diff --git a/src/Adyen/Model/Payments/Recurring.php b/src/Adyen/Model/Payments/Recurring.php index 330a96d4d..9ccd30a0f 100644 --- a/src/Adyen/Model/Payments/Recurring.php +++ b/src/Adyen/Model/Payments/Recurring.php @@ -237,8 +237,10 @@ public function getModelName() } public const CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_ONECLICKRECURRING = 'ONECLICK,RECURRING'; public const CONTRACT_RECURRING = 'RECURRING'; public const CONTRACT_PAYOUT = 'PAYOUT'; + public const CONTRACT_EXTERNAL = 'EXTERNAL'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; @@ -253,8 +255,10 @@ public function getContractAllowableValues() { return [ self::CONTRACT_ONECLICK, + self::CONTRACT_ONECLICKRECURRING, self::CONTRACT_RECURRING, self::CONTRACT_PAYOUT, + self::CONTRACT_EXTERNAL, ]; } /** @@ -366,7 +370,7 @@ public function getContract() /** * Sets contract * - * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. * * @return self */ diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataSwish.php b/src/Adyen/Model/Payments/ResponseAdditionalDataSwish.php new file mode 100644 index 000000000..31e787738 --- /dev/null +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataSwish.php @@ -0,0 +1,404 @@ + + */ +class ResponseAdditionalDataSwish implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataSwish'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'swishPayerAlias' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'swishPayerAlias' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'swishPayerAlias' => 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 = [ + 'swishPayerAlias' => 'swish.payerAlias' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'swishPayerAlias' => 'setSwishPayerAlias' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'swishPayerAlias' => 'getSwishPayerAlias' + ]; + + /** + * 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('swishPayerAlias', $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 = []; + + 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 swishPayerAlias + * + * @return string|null + */ + public function getSwishPayerAlias() + { + return $this->container['swishPayerAlias']; + } + + /** + * Sets swishPayerAlias + * + * @param string|null $swishPayerAlias A Swish shopper's telephone number. + * + * @return self + */ + public function setSwishPayerAlias($swishPayerAlias) + { + $this->container['swishPayerAlias'] = $swishPayerAlias; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/Payments/Split.php b/src/Adyen/Model/Payments/Split.php index 1cccd3c73..087949d5b 100644 --- a/src/Adyen/Model/Payments/Split.php +++ b/src/Adyen/Model/Payments/Split.php @@ -464,7 +464,7 @@ public function getType() /** * Sets type * - * @param string $type The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. + * @param string $type The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. * * @return self */ diff --git a/src/Adyen/Model/Payout/Recurring.php b/src/Adyen/Model/Payout/Recurring.php index 27af5f886..aa7be240e 100644 --- a/src/Adyen/Model/Payout/Recurring.php +++ b/src/Adyen/Model/Payout/Recurring.php @@ -237,8 +237,10 @@ public function getModelName() } public const CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_ONECLICKRECURRING = 'ONECLICK,RECURRING'; public const CONTRACT_RECURRING = 'RECURRING'; public const CONTRACT_PAYOUT = 'PAYOUT'; + public const CONTRACT_EXTERNAL = 'EXTERNAL'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; @@ -253,8 +255,10 @@ public function getContractAllowableValues() { return [ self::CONTRACT_ONECLICK, + self::CONTRACT_ONECLICKRECURRING, self::CONTRACT_RECURRING, self::CONTRACT_PAYOUT, + self::CONTRACT_EXTERNAL, ]; } /** @@ -366,7 +370,7 @@ public function getContract() /** * Sets contract * - * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. * * @return self */ diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataSwish.php b/src/Adyen/Model/Payout/ResponseAdditionalDataSwish.php new file mode 100644 index 000000000..157908bc8 --- /dev/null +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataSwish.php @@ -0,0 +1,404 @@ + + */ +class ResponseAdditionalDataSwish implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataSwish'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'swishPayerAlias' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'swishPayerAlias' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'swishPayerAlias' => 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 = [ + 'swishPayerAlias' => 'swish.payerAlias' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'swishPayerAlias' => 'setSwishPayerAlias' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'swishPayerAlias' => 'getSwishPayerAlias' + ]; + + /** + * 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('swishPayerAlias', $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 = []; + + 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 swishPayerAlias + * + * @return string|null + */ + public function getSwishPayerAlias() + { + return $this->container['swishPayerAlias']; + } + + /** + * Sets swishPayerAlias + * + * @param string|null $swishPayerAlias A Swish shopper's telephone number. + * + * @return self + */ + public function setSwishPayerAlias($swishPayerAlias) + { + $this->container['swishPayerAlias'] = $swishPayerAlias; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * 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/Recurring/Recurring.php b/src/Adyen/Model/Recurring/Recurring.php index 47aa00f8b..9f4a272ec 100644 --- a/src/Adyen/Model/Recurring/Recurring.php +++ b/src/Adyen/Model/Recurring/Recurring.php @@ -237,8 +237,10 @@ public function getModelName() } public const CONTRACT_ONECLICK = 'ONECLICK'; + public const CONTRACT_ONECLICKRECURRING = 'ONECLICK,RECURRING'; public const CONTRACT_RECURRING = 'RECURRING'; public const CONTRACT_PAYOUT = 'PAYOUT'; + public const CONTRACT_EXTERNAL = 'EXTERNAL'; public const TOKEN_SERVICE_VISATOKENSERVICE = 'VISATOKENSERVICE'; public const TOKEN_SERVICE_MCTOKENSERVICE = 'MCTOKENSERVICE'; public const TOKEN_SERVICE_AMEXTOKENSERVICE = 'AMEXTOKENSERVICE'; @@ -253,8 +255,10 @@ public function getContractAllowableValues() { return [ self::CONTRACT_ONECLICK, + self::CONTRACT_ONECLICKRECURRING, self::CONTRACT_RECURRING, self::CONTRACT_PAYOUT, + self::CONTRACT_EXTERNAL, ]; } /** @@ -366,7 +370,7 @@ public function getContract() /** * Sets contract * - * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + * @param string|null $contract The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. * * @return self */ diff --git a/src/Adyen/Service/Checkout/DonationsApi.php b/src/Adyen/Service/Checkout/DonationsApi.php index 0cadbe4c7..63caab460 100644 --- a/src/Adyen/Service/Checkout/DonationsApi.php +++ b/src/Adyen/Service/Checkout/DonationsApi.php @@ -55,7 +55,7 @@ public function donationCampaigns(\Adyen\Model\Checkout\DonationCampaignsRequest } /** - * Start a transaction for donations + * Make a donation * * @param \Adyen\Model\Checkout\DonationPaymentRequest $donationPaymentRequest * @param array|null $requestOptions diff --git a/src/Adyen/Service/RecurringApi.php b/src/Adyen/Service/RecurringApi.php index 3a815a3f0..2591fc892 100644 --- a/src/Adyen/Service/RecurringApi.php +++ b/src/Adyen/Service/RecurringApi.php @@ -58,7 +58,6 @@ public function createPermit(\Adyen\Model\Recurring\CreatePermitRequest $createP /** * Disable stored payment details * - * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\DisableRequest $disableRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\DisableResult @@ -90,7 +89,6 @@ public function disablePermit(\Adyen\Model\Recurring\DisablePermitRequest $disab /** * Get stored payment details * - * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\RecurringDetailsRequest $recurringDetailsRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\RecurringDetailsResult @@ -106,7 +104,6 @@ public function listRecurringDetails(\Adyen\Model\Recurring\RecurringDetailsRequ /** * Ask issuer to notify the shopper * - * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\NotifyShopperRequest $notifyShopperRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\NotifyShopperResult @@ -122,7 +119,6 @@ public function notifyShopper(\Adyen\Model\Recurring\NotifyShopperRequest $notif /** * Schedule running the Account Updater * - * @deprecated since Adyen Recurring API v68. * @param \Adyen\Model\Recurring\ScheduleAccountUpdaterRequest $scheduleAccountUpdaterRequest * @param array|null $requestOptions * @return \Adyen\Model\Recurring\ScheduleAccountUpdaterResult