diff --git a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php index f3dd330d..4c8886ae 100644 --- a/src/Adyen/Model/Checkout/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Checkout/AdditionalData3DSecure.php @@ -354,7 +354,7 @@ public function getAllow3DS2() /** * Sets allow3DS2 * - * @param string|null $allow3DS2 Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen still selects the version of 3D Secure based on configuration to optimize authorisation rates and improve the shopper's experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen will not offer 3D Secure 2 to your shopper regardless of your configuration. + * @param string|null $allow3DS2 Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen selects redirect or native authentication based on your configuration to optimize authorization rates and improve the shopper's experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen offers redirect 3D Secure 2 authentication instead, based on your configuration. * * @return self * @deprecated diff --git a/src/Adyen/Model/Checkout/AdditionalDataLodging.php b/src/Adyen/Model/Checkout/AdditionalDataLodging.php index eb7372b1..f78af364 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLodging.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLodging.php @@ -473,7 +473,7 @@ public function getLodgingCustomerServiceTollFreeNumber() /** * Sets lodgingCustomerServiceTollFreeNumber * - * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. + * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - * Must not be all zeros. * * @return self */ @@ -545,7 +545,7 @@ public function getLodgingFolioNumber() /** * Sets lodgingFolioNumber * - * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space *Must not be all zeros. + * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters * Must not start with a space * Must not contain any special characters * Must not be all zeros. * * @return self */ @@ -641,7 +641,7 @@ public function getLodgingPropertyPhoneNumber() /** * Sets lodgingPropertyPhoneNumber * - * @param string|null $lodgingPropertyPhoneNumber The lodging property location's phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. + * @param string|null $lodgingPropertyPhoneNumber The lodging property location's phone number. * Format: numeric * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - * Must not be all zeros. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php b/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php index ed750f82..48a255b9 100644 --- a/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php +++ b/src/Adyen/Model/Checkout/CheckoutBankTransferAction.php @@ -44,13 +44,16 @@ class CheckoutBankTransferAction implements ModelInterface, ArrayAccess, \JsonSe * @var string[] */ protected static $openAPITypes = [ + 'accountNumber' => 'string', 'beneficiary' => 'string', 'bic' => 'string', 'downloadUrl' => 'string', 'iban' => 'string', 'paymentMethodType' => 'string', 'reference' => 'string', + 'routingNumber' => 'string', 'shopperEmail' => 'string', + 'sortCode' => 'string', 'totalAmount' => '\Adyen\Model\Checkout\Amount', 'type' => 'string', 'url' => 'string' @@ -64,13 +67,16 @@ class CheckoutBankTransferAction implements ModelInterface, ArrayAccess, \JsonSe * @psalm-var array */ protected static $openAPIFormats = [ + 'accountNumber' => null, 'beneficiary' => null, 'bic' => null, 'downloadUrl' => null, 'iban' => null, 'paymentMethodType' => null, 'reference' => null, + 'routingNumber' => null, 'shopperEmail' => null, + 'sortCode' => null, 'totalAmount' => null, 'type' => null, 'url' => null @@ -82,13 +88,16 @@ class CheckoutBankTransferAction implements ModelInterface, ArrayAccess, \JsonSe * @var boolean[] */ protected static $openAPINullables = [ + 'accountNumber' => false, 'beneficiary' => false, 'bic' => false, 'downloadUrl' => false, 'iban' => false, 'paymentMethodType' => false, 'reference' => false, + 'routingNumber' => false, 'shopperEmail' => false, + 'sortCode' => false, 'totalAmount' => false, 'type' => false, 'url' => false @@ -180,13 +189,16 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'accountNumber' => 'accountNumber', 'beneficiary' => 'beneficiary', 'bic' => 'bic', 'downloadUrl' => 'downloadUrl', 'iban' => 'iban', 'paymentMethodType' => 'paymentMethodType', 'reference' => 'reference', + 'routingNumber' => 'routingNumber', 'shopperEmail' => 'shopperEmail', + 'sortCode' => 'sortCode', 'totalAmount' => 'totalAmount', 'type' => 'type', 'url' => 'url' @@ -198,13 +210,16 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'accountNumber' => 'setAccountNumber', 'beneficiary' => 'setBeneficiary', 'bic' => 'setBic', 'downloadUrl' => 'setDownloadUrl', 'iban' => 'setIban', 'paymentMethodType' => 'setPaymentMethodType', 'reference' => 'setReference', + 'routingNumber' => 'setRoutingNumber', 'shopperEmail' => 'setShopperEmail', + 'sortCode' => 'setSortCode', 'totalAmount' => 'setTotalAmount', 'type' => 'setType', 'url' => 'setUrl' @@ -216,13 +231,16 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'accountNumber' => 'getAccountNumber', 'beneficiary' => 'getBeneficiary', 'bic' => 'getBic', 'downloadUrl' => 'getDownloadUrl', 'iban' => 'getIban', 'paymentMethodType' => 'getPaymentMethodType', 'reference' => 'getReference', + 'routingNumber' => 'getRoutingNumber', 'shopperEmail' => 'getShopperEmail', + 'sortCode' => 'getSortCode', 'totalAmount' => 'getTotalAmount', 'type' => 'getType', 'url' => 'getUrl' @@ -297,13 +315,16 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('beneficiary', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('downloadUrl', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('paymentMethodType', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('routingNumber', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); + $this->setIfExists('sortCode', $data ?? [], null); $this->setIfExists('totalAmount', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); @@ -363,6 +384,30 @@ public function valid() } + /** + * Gets accountNumber + * + * @return string|null + */ + public function getAccountNumber() + { + return $this->container['accountNumber']; + } + + /** + * Sets accountNumber + * + * @param string|null $accountNumber The account number of the bank transfer. + * + * @return self + */ + public function setAccountNumber($accountNumber) + { + $this->container['accountNumber'] = $accountNumber; + + return $this; + } + /** * Gets beneficiary * @@ -507,6 +552,30 @@ public function setReference($reference) return $this; } + /** + * Gets routingNumber + * + * @return string|null + */ + public function getRoutingNumber() + { + return $this->container['routingNumber']; + } + + /** + * Sets routingNumber + * + * @param string|null $routingNumber The routing number of the bank transfer. + * + * @return self + */ + public function setRoutingNumber($routingNumber) + { + $this->container['routingNumber'] = $routingNumber; + + return $this; + } + /** * Gets shopperEmail * @@ -531,6 +600,30 @@ public function setShopperEmail($shopperEmail) return $this; } + /** + * Gets sortCode + * + * @return string|null + */ + public function getSortCode() + { + return $this->container['sortCode']; + } + + /** + * Sets sortCode + * + * @param string|null $sortCode The sort code of the bank transfer. + * + * @return self + */ + public function setSortCode($sortCode) + { + $this->container['sortCode'] = $sortCode; + + return $this; + } + /** * Gets totalAmount * diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index b9f3892e..c5efe3d9 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -94,6 +94,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'lastName' => 'string', 'shopperEmail' => 'string', 'telephoneNumber' => 'string', + 'bankCode' => 'string', 'googlePayCardNetwork' => 'string', 'googlePayToken' => 'string', 'masterpassTransactionId' => 'string', @@ -169,6 +170,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'lastName' => null, 'shopperEmail' => null, 'telephoneNumber' => null, + 'bankCode' => null, 'googlePayCardNetwork' => null, 'googlePayToken' => null, 'masterpassTransactionId' => null, @@ -242,6 +244,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'lastName' => false, 'shopperEmail' => false, 'telephoneNumber' => false, + 'bankCode' => false, 'googlePayCardNetwork' => false, 'googlePayToken' => false, 'masterpassTransactionId' => false, @@ -395,6 +398,7 @@ public function isNullableSetToNull(string $property): bool 'lastName' => 'lastName', 'shopperEmail' => 'shopperEmail', 'telephoneNumber' => 'telephoneNumber', + 'bankCode' => 'bankCode', 'googlePayCardNetwork' => 'googlePayCardNetwork', 'googlePayToken' => 'googlePayToken', 'masterpassTransactionId' => 'masterpassTransactionId', @@ -468,6 +472,7 @@ public function isNullableSetToNull(string $property): bool 'lastName' => 'setLastName', 'shopperEmail' => 'setShopperEmail', 'telephoneNumber' => 'setTelephoneNumber', + 'bankCode' => 'setBankCode', 'googlePayCardNetwork' => 'setGooglePayCardNetwork', 'googlePayToken' => 'setGooglePayToken', 'masterpassTransactionId' => 'setMasterpassTransactionId', @@ -541,6 +546,7 @@ public function isNullableSetToNull(string $property): bool 'lastName' => 'getLastName', 'shopperEmail' => 'getShopperEmail', 'telephoneNumber' => 'getTelephoneNumber', + 'bankCode' => 'getBankCode', 'googlePayCardNetwork' => 'getGooglePayCardNetwork', 'googlePayToken' => 'getGooglePayToken', 'masterpassTransactionId' => 'getMasterpassTransactionId', @@ -664,6 +670,7 @@ public function __construct(array $data = null) $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('googlePayCardNetwork', $data ?? [], null); $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('masterpassTransactionId', $data ?? [], null); @@ -1950,6 +1957,30 @@ public function setTelephoneNumber($telephoneNumber) return $this; } + /** + * Gets bankCode + * + * @return string|null + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string|null $bankCode The financial institution code. + * + * @return self + */ + public function setBankCode($bankCode) + { + $this->container['bankCode'] = $bankCode; + + return $this; + } + /** * Gets googlePayCardNetwork * diff --git a/src/Adyen/Model/Checkout/EftDetails.php b/src/Adyen/Model/Checkout/EftDetails.php new file mode 100644 index 00000000..2e7d8b27 --- /dev/null +++ b/src/Adyen/Model/Checkout/EftDetails.php @@ -0,0 +1,657 @@ + + */ +class EftDetails implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'EftDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bankAccountNumber' => 'string', + 'bankCode' => 'string', + 'bankLocationId' => 'string', + 'checkoutAttemptId' => 'string', + 'ownerName' => 'string', + 'recurringDetailReference' => '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 = [ + 'bankAccountNumber' => null, + 'bankCode' => null, + 'bankLocationId' => null, + 'checkoutAttemptId' => null, + 'ownerName' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'bankAccountNumber' => false, + 'bankCode' => false, + 'bankLocationId' => false, + 'checkoutAttemptId' => false, + 'ownerName' => false, + 'recurringDetailReference' => 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 = [ + 'bankAccountNumber' => 'bankAccountNumber', + 'bankCode' => 'bankCode', + 'bankLocationId' => 'bankLocationId', + 'checkoutAttemptId' => 'checkoutAttemptId', + 'ownerName' => 'ownerName', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bankAccountNumber' => 'setBankAccountNumber', + 'bankCode' => 'setBankCode', + 'bankLocationId' => 'setBankLocationId', + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'ownerName' => 'setOwnerName', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bankAccountNumber' => 'getBankAccountNumber', + 'bankCode' => 'getBankCode', + 'bankLocationId' => 'getBankLocationId', + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'ownerName' => 'getOwnerName', + 'recurringDetailReference' => 'getRecurringDetailReference', + '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_EFT_DIRECTDEBIT_CA = 'eft_directdebit_CA'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_EFT_DIRECTDEBIT_CA, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('bankAccountNumber', $data ?? [], null); + $this->setIfExists('bankCode', $data ?? [], null); + $this->setIfExists('bankLocationId', $data ?? [], null); + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('ownerName', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $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 = []; + + $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 bankAccountNumber + * + * @return string|null + */ + public function getBankAccountNumber() + { + return $this->container['bankAccountNumber']; + } + + /** + * Sets bankAccountNumber + * + * @param string|null $bankAccountNumber The bank account number (without separators). + * + * @return self + */ + public function setBankAccountNumber($bankAccountNumber) + { + $this->container['bankAccountNumber'] = $bankAccountNumber; + + return $this; + } + + /** + * Gets bankCode + * + * @return string|null + */ + public function getBankCode() + { + return $this->container['bankCode']; + } + + /** + * Sets bankCode + * + * @param string|null $bankCode The financial institution code. + * + * @return self + */ + public function setBankCode($bankCode) + { + $this->container['bankCode'] = $bankCode; + + return $this; + } + + /** + * Gets bankLocationId + * + * @return string|null + */ + public function getBankLocationId() + { + return $this->container['bankLocationId']; + } + + /** + * Sets bankLocationId + * + * @param string|null $bankLocationId The bank routing number of the account. + * + * @return self + */ + public function setBankLocationId($bankLocationId) + { + $this->container['bankLocationId'] = $bankLocationId; + + return $this; + } + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets ownerName + * + * @return string|null + */ + public function getOwnerName() + { + return $this->container['ownerName']; + } + + /** + * Sets ownerName + * + * @param string|null $ownerName The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. + * + * @return self + */ + public function setOwnerName($ownerName) + { + $this->container['ownerName'] = $ownerName; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated + */ + public function setRecurringDetailReference($recurringDetailReference) + { + $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 + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **eft** + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%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/PaymentResponseAction.php b/src/Adyen/Model/Checkout/PaymentResponseAction.php index 0ac82ec4..9583f5d3 100644 --- a/src/Adyen/Model/Checkout/PaymentResponseAction.php +++ b/src/Adyen/Model/Checkout/PaymentResponseAction.php @@ -49,12 +49,15 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'paymentMethodType' => 'string', 'type' => 'string', 'url' => 'string', + 'accountNumber' => 'string', 'beneficiary' => 'string', 'bic' => 'string', 'downloadUrl' => 'string', 'iban' => 'string', 'reference' => 'string', + 'routingNumber' => 'string', 'shopperEmail' => 'string', + 'sortCode' => 'string', 'totalAmount' => '\Adyen\Model\Checkout\Amount', 'authorisationToken' => 'string', 'token' => 'string', @@ -91,12 +94,15 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'paymentMethodType' => null, 'type' => null, 'url' => null, + 'accountNumber' => null, 'beneficiary' => null, 'bic' => null, 'downloadUrl' => null, 'iban' => null, 'reference' => null, + 'routingNumber' => null, 'shopperEmail' => null, + 'sortCode' => null, 'totalAmount' => null, 'authorisationToken' => null, 'token' => null, @@ -131,12 +137,15 @@ class PaymentResponseAction implements ModelInterface, ArrayAccess, \JsonSeriali 'paymentMethodType' => false, 'type' => false, 'url' => false, + 'accountNumber' => false, 'beneficiary' => false, 'bic' => false, 'downloadUrl' => false, 'iban' => false, 'reference' => false, + 'routingNumber' => false, 'shopperEmail' => false, + 'sortCode' => false, 'totalAmount' => false, 'authorisationToken' => false, 'token' => false, @@ -251,12 +260,15 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodType' => 'paymentMethodType', 'type' => 'type', 'url' => 'url', + 'accountNumber' => 'accountNumber', 'beneficiary' => 'beneficiary', 'bic' => 'bic', 'downloadUrl' => 'downloadUrl', 'iban' => 'iban', 'reference' => 'reference', + 'routingNumber' => 'routingNumber', 'shopperEmail' => 'shopperEmail', + 'sortCode' => 'sortCode', 'totalAmount' => 'totalAmount', 'authorisationToken' => 'authorisationToken', 'token' => 'token', @@ -291,12 +303,15 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodType' => 'setPaymentMethodType', 'type' => 'setType', 'url' => 'setUrl', + 'accountNumber' => 'setAccountNumber', 'beneficiary' => 'setBeneficiary', 'bic' => 'setBic', 'downloadUrl' => 'setDownloadUrl', 'iban' => 'setIban', 'reference' => 'setReference', + 'routingNumber' => 'setRoutingNumber', 'shopperEmail' => 'setShopperEmail', + 'sortCode' => 'setSortCode', 'totalAmount' => 'setTotalAmount', 'authorisationToken' => 'setAuthorisationToken', 'token' => 'setToken', @@ -331,12 +346,15 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodType' => 'getPaymentMethodType', 'type' => 'getType', 'url' => 'getUrl', + 'accountNumber' => 'getAccountNumber', 'beneficiary' => 'getBeneficiary', 'bic' => 'getBic', 'downloadUrl' => 'getDownloadUrl', 'iban' => 'getIban', 'reference' => 'getReference', + 'routingNumber' => 'getRoutingNumber', 'shopperEmail' => 'getShopperEmail', + 'sortCode' => 'getSortCode', 'totalAmount' => 'getTotalAmount', 'authorisationToken' => 'getAuthorisationToken', 'token' => 'getToken', @@ -421,12 +439,15 @@ public function __construct(array $data = null) $this->setIfExists('paymentMethodType', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('beneficiary', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('downloadUrl', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('routingNumber', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); + $this->setIfExists('sortCode', $data ?? [], null); $this->setIfExists('totalAmount', $data ?? [], null); $this->setIfExists('authorisationToken', $data ?? [], null); $this->setIfExists('token', $data ?? [], null); @@ -593,6 +614,30 @@ public function setUrl($url) return $this; } + /** + * Gets accountNumber + * + * @return string|null + */ + public function getAccountNumber() + { + return $this->container['accountNumber']; + } + + /** + * Sets accountNumber + * + * @param string|null $accountNumber The account number of the bank transfer. + * + * @return self + */ + public function setAccountNumber($accountNumber) + { + $this->container['accountNumber'] = $accountNumber; + + return $this; + } + /** * Gets beneficiary * @@ -713,6 +758,30 @@ public function setReference($reference) return $this; } + /** + * Gets routingNumber + * + * @return string|null + */ + public function getRoutingNumber() + { + return $this->container['routingNumber']; + } + + /** + * Sets routingNumber + * + * @param string|null $routingNumber The routing number of the bank transfer. + * + * @return self + */ + public function setRoutingNumber($routingNumber) + { + $this->container['routingNumber'] = $routingNumber; + + return $this; + } + /** * Gets shopperEmail * @@ -737,6 +806,30 @@ public function setShopperEmail($shopperEmail) return $this; } + /** + * Gets sortCode + * + * @return string|null + */ + public function getSortCode() + { + return $this->container['sortCode']; + } + + /** + * Sets sortCode + * + * @param string|null $sortCode The sort code of the bank transfer. + * + * @return self + */ + public function setSortCode($sortCode) + { + $this->container['sortCode'] = $sortCode; + + return $this; + } + /** * Gets totalAmount * diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php index ab08d6a9..62554d91 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php @@ -368,7 +368,7 @@ public function getTermsOfServiceDocumentFormat() /** * Sets termsOfServiceDocumentFormat * - * @param string|null $termsOfServiceDocumentFormat The requested format for the Terms of Service document. Default value: JSON. Possible values: JSON or PDF. + * @param string|null $termsOfServiceDocumentFormat The requested format for the Terms of Service document. Default value: JSON. Possible values: **JSON**, **PDF**, or **TXT**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index 7dcaee0d..28bb60f4 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -507,7 +507,7 @@ public function getType() /** * Sets type * - * @param string $type Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber + * @param string $type Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php index 902853fd..c6634917 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php @@ -248,6 +248,7 @@ public function getModelName() public const CAPABILITIES_ISSUE_CARD = 'issueCard'; public const CAPABILITIES_ISSUE_CARD_COMMERCIAL = 'issueCardCommercial'; public const CAPABILITIES_ISSUE_CARD_CONSUMER = 'issueCardConsumer'; + public const CAPABILITIES_ISSUE_CREDIT_LIMIT = 'issueCreditLimit'; public const CAPABILITIES_LOCAL_ACCEPTANCE = 'localAcceptance'; public const CAPABILITIES_PAYOUT = 'payout'; public const CAPABILITIES_PAYOUT_TO_TRANSFER_INSTRUMENT = 'payoutToTransferInstrument'; @@ -307,6 +308,7 @@ public function getCapabilitiesAllowableValues() self::CAPABILITIES_ISSUE_CARD, self::CAPABILITIES_ISSUE_CARD_COMMERCIAL, self::CAPABILITIES_ISSUE_CARD_CONSUMER, + self::CAPABILITIES_ISSUE_CREDIT_LIMIT, self::CAPABILITIES_LOCAL_ACCEPTANCE, self::CAPABILITIES_PAYOUT, self::CAPABILITIES_PAYOUT_TO_TRANSFER_INSTRUMENT, diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationError.php b/src/Adyen/Model/LegalEntityManagement/VerificationError.php index 2cd9e2d1..e43fd1e5 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationError.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationError.php @@ -266,6 +266,7 @@ public function getModelName() public const CAPABILITIES_ISSUE_CARD = 'issueCard'; public const CAPABILITIES_ISSUE_CARD_COMMERCIAL = 'issueCardCommercial'; public const CAPABILITIES_ISSUE_CARD_CONSUMER = 'issueCardConsumer'; + public const CAPABILITIES_ISSUE_CREDIT_LIMIT = 'issueCreditLimit'; public const CAPABILITIES_LOCAL_ACCEPTANCE = 'localAcceptance'; public const CAPABILITIES_PAYOUT = 'payout'; public const CAPABILITIES_PAYOUT_TO_TRANSFER_INSTRUMENT = 'payoutToTransferInstrument'; @@ -330,6 +331,7 @@ public function getCapabilitiesAllowableValues() self::CAPABILITIES_ISSUE_CARD, self::CAPABILITIES_ISSUE_CARD_COMMERCIAL, self::CAPABILITIES_ISSUE_CARD_CONSUMER, + self::CAPABILITIES_ISSUE_CREDIT_LIMIT, self::CAPABILITIES_LOCAL_ACCEPTANCE, self::CAPABILITIES_PAYOUT, self::CAPABILITIES_PAYOUT_TO_TRANSFER_INSTRUMENT, @@ -592,7 +594,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of error. + * @param string|null $type The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php index a4e60201..cf7ccc47 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php @@ -260,6 +260,7 @@ public function getModelName() public const CAPABILITIES_ISSUE_CARD = 'issueCard'; public const CAPABILITIES_ISSUE_CARD_COMMERCIAL = 'issueCardCommercial'; public const CAPABILITIES_ISSUE_CARD_CONSUMER = 'issueCardConsumer'; + public const CAPABILITIES_ISSUE_CREDIT_LIMIT = 'issueCreditLimit'; public const CAPABILITIES_LOCAL_ACCEPTANCE = 'localAcceptance'; public const CAPABILITIES_PAYOUT = 'payout'; public const CAPABILITIES_PAYOUT_TO_TRANSFER_INSTRUMENT = 'payoutToTransferInstrument'; @@ -324,6 +325,7 @@ public function getCapabilitiesAllowableValues() self::CAPABILITIES_ISSUE_CARD, self::CAPABILITIES_ISSUE_CARD_COMMERCIAL, self::CAPABILITIES_ISSUE_CARD_CONSUMER, + self::CAPABILITIES_ISSUE_CREDIT_LIMIT, self::CAPABILITIES_LOCAL_ACCEPTANCE, self::CAPABILITIES_PAYOUT, self::CAPABILITIES_PAYOUT_TO_TRANSFER_INSTRUMENT, @@ -537,7 +539,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of error. + * @param string|null $type The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** * * @return self */ diff --git a/src/Adyen/Model/Management/AccelInfo.php b/src/Adyen/Model/Management/AccelInfo.php new file mode 100644 index 00000000..d056973c --- /dev/null +++ b/src/Adyen/Model/Management/AccelInfo.php @@ -0,0 +1,476 @@ + + */ +class AccelInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccelInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'processingType' => 'string', + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'processingType' => null, + 'transactionDescription' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'processingType' => false, + 'transactionDescription' => 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 = [ + 'processingType' => 'processingType', + 'transactionDescription' => 'transactionDescription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'processingType' => 'setProcessingType', + 'transactionDescription' => 'setTransactionDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'processingType' => 'getProcessingType', + 'transactionDescription' => 'getTransactionDescription' + ]; + + /** + * 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 PROCESSING_TYPE_BILLPAY = 'billpay'; + public const PROCESSING_TYPE_ECOM = 'ecom'; + public const PROCESSING_TYPE_POS = 'pos'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProcessingTypeAllowableValues() + { + return [ + self::PROCESSING_TYPE_BILLPAY, + self::PROCESSING_TYPE_ECOM, + self::PROCESSING_TYPE_POS, + ]; + } + /** + * 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('processingType', $data ?? [], null); + $this->setIfExists('transactionDescription', $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['processingType'] === null) { + $invalidProperties[] = "'processingType' can't be null"; + } + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!is_null($this->container['processingType']) && !in_array($this->container['processingType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'processingType', must be one of '%s'", + $this->container['processingType'], + 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 processingType + * + * @return string + */ + public function getProcessingType() + { + return $this->container['processingType']; + } + + /** + * Sets processingType + * + * @param string $processingType The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * + * @return self + */ + public function setProcessingType($processingType) + { + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!in_array($processingType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'processingType', must be one of '%s'", + $processingType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['processingType'] = $processingType; + + return $this; + } + + /** + * Gets transactionDescription + * + * @return \Adyen\Model\Management\TransactionDescriptionInfo|null + */ + public function getTransactionDescription() + { + return $this->container['transactionDescription']; + } + + /** + * Sets transactionDescription + * + * @param \Adyen\Model\Management\TransactionDescriptionInfo|null $transactionDescription transactionDescription + * + * @return self + */ + public function setTransactionDescription($transactionDescription) + { + $this->container['transactionDescription'] = $transactionDescription; + + 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/Management/Connectivity.php b/src/Adyen/Model/Management/Connectivity.php index 0ab0df53..d07b02bf 100644 --- a/src/Adyen/Model/Management/Connectivity.php +++ b/src/Adyen/Model/Management/Connectivity.php @@ -44,7 +44,8 @@ class Connectivity implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'simcardStatus' => 'string' + 'simcardStatus' => 'string', + 'terminalIPAddressURL' => '\Adyen\Model\Management\EventUrl' ]; /** @@ -55,7 +56,8 @@ class Connectivity implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'simcardStatus' => null + 'simcardStatus' => null, + 'terminalIPAddressURL' => null ]; /** @@ -64,7 +66,8 @@ class Connectivity implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'simcardStatus' => false + 'simcardStatus' => false, + 'terminalIPAddressURL' => false ]; /** @@ -153,7 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'simcardStatus' => 'simcardStatus' + 'simcardStatus' => 'simcardStatus', + 'terminalIPAddressURL' => 'terminalIPAddressURL' ]; /** @@ -162,7 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'simcardStatus' => 'setSimcardStatus' + 'simcardStatus' => 'setSimcardStatus', + 'terminalIPAddressURL' => 'setTerminalIPAddressURL' ]; /** @@ -171,7 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'simcardStatus' => 'getSimcardStatus' + 'simcardStatus' => 'getSimcardStatus', + 'terminalIPAddressURL' => 'getTerminalIPAddressURL' ]; /** @@ -246,6 +252,7 @@ public function getSimcardStatusAllowableValues() public function __construct(array $data = null) { $this->setIfExists('simcardStatus', $data ?? [], null); + $this->setIfExists('terminalIPAddressURL', $data ?? [], null); } /** @@ -332,6 +339,30 @@ public function setSimcardStatus($simcardStatus) return $this; } + + /** + * Gets terminalIPAddressURL + * + * @return \Adyen\Model\Management\EventUrl|null + */ + public function getTerminalIPAddressURL() + { + return $this->container['terminalIPAddressURL']; + } + + /** + * Sets terminalIPAddressURL + * + * @param \Adyen\Model\Management\EventUrl|null $terminalIPAddressURL terminalIPAddressURL + * + * @return self + */ + public function setTerminalIPAddressURL($terminalIPAddressURL) + { + $this->container['terminalIPAddressURL'] = $terminalIPAddressURL; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/NyceInfo.php b/src/Adyen/Model/Management/NyceInfo.php new file mode 100644 index 00000000..a9850274 --- /dev/null +++ b/src/Adyen/Model/Management/NyceInfo.php @@ -0,0 +1,476 @@ + + */ +class NyceInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'NyceInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'processingType' => 'string', + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'processingType' => null, + 'transactionDescription' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'processingType' => false, + 'transactionDescription' => 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 = [ + 'processingType' => 'processingType', + 'transactionDescription' => 'transactionDescription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'processingType' => 'setProcessingType', + 'transactionDescription' => 'setTransactionDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'processingType' => 'getProcessingType', + 'transactionDescription' => 'getTransactionDescription' + ]; + + /** + * 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 PROCESSING_TYPE_BILLPAY = 'billpay'; + public const PROCESSING_TYPE_ECOM = 'ecom'; + public const PROCESSING_TYPE_POS = 'pos'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProcessingTypeAllowableValues() + { + return [ + self::PROCESSING_TYPE_BILLPAY, + self::PROCESSING_TYPE_ECOM, + self::PROCESSING_TYPE_POS, + ]; + } + /** + * 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('processingType', $data ?? [], null); + $this->setIfExists('transactionDescription', $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['processingType'] === null) { + $invalidProperties[] = "'processingType' can't be null"; + } + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!is_null($this->container['processingType']) && !in_array($this->container['processingType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'processingType', must be one of '%s'", + $this->container['processingType'], + 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 processingType + * + * @return string + */ + public function getProcessingType() + { + return $this->container['processingType']; + } + + /** + * Sets processingType + * + * @param string $processingType The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * + * @return self + */ + public function setProcessingType($processingType) + { + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!in_array($processingType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'processingType', must be one of '%s'", + $processingType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['processingType'] = $processingType; + + return $this; + } + + /** + * Gets transactionDescription + * + * @return \Adyen\Model\Management\TransactionDescriptionInfo|null + */ + public function getTransactionDescription() + { + return $this->container['transactionDescription']; + } + + /** + * Sets transactionDescription + * + * @param \Adyen\Model\Management\TransactionDescriptionInfo|null $transactionDescription transactionDescription + * + * @return self + */ + public function setTransactionDescription($transactionDescription) + { + $this->container['transactionDescription'] = $transactionDescription; + + 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/Management/PayMeInfo.php b/src/Adyen/Model/Management/PayMeInfo.php new file mode 100644 index 00000000..f12ac013 --- /dev/null +++ b/src/Adyen/Model/Management/PayMeInfo.php @@ -0,0 +1,478 @@ + + */ +class PayMeInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PayMeInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'displayName' => 'string', + 'logo' => 'string', + 'supportEmail' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'displayName' => null, + 'logo' => null, + 'supportEmail' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'displayName' => false, + 'logo' => false, + 'supportEmail' => 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 = [ + 'displayName' => 'displayName', + 'logo' => 'logo', + 'supportEmail' => 'supportEmail' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'displayName' => 'setDisplayName', + 'logo' => 'setLogo', + 'supportEmail' => 'setSupportEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'displayName' => 'getDisplayName', + 'logo' => 'getLogo', + 'supportEmail' => 'getSupportEmail' + ]; + + /** + * 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('displayName', $data ?? [], null); + $this->setIfExists('logo', $data ?? [], null); + $this->setIfExists('supportEmail', $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['displayName'] === null) { + $invalidProperties[] = "'displayName' can't be null"; + } + if ($this->container['logo'] === null) { + $invalidProperties[] = "'logo' can't be null"; + } + if ($this->container['supportEmail'] === null) { + $invalidProperties[] = "'supportEmail' 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 displayName + * + * @return string + */ + public function getDisplayName() + { + return $this->container['displayName']; + } + + /** + * Sets displayName + * + * @param string $displayName Merchant display name + * + * @return self + */ + public function setDisplayName($displayName) + { + $this->container['displayName'] = $displayName; + + return $this; + } + + /** + * Gets logo + * + * @return string + */ + public function getLogo() + { + return $this->container['logo']; + } + + /** + * Sets logo + * + * @param string $logo Merchant logo. Format: Base64-encoded string. + * + * @return self + */ + public function setLogo($logo) + { + $this->container['logo'] = $logo; + + return $this; + } + + /** + * Gets supportEmail + * + * @return string + */ + public function getSupportEmail() + { + return $this->container['supportEmail']; + } + + /** + * Sets supportEmail + * + * @param string $supportEmail The email address of merchant support. + * + * @return self + */ + public function setSupportEmail($supportEmail) + { + $this->container['supportEmail'] = $supportEmail; + + 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/Management/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index 3569f886..c5ca5810 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -44,6 +44,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'accel' => '\Adyen\Model\Management\AccelInfo', 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'allowed' => 'bool', 'amex' => '\Adyen\Model\Management\AmexInfo', @@ -71,10 +72,15 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'maestro' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'mc' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'mealVoucherFR' => '\Adyen\Model\Management\MealVoucherFRInfo', + 'nyce' => '\Adyen\Model\Management\NyceInfo', + 'payme' => '\Adyen\Model\Management\PayMeInfo', 'paypal' => '\Adyen\Model\Management\PayPalInfo', + 'pulse' => '\Adyen\Model\Management\PulseInfo', 'reference' => 'string', 'shopperInteraction' => 'string', + 'sodexo' => '\Adyen\Model\Management\SodexoInfo', 'sofort' => '\Adyen\Model\Management\SofortInfo', + 'star' => '\Adyen\Model\Management\StarInfo', 'storeIds' => 'string[]', 'swish' => '\Adyen\Model\Management\SwishInfo', 'ticket' => '\Adyen\Model\Management\TicketInfo', @@ -95,6 +101,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'accel' => null, 'afterpayTouch' => null, 'allowed' => null, 'amex' => null, @@ -122,10 +129,15 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'maestro' => null, 'mc' => null, 'mealVoucherFR' => null, + 'nyce' => null, + 'payme' => null, 'paypal' => null, + 'pulse' => null, 'reference' => null, 'shopperInteraction' => null, + 'sodexo' => null, 'sofort' => null, + 'star' => null, 'storeIds' => null, 'swish' => null, 'ticket' => null, @@ -144,6 +156,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'accel' => false, 'afterpayTouch' => false, 'allowed' => false, 'amex' => false, @@ -171,10 +184,15 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'maestro' => false, 'mc' => false, 'mealVoucherFR' => false, + 'nyce' => false, + 'payme' => false, 'paypal' => false, + 'pulse' => false, 'reference' => false, 'shopperInteraction' => false, + 'sodexo' => false, 'sofort' => false, + 'star' => false, 'storeIds' => false, 'swish' => false, 'ticket' => false, @@ -273,6 +291,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'accel' => 'accel', 'afterpayTouch' => 'afterpayTouch', 'allowed' => 'allowed', 'amex' => 'amex', @@ -300,10 +319,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'maestro', 'mc' => 'mc', 'mealVoucherFR' => 'mealVoucher_FR', + 'nyce' => 'nyce', + 'payme' => 'payme', 'paypal' => 'paypal', + 'pulse' => 'pulse', 'reference' => 'reference', 'shopperInteraction' => 'shopperInteraction', + 'sodexo' => 'sodexo', 'sofort' => 'sofort', + 'star' => 'star', 'storeIds' => 'storeIds', 'swish' => 'swish', 'ticket' => 'ticket', @@ -322,6 +346,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'accel' => 'setAccel', 'afterpayTouch' => 'setAfterpayTouch', 'allowed' => 'setAllowed', 'amex' => 'setAmex', @@ -349,10 +374,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'setMaestro', 'mc' => 'setMc', 'mealVoucherFR' => 'setMealVoucherFR', + 'nyce' => 'setNyce', + 'payme' => 'setPayme', 'paypal' => 'setPaypal', + 'pulse' => 'setPulse', 'reference' => 'setReference', 'shopperInteraction' => 'setShopperInteraction', + 'sodexo' => 'setSodexo', 'sofort' => 'setSofort', + 'star' => 'setStar', 'storeIds' => 'setStoreIds', 'swish' => 'setSwish', 'ticket' => 'setTicket', @@ -371,6 +401,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'accel' => 'getAccel', 'afterpayTouch' => 'getAfterpayTouch', 'allowed' => 'getAllowed', 'amex' => 'getAmex', @@ -398,10 +429,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'getMaestro', 'mc' => 'getMc', 'mealVoucherFR' => 'getMealVoucherFR', + 'nyce' => 'getNyce', + 'payme' => 'getPayme', 'paypal' => 'getPaypal', + 'pulse' => 'getPulse', 'reference' => 'getReference', 'shopperInteraction' => 'getShopperInteraction', + 'sodexo' => 'getSodexo', 'sofort' => 'getSofort', + 'star' => 'getStar', 'storeIds' => 'getStoreIds', 'swish' => 'getSwish', 'ticket' => 'getTicket', @@ -489,6 +525,7 @@ public function getVerificationStatusAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('accel', $data ?? [], null); $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('allowed', $data ?? [], null); $this->setIfExists('amex', $data ?? [], null); @@ -516,10 +553,15 @@ public function __construct(array $data = null) $this->setIfExists('maestro', $data ?? [], null); $this->setIfExists('mc', $data ?? [], null); $this->setIfExists('mealVoucherFR', $data ?? [], null); + $this->setIfExists('nyce', $data ?? [], null); + $this->setIfExists('payme', $data ?? [], null); $this->setIfExists('paypal', $data ?? [], null); + $this->setIfExists('pulse', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('shopperInteraction', $data ?? [], null); + $this->setIfExists('sodexo', $data ?? [], null); $this->setIfExists('sofort', $data ?? [], null); + $this->setIfExists('star', $data ?? [], null); $this->setIfExists('storeIds', $data ?? [], null); $this->setIfExists('swish', $data ?? [], null); $this->setIfExists('ticket', $data ?? [], null); @@ -586,6 +628,30 @@ public function valid() } + /** + * Gets accel + * + * @return \Adyen\Model\Management\AccelInfo|null + */ + public function getAccel() + { + return $this->container['accel']; + } + + /** + * Sets accel + * + * @param \Adyen\Model\Management\AccelInfo|null $accel accel + * + * @return self + */ + public function setAccel($accel) + { + $this->container['accel'] = $accel; + + return $this; + } + /** * Gets afterpayTouch * @@ -1234,6 +1300,54 @@ public function setMealVoucherFR($mealVoucherFR) return $this; } + /** + * Gets nyce + * + * @return \Adyen\Model\Management\NyceInfo|null + */ + public function getNyce() + { + return $this->container['nyce']; + } + + /** + * Sets nyce + * + * @param \Adyen\Model\Management\NyceInfo|null $nyce nyce + * + * @return self + */ + public function setNyce($nyce) + { + $this->container['nyce'] = $nyce; + + return $this; + } + + /** + * Gets payme + * + * @return \Adyen\Model\Management\PayMeInfo|null + */ + public function getPayme() + { + return $this->container['payme']; + } + + /** + * Sets payme + * + * @param \Adyen\Model\Management\PayMeInfo|null $payme payme + * + * @return self + */ + public function setPayme($payme) + { + $this->container['payme'] = $payme; + + return $this; + } + /** * Gets paypal * @@ -1258,6 +1372,30 @@ public function setPaypal($paypal) return $this; } + /** + * Gets pulse + * + * @return \Adyen\Model\Management\PulseInfo|null + */ + public function getPulse() + { + return $this->container['pulse']; + } + + /** + * Sets pulse + * + * @param \Adyen\Model\Management\PulseInfo|null $pulse pulse + * + * @return self + */ + public function setPulse($pulse) + { + $this->container['pulse'] = $pulse; + + return $this; + } + /** * Gets reference * @@ -1306,6 +1444,30 @@ public function setShopperInteraction($shopperInteraction) return $this; } + /** + * Gets sodexo + * + * @return \Adyen\Model\Management\SodexoInfo|null + */ + public function getSodexo() + { + return $this->container['sodexo']; + } + + /** + * Sets sodexo + * + * @param \Adyen\Model\Management\SodexoInfo|null $sodexo sodexo + * + * @return self + */ + public function setSodexo($sodexo) + { + $this->container['sodexo'] = $sodexo; + + return $this; + } + /** * Gets sofort * @@ -1330,6 +1492,30 @@ public function setSofort($sofort) return $this; } + /** + * Gets star + * + * @return \Adyen\Model\Management\StarInfo|null + */ + public function getStar() + { + return $this->container['star']; + } + + /** + * Sets star + * + * @param \Adyen\Model\Management\StarInfo|null $star star + * + * @return self + */ + public function setStar($star) + { + $this->container['star'] = $star; + + return $this; + } + /** * Gets storeIds * diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index 0ed84306..6811b47d 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -239,16 +239,25 @@ public function getModelName() return self::$openAPIModelName; } + public const TYPES_WITH_ERRORS_ACCEL = 'accel'; public const TYPES_WITH_ERRORS_AFTERPAYTOUCH = 'afterpaytouch'; + public const TYPES_WITH_ERRORS_ALELO = 'alelo'; public const TYPES_WITH_ERRORS_ALIPAY = 'alipay'; public const TYPES_WITH_ERRORS_ALIPAY_HK = 'alipay_hk'; public const TYPES_WITH_ERRORS_AMEX = 'amex'; public const TYPES_WITH_ERRORS_APPLEPAY = 'applepay'; + public const TYPES_WITH_ERRORS_BANESE_CARD = 'banese_card'; + public const TYPES_WITH_ERRORS_BANESE_CARD_CREDIT = 'banese_card_credit'; + public const TYPES_WITH_ERRORS_BANESE_CARD_DEBIT = 'banese_card_debit'; + public const TYPES_WITH_ERRORS_BANESE_CARD_PREPAID = 'banese_card_prepaid'; public const TYPES_WITH_ERRORS_BCMC = 'bcmc'; public const TYPES_WITH_ERRORS_BLIK = 'blik'; public const TYPES_WITH_ERRORS_CARTEBANCAIRE = 'cartebancaire'; public const TYPES_WITH_ERRORS_CLEARPAY = 'clearpay'; public const TYPES_WITH_ERRORS_CLICKTOPAY = 'clicktopay'; + public const TYPES_WITH_ERRORS_CREDTODOS = 'credtodos'; + public const TYPES_WITH_ERRORS_CREDTODOS_PRIVATE_CREDIT = 'credtodos_private_credit'; + public const TYPES_WITH_ERRORS_CREDTODOS_PRIVATE_DEBIT = 'credtodos_private_debit'; public const TYPES_WITH_ERRORS_CUP = 'cup'; public const TYPES_WITH_ERRORS_DINERS = 'diners'; public const TYPES_WITH_ERRORS_DIRECTDEBIT_GB = 'directdebit_GB'; @@ -275,17 +284,27 @@ public function getModelName() public const TYPES_WITH_ERRORS_MEAL_VOUCHER_FR = 'mealVoucher_FR'; public const TYPES_WITH_ERRORS_MOBILEPAY = 'mobilepay'; public const TYPES_WITH_ERRORS_MULTIBANCO = 'multibanco'; + public const TYPES_WITH_ERRORS_NYCE = 'nyce'; public const TYPES_WITH_ERRORS_ONLINE_BANKING_PL = 'onlineBanking_PL'; public const TYPES_WITH_ERRORS_PAYBYBANK = 'paybybank'; + public const TYPES_WITH_ERRORS_PAYME = 'payme'; + public const TYPES_WITH_ERRORS_PAYME_POS = 'payme_pos'; public const TYPES_WITH_ERRORS_PAYNOW = 'paynow'; public const TYPES_WITH_ERRORS_PAYNOW_POS = 'paynow_pos'; public const TYPES_WITH_ERRORS_PAYPAL = 'paypal'; public const TYPES_WITH_ERRORS_PAYSHOP = 'payshop'; + public const TYPES_WITH_ERRORS_PULSE = 'pulse'; + public const TYPES_WITH_ERRORS_SODEXO = 'sodexo'; + public const TYPES_WITH_ERRORS_STAR = 'star'; public const TYPES_WITH_ERRORS_SWISH = 'swish'; public const TYPES_WITH_ERRORS_TICKET = 'ticket'; + public const TYPES_WITH_ERRORS_TODO_GIFTCARD = 'todo_giftcard'; public const TYPES_WITH_ERRORS_TRUSTLY = 'trustly'; public const TYPES_WITH_ERRORS_TWINT = 'twint'; public const TYPES_WITH_ERRORS_TWINT_POS = 'twint_pos'; + public const TYPES_WITH_ERRORS_UP_BRAZIL_CREDIT = 'up_brazil_credit'; + public const TYPES_WITH_ERRORS_VALE_REFEICAO = 'vale_refeicao'; + public const TYPES_WITH_ERRORS_VALE_REFEICAO_PREPAID = 'vale_refeicao_prepaid'; public const TYPES_WITH_ERRORS_VIPPS = 'vipps'; public const TYPES_WITH_ERRORS_VISA = 'visa'; public const TYPES_WITH_ERRORS_VISADEBIT = 'visadebit'; @@ -301,16 +320,25 @@ public function getModelName() public function getTypesWithErrorsAllowableValues() { return [ + self::TYPES_WITH_ERRORS_ACCEL, self::TYPES_WITH_ERRORS_AFTERPAYTOUCH, + self::TYPES_WITH_ERRORS_ALELO, self::TYPES_WITH_ERRORS_ALIPAY, self::TYPES_WITH_ERRORS_ALIPAY_HK, self::TYPES_WITH_ERRORS_AMEX, self::TYPES_WITH_ERRORS_APPLEPAY, + self::TYPES_WITH_ERRORS_BANESE_CARD, + self::TYPES_WITH_ERRORS_BANESE_CARD_CREDIT, + self::TYPES_WITH_ERRORS_BANESE_CARD_DEBIT, + self::TYPES_WITH_ERRORS_BANESE_CARD_PREPAID, self::TYPES_WITH_ERRORS_BCMC, self::TYPES_WITH_ERRORS_BLIK, self::TYPES_WITH_ERRORS_CARTEBANCAIRE, self::TYPES_WITH_ERRORS_CLEARPAY, self::TYPES_WITH_ERRORS_CLICKTOPAY, + self::TYPES_WITH_ERRORS_CREDTODOS, + self::TYPES_WITH_ERRORS_CREDTODOS_PRIVATE_CREDIT, + self::TYPES_WITH_ERRORS_CREDTODOS_PRIVATE_DEBIT, self::TYPES_WITH_ERRORS_CUP, self::TYPES_WITH_ERRORS_DINERS, self::TYPES_WITH_ERRORS_DIRECTDEBIT_GB, @@ -337,17 +365,27 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_MEAL_VOUCHER_FR, self::TYPES_WITH_ERRORS_MOBILEPAY, self::TYPES_WITH_ERRORS_MULTIBANCO, + self::TYPES_WITH_ERRORS_NYCE, self::TYPES_WITH_ERRORS_ONLINE_BANKING_PL, self::TYPES_WITH_ERRORS_PAYBYBANK, + self::TYPES_WITH_ERRORS_PAYME, + self::TYPES_WITH_ERRORS_PAYME_POS, self::TYPES_WITH_ERRORS_PAYNOW, self::TYPES_WITH_ERRORS_PAYNOW_POS, self::TYPES_WITH_ERRORS_PAYPAL, self::TYPES_WITH_ERRORS_PAYSHOP, + self::TYPES_WITH_ERRORS_PULSE, + self::TYPES_WITH_ERRORS_SODEXO, + self::TYPES_WITH_ERRORS_STAR, self::TYPES_WITH_ERRORS_SWISH, self::TYPES_WITH_ERRORS_TICKET, + self::TYPES_WITH_ERRORS_TODO_GIFTCARD, self::TYPES_WITH_ERRORS_TRUSTLY, self::TYPES_WITH_ERRORS_TWINT, self::TYPES_WITH_ERRORS_TWINT_POS, + self::TYPES_WITH_ERRORS_UP_BRAZIL_CREDIT, + self::TYPES_WITH_ERRORS_VALE_REFEICAO, + self::TYPES_WITH_ERRORS_VALE_REFEICAO_PREPAID, self::TYPES_WITH_ERRORS_VIPPS, self::TYPES_WITH_ERRORS_VISA, self::TYPES_WITH_ERRORS_VISADEBIT, diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index 84dfcb5a..130cb434 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -44,6 +44,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ + 'accel' => '\Adyen\Model\Management\AccelInfo', 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'amex' => '\Adyen\Model\Management\AmexInfo', 'applePay' => '\Adyen\Model\Management\ApplePayInfo', @@ -68,10 +69,15 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'maestro' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'mc' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'mealVoucherFR' => '\Adyen\Model\Management\MealVoucherFRInfo', + 'nyce' => '\Adyen\Model\Management\NyceInfo', + 'payme' => '\Adyen\Model\Management\PayMeInfo', 'paypal' => '\Adyen\Model\Management\PayPalInfo', + 'pulse' => '\Adyen\Model\Management\PulseInfo', 'reference' => 'string', 'shopperInteraction' => 'string', + 'sodexo' => '\Adyen\Model\Management\SodexoInfo', 'sofort' => '\Adyen\Model\Management\SofortInfo', + 'star' => '\Adyen\Model\Management\StarInfo', 'storeIds' => 'string[]', 'swish' => '\Adyen\Model\Management\SwishInfo', 'ticket' => '\Adyen\Model\Management\TicketInfo', @@ -91,6 +97,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ + 'accel' => null, 'afterpayTouch' => null, 'amex' => null, 'applePay' => null, @@ -115,10 +122,15 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'maestro' => null, 'mc' => null, 'mealVoucherFR' => null, + 'nyce' => null, + 'payme' => null, 'paypal' => null, + 'pulse' => null, 'reference' => null, 'shopperInteraction' => null, + 'sodexo' => null, 'sofort' => null, + 'star' => null, 'storeIds' => null, 'swish' => null, 'ticket' => null, @@ -136,6 +148,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @var boolean[] */ protected static $openAPINullables = [ + 'accel' => false, 'afterpayTouch' => false, 'amex' => false, 'applePay' => false, @@ -160,10 +173,15 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'maestro' => false, 'mc' => false, 'mealVoucherFR' => false, + 'nyce' => false, + 'payme' => false, 'paypal' => false, + 'pulse' => false, 'reference' => false, 'shopperInteraction' => false, + 'sodexo' => false, 'sofort' => false, + 'star' => false, 'storeIds' => false, 'swish' => false, 'ticket' => false, @@ -261,6 +279,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'accel' => 'accel', 'afterpayTouch' => 'afterpayTouch', 'amex' => 'amex', 'applePay' => 'applePay', @@ -285,10 +304,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'maestro', 'mc' => 'mc', 'mealVoucherFR' => 'mealVoucher_FR', + 'nyce' => 'nyce', + 'payme' => 'payme', 'paypal' => 'paypal', + 'pulse' => 'pulse', 'reference' => 'reference', 'shopperInteraction' => 'shopperInteraction', + 'sodexo' => 'sodexo', 'sofort' => 'sofort', + 'star' => 'star', 'storeIds' => 'storeIds', 'swish' => 'swish', 'ticket' => 'ticket', @@ -306,6 +330,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'accel' => 'setAccel', 'afterpayTouch' => 'setAfterpayTouch', 'amex' => 'setAmex', 'applePay' => 'setApplePay', @@ -330,10 +355,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'setMaestro', 'mc' => 'setMc', 'mealVoucherFR' => 'setMealVoucherFR', + 'nyce' => 'setNyce', + 'payme' => 'setPayme', 'paypal' => 'setPaypal', + 'pulse' => 'setPulse', 'reference' => 'setReference', 'shopperInteraction' => 'setShopperInteraction', + 'sodexo' => 'setSodexo', 'sofort' => 'setSofort', + 'star' => 'setStar', 'storeIds' => 'setStoreIds', 'swish' => 'setSwish', 'ticket' => 'setTicket', @@ -351,6 +381,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'accel' => 'getAccel', 'afterpayTouch' => 'getAfterpayTouch', 'amex' => 'getAmex', 'applePay' => 'getApplePay', @@ -375,10 +406,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'getMaestro', 'mc' => 'getMc', 'mealVoucherFR' => 'getMealVoucherFR', + 'nyce' => 'getNyce', + 'payme' => 'getPayme', 'paypal' => 'getPaypal', + 'pulse' => 'getPulse', 'reference' => 'getReference', 'shopperInteraction' => 'getShopperInteraction', + 'sodexo' => 'getSodexo', 'sofort' => 'getSofort', + 'star' => 'getStar', 'storeIds' => 'getStoreIds', 'swish' => 'getSwish', 'ticket' => 'getTicket', @@ -435,16 +471,25 @@ public function getModelName() public const SHOPPER_INTERACTION_POS = 'pos'; public const SHOPPER_INTERACTION_MOTO = 'moto'; public const SHOPPER_INTERACTION_CONT_AUTH = 'contAuth'; + public const TYPE_ACCEL = 'accel'; public const TYPE_AFTERPAYTOUCH = 'afterpaytouch'; + public const TYPE_ALELO = 'alelo'; public const TYPE_ALIPAY = 'alipay'; public const TYPE_ALIPAY_HK = 'alipay_hk'; public const TYPE_AMEX = 'amex'; public const TYPE_APPLEPAY = 'applepay'; + public const TYPE_BANESE_CARD = 'banese_card'; + public const TYPE_BANESE_CARD_CREDIT = 'banese_card_credit'; + public const TYPE_BANESE_CARD_DEBIT = 'banese_card_debit'; + public const TYPE_BANESE_CARD_PREPAID = 'banese_card_prepaid'; public const TYPE_BCMC = 'bcmc'; public const TYPE_BLIK = 'blik'; public const TYPE_CARTEBANCAIRE = 'cartebancaire'; public const TYPE_CLEARPAY = 'clearpay'; public const TYPE_CLICKTOPAY = 'clicktopay'; + public const TYPE_CREDTODOS = 'credtodos'; + public const TYPE_CREDTODOS_PRIVATE_CREDIT = 'credtodos_private_credit'; + public const TYPE_CREDTODOS_PRIVATE_DEBIT = 'credtodos_private_debit'; public const TYPE_CUP = 'cup'; public const TYPE_DINERS = 'diners'; public const TYPE_DIRECTDEBIT_GB = 'directdebit_GB'; @@ -471,17 +516,27 @@ public function getModelName() public const TYPE_MEAL_VOUCHER_FR = 'mealVoucher_FR'; public const TYPE_MOBILEPAY = 'mobilepay'; public const TYPE_MULTIBANCO = 'multibanco'; + public const TYPE_NYCE = 'nyce'; public const TYPE_ONLINE_BANKING_PL = 'onlineBanking_PL'; public const TYPE_PAYBYBANK = 'paybybank'; + public const TYPE_PAYME = 'payme'; + public const TYPE_PAYME_POS = 'payme_pos'; public const TYPE_PAYNOW = 'paynow'; public const TYPE_PAYNOW_POS = 'paynow_pos'; public const TYPE_PAYPAL = 'paypal'; public const TYPE_PAYSHOP = 'payshop'; + public const TYPE_PULSE = 'pulse'; + public const TYPE_SODEXO = 'sodexo'; + public const TYPE_STAR = 'star'; public const TYPE_SWISH = 'swish'; public const TYPE_TICKET = 'ticket'; + public const TYPE_TODO_GIFTCARD = 'todo_giftcard'; public const TYPE_TRUSTLY = 'trustly'; public const TYPE_TWINT = 'twint'; public const TYPE_TWINT_POS = 'twint_pos'; + public const TYPE_UP_BRAZIL_CREDIT = 'up_brazil_credit'; + public const TYPE_VALE_REFEICAO = 'vale_refeicao'; + public const TYPE_VALE_REFEICAO_PREPAID = 'vale_refeicao_prepaid'; public const TYPE_VIPPS = 'vipps'; public const TYPE_VISA = 'visa'; public const TYPE_VISADEBIT = 'visadebit'; @@ -511,16 +566,25 @@ public function getShopperInteractionAllowableValues() public function getTypeAllowableValues() { return [ + self::TYPE_ACCEL, self::TYPE_AFTERPAYTOUCH, + self::TYPE_ALELO, self::TYPE_ALIPAY, self::TYPE_ALIPAY_HK, self::TYPE_AMEX, self::TYPE_APPLEPAY, + self::TYPE_BANESE_CARD, + self::TYPE_BANESE_CARD_CREDIT, + self::TYPE_BANESE_CARD_DEBIT, + self::TYPE_BANESE_CARD_PREPAID, self::TYPE_BCMC, self::TYPE_BLIK, self::TYPE_CARTEBANCAIRE, self::TYPE_CLEARPAY, self::TYPE_CLICKTOPAY, + self::TYPE_CREDTODOS, + self::TYPE_CREDTODOS_PRIVATE_CREDIT, + self::TYPE_CREDTODOS_PRIVATE_DEBIT, self::TYPE_CUP, self::TYPE_DINERS, self::TYPE_DIRECTDEBIT_GB, @@ -547,17 +611,27 @@ public function getTypeAllowableValues() self::TYPE_MEAL_VOUCHER_FR, self::TYPE_MOBILEPAY, self::TYPE_MULTIBANCO, + self::TYPE_NYCE, self::TYPE_ONLINE_BANKING_PL, self::TYPE_PAYBYBANK, + self::TYPE_PAYME, + self::TYPE_PAYME_POS, self::TYPE_PAYNOW, self::TYPE_PAYNOW_POS, self::TYPE_PAYPAL, self::TYPE_PAYSHOP, + self::TYPE_PULSE, + self::TYPE_SODEXO, + self::TYPE_STAR, self::TYPE_SWISH, self::TYPE_TICKET, + self::TYPE_TODO_GIFTCARD, self::TYPE_TRUSTLY, self::TYPE_TWINT, self::TYPE_TWINT_POS, + self::TYPE_UP_BRAZIL_CREDIT, + self::TYPE_VALE_REFEICAO, + self::TYPE_VALE_REFEICAO_PREPAID, self::TYPE_VIPPS, self::TYPE_VISA, self::TYPE_VISADEBIT, @@ -581,6 +655,7 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('accel', $data ?? [], null); $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('amex', $data ?? [], null); $this->setIfExists('applePay', $data ?? [], null); @@ -605,10 +680,15 @@ public function __construct(array $data = null) $this->setIfExists('maestro', $data ?? [], null); $this->setIfExists('mc', $data ?? [], null); $this->setIfExists('mealVoucherFR', $data ?? [], null); + $this->setIfExists('nyce', $data ?? [], null); + $this->setIfExists('payme', $data ?? [], null); $this->setIfExists('paypal', $data ?? [], null); + $this->setIfExists('pulse', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('shopperInteraction', $data ?? [], null); + $this->setIfExists('sodexo', $data ?? [], null); $this->setIfExists('sofort', $data ?? [], null); + $this->setIfExists('star', $data ?? [], null); $this->setIfExists('storeIds', $data ?? [], null); $this->setIfExists('swish', $data ?? [], null); $this->setIfExists('ticket', $data ?? [], null); @@ -683,6 +763,30 @@ public function valid() } + /** + * Gets accel + * + * @return \Adyen\Model\Management\AccelInfo|null + */ + public function getAccel() + { + return $this->container['accel']; + } + + /** + * Sets accel + * + * @param \Adyen\Model\Management\AccelInfo|null $accel accel + * + * @return self + */ + public function setAccel($accel) + { + $this->container['accel'] = $accel; + + return $this; + } + /** * Gets afterpayTouch * @@ -1259,6 +1363,54 @@ public function setMealVoucherFR($mealVoucherFR) return $this; } + /** + * Gets nyce + * + * @return \Adyen\Model\Management\NyceInfo|null + */ + public function getNyce() + { + return $this->container['nyce']; + } + + /** + * Sets nyce + * + * @param \Adyen\Model\Management\NyceInfo|null $nyce nyce + * + * @return self + */ + public function setNyce($nyce) + { + $this->container['nyce'] = $nyce; + + return $this; + } + + /** + * Gets payme + * + * @return \Adyen\Model\Management\PayMeInfo|null + */ + public function getPayme() + { + return $this->container['payme']; + } + + /** + * Sets payme + * + * @param \Adyen\Model\Management\PayMeInfo|null $payme payme + * + * @return self + */ + public function setPayme($payme) + { + $this->container['payme'] = $payme; + + return $this; + } + /** * Gets paypal * @@ -1283,6 +1435,30 @@ public function setPaypal($paypal) return $this; } + /** + * Gets pulse + * + * @return \Adyen\Model\Management\PulseInfo|null + */ + public function getPulse() + { + return $this->container['pulse']; + } + + /** + * Sets pulse + * + * @param \Adyen\Model\Management\PulseInfo|null $pulse pulse + * + * @return self + */ + public function setPulse($pulse) + { + $this->container['pulse'] = $pulse; + + return $this; + } + /** * Gets reference * @@ -1341,6 +1517,30 @@ public function setShopperInteraction($shopperInteraction) return $this; } + /** + * Gets sodexo + * + * @return \Adyen\Model\Management\SodexoInfo|null + */ + public function getSodexo() + { + return $this->container['sodexo']; + } + + /** + * Sets sodexo + * + * @param \Adyen\Model\Management\SodexoInfo|null $sodexo sodexo + * + * @return self + */ + public function setSodexo($sodexo) + { + $this->container['sodexo'] = $sodexo; + + return $this; + } + /** * Gets sofort * @@ -1365,6 +1565,30 @@ public function setSofort($sofort) return $this; } + /** + * Gets star + * + * @return \Adyen\Model\Management\StarInfo|null + */ + public function getStar() + { + return $this->container['star']; + } + + /** + * Sets star + * + * @param \Adyen\Model\Management\StarInfo|null $star star + * + * @return self + */ + public function setStar($star) + { + $this->container['star'] = $star; + + return $this; + } + /** * Gets storeIds * diff --git a/src/Adyen/Model/Management/PulseInfo.php b/src/Adyen/Model/Management/PulseInfo.php new file mode 100644 index 00000000..11bd0288 --- /dev/null +++ b/src/Adyen/Model/Management/PulseInfo.php @@ -0,0 +1,476 @@ + + */ +class PulseInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PulseInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'processingType' => 'string', + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'processingType' => null, + 'transactionDescription' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'processingType' => false, + 'transactionDescription' => 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 = [ + 'processingType' => 'processingType', + 'transactionDescription' => 'transactionDescription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'processingType' => 'setProcessingType', + 'transactionDescription' => 'setTransactionDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'processingType' => 'getProcessingType', + 'transactionDescription' => 'getTransactionDescription' + ]; + + /** + * 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 PROCESSING_TYPE_BILLPAY = 'billpay'; + public const PROCESSING_TYPE_ECOM = 'ecom'; + public const PROCESSING_TYPE_POS = 'pos'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProcessingTypeAllowableValues() + { + return [ + self::PROCESSING_TYPE_BILLPAY, + self::PROCESSING_TYPE_ECOM, + self::PROCESSING_TYPE_POS, + ]; + } + /** + * 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('processingType', $data ?? [], null); + $this->setIfExists('transactionDescription', $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['processingType'] === null) { + $invalidProperties[] = "'processingType' can't be null"; + } + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!is_null($this->container['processingType']) && !in_array($this->container['processingType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'processingType', must be one of '%s'", + $this->container['processingType'], + 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 processingType + * + * @return string + */ + public function getProcessingType() + { + return $this->container['processingType']; + } + + /** + * Sets processingType + * + * @param string $processingType The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * + * @return self + */ + public function setProcessingType($processingType) + { + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!in_array($processingType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'processingType', must be one of '%s'", + $processingType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['processingType'] = $processingType; + + return $this; + } + + /** + * Gets transactionDescription + * + * @return \Adyen\Model\Management\TransactionDescriptionInfo|null + */ + public function getTransactionDescription() + { + return $this->container['transactionDescription']; + } + + /** + * Sets transactionDescription + * + * @param \Adyen\Model\Management\TransactionDescriptionInfo|null $transactionDescription transactionDescription + * + * @return self + */ + public function setTransactionDescription($transactionDescription) + { + $this->container['transactionDescription'] = $transactionDescription; + + 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/Management/SodexoInfo.php b/src/Adyen/Model/Management/SodexoInfo.php new file mode 100644 index 00000000..d8120ede --- /dev/null +++ b/src/Adyen/Model/Management/SodexoInfo.php @@ -0,0 +1,410 @@ + + */ +class SodexoInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SodexoInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'merchantContactPhone' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'merchantContactPhone' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'merchantContactPhone' => 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 = [ + 'merchantContactPhone' => 'merchantContactPhone' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'merchantContactPhone' => 'setMerchantContactPhone' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'merchantContactPhone' => 'getMerchantContactPhone' + ]; + + /** + * 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('merchantContactPhone', $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['merchantContactPhone'] === null) { + $invalidProperties[] = "'merchantContactPhone' 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 merchantContactPhone + * + * @return string + */ + public function getMerchantContactPhone() + { + return $this->container['merchantContactPhone']; + } + + /** + * Sets merchantContactPhone + * + * @param string $merchantContactPhone Sodexo merchantContactPhone + * + * @return self + */ + public function setMerchantContactPhone($merchantContactPhone) + { + $this->container['merchantContactPhone'] = $merchantContactPhone; + + 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/Management/StarInfo.php b/src/Adyen/Model/Management/StarInfo.php new file mode 100644 index 00000000..493c2d3c --- /dev/null +++ b/src/Adyen/Model/Management/StarInfo.php @@ -0,0 +1,476 @@ + + */ +class StarInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'StarInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'processingType' => 'string', + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'processingType' => null, + 'transactionDescription' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'processingType' => false, + 'transactionDescription' => 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 = [ + 'processingType' => 'processingType', + 'transactionDescription' => 'transactionDescription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'processingType' => 'setProcessingType', + 'transactionDescription' => 'setTransactionDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'processingType' => 'getProcessingType', + 'transactionDescription' => 'getTransactionDescription' + ]; + + /** + * 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 PROCESSING_TYPE_BILLPAY = 'billpay'; + public const PROCESSING_TYPE_ECOM = 'ecom'; + public const PROCESSING_TYPE_POS = 'pos'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProcessingTypeAllowableValues() + { + return [ + self::PROCESSING_TYPE_BILLPAY, + self::PROCESSING_TYPE_ECOM, + self::PROCESSING_TYPE_POS, + ]; + } + /** + * 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('processingType', $data ?? [], null); + $this->setIfExists('transactionDescription', $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['processingType'] === null) { + $invalidProperties[] = "'processingType' can't be null"; + } + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!is_null($this->container['processingType']) && !in_array($this->container['processingType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'processingType', must be one of '%s'", + $this->container['processingType'], + 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 processingType + * + * @return string + */ + public function getProcessingType() + { + return $this->container['processingType']; + } + + /** + * Sets processingType + * + * @param string $processingType The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * + * @return self + */ + public function setProcessingType($processingType) + { + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!in_array($processingType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'processingType', must be one of '%s'", + $processingType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['processingType'] = $processingType; + + return $this; + } + + /** + * Gets transactionDescription + * + * @return \Adyen\Model\Management\TransactionDescriptionInfo|null + */ + public function getTransactionDescription() + { + return $this->container['transactionDescription']; + } + + /** + * Sets transactionDescription + * + * @param \Adyen\Model\Management\TransactionDescriptionInfo|null $transactionDescription transactionDescription + * + * @return self + */ + public function setTransactionDescription($transactionDescription) + { + $this->container['transactionDescription'] = $transactionDescription; + + 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/Management/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index 87212bf5..6c6f2931 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -44,6 +44,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openAPITypes = [ + 'accel' => '\Adyen\Model\Management\AccelInfo', 'bcmc' => '\Adyen\Model\Management\BcmcInfo', 'cartesBancaires' => '\Adyen\Model\Management\CartesBancairesInfo', 'countries' => 'string[]', @@ -60,6 +61,9 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'jcb' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'maestro' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'mc' => '\Adyen\Model\Management\GenericPmWithTdiInfo', + 'nyce' => '\Adyen\Model\Management\NyceInfo', + 'pulse' => '\Adyen\Model\Management\PulseInfo', + 'star' => '\Adyen\Model\Management\StarInfo', 'storeIds' => 'string[]', 'visa' => '\Adyen\Model\Management\GenericPmWithTdiInfo' ]; @@ -72,6 +76,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ + 'accel' => null, 'bcmc' => null, 'cartesBancaires' => null, 'countries' => null, @@ -88,6 +93,9 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'jcb' => null, 'maestro' => null, 'mc' => null, + 'nyce' => null, + 'pulse' => null, + 'star' => null, 'storeIds' => null, 'visa' => null ]; @@ -98,6 +106,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @var boolean[] */ protected static $openAPINullables = [ + 'accel' => false, 'bcmc' => false, 'cartesBancaires' => false, 'countries' => false, @@ -114,6 +123,9 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'jcb' => false, 'maestro' => false, 'mc' => false, + 'nyce' => false, + 'pulse' => false, + 'star' => false, 'storeIds' => false, 'visa' => false ]; @@ -204,6 +216,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'accel' => 'accel', 'bcmc' => 'bcmc', 'cartesBancaires' => 'cartesBancaires', 'countries' => 'countries', @@ -220,6 +233,9 @@ public function isNullableSetToNull(string $property): bool 'jcb' => 'jcb', 'maestro' => 'maestro', 'mc' => 'mc', + 'nyce' => 'nyce', + 'pulse' => 'pulse', + 'star' => 'star', 'storeIds' => 'storeIds', 'visa' => 'visa' ]; @@ -230,6 +246,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'accel' => 'setAccel', 'bcmc' => 'setBcmc', 'cartesBancaires' => 'setCartesBancaires', 'countries' => 'setCountries', @@ -246,6 +263,9 @@ public function isNullableSetToNull(string $property): bool 'jcb' => 'setJcb', 'maestro' => 'setMaestro', 'mc' => 'setMc', + 'nyce' => 'setNyce', + 'pulse' => 'setPulse', + 'star' => 'setStar', 'storeIds' => 'setStoreIds', 'visa' => 'setVisa' ]; @@ -256,6 +276,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'accel' => 'getAccel', 'bcmc' => 'getBcmc', 'cartesBancaires' => 'getCartesBancaires', 'countries' => 'getCountries', @@ -272,6 +293,9 @@ public function isNullableSetToNull(string $property): bool 'jcb' => 'getJcb', 'maestro' => 'getMaestro', 'mc' => 'getMc', + 'nyce' => 'getNyce', + 'pulse' => 'getPulse', + 'star' => 'getStar', 'storeIds' => 'getStoreIds', 'visa' => 'getVisa' ]; @@ -333,6 +357,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('accel', $data ?? [], null); $this->setIfExists('bcmc', $data ?? [], null); $this->setIfExists('cartesBancaires', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); @@ -349,6 +374,9 @@ public function __construct(array $data = null) $this->setIfExists('jcb', $data ?? [], null); $this->setIfExists('maestro', $data ?? [], null); $this->setIfExists('mc', $data ?? [], null); + $this->setIfExists('nyce', $data ?? [], null); + $this->setIfExists('pulse', $data ?? [], null); + $this->setIfExists('star', $data ?? [], null); $this->setIfExists('storeIds', $data ?? [], null); $this->setIfExists('visa', $data ?? [], null); } @@ -395,6 +423,30 @@ public function valid() } + /** + * Gets accel + * + * @return \Adyen\Model\Management\AccelInfo|null + */ + public function getAccel() + { + return $this->container['accel']; + } + + /** + * Sets accel + * + * @param \Adyen\Model\Management\AccelInfo|null $accel accel + * + * @return self + */ + public function setAccel($accel) + { + $this->container['accel'] = $accel; + + return $this; + } + /** * Gets bcmc * @@ -779,6 +831,78 @@ public function setMc($mc) return $this; } + /** + * Gets nyce + * + * @return \Adyen\Model\Management\NyceInfo|null + */ + public function getNyce() + { + return $this->container['nyce']; + } + + /** + * Sets nyce + * + * @param \Adyen\Model\Management\NyceInfo|null $nyce nyce + * + * @return self + */ + public function setNyce($nyce) + { + $this->container['nyce'] = $nyce; + + return $this; + } + + /** + * Gets pulse + * + * @return \Adyen\Model\Management\PulseInfo|null + */ + public function getPulse() + { + return $this->container['pulse']; + } + + /** + * Sets pulse + * + * @param \Adyen\Model\Management\PulseInfo|null $pulse pulse + * + * @return self + */ + public function setPulse($pulse) + { + $this->container['pulse'] = $pulse; + + return $this; + } + + /** + * Gets star + * + * @return \Adyen\Model\Management\StarInfo|null + */ + public function getStar() + { + return $this->container['star']; + } + + /** + * Sets star + * + * @param \Adyen\Model\Management\StarInfo|null $star star + * + * @return self + */ + public function setStar($star) + { + $this->container['star'] = $star; + + return $this; + } + /** * Gets storeIds * diff --git a/src/Adyen/Model/Payments/AdditionalData3DSecure.php b/src/Adyen/Model/Payments/AdditionalData3DSecure.php index 84d875d9..a0091822 100644 --- a/src/Adyen/Model/Payments/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Payments/AdditionalData3DSecure.php @@ -353,7 +353,7 @@ public function getAllow3DS2() /** * Sets allow3DS2 * - * @param string|null $allow3DS2 Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen still selects the version of 3D Secure based on configuration to optimize authorisation rates and improve the shopper's experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen will not offer 3D Secure 2 to your shopper regardless of your configuration. + * @param string|null $allow3DS2 Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen selects redirect or native authentication based on your configuration to optimize authorization rates and improve the shopper's experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen offers redirect 3D Secure 2 authentication instead, based on your configuration. * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataLodging.php b/src/Adyen/Model/Payments/AdditionalDataLodging.php index b909017d..e0c74690 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLodging.php +++ b/src/Adyen/Model/Payments/AdditionalDataLodging.php @@ -473,7 +473,7 @@ public function getLodgingCustomerServiceTollFreeNumber() /** * Sets lodgingCustomerServiceTollFreeNumber * - * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. + * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - * Must not be all zeros. * * @return self */ @@ -545,7 +545,7 @@ public function getLodgingFolioNumber() /** * Sets lodgingFolioNumber * - * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space *Must not be all zeros. + * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters * Must not start with a space * Must not contain any special characters * Must not be all zeros. * * @return self */ @@ -641,7 +641,7 @@ public function getLodgingPropertyPhoneNumber() /** * Sets lodgingPropertyPhoneNumber * - * @param string|null $lodgingPropertyPhoneNumber The lodging property location's phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. + * @param string|null $lodgingPropertyPhoneNumber The lodging property location's phone number. * Format: numeric * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - * Must not be all zeros. * * @return self */