diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccount.php b/src/Adyen/Model/BalancePlatform/BalanceAccount.php index 2ef327c28..d8456e950 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccount.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccount.php @@ -446,7 +446,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php index ba7373e31..a82948bbf 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php @@ -412,7 +412,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php index 29f07c3fd..bccfbacd4 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php @@ -368,7 +368,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php index e97f31c21..e477f881a 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php @@ -45,7 +45,6 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPITypes = [ 'accountHolderId' => 'string', - 'defaultCurrencyCode' => 'string', 'description' => 'string', 'metadata' => 'array', 'platformPaymentConfiguration' => '\Adyen\Model\BalancePlatform\PlatformPaymentConfiguration', @@ -63,7 +62,6 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPIFormats = [ 'accountHolderId' => null, - 'defaultCurrencyCode' => null, 'description' => null, 'metadata' => null, 'platformPaymentConfiguration' => null, @@ -79,7 +77,6 @@ class BalanceAccountUpdateRequest implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPINullables = [ 'accountHolderId' => false, - 'defaultCurrencyCode' => false, 'description' => false, 'metadata' => false, 'platformPaymentConfiguration' => false, @@ -175,7 +172,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountHolderId' => 'accountHolderId', - 'defaultCurrencyCode' => 'defaultCurrencyCode', 'description' => 'description', 'metadata' => 'metadata', 'platformPaymentConfiguration' => 'platformPaymentConfiguration', @@ -191,7 +187,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountHolderId' => 'setAccountHolderId', - 'defaultCurrencyCode' => 'setDefaultCurrencyCode', 'description' => 'setDescription', 'metadata' => 'setMetadata', 'platformPaymentConfiguration' => 'setPlatformPaymentConfiguration', @@ -207,7 +202,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountHolderId' => 'getAccountHolderId', - 'defaultCurrencyCode' => 'getDefaultCurrencyCode', 'description' => 'getDescription', 'metadata' => 'getMetadata', 'platformPaymentConfiguration' => 'getPlatformPaymentConfiguration', @@ -292,7 +286,6 @@ public function getStatusAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountHolderId', $data ?? [], null); - $this->setIfExists('defaultCurrencyCode', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('platformPaymentConfiguration', $data ?? [], null); @@ -379,33 +372,6 @@ public function setAccountHolderId($accountHolderId) return $this; } - /** - * Gets defaultCurrencyCode - * - * @return string|null - */ - public function getDefaultCurrencyCode() - { - return $this->container['defaultCurrencyCode']; - } - - /** - * Sets defaultCurrencyCode - * - * @param string|null $defaultCurrencyCode The default currency code of this balance account, in three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) format. The default value is **EUR**. - * - * @return self - */ - public function setDefaultCurrencyCode($defaultCurrencyCode) - { - if (is_null($defaultCurrencyCode)) { - throw new \InvalidArgumentException('non-nullable defaultCurrencyCode cannot be null'); - } - $this->container['defaultCurrencyCode'] = $defaultCurrencyCode; - - return $this; - } - /** * Gets description * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php index df53ff3db..d808045d8 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php @@ -55,7 +55,6 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ 'transitNumber' => 'string', 'clearingCode' => 'string', 'iban' => 'string', - 'accountSuffix' => 'string', 'additionalBankIdentification' => '\Adyen\Model\BalancePlatform\AdditionalBankIdentification', 'bic' => 'string', 'clearingNumber' => 'string', @@ -81,7 +80,6 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ 'transitNumber' => null, 'clearingCode' => null, 'iban' => null, - 'accountSuffix' => null, 'additionalBankIdentification' => null, 'bic' => null, 'clearingNumber' => null, @@ -105,7 +103,6 @@ class BankAccountAccountIdentification implements ModelInterface, ArrayAccess, \ 'transitNumber' => false, 'clearingCode' => false, 'iban' => false, - 'accountSuffix' => false, 'additionalBankIdentification' => false, 'bic' => false, 'clearingNumber' => false, @@ -209,7 +206,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'transitNumber', 'clearingCode' => 'clearingCode', 'iban' => 'iban', - 'accountSuffix' => 'accountSuffix', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', 'clearingNumber' => 'clearingNumber', @@ -233,7 +229,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'setTransitNumber', 'clearingCode' => 'setClearingCode', 'iban' => 'setIban', - 'accountSuffix' => 'setAccountSuffix', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', 'clearingNumber' => 'setClearingNumber', @@ -257,7 +252,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'getTransitNumber', 'clearingCode' => 'getClearingCode', 'iban' => 'getIban', - 'accountSuffix' => 'getAccountSuffix', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', 'clearingNumber' => 'getClearingNumber', @@ -331,7 +325,6 @@ public function __construct(array $data = null) $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); @@ -395,9 +388,6 @@ public function listInvalidProperties() if ($this->container['iban'] === null) { $invalidProperties[] = "'iban' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } if ($this->container['bic'] === null) { $invalidProperties[] = "'bic' can't be null"; } @@ -519,7 +509,7 @@ public function getBankCode() /** * Sets bankCode * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (without separators or whitespace). * * @return self */ @@ -695,33 +685,6 @@ public function setIban($iban) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - /** * Gets additionalBankIdentification * diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php index 6fc6e0d3f..13cf1319c 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php @@ -55,7 +55,6 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements 'transitNumber' => 'string', 'clearingCode' => 'string', 'iban' => 'string', - 'accountSuffix' => 'string', 'additionalBankIdentification' => '\Adyen\Model\BalancePlatform\AdditionalBankIdentification', 'bic' => 'string', 'clearingNumber' => 'string', @@ -81,7 +80,6 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements 'transitNumber' => null, 'clearingCode' => null, 'iban' => null, - 'accountSuffix' => null, 'additionalBankIdentification' => null, 'bic' => null, 'clearingNumber' => null, @@ -105,7 +103,6 @@ class BankAccountIdentificationValidationRequestAccountIdentification implements 'transitNumber' => false, 'clearingCode' => false, 'iban' => false, - 'accountSuffix' => false, 'additionalBankIdentification' => false, 'bic' => false, 'clearingNumber' => false, @@ -209,7 +206,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'transitNumber', 'clearingCode' => 'clearingCode', 'iban' => 'iban', - 'accountSuffix' => 'accountSuffix', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', 'clearingNumber' => 'clearingNumber', @@ -233,7 +229,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'setTransitNumber', 'clearingCode' => 'setClearingCode', 'iban' => 'setIban', - 'accountSuffix' => 'setAccountSuffix', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', 'clearingNumber' => 'setClearingNumber', @@ -257,7 +252,6 @@ public function isNullableSetToNull(string $property): bool 'transitNumber' => 'getTransitNumber', 'clearingCode' => 'getClearingCode', 'iban' => 'getIban', - 'accountSuffix' => 'getAccountSuffix', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', 'clearingNumber' => 'getClearingNumber', @@ -331,7 +325,6 @@ public function __construct(array $data = null) $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); @@ -395,9 +388,6 @@ public function listInvalidProperties() if ($this->container['iban'] === null) { $invalidProperties[] = "'iban' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } if ($this->container['bic'] === null) { $invalidProperties[] = "'bic' can't be null"; } @@ -519,7 +509,7 @@ public function getBankCode() /** * Sets bankCode * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (without separators or whitespace). * * @return self */ @@ -695,33 +685,6 @@ public function setIban($iban) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - /** * Gets additionalBankIdentification * diff --git a/src/Adyen/Model/BalancePlatform/BankIdentification.php b/src/Adyen/Model/BalancePlatform/BankIdentification.php new file mode 100644 index 000000000..cff25d900 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/BankIdentification.php @@ -0,0 +1,485 @@ + + */ +class BankIdentification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BankIdentification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'country' => 'string', + 'identification' => 'string', + 'identificationType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'country' => null, + 'identification' => null, + 'identificationType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'country' => false, + 'identification' => false, + 'identificationType' => 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 = [ + 'country' => 'country', + 'identification' => 'identification', + 'identificationType' => 'identificationType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'country' => 'setCountry', + 'identification' => 'setIdentification', + 'identificationType' => 'setIdentificationType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'country' => 'getCountry', + 'identification' => 'getIdentification', + 'identificationType' => 'getIdentificationType' + ]; + + /** + * 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 IDENTIFICATION_TYPE_IBAN = 'iban'; + public const IDENTIFICATION_TYPE_ROUTING_NUMBER = 'routingNumber'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getIdentificationTypeAllowableValues() + { + return [ + self::IDENTIFICATION_TYPE_IBAN, + self::IDENTIFICATION_TYPE_ROUTING_NUMBER, + ]; + } + /** + * 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('country', $data ?? [], null); + $this->setIfExists('identification', $data ?? [], null); + $this->setIfExists('identificationType', $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->getIdentificationTypeAllowableValues(); + if (!is_null($this->container['identificationType']) && !in_array($this->container['identificationType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'identificationType', must be one of '%s'", + $this->container['identificationType'], + 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 country + * + * @return string|null + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country country + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets identification + * + * @return string|null + */ + public function getIdentification() + { + return $this->container['identification']; + } + + /** + * Sets identification + * + * @param string|null $identification identification + * + * @return self + */ + public function setIdentification($identification) + { + if (is_null($identification)) { + throw new \InvalidArgumentException('non-nullable identification cannot be null'); + } + $this->container['identification'] = $identification; + + return $this; + } + + /** + * Gets identificationType + * + * @return string|null + */ + public function getIdentificationType() + { + return $this->container['identificationType']; + } + + /** + * Sets identificationType + * + * @param string|null $identificationType identificationType + * + * @return self + */ + public function setIdentificationType($identificationType) + { + if (is_null($identificationType)) { + throw new \InvalidArgumentException('non-nullable identificationType cannot be null'); + } + $allowedValues = $this->getIdentificationTypeAllowableValues(); + if (!in_array($identificationType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'identificationType', must be one of '%s'", + $identificationType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['identificationType'] = $identificationType; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php new file mode 100644 index 000000000..fbf6f1f19 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php @@ -0,0 +1,421 @@ + + */ +class CounterpartyBankRestriction implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CounterpartyBankRestriction'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'operation' => 'string', + 'value' => '\Adyen\Model\BalancePlatform\BankIdentification[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'operation' => null, + 'value' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'operation' => false, + 'value' => 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 = [ + 'operation' => 'operation', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'operation' => 'setOperation', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'operation' => 'getOperation', + 'value' => 'getValue' + ]; + + /** + * 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('operation', $data ?? [], null); + $this->setIfExists('value', $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['operation'] === null) { + $invalidProperties[] = "'operation' 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 operation + * + * @return string + */ + public function getOperation() + { + return $this->container['operation']; + } + + /** + * Sets operation + * + * @param string $operation Defines how the condition must be evaluated. + * + * @return self + */ + public function setOperation($operation) + { + if (is_null($operation)) { + throw new \InvalidArgumentException('non-nullable operation cannot be null'); + } + $this->container['operation'] = $operation; + + return $this; + } + + /** + * Gets value + * + * @return \Adyen\Model\BalancePlatform\BankIdentification[]|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param \Adyen\Model\BalancePlatform\BankIdentification[]|null $value List of counterparty Bank Institutions and the operation. + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php index 9a0404822..805603649 100644 --- a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php @@ -285,7 +285,6 @@ public function getModelName() public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const PRIORITIES_CROSS_BORDER = 'crossBorder'; - public const PRIORITIES_DIRECT_DEBIT = 'directDebit'; public const PRIORITIES_FAST = 'fast'; public const PRIORITIES_INSTANT = 'instant'; public const PRIORITIES_INTERNAL = 'internal'; @@ -293,16 +292,19 @@ public function getModelName() public const PRIORITIES_WIRE = 'wire'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -331,7 +333,6 @@ public function getPrioritiesAllowableValues() { return [ self::PRIORITIES_CROSS_BORDER, - self::PRIORITIES_DIRECT_DEBIT, self::PRIORITIES_FAST, self::PRIORITIES_INSTANT, self::PRIORITIES_INTERNAL, @@ -349,16 +350,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php new file mode 100644 index 000000000..ea3df25eb --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php @@ -0,0 +1,452 @@ + + */ +class GetTaxFormResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'GetTaxFormResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'content' => 'string', + 'contentType' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'content' => 'byte', + 'contentType' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'content' => false, + 'contentType' => 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 = [ + 'content' => 'content', + 'contentType' => 'contentType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'content' => 'setContent', + 'contentType' => 'setContentType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'content' => 'getContent', + 'contentType' => 'getContentType' + ]; + + /** + * 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 CONTENT_TYPE_APPLICATION_PDF = 'application/pdf'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getContentTypeAllowableValues() + { + return [ + self::CONTENT_TYPE_APPLICATION_PDF, + ]; + } + /** + * 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('content', $data ?? [], null); + $this->setIfExists('contentType', $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['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + $allowedValues = $this->getContentTypeAllowableValues(); + if (!is_null($this->container['contentType']) && !in_array($this->container['contentType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'contentType', must be one of '%s'", + $this->container['contentType'], + 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 content + * + * @return string + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string $content The content of the tax form in Base64 format. + * + * @return self + */ + public function setContent($content) + { + if (is_null($content)) { + throw new \InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets contentType + * + * @return string|null + */ + public function getContentType() + { + return $this->container['contentType']; + } + + /** + * Sets contentType + * + * @param string|null $contentType The content type of the tax form. Possible values: * **application/pdf** + * + * @return self + */ + public function setContentType($contentType) + { + if (is_null($contentType)) { + throw new \InvalidArgumentException('non-nullable contentType cannot be null'); + } + $allowedValues = $this->getContentTypeAllowableValues(); + if (!in_array($contentType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'contentType', must be one of '%s'", + $contentType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['contentType'] = $contentType; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php index 561d32201..262c9de65 100644 --- a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php @@ -333,7 +333,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + * @param string $accountNumber The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php index 0df909d2b..ff1b67d47 100644 --- a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php @@ -45,8 +45,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', - 'accountSuffix' => 'string', - 'bankCode' => 'string', 'type' => 'string' ]; @@ -59,8 +57,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, - 'accountSuffix' => null, - 'bankCode' => null, 'type' => null ]; @@ -71,8 +67,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, - 'accountSuffix' => false, - 'bankCode' => false, 'type' => false ]; @@ -163,8 +157,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', - 'accountSuffix' => 'accountSuffix', - 'bankCode' => 'bankCode', 'type' => 'type' ]; @@ -175,8 +167,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', - 'accountSuffix' => 'setAccountSuffix', - 'bankCode' => 'setBankCode', 'type' => 'setType' ]; @@ -187,8 +177,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', - 'accountSuffix' => 'getAccountSuffix', - 'bankCode' => 'getBankCode', 'type' => 'getType' ]; @@ -262,8 +250,6 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); - $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'nzLocal'); } @@ -297,12 +283,6 @@ public function listInvalidProperties() if ($this->container['accountNumber'] === null) { $invalidProperties[] = "'accountNumber' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } - if ($this->container['bankCode'] === null) { - $invalidProperties[] = "'bankCode' can't be null"; - } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -343,7 +323,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 7-digit bank account number, without separators or whitespace. + * @param string $accountNumber The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. * * @return self */ @@ -357,60 +337,6 @@ public function setAccountNumber($accountNumber) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - - /** - * Gets bankCode - * - * @return string - */ - public function getBankCode() - { - return $this->container['bankCode']; - } - - /** - * Sets bankCode - * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - * - * @return self - */ - public function setBankCode($bankCode) - { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } - $this->container['bankCode'] = $bankCode; - - return $this; - } - /** * Gets type * diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php index 83d3719c2..00fd465f4 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php @@ -46,6 +46,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPITypes = [ 'description' => 'string', 'issuingCountryCode' => 'string', + 'onlyForCrossBalancePlatform' => 'bool', 'paymentInstrumentType' => 'string', 'type' => 'string' ]; @@ -60,6 +61,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPIFormats = [ 'description' => null, 'issuingCountryCode' => null, + 'onlyForCrossBalancePlatform' => null, 'paymentInstrumentType' => null, 'type' => null ]; @@ -72,6 +74,7 @@ class PaymentInstrumentRequirement implements ModelInterface, ArrayAccess, \Json protected static $openAPINullables = [ 'description' => false, 'issuingCountryCode' => false, + 'onlyForCrossBalancePlatform' => false, 'paymentInstrumentType' => false, 'type' => false ]; @@ -164,6 +167,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'description' => 'description', 'issuingCountryCode' => 'issuingCountryCode', + 'onlyForCrossBalancePlatform' => 'onlyForCrossBalancePlatform', 'paymentInstrumentType' => 'paymentInstrumentType', 'type' => 'type' ]; @@ -176,6 +180,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'description' => 'setDescription', 'issuingCountryCode' => 'setIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'setOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'setPaymentInstrumentType', 'type' => 'setType' ]; @@ -188,6 +193,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'description' => 'getDescription', 'issuingCountryCode' => 'getIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'getOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'getPaymentInstrumentType', 'type' => 'getType' ]; @@ -277,6 +283,7 @@ public function __construct(array $data = null) { $this->setIfExists('description', $data ?? [], null); $this->setIfExists('issuingCountryCode', $data ?? [], null); + $this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null); $this->setIfExists('paymentInstrumentType', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'paymentInstrumentRequirement'); } @@ -398,6 +405,33 @@ public function setIssuingCountryCode($issuingCountryCode) return $this; } + /** + * Gets onlyForCrossBalancePlatform + * + * @return bool|null + */ + public function getOnlyForCrossBalancePlatform() + { + return $this->container['onlyForCrossBalancePlatform']; + } + + /** + * Sets onlyForCrossBalancePlatform + * + * @param bool|null $onlyForCrossBalancePlatform Specifies if the requirement only applies to transfers to another balance platform. + * + * @return self + */ + public function setOnlyForCrossBalancePlatform($onlyForCrossBalancePlatform) + { + if (is_null($onlyForCrossBalancePlatform)) { + throw new \InvalidArgumentException('non-nullable onlyForCrossBalancePlatform cannot be null'); + } + $this->container['onlyForCrossBalancePlatform'] = $onlyForCrossBalancePlatform; + + return $this; + } + /** * Gets paymentInstrumentType * diff --git a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php index d5f3759b0..0ea45c5c8 100644 --- a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php @@ -296,7 +296,7 @@ public function getSalesDayClosingTime() /** * Sets salesDayClosingTime * - * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. * * @return self */ @@ -323,7 +323,7 @@ public function getSettlementDelayDays() /** * Sets settlementDelayDays * - * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/pass-through-settlement). Default value: **null**. + * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/pass-through-settlement). Default value: **null**. * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php index 78b0ea9f3..9a5e1b56e 100644 --- a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php @@ -291,7 +291,6 @@ public function getModelName() public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const PRIORITIES_CROSS_BORDER = 'crossBorder'; - public const PRIORITIES_DIRECT_DEBIT = 'directDebit'; public const PRIORITIES_FAST = 'fast'; public const PRIORITIES_INSTANT = 'instant'; public const PRIORITIES_INTERNAL = 'internal'; @@ -299,16 +298,19 @@ public function getModelName() public const PRIORITIES_WIRE = 'wire'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -337,7 +339,6 @@ public function getPrioritiesAllowableValues() { return [ self::PRIORITIES_CROSS_BORDER, - self::PRIORITIES_DIRECT_DEBIT, self::PRIORITIES_FAST, self::PRIORITIES_INSTANT, self::PRIORITIES_INTERNAL, @@ -355,16 +356,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php index 11cad0321..04a403188 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php @@ -46,6 +46,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS protected static $openAPITypes = [ 'activeNetworkTokens' => '\Adyen\Model\BalancePlatform\ActiveNetworkTokensRestriction', 'brandVariants' => '\Adyen\Model\BalancePlatform\BrandVariantsRestriction', + 'counterpartyBank' => '\Adyen\Model\BalancePlatform\CounterpartyBankRestriction', 'countries' => '\Adyen\Model\BalancePlatform\CountriesRestriction', 'dayOfWeek' => '\Adyen\Model\BalancePlatform\DayOfWeekRestriction', 'differentCurrencies' => '\Adyen\Model\BalancePlatform\DifferentCurrenciesRestriction', @@ -70,6 +71,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS protected static $openAPIFormats = [ 'activeNetworkTokens' => null, 'brandVariants' => null, + 'counterpartyBank' => null, 'countries' => null, 'dayOfWeek' => null, 'differentCurrencies' => null, @@ -92,6 +94,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS protected static $openAPINullables = [ 'activeNetworkTokens' => false, 'brandVariants' => false, + 'counterpartyBank' => false, 'countries' => false, 'dayOfWeek' => false, 'differentCurrencies' => false, @@ -194,6 +197,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'activeNetworkTokens' => 'activeNetworkTokens', 'brandVariants' => 'brandVariants', + 'counterpartyBank' => 'counterpartyBank', 'countries' => 'countries', 'dayOfWeek' => 'dayOfWeek', 'differentCurrencies' => 'differentCurrencies', @@ -216,6 +220,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'activeNetworkTokens' => 'setActiveNetworkTokens', 'brandVariants' => 'setBrandVariants', + 'counterpartyBank' => 'setCounterpartyBank', 'countries' => 'setCountries', 'dayOfWeek' => 'setDayOfWeek', 'differentCurrencies' => 'setDifferentCurrencies', @@ -238,6 +243,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'activeNetworkTokens' => 'getActiveNetworkTokens', 'brandVariants' => 'getBrandVariants', + 'counterpartyBank' => 'getCounterpartyBank', 'countries' => 'getCountries', 'dayOfWeek' => 'getDayOfWeek', 'differentCurrencies' => 'getDifferentCurrencies', @@ -311,6 +317,7 @@ public function __construct(array $data = null) { $this->setIfExists('activeNetworkTokens', $data ?? [], null); $this->setIfExists('brandVariants', $data ?? [], null); + $this->setIfExists('counterpartyBank', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); $this->setIfExists('dayOfWeek', $data ?? [], null); $this->setIfExists('differentCurrencies', $data ?? [], null); @@ -421,6 +428,33 @@ public function setBrandVariants($brandVariants) return $this; } + /** + * Gets counterpartyBank + * + * @return \Adyen\Model\BalancePlatform\CounterpartyBankRestriction|null + */ + public function getCounterpartyBank() + { + return $this->container['counterpartyBank']; + } + + /** + * Sets counterpartyBank + * + * @param \Adyen\Model\BalancePlatform\CounterpartyBankRestriction|null $counterpartyBank counterpartyBank + * + * @return self + */ + public function setCounterpartyBank($counterpartyBank) + { + if (is_null($counterpartyBank)) { + throw new \InvalidArgumentException('non-nullable counterpartyBank cannot be null'); + } + $this->container['counterpartyBank'] = $counterpartyBank; + + return $this; + } + /** * Gets countries * diff --git a/src/Adyen/Model/BalancePlatform/TransferRoute.php b/src/Adyen/Model/BalancePlatform/TransferRoute.php index 0d7c123c7..e72c147ca 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRoute.php +++ b/src/Adyen/Model/BalancePlatform/TransferRoute.php @@ -44,7 +44,6 @@ class TransferRoute implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'balancePlatform' => 'string', 'category' => 'string', 'country' => 'string', 'currency' => 'string', @@ -60,7 +59,6 @@ class TransferRoute implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'balancePlatform' => null, 'category' => null, 'country' => null, 'currency' => null, @@ -74,7 +72,6 @@ class TransferRoute implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'balancePlatform' => false, 'category' => false, 'country' => false, 'currency' => false, @@ -168,7 +165,6 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'balancePlatform' => 'balancePlatform', 'category' => 'category', 'country' => 'country', 'currency' => 'currency', @@ -182,7 +178,6 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'balancePlatform' => 'setBalancePlatform', 'category' => 'setCategory', 'country' => 'setCountry', 'currency' => 'setCurrency', @@ -196,7 +191,6 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'balancePlatform' => 'getBalancePlatform', 'category' => 'getCategory', 'country' => 'getCountry', 'currency' => 'getCurrency', @@ -252,6 +246,7 @@ public function getModelName() public const CATEGORY_ISSUED_CARD = 'issuedCard'; public const CATEGORY_MIGRATION = 'migration'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; + public const CATEGORY_UPGRADE = 'upgrade'; public const PRIORITY_CROSS_BORDER = 'crossBorder'; public const PRIORITY_FAST = 'fast'; public const PRIORITY_INSTANT = 'instant'; @@ -274,6 +269,7 @@ public function getCategoryAllowableValues() self::CATEGORY_ISSUED_CARD, self::CATEGORY_MIGRATION, self::CATEGORY_PLATFORM_PAYMENT, + self::CATEGORY_UPGRADE, ]; } /** @@ -307,7 +303,6 @@ public function getPriorityAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('balancePlatform', $data ?? [], null); $this->setIfExists('category', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('currency', $data ?? [], null); @@ -375,33 +370,6 @@ public function valid() } - /** - * Gets balancePlatform - * - * @return string|null - */ - public function getBalancePlatform() - { - return $this->container['balancePlatform']; - } - - /** - * Sets balancePlatform - * - * @param string|null $balancePlatform The unique identifier assigned to the balance platform associated with the account holder. - * - * @return self - */ - public function setBalancePlatform($balancePlatform) - { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } - $this->container['balancePlatform'] = $balancePlatform; - - return $this; - } - /** * Gets category * diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php index 6039b0908..74f39f20d 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php @@ -52,6 +52,7 @@ class TransferRouteRequirements implements ModelInterface, ArrayAccess, \JsonSer 'min' => 'int', 'bankAccountIdentificationTypes' => 'string[]', 'issuingCountryCode' => 'string', + 'onlyForCrossBalancePlatform' => 'bool', 'paymentInstrumentType' => 'string' ]; @@ -70,6 +71,7 @@ class TransferRouteRequirements implements ModelInterface, ArrayAccess, \JsonSer 'min' => 'int64', 'bankAccountIdentificationTypes' => null, 'issuingCountryCode' => null, + 'onlyForCrossBalancePlatform' => null, 'paymentInstrumentType' => null ]; @@ -86,6 +88,7 @@ class TransferRouteRequirements implements ModelInterface, ArrayAccess, \JsonSer 'min' => false, 'bankAccountIdentificationTypes' => false, 'issuingCountryCode' => false, + 'onlyForCrossBalancePlatform' => false, 'paymentInstrumentType' => false ]; @@ -182,6 +185,7 @@ public function isNullableSetToNull(string $property): bool 'min' => 'min', 'bankAccountIdentificationTypes' => 'bankAccountIdentificationTypes', 'issuingCountryCode' => 'issuingCountryCode', + 'onlyForCrossBalancePlatform' => 'onlyForCrossBalancePlatform', 'paymentInstrumentType' => 'paymentInstrumentType' ]; @@ -198,6 +202,7 @@ public function isNullableSetToNull(string $property): bool 'min' => 'setMin', 'bankAccountIdentificationTypes' => 'setBankAccountIdentificationTypes', 'issuingCountryCode' => 'setIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'setOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'setPaymentInstrumentType' ]; @@ -214,6 +219,7 @@ public function isNullableSetToNull(string $property): bool 'min' => 'getMin', 'bankAccountIdentificationTypes' => 'getBankAccountIdentificationTypes', 'issuingCountryCode' => 'getIssuingCountryCode', + 'onlyForCrossBalancePlatform' => 'getOnlyForCrossBalancePlatform', 'paymentInstrumentType' => 'getPaymentInstrumentType' ]; @@ -280,6 +286,7 @@ public function __construct(array $data = null) $this->setIfExists('min', $data ?? [], null); $this->setIfExists('bankAccountIdentificationTypes', $data ?? [], null); $this->setIfExists('issuingCountryCode', $data ?? [], null); + $this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null); $this->setIfExists('paymentInstrumentType', $data ?? [], null); } @@ -519,6 +526,33 @@ public function setIssuingCountryCode($issuingCountryCode) return $this; } + /** + * Gets onlyForCrossBalancePlatform + * + * @return bool|null + */ + public function getOnlyForCrossBalancePlatform() + { + return $this->container['onlyForCrossBalancePlatform']; + } + + /** + * Sets onlyForCrossBalancePlatform + * + * @param bool|null $onlyForCrossBalancePlatform Specifies if the requirement only applies to transfers to another balance platform. + * + * @return self + */ + public function setOnlyForCrossBalancePlatform($onlyForCrossBalancePlatform) + { + if (is_null($onlyForCrossBalancePlatform)) { + throw new \InvalidArgumentException('non-nullable onlyForCrossBalancePlatform cannot be null'); + } + $this->container['onlyForCrossBalancePlatform'] = $onlyForCrossBalancePlatform; + + return $this; + } + /** * Gets paymentInstrumentType * diff --git a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php index eaedc36f7..f728eba4b 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php @@ -291,7 +291,6 @@ public function getModelName() public const CATEGORY_INTERNAL = 'internal'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; public const PRIORITIES_CROSS_BORDER = 'crossBorder'; - public const PRIORITIES_DIRECT_DEBIT = 'directDebit'; public const PRIORITIES_FAST = 'fast'; public const PRIORITIES_INSTANT = 'instant'; public const PRIORITIES_INTERNAL = 'internal'; @@ -299,16 +298,19 @@ public function getModelName() public const PRIORITIES_WIRE = 'wire'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -337,7 +339,6 @@ public function getPrioritiesAllowableValues() { return [ self::PRIORITIES_CROSS_BORDER, - self::PRIORITIES_DIRECT_DEBIT, self::PRIORITIES_FAST, self::PRIORITIES_INSTANT, self::PRIORITIES_INTERNAL, @@ -355,16 +356,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php index 2f4cdc052..52c30a926 100644 --- a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php +++ b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php @@ -47,7 +47,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => 'string', 'directoryServerId' => 'string', 'fromSDKVersion' => 'string', - 'publicKey' => 'string' + 'publicKey' => 'string', + 'rootCertificates' => 'string' ]; /** @@ -61,7 +62,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => null, 'directoryServerId' => null, 'fromSDKVersion' => null, - 'publicKey' => 'byte' + 'publicKey' => 'byte', + 'rootCertificates' => null ]; /** @@ -73,7 +75,8 @@ class DSPublicKeyDetail implements ModelInterface, ArrayAccess, \JsonSerializabl 'brand' => false, 'directoryServerId' => false, 'fromSDKVersion' => false, - 'publicKey' => false + 'publicKey' => false, + 'rootCertificates' => false ]; /** @@ -165,7 +168,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'brand', 'directoryServerId' => 'directoryServerId', 'fromSDKVersion' => 'fromSDKVersion', - 'publicKey' => 'publicKey' + 'publicKey' => 'publicKey', + 'rootCertificates' => 'rootCertificates' ]; /** @@ -177,7 +181,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'setBrand', 'directoryServerId' => 'setDirectoryServerId', 'fromSDKVersion' => 'setFromSDKVersion', - 'publicKey' => 'setPublicKey' + 'publicKey' => 'setPublicKey', + 'rootCertificates' => 'setRootCertificates' ]; /** @@ -189,7 +194,8 @@ public function isNullableSetToNull(string $property): bool 'brand' => 'getBrand', 'directoryServerId' => 'getDirectoryServerId', 'fromSDKVersion' => 'getFromSDKVersion', - 'publicKey' => 'getPublicKey' + 'publicKey' => 'getPublicKey', + 'rootCertificates' => 'getRootCertificates' ]; /** @@ -253,6 +259,7 @@ public function __construct(array $data = null) $this->setIfExists('directoryServerId', $data ?? [], null); $this->setIfExists('fromSDKVersion', $data ?? [], null); $this->setIfExists('publicKey', $data ?? [], null); + $this->setIfExists('rootCertificates', $data ?? [], null); } /** @@ -404,6 +411,33 @@ public function setPublicKey($publicKey) return $this; } + + /** + * Gets rootCertificates + * + * @return string|null + */ + public function getRootCertificates() + { + return $this->container['rootCertificates']; + } + + /** + * Sets rootCertificates + * + * @param string|null $rootCertificates Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates. + * + * @return self + */ + public function setRootCertificates($rootCertificates) + { + if (is_null($rootCertificates)) { + throw new \InvalidArgumentException('non-nullable rootCertificates cannot be null'); + } + $this->container['rootCertificates'] = $rootCertificates; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/BillingAddress.php b/src/Adyen/Model/Checkout/BillingAddress.php new file mode 100644 index 000000000..9737f8435 --- /dev/null +++ b/src/Adyen/Model/Checkout/BillingAddress.php @@ -0,0 +1,569 @@ + + */ +class BillingAddress implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BillingAddress'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => 'string', + 'houseNumberOrName' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string', + 'street' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'country' => null, + 'houseNumberOrName' => null, + 'postalCode' => null, + 'stateOrProvince' => null, + 'street' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => false, + 'houseNumberOrName' => false, + 'postalCode' => false, + 'stateOrProvince' => false, + 'street' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'city' => 'city', + 'country' => 'country', + 'houseNumberOrName' => 'houseNumberOrName', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince', + 'street' => 'street' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'houseNumberOrName' => 'setHouseNumberOrName', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince', + 'street' => 'setStreet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + 'houseNumberOrName' => 'getHouseNumberOrName', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince', + 'street' => 'getStreet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('houseNumberOrName', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $data ?? [], null); + $this->setIfExists('street', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + if ($this->container['houseNumberOrName'] === null) { + $invalidProperties[] = "'houseNumberOrName' can't be null"; + } + if ($this->container['postalCode'] === null) { + $invalidProperties[] = "'postalCode' can't be null"; + } + if ($this->container['street'] === null) { + $invalidProperties[] = "'street' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets city + * + * @return string + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city The name of the city. Maximum length: 3000 characters. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets houseNumberOrName + * + * @return string + */ + public function getHouseNumberOrName() + { + return $this->container['houseNumberOrName']; + } + + /** + * Sets houseNumberOrName + * + * @param string $houseNumberOrName The number or name of the house. Maximum length: 3000 characters. + * + * @return self + */ + public function setHouseNumberOrName($houseNumberOrName) + { + if (is_null($houseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); + } + $this->container['houseNumberOrName'] = $houseNumberOrName; + + return $this; + } + + /** + * Gets postalCode + * + * @return string + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string $postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince + * + * @return string|null + */ + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + return $this; + } + + /** + * Gets street + * + * @return string + */ + public function getStreet() + { + return $this->container['street']; + } + + /** + * Sets street + * + * @param string $street The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + * + * @return self + */ + public function setStreet($street) + { + if (is_null($street)) { + throw new \InvalidArgumentException('non-nullable street cannot be null'); + } + $this->container['street'] = $street; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 33974d5a1..7417472c2 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -324,11 +324,8 @@ public function getModelName() } public const FUNDING_SOURCE_DEBIT = 'debit'; - public const TYPE_BCMC = 'bcmc'; public const TYPE_SCHEME = 'scheme'; public const TYPE_NETWORK_TOKEN = 'networkToken'; - public const TYPE_GIFTCARD = 'giftcard'; - public const TYPE_ALLIANCEDATA = 'alliancedata'; public const TYPE_CARD = 'card'; /** @@ -350,11 +347,8 @@ public function getFundingSourceAllowableValues() public function getTypeAllowableValues() { return [ - self::TYPE_BCMC, self::TYPE_SCHEME, self::TYPE_NETWORK_TOKEN, - self::TYPE_GIFTCARD, - self::TYPE_ALLIANCEDATA, self::TYPE_CARD, ]; } diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 89166d867..1694bce5c 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -45,26 +45,12 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'bankAccountNumber' => 'string', - 'bankAccountType' => 'string', - 'bankLocationId' => 'string', + 'applePayToken' => 'string', 'checkoutAttemptId' => 'string', - 'encryptedBankAccountNumber' => 'string', - 'encryptedBankLocationId' => 'string', - 'ownerName' => 'string', + 'fundingSource' => 'string', 'recurringDetailReference' => 'string', 'storedPaymentMethodId' => 'string', 'type' => 'string', - 'billingAddress' => 'string', - 'deliveryAddress' => 'string', - 'personalDetails' => 'string', - 'amazonPayToken' => 'string', - 'checkoutSessionId' => 'string', - 'applePayToken' => 'string', - 'fundingSource' => 'string', - 'holderName' => 'string', - 'issuer' => 'string', - 'blikCode' => 'string', 'brand' => 'string', 'cupsecureplusSmscode' => 'string', 'cvc' => 'string', @@ -74,29 +60,13 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', + 'holderName' => 'string', 'networkPaymentReference' => 'string', 'number' => 'string', 'shopperNotificationReference' => 'string', 'threeDS2SdkVersion' => 'string', - 'firstName' => 'string', - 'lastName' => 'string', - 'shopperEmail' => 'string', - 'telephoneNumber' => 'string', 'googlePayToken' => 'string', - 'subtype' => 'string', - 'masterpassTransactionId' => 'string', - 'orderID' => 'string', - 'payeePreferred' => 'string', - 'payerID' => 'string', - 'payerSelected' => 'string', - 'virtualPaymentAddress' => 'string', - 'samsungPayToken' => 'string', - 'iban' => 'string', - 'billingSequenceNumber' => 'string', - 'visaCheckoutCallId' => 'string', - 'appId' => 'string', - 'openid' => 'string', - 'clickAndCollect' => 'string' + 'issuer' => 'string' ]; /** @@ -107,26 +77,12 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'bankAccountNumber' => null, - 'bankAccountType' => null, - 'bankLocationId' => null, + 'applePayToken' => null, 'checkoutAttemptId' => null, - 'encryptedBankAccountNumber' => null, - 'encryptedBankLocationId' => null, - 'ownerName' => null, + 'fundingSource' => null, 'recurringDetailReference' => null, 'storedPaymentMethodId' => null, 'type' => null, - 'billingAddress' => null, - 'deliveryAddress' => null, - 'personalDetails' => null, - 'amazonPayToken' => null, - 'checkoutSessionId' => null, - 'applePayToken' => null, - 'fundingSource' => null, - 'holderName' => null, - 'issuer' => null, - 'blikCode' => null, 'brand' => null, 'cupsecureplusSmscode' => null, 'cvc' => null, @@ -136,29 +92,13 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, + 'holderName' => null, 'networkPaymentReference' => null, 'number' => null, 'shopperNotificationReference' => null, 'threeDS2SdkVersion' => null, - 'firstName' => null, - 'lastName' => null, - 'shopperEmail' => null, - 'telephoneNumber' => null, 'googlePayToken' => null, - 'subtype' => null, - 'masterpassTransactionId' => null, - 'orderID' => null, - 'payeePreferred' => null, - 'payerID' => null, - 'payerSelected' => null, - 'virtualPaymentAddress' => null, - 'samsungPayToken' => null, - 'iban' => null, - 'billingSequenceNumber' => null, - 'visaCheckoutCallId' => null, - 'appId' => null, - 'openid' => null, - 'clickAndCollect' => null + 'issuer' => null ]; /** @@ -167,26 +107,12 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static $openAPINullables = [ - 'bankAccountNumber' => false, - 'bankAccountType' => false, - 'bankLocationId' => false, + 'applePayToken' => false, 'checkoutAttemptId' => false, - 'encryptedBankAccountNumber' => false, - 'encryptedBankLocationId' => false, - 'ownerName' => false, + 'fundingSource' => false, 'recurringDetailReference' => false, 'storedPaymentMethodId' => false, 'type' => false, - 'billingAddress' => false, - 'deliveryAddress' => false, - 'personalDetails' => false, - 'amazonPayToken' => false, - 'checkoutSessionId' => false, - 'applePayToken' => false, - 'fundingSource' => false, - 'holderName' => false, - 'issuer' => false, - 'blikCode' => false, 'brand' => false, 'cupsecureplusSmscode' => false, 'cvc' => false, @@ -196,29 +122,13 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, + 'holderName' => false, 'networkPaymentReference' => false, 'number' => false, 'shopperNotificationReference' => false, 'threeDS2SdkVersion' => false, - 'firstName' => false, - 'lastName' => false, - 'shopperEmail' => false, - 'telephoneNumber' => false, 'googlePayToken' => false, - 'subtype' => false, - 'masterpassTransactionId' => false, - 'orderID' => false, - 'payeePreferred' => false, - 'payerID' => false, - 'payerSelected' => false, - 'virtualPaymentAddress' => false, - 'samsungPayToken' => false, - 'iban' => false, - 'billingSequenceNumber' => false, - 'visaCheckoutCallId' => false, - 'appId' => false, - 'openid' => false, - 'clickAndCollect' => false + 'issuer' => false ]; /** @@ -307,26 +217,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'bankAccountNumber' => 'bankAccountNumber', - 'bankAccountType' => 'bankAccountType', - 'bankLocationId' => 'bankLocationId', + 'applePayToken' => 'applePayToken', 'checkoutAttemptId' => 'checkoutAttemptId', - 'encryptedBankAccountNumber' => 'encryptedBankAccountNumber', - 'encryptedBankLocationId' => 'encryptedBankLocationId', - 'ownerName' => 'ownerName', + 'fundingSource' => 'fundingSource', 'recurringDetailReference' => 'recurringDetailReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'type' => 'type', - 'billingAddress' => 'billingAddress', - 'deliveryAddress' => 'deliveryAddress', - 'personalDetails' => 'personalDetails', - 'amazonPayToken' => 'amazonPayToken', - 'checkoutSessionId' => 'checkoutSessionId', - 'applePayToken' => 'applePayToken', - 'fundingSource' => 'fundingSource', - 'holderName' => 'holderName', - 'issuer' => 'issuer', - 'blikCode' => 'blikCode', 'brand' => 'brand', 'cupsecureplusSmscode' => 'cupsecureplus.smscode', 'cvc' => 'cvc', @@ -336,29 +232,13 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', + 'holderName' => 'holderName', 'networkPaymentReference' => 'networkPaymentReference', 'number' => 'number', 'shopperNotificationReference' => 'shopperNotificationReference', 'threeDS2SdkVersion' => 'threeDS2SdkVersion', - 'firstName' => 'firstName', - 'lastName' => 'lastName', - 'shopperEmail' => 'shopperEmail', - 'telephoneNumber' => 'telephoneNumber', 'googlePayToken' => 'googlePayToken', - 'subtype' => 'subtype', - 'masterpassTransactionId' => 'masterpassTransactionId', - 'orderID' => 'orderID', - 'payeePreferred' => 'payeePreferred', - 'payerID' => 'payerID', - 'payerSelected' => 'payerSelected', - 'virtualPaymentAddress' => 'virtualPaymentAddress', - 'samsungPayToken' => 'samsungPayToken', - 'iban' => 'iban', - 'billingSequenceNumber' => 'billingSequenceNumber', - 'visaCheckoutCallId' => 'visaCheckoutCallId', - 'appId' => 'appId', - 'openid' => 'openid', - 'clickAndCollect' => 'clickAndCollect' + 'issuer' => 'issuer' ]; /** @@ -367,26 +247,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'bankAccountNumber' => 'setBankAccountNumber', - 'bankAccountType' => 'setBankAccountType', - 'bankLocationId' => 'setBankLocationId', + 'applePayToken' => 'setApplePayToken', 'checkoutAttemptId' => 'setCheckoutAttemptId', - 'encryptedBankAccountNumber' => 'setEncryptedBankAccountNumber', - 'encryptedBankLocationId' => 'setEncryptedBankLocationId', - 'ownerName' => 'setOwnerName', + 'fundingSource' => 'setFundingSource', 'recurringDetailReference' => 'setRecurringDetailReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'type' => 'setType', - 'billingAddress' => 'setBillingAddress', - 'deliveryAddress' => 'setDeliveryAddress', - 'personalDetails' => 'setPersonalDetails', - 'amazonPayToken' => 'setAmazonPayToken', - 'checkoutSessionId' => 'setCheckoutSessionId', - 'applePayToken' => 'setApplePayToken', - 'fundingSource' => 'setFundingSource', - 'holderName' => 'setHolderName', - 'issuer' => 'setIssuer', - 'blikCode' => 'setBlikCode', 'brand' => 'setBrand', 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', 'cvc' => 'setCvc', @@ -396,29 +262,13 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', + 'holderName' => 'setHolderName', 'networkPaymentReference' => 'setNetworkPaymentReference', 'number' => 'setNumber', 'shopperNotificationReference' => 'setShopperNotificationReference', 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', - 'firstName' => 'setFirstName', - 'lastName' => 'setLastName', - 'shopperEmail' => 'setShopperEmail', - 'telephoneNumber' => 'setTelephoneNumber', 'googlePayToken' => 'setGooglePayToken', - 'subtype' => 'setSubtype', - 'masterpassTransactionId' => 'setMasterpassTransactionId', - 'orderID' => 'setOrderID', - 'payeePreferred' => 'setPayeePreferred', - 'payerID' => 'setPayerID', - 'payerSelected' => 'setPayerSelected', - 'virtualPaymentAddress' => 'setVirtualPaymentAddress', - 'samsungPayToken' => 'setSamsungPayToken', - 'iban' => 'setIban', - 'billingSequenceNumber' => 'setBillingSequenceNumber', - 'visaCheckoutCallId' => 'setVisaCheckoutCallId', - 'appId' => 'setAppId', - 'openid' => 'setOpenid', - 'clickAndCollect' => 'setClickAndCollect' + 'issuer' => 'setIssuer' ]; /** @@ -427,26 +277,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'bankAccountNumber' => 'getBankAccountNumber', - 'bankAccountType' => 'getBankAccountType', - 'bankLocationId' => 'getBankLocationId', + 'applePayToken' => 'getApplePayToken', 'checkoutAttemptId' => 'getCheckoutAttemptId', - 'encryptedBankAccountNumber' => 'getEncryptedBankAccountNumber', - 'encryptedBankLocationId' => 'getEncryptedBankLocationId', - 'ownerName' => 'getOwnerName', + 'fundingSource' => 'getFundingSource', 'recurringDetailReference' => 'getRecurringDetailReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'type' => 'getType', - 'billingAddress' => 'getBillingAddress', - 'deliveryAddress' => 'getDeliveryAddress', - 'personalDetails' => 'getPersonalDetails', - 'amazonPayToken' => 'getAmazonPayToken', - 'checkoutSessionId' => 'getCheckoutSessionId', - 'applePayToken' => 'getApplePayToken', - 'fundingSource' => 'getFundingSource', - 'holderName' => 'getHolderName', - 'issuer' => 'getIssuer', - 'blikCode' => 'getBlikCode', 'brand' => 'getBrand', 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', 'cvc' => 'getCvc', @@ -456,29 +292,13 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', + 'holderName' => 'getHolderName', 'networkPaymentReference' => 'getNetworkPaymentReference', 'number' => 'getNumber', 'shopperNotificationReference' => 'getShopperNotificationReference', 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', - 'firstName' => 'getFirstName', - 'lastName' => 'getLastName', - 'shopperEmail' => 'getShopperEmail', - 'telephoneNumber' => 'getTelephoneNumber', 'googlePayToken' => 'getGooglePayToken', - 'subtype' => 'getSubtype', - 'masterpassTransactionId' => 'getMasterpassTransactionId', - 'orderID' => 'getOrderID', - 'payeePreferred' => 'getPayeePreferred', - 'payerID' => 'getPayerID', - 'payerSelected' => 'getPayerSelected', - 'virtualPaymentAddress' => 'getVirtualPaymentAddress', - 'samsungPayToken' => 'getSamsungPayToken', - 'iban' => 'getIban', - 'billingSequenceNumber' => 'getBillingSequenceNumber', - 'visaCheckoutCallId' => 'getVisaCheckoutCallId', - 'appId' => 'getAppId', - 'openid' => 'getOpenid', - 'clickAndCollect' => 'getClickAndCollect' + 'issuer' => 'getIssuer' ]; /** @@ -537,26 +357,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('bankAccountNumber', $data ?? [], null); - $this->setIfExists('bankAccountType', $data ?? [], null); - $this->setIfExists('bankLocationId', $data ?? [], null); + $this->setIfExists('applePayToken', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); - $this->setIfExists('encryptedBankAccountNumber', $data ?? [], null); - $this->setIfExists('encryptedBankLocationId', $data ?? [], null); - $this->setIfExists('ownerName', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'zip'); - $this->setIfExists('billingAddress', $data ?? [], null); - $this->setIfExists('deliveryAddress', $data ?? [], null); - $this->setIfExists('personalDetails', $data ?? [], null); - $this->setIfExists('amazonPayToken', $data ?? [], null); - $this->setIfExists('checkoutSessionId', $data ?? [], null); - $this->setIfExists('applePayToken', $data ?? [], null); - $this->setIfExists('fundingSource', $data ?? [], null); - $this->setIfExists('holderName', $data ?? [], null); - $this->setIfExists('issuer', $data ?? [], null); - $this->setIfExists('blikCode', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'paywithgoogle'); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); $this->setIfExists('cvc', $data ?? [], null); @@ -566,29 +372,13 @@ public function __construct(array $data = null) $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('networkPaymentReference', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); - $this->setIfExists('firstName', $data ?? [], null); - $this->setIfExists('lastName', $data ?? [], null); - $this->setIfExists('shopperEmail', $data ?? [], null); - $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('googlePayToken', $data ?? [], null); - $this->setIfExists('subtype', $data ?? [], null); - $this->setIfExists('masterpassTransactionId', $data ?? [], null); - $this->setIfExists('orderID', $data ?? [], null); - $this->setIfExists('payeePreferred', $data ?? [], null); - $this->setIfExists('payerID', $data ?? [], null); - $this->setIfExists('payerSelected', $data ?? [], null); - $this->setIfExists('virtualPaymentAddress', $data ?? [], null); - $this->setIfExists('samsungPayToken', $data ?? [], null); - $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('billingSequenceNumber', $data ?? [], null); - $this->setIfExists('visaCheckoutCallId', $data ?? [], null); - $this->setIfExists('appId', $data ?? [], null); - $this->setIfExists('openid', $data ?? [], null); - $this->setIfExists('clickAndCollect', $data ?? [], null); + $this->setIfExists('issuer', $data ?? [], null); } /** @@ -618,54 +408,16 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['bankAccountNumber'] === null) { - $invalidProperties[] = "'bankAccountNumber' can't be null"; - } - - if ($this->container['ownerName'] === null) { - $invalidProperties[] = "'ownerName' can't be null"; - } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ($this->container['applePayToken'] === null) { $invalidProperties[] = "'applePayToken' can't be null"; } - if ($this->container['issuer'] === null) { - $invalidProperties[] = "'issuer' can't be null"; - } - if ($this->container['firstName'] === null) { - $invalidProperties[] = "'firstName' can't be null"; - } - if ($this->container['lastName'] === null) { - $invalidProperties[] = "'lastName' can't be null"; - } - if ($this->container['shopperEmail'] === null) { - $invalidProperties[] = "'shopperEmail' can't be null"; - } - if ($this->container['telephoneNumber'] === null) { - $invalidProperties[] = "'telephoneNumber' can't be null"; - } + if ($this->container['googlePayToken'] === null) { $invalidProperties[] = "'googlePayToken' can't be null"; } - - if ($this->container['masterpassTransactionId'] === null) { - $invalidProperties[] = "'masterpassTransactionId' can't be null"; - } - if ($this->container['samsungPayToken'] === null) { - $invalidProperties[] = "'samsungPayToken' can't be null"; - } - if ($this->container['iban'] === null) { - $invalidProperties[] = "'iban' can't be null"; - } - if ($this->container['billingSequenceNumber'] === null) { - $invalidProperties[] = "'billingSequenceNumber' can't be null"; - } - if ($this->container['visaCheckoutCallId'] === null) { - $invalidProperties[] = "'visaCheckoutCallId' can't be null"; + if ($this->container['issuer'] === null) { + $invalidProperties[] = "'issuer' can't be null"; } return $invalidProperties; } @@ -683,82 +435,28 @@ public function valid() /** - * Gets bankAccountNumber + * Gets applePayToken * * @return string */ - public function getBankAccountNumber() - { - return $this->container['bankAccountNumber']; - } - - /** - * Sets bankAccountNumber - * - * @param string $bankAccountNumber The bank account number (without separators). - * - * @return self - */ - public function setBankAccountNumber($bankAccountNumber) - { - if (is_null($bankAccountNumber)) { - throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); - } - $this->container['bankAccountNumber'] = $bankAccountNumber; - - return $this; - } - - /** - * Gets bankAccountType - * - * @return string|null - */ - public function getBankAccountType() - { - return $this->container['bankAccountType']; - } - - /** - * Sets bankAccountType - * - * @param string|null $bankAccountType The bank account type (checking, savings...). - * - * @return self - */ - public function setBankAccountType($bankAccountType) - { - if (is_null($bankAccountType)) { - throw new \InvalidArgumentException('non-nullable bankAccountType cannot be null'); - } - $this->container['bankAccountType'] = $bankAccountType; - - return $this; - } - - /** - * Gets bankLocationId - * - * @return string|null - */ - public function getBankLocationId() + public function getApplePayToken() { - return $this->container['bankLocationId']; + return $this->container['applePayToken']; } /** - * Sets bankLocationId + * Sets applePayToken * - * @param string|null $bankLocationId The bank routing number of the account. + * @param string $applePayToken The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. * * @return self */ - public function setBankLocationId($bankLocationId) + public function setApplePayToken($applePayToken) { - if (is_null($bankLocationId)) { - throw new \InvalidArgumentException('non-nullable bankLocationId cannot be null'); + if (is_null($applePayToken)) { + throw new \InvalidArgumentException('non-nullable applePayToken cannot be null'); } - $this->container['bankLocationId'] = $bankLocationId; + $this->container['applePayToken'] = $applePayToken; return $this; } @@ -791,82 +489,28 @@ public function setCheckoutAttemptId($checkoutAttemptId) } /** - * Gets encryptedBankAccountNumber - * - * @return string|null - */ - public function getEncryptedBankAccountNumber() - { - return $this->container['encryptedBankAccountNumber']; - } - - /** - * Sets encryptedBankAccountNumber - * - * @param string|null $encryptedBankAccountNumber Encrypted bank account number. The bank account number (without separators). - * - * @return self - */ - public function setEncryptedBankAccountNumber($encryptedBankAccountNumber) - { - if (is_null($encryptedBankAccountNumber)) { - throw new \InvalidArgumentException('non-nullable encryptedBankAccountNumber cannot be null'); - } - $this->container['encryptedBankAccountNumber'] = $encryptedBankAccountNumber; - - return $this; - } - - /** - * Gets encryptedBankLocationId + * Gets fundingSource * * @return string|null */ - public function getEncryptedBankLocationId() - { - return $this->container['encryptedBankLocationId']; - } - - /** - * Sets encryptedBankLocationId - * - * @param string|null $encryptedBankLocationId Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases. - * - * @return self - */ - public function setEncryptedBankLocationId($encryptedBankLocationId) - { - if (is_null($encryptedBankLocationId)) { - throw new \InvalidArgumentException('non-nullable encryptedBankLocationId cannot be null'); - } - $this->container['encryptedBankLocationId'] = $encryptedBankLocationId; - - return $this; - } - - /** - * Gets ownerName - * - * @return string - */ - public function getOwnerName() + public function getFundingSource() { - return $this->container['ownerName']; + return $this->container['fundingSource']; } /** - * Sets ownerName + * Sets fundingSource * - * @param string $ownerName The name of the bank account holder. + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. * * @return self */ - public function setOwnerName($ownerName) + public function setFundingSource($fundingSource) { - if (is_null($ownerName)) { - throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); } - $this->container['ownerName'] = $ownerName; + $this->container['fundingSource'] = $fundingSource; return $this; } @@ -930,7 +574,7 @@ public function setStoredPaymentMethodId($storedPaymentMethodId) /** * Gets type * - * @return string + * @return string|null */ public function getType() { @@ -940,7 +584,7 @@ public function getType() /** * Sets type * - * @param string $type **zip** + * @param string|null $type **paywithgoogle** * * @return self */ @@ -955,1137 +599,435 @@ public function setType($type) } /** - * Gets billingAddress + * Gets brand * * @return string|null */ - public function getBillingAddress() + public function getBrand() { - return $this->container['billingAddress']; + return $this->container['brand']; } /** - * Sets billingAddress + * Sets brand * - * @param string|null $billingAddress The address where to send the invoice. + * @param string|null $brand Secondary brand of the card. For example: **plastix**, **hmclub**. * * @return self */ - public function setBillingAddress($billingAddress) + public function setBrand($brand) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); + if (is_null($brand)) { + throw new \InvalidArgumentException('non-nullable brand cannot be null'); } - $this->container['billingAddress'] = $billingAddress; + $this->container['brand'] = $brand; return $this; } /** - * Gets deliveryAddress + * Gets cupsecureplusSmscode * * @return string|null + * @deprecated */ - public function getDeliveryAddress() + public function getCupsecureplusSmscode() { - return $this->container['deliveryAddress']; + return $this->container['cupsecureplusSmscode']; } /** - * Sets deliveryAddress + * Sets cupsecureplusSmscode * - * @param string|null $deliveryAddress The address where the goods should be delivered. + * @param string|null $cupsecureplusSmscode cupsecureplusSmscode * * @return self + * @deprecated */ - public function setDeliveryAddress($deliveryAddress) + public function setCupsecureplusSmscode($cupsecureplusSmscode) { - if (is_null($deliveryAddress)) { - throw new \InvalidArgumentException('non-nullable deliveryAddress cannot be null'); + if (is_null($cupsecureplusSmscode)) { + throw new \InvalidArgumentException('non-nullable cupsecureplusSmscode cannot be null'); } - $this->container['deliveryAddress'] = $deliveryAddress; + $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; return $this; } /** - * Gets personalDetails + * Gets cvc * * @return string|null */ - public function getPersonalDetails() + public function getCvc() { - return $this->container['personalDetails']; + return $this->container['cvc']; } /** - * Sets personalDetails + * Sets cvc * - * @param string|null $personalDetails Shopper name, date of birth, phone number, and email address. + * @param string|null $cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). * * @return self */ - public function setPersonalDetails($personalDetails) + public function setCvc($cvc) { - if (is_null($personalDetails)) { - throw new \InvalidArgumentException('non-nullable personalDetails cannot be null'); + if (is_null($cvc)) { + throw new \InvalidArgumentException('non-nullable cvc cannot be null'); } - $this->container['personalDetails'] = $personalDetails; + $this->container['cvc'] = $cvc; return $this; } /** - * Gets amazonPayToken + * Gets encryptedCardNumber * * @return string|null */ - public function getAmazonPayToken() + public function getEncryptedCardNumber() { - return $this->container['amazonPayToken']; + return $this->container['encryptedCardNumber']; } /** - * Sets amazonPayToken + * Sets encryptedCardNumber * - * @param string|null $amazonPayToken This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically. + * @param string|null $encryptedCardNumber The encrypted card number. * * @return self */ - public function setAmazonPayToken($amazonPayToken) + public function setEncryptedCardNumber($encryptedCardNumber) { - if (is_null($amazonPayToken)) { - throw new \InvalidArgumentException('non-nullable amazonPayToken cannot be null'); + if (is_null($encryptedCardNumber)) { + throw new \InvalidArgumentException('non-nullable encryptedCardNumber cannot be null'); } - $this->container['amazonPayToken'] = $amazonPayToken; + $this->container['encryptedCardNumber'] = $encryptedCardNumber; return $this; } /** - * Gets checkoutSessionId + * Gets encryptedExpiryMonth * * @return string|null */ - public function getCheckoutSessionId() + public function getEncryptedExpiryMonth() { - return $this->container['checkoutSessionId']; + return $this->container['encryptedExpiryMonth']; } /** - * Sets checkoutSessionId + * Sets encryptedExpiryMonth * - * @param string|null $checkoutSessionId The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken. + * @param string|null $encryptedExpiryMonth The encrypted card expiry month. * * @return self */ - public function setCheckoutSessionId($checkoutSessionId) + public function setEncryptedExpiryMonth($encryptedExpiryMonth) { - if (is_null($checkoutSessionId)) { - throw new \InvalidArgumentException('non-nullable checkoutSessionId cannot be null'); + if (is_null($encryptedExpiryMonth)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryMonth cannot be null'); } - $this->container['checkoutSessionId'] = $checkoutSessionId; + $this->container['encryptedExpiryMonth'] = $encryptedExpiryMonth; return $this; } /** - * Gets applePayToken + * Gets encryptedExpiryYear * - * @return string + * @return string|null */ - public function getApplePayToken() + public function getEncryptedExpiryYear() { - return $this->container['applePayToken']; + return $this->container['encryptedExpiryYear']; } /** - * Sets applePayToken + * Sets encryptedExpiryYear * - * @param string $applePayToken The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. + * @param string|null $encryptedExpiryYear The encrypted card expiry year. * * @return self */ - public function setApplePayToken($applePayToken) + public function setEncryptedExpiryYear($encryptedExpiryYear) { - if (is_null($applePayToken)) { - throw new \InvalidArgumentException('non-nullable applePayToken cannot be null'); + if (is_null($encryptedExpiryYear)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryYear cannot be null'); } - $this->container['applePayToken'] = $applePayToken; + $this->container['encryptedExpiryYear'] = $encryptedExpiryYear; return $this; } /** - * Gets fundingSource + * Gets encryptedSecurityCode * * @return string|null */ - public function getFundingSource() + public function getEncryptedSecurityCode() { - return $this->container['fundingSource']; + return $this->container['encryptedSecurityCode']; } /** - * Sets fundingSource + * Sets encryptedSecurityCode * - * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * @param string|null $encryptedSecurityCode The encrypted card verification code. * * @return self */ - public function setFundingSource($fundingSource) + public function setEncryptedSecurityCode($encryptedSecurityCode) { - if (is_null($fundingSource)) { - throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + if (is_null($encryptedSecurityCode)) { + throw new \InvalidArgumentException('non-nullable encryptedSecurityCode cannot be null'); } - $this->container['fundingSource'] = $fundingSource; + $this->container['encryptedSecurityCode'] = $encryptedSecurityCode; return $this; } /** - * Gets holderName + * Gets expiryMonth * * @return string|null */ - public function getHolderName() + public function getExpiryMonth() { - return $this->container['holderName']; + return $this->container['expiryMonth']; } /** - * Sets holderName + * Sets expiryMonth * - * @param string|null $holderName The name of the card holder. + * @param string|null $expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). * * @return self */ - public function setHolderName($holderName) + public function setExpiryMonth($expiryMonth) { - if (is_null($holderName)) { - throw new \InvalidArgumentException('non-nullable holderName cannot be null'); - } - $this->container['holderName'] = $holderName; - - return $this; - } - - /** - * Gets issuer - * - * @return string - */ - public function getIssuer() - { - return $this->container['issuer']; - } - - /** - * Sets issuer - * - * @param string $issuer The shopper's bank. Specify this with the issuer value that corresponds to this bank. - * - * @return self - */ - public function setIssuer($issuer) - { - if (is_null($issuer)) { - throw new \InvalidArgumentException('non-nullable issuer cannot be null'); - } - $this->container['issuer'] = $issuer; - - return $this; - } - - /** - * Gets blikCode - * - * @return string|null - */ - public function getBlikCode() - { - return $this->container['blikCode']; - } - - /** - * Sets blikCode - * - * @param string|null $blikCode BLIK code consisting of 6 digits. - * - * @return self - */ - public function setBlikCode($blikCode) - { - if (is_null($blikCode)) { - throw new \InvalidArgumentException('non-nullable blikCode cannot be null'); - } - $this->container['blikCode'] = $blikCode; - - return $this; - } - - /** - * Gets brand - * - * @return string|null - */ - public function getBrand() - { - return $this->container['brand']; - } - - /** - * Sets brand - * - * @param string|null $brand Secondary brand of the card. For example: **plastix**, **hmclub**. - * - * @return self - */ - public function setBrand($brand) - { - if (is_null($brand)) { - throw new \InvalidArgumentException('non-nullable brand cannot be null'); - } - $this->container['brand'] = $brand; - - return $this; - } - - /** - * Gets cupsecureplusSmscode - * - * @return string|null - * @deprecated - */ - public function getCupsecureplusSmscode() - { - return $this->container['cupsecureplusSmscode']; - } - - /** - * Sets cupsecureplusSmscode - * - * @param string|null $cupsecureplusSmscode cupsecureplusSmscode - * - * @return self - * @deprecated - */ - public function setCupsecureplusSmscode($cupsecureplusSmscode) - { - if (is_null($cupsecureplusSmscode)) { - throw new \InvalidArgumentException('non-nullable cupsecureplusSmscode cannot be null'); - } - $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; - - return $this; - } - - /** - * Gets cvc - * - * @return string|null - */ - public function getCvc() - { - return $this->container['cvc']; - } - - /** - * Sets cvc - * - * @param string|null $cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - * - * @return self - */ - public function setCvc($cvc) - { - if (is_null($cvc)) { - throw new \InvalidArgumentException('non-nullable cvc cannot be null'); - } - $this->container['cvc'] = $cvc; - - return $this; - } - - /** - * Gets encryptedCardNumber - * - * @return string|null - */ - public function getEncryptedCardNumber() - { - return $this->container['encryptedCardNumber']; - } - - /** - * Sets encryptedCardNumber - * - * @param string|null $encryptedCardNumber The encrypted card number. - * - * @return self - */ - public function setEncryptedCardNumber($encryptedCardNumber) - { - if (is_null($encryptedCardNumber)) { - throw new \InvalidArgumentException('non-nullable encryptedCardNumber cannot be null'); - } - $this->container['encryptedCardNumber'] = $encryptedCardNumber; - - return $this; - } - - /** - * Gets encryptedExpiryMonth - * - * @return string|null - */ - public function getEncryptedExpiryMonth() - { - return $this->container['encryptedExpiryMonth']; - } - - /** - * Sets encryptedExpiryMonth - * - * @param string|null $encryptedExpiryMonth The encrypted card expiry month. - * - * @return self - */ - public function setEncryptedExpiryMonth($encryptedExpiryMonth) - { - if (is_null($encryptedExpiryMonth)) { - throw new \InvalidArgumentException('non-nullable encryptedExpiryMonth cannot be null'); - } - $this->container['encryptedExpiryMonth'] = $encryptedExpiryMonth; - - return $this; - } - - /** - * Gets encryptedExpiryYear - * - * @return string|null - */ - public function getEncryptedExpiryYear() - { - return $this->container['encryptedExpiryYear']; - } - - /** - * Sets encryptedExpiryYear - * - * @param string|null $encryptedExpiryYear The encrypted card expiry year. - * - * @return self - */ - public function setEncryptedExpiryYear($encryptedExpiryYear) - { - if (is_null($encryptedExpiryYear)) { - throw new \InvalidArgumentException('non-nullable encryptedExpiryYear cannot be null'); - } - $this->container['encryptedExpiryYear'] = $encryptedExpiryYear; - - return $this; - } - - /** - * Gets encryptedSecurityCode - * - * @return string|null - */ - public function getEncryptedSecurityCode() - { - return $this->container['encryptedSecurityCode']; - } - - /** - * Sets encryptedSecurityCode - * - * @param string|null $encryptedSecurityCode The encrypted card verification code. - * - * @return self - */ - public function setEncryptedSecurityCode($encryptedSecurityCode) - { - if (is_null($encryptedSecurityCode)) { - throw new \InvalidArgumentException('non-nullable encryptedSecurityCode cannot be null'); - } - $this->container['encryptedSecurityCode'] = $encryptedSecurityCode; - - return $this; - } - - /** - * Gets expiryMonth - * - * @return string|null - */ - public function getExpiryMonth() - { - return $this->container['expiryMonth']; - } - - /** - * Sets expiryMonth - * - * @param string|null $expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - * - * @return self - */ - public function setExpiryMonth($expiryMonth) - { - if (is_null($expiryMonth)) { - throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); - } - $this->container['expiryMonth'] = $expiryMonth; - - return $this; - } - - /** - * Gets expiryYear - * - * @return string|null - */ - public function getExpiryYear() - { - return $this->container['expiryYear']; - } - - /** - * Sets expiryYear - * - * @param string|null $expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - * - * @return self - */ - public function setExpiryYear($expiryYear) - { - if (is_null($expiryYear)) { - throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); - } - $this->container['expiryYear'] = $expiryYear; - - return $this; - } - - /** - * Gets networkPaymentReference - * - * @return string|null - */ - public function getNetworkPaymentReference() - { - return $this->container['networkPaymentReference']; - } - - /** - * Sets networkPaymentReference - * - * @param string|null $networkPaymentReference The network token reference. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. - * - * @return self - */ - public function setNetworkPaymentReference($networkPaymentReference) - { - if (is_null($networkPaymentReference)) { - throw new \InvalidArgumentException('non-nullable networkPaymentReference cannot be null'); - } - $this->container['networkPaymentReference'] = $networkPaymentReference; - - return $this; - } - - /** - * Gets number - * - * @return string|null - */ - public function getNumber() - { - return $this->container['number']; - } - - /** - * Sets number - * - * @param string|null $number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - * - * @return self - */ - public function setNumber($number) - { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } - $this->container['number'] = $number; - - return $this; - } - - /** - * Gets shopperNotificationReference - * - * @return string|null - */ - public function getShopperNotificationReference() - { - return $this->container['shopperNotificationReference']; - } - - /** - * Sets shopperNotificationReference - * - * @param string|null $shopperNotificationReference The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. - * - * @return self - */ - public function setShopperNotificationReference($shopperNotificationReference) - { - if (is_null($shopperNotificationReference)) { - throw new \InvalidArgumentException('non-nullable shopperNotificationReference cannot be null'); - } - $this->container['shopperNotificationReference'] = $shopperNotificationReference; - - return $this; - } - - /** - * Gets threeDS2SdkVersion - * - * @return string|null - */ - public function getThreeDS2SdkVersion() - { - return $this->container['threeDS2SdkVersion']; - } - - /** - * Sets threeDS2SdkVersion - * - * @param string|null $threeDS2SdkVersion Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - * - * @return self - */ - public function setThreeDS2SdkVersion($threeDS2SdkVersion) - { - if (is_null($threeDS2SdkVersion)) { - throw new \InvalidArgumentException('non-nullable threeDS2SdkVersion cannot be null'); - } - $this->container['threeDS2SdkVersion'] = $threeDS2SdkVersion; - - return $this; - } - - /** - * Gets firstName - * - * @return string - */ - public function getFirstName() - { - return $this->container['firstName']; - } - - /** - * Sets firstName - * - * @param string $firstName The shopper's first name. - * - * @return self - */ - public function setFirstName($firstName) - { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } - $this->container['firstName'] = $firstName; - - return $this; - } - - /** - * Gets lastName - * - * @return string - */ - public function getLastName() - { - return $this->container['lastName']; - } - - /** - * Sets lastName - * - * @param string $lastName The shopper's last name. - * - * @return self - */ - public function setLastName($lastName) - { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } - $this->container['lastName'] = $lastName; - - return $this; - } - - /** - * Gets shopperEmail - * - * @return string - */ - public function getShopperEmail() - { - return $this->container['shopperEmail']; - } - - /** - * Sets shopperEmail - * - * @param string $shopperEmail - * - * @return self - */ - public function setShopperEmail($shopperEmail) - { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } - $this->container['shopperEmail'] = $shopperEmail; - - return $this; - } - - /** - * Gets telephoneNumber - * - * @return string - */ - public function getTelephoneNumber() - { - return $this->container['telephoneNumber']; - } - - /** - * Sets telephoneNumber - * - * @param string $telephoneNumber - * - * @return self - */ - public function setTelephoneNumber($telephoneNumber) - { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } - $this->container['telephoneNumber'] = $telephoneNumber; - - return $this; - } - - /** - * Gets googlePayToken - * - * @return string - */ - public function getGooglePayToken() - { - return $this->container['googlePayToken']; - } - - /** - * Sets googlePayToken - * - * @param string $googlePayToken The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. - * - * @return self - */ - public function setGooglePayToken($googlePayToken) - { - if (is_null($googlePayToken)) { - throw new \InvalidArgumentException('non-nullable googlePayToken cannot be null'); + if (is_null($expiryMonth)) { + throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); } - $this->container['googlePayToken'] = $googlePayToken; + $this->container['expiryMonth'] = $expiryMonth; return $this; } /** - * Gets subtype + * Gets expiryYear * * @return string|null */ - public function getSubtype() - { - return $this->container['subtype']; - } - - /** - * Sets subtype - * - * @param string|null $subtype The type of flow to initiate. - * - * @return self - */ - public function setSubtype($subtype) - { - if (is_null($subtype)) { - throw new \InvalidArgumentException('non-nullable subtype cannot be null'); - } - $this->container['subtype'] = $subtype; - - return $this; - } - - /** - * Gets masterpassTransactionId - * - * @return string - */ - public function getMasterpassTransactionId() + public function getExpiryYear() { - return $this->container['masterpassTransactionId']; + return $this->container['expiryYear']; } /** - * Sets masterpassTransactionId + * Sets expiryYear * - * @param string $masterpassTransactionId The Masterpass transaction ID. + * @param string|null $expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). * * @return self */ - public function setMasterpassTransactionId($masterpassTransactionId) + public function setExpiryYear($expiryYear) { - if (is_null($masterpassTransactionId)) { - throw new \InvalidArgumentException('non-nullable masterpassTransactionId cannot be null'); + if (is_null($expiryYear)) { + throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); } - $this->container['masterpassTransactionId'] = $masterpassTransactionId; + $this->container['expiryYear'] = $expiryYear; return $this; } /** - * Gets orderID + * Gets holderName * * @return string|null */ - public function getOrderID() + public function getHolderName() { - return $this->container['orderID']; + return $this->container['holderName']; } /** - * Sets orderID + * Sets holderName * - * @param string|null $orderID The unique ID associated with the order. + * @param string|null $holderName The name of the card holder. * * @return self */ - public function setOrderID($orderID) + public function setHolderName($holderName) { - if (is_null($orderID)) { - throw new \InvalidArgumentException('non-nullable orderID cannot be null'); + if (is_null($holderName)) { + throw new \InvalidArgumentException('non-nullable holderName cannot be null'); } - $this->container['orderID'] = $orderID; + $this->container['holderName'] = $holderName; return $this; } /** - * Gets payeePreferred + * Gets networkPaymentReference * * @return string|null */ - public function getPayeePreferred() + public function getNetworkPaymentReference() { - return $this->container['payeePreferred']; + return $this->container['networkPaymentReference']; } /** - * Sets payeePreferred + * Sets networkPaymentReference * - * @param string|null $payeePreferred IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED + * @param string|null $networkPaymentReference The network token reference. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. * * @return self */ - public function setPayeePreferred($payeePreferred) + public function setNetworkPaymentReference($networkPaymentReference) { - if (is_null($payeePreferred)) { - throw new \InvalidArgumentException('non-nullable payeePreferred cannot be null'); + if (is_null($networkPaymentReference)) { + throw new \InvalidArgumentException('non-nullable networkPaymentReference cannot be null'); } - $this->container['payeePreferred'] = $payeePreferred; + $this->container['networkPaymentReference'] = $networkPaymentReference; return $this; } /** - * Gets payerID + * Gets number * * @return string|null */ - public function getPayerID() + public function getNumber() { - return $this->container['payerID']; + return $this->container['number']; } /** - * Sets payerID + * Sets number * - * @param string|null $payerID The unique ID associated with the payer. + * @param string|null $number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). * * @return self */ - public function setPayerID($payerID) + public function setNumber($number) { - if (is_null($payerID)) { - throw new \InvalidArgumentException('non-nullable payerID cannot be null'); + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); } - $this->container['payerID'] = $payerID; + $this->container['number'] = $number; return $this; } /** - * Gets payerSelected + * Gets shopperNotificationReference * * @return string|null */ - public function getPayerSelected() + public function getShopperNotificationReference() { - return $this->container['payerSelected']; + return $this->container['shopperNotificationReference']; } /** - * Sets payerSelected + * Sets shopperNotificationReference * - * @param string|null $payerSelected PAYPAL or PAYPAL_CREDIT + * @param string|null $shopperNotificationReference The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. * * @return self */ - public function setPayerSelected($payerSelected) + public function setShopperNotificationReference($shopperNotificationReference) { - if (is_null($payerSelected)) { - throw new \InvalidArgumentException('non-nullable payerSelected cannot be null'); + if (is_null($shopperNotificationReference)) { + throw new \InvalidArgumentException('non-nullable shopperNotificationReference cannot be null'); } - $this->container['payerSelected'] = $payerSelected; + $this->container['shopperNotificationReference'] = $shopperNotificationReference; return $this; } /** - * Gets virtualPaymentAddress + * Gets threeDS2SdkVersion * * @return string|null */ - public function getVirtualPaymentAddress() - { - return $this->container['virtualPaymentAddress']; - } - - /** - * Sets virtualPaymentAddress - * - * @param string|null $virtualPaymentAddress The virtual payment address for UPI. - * - * @return self - */ - public function setVirtualPaymentAddress($virtualPaymentAddress) - { - if (is_null($virtualPaymentAddress)) { - throw new \InvalidArgumentException('non-nullable virtualPaymentAddress cannot be null'); - } - $this->container['virtualPaymentAddress'] = $virtualPaymentAddress; - - return $this; - } - - /** - * Gets samsungPayToken - * - * @return string - */ - public function getSamsungPayToken() - { - return $this->container['samsungPayToken']; - } - - /** - * Sets samsungPayToken - * - * @param string $samsungPayToken The payload you received from the Samsung Pay SDK response. - * - * @return self - */ - public function setSamsungPayToken($samsungPayToken) - { - if (is_null($samsungPayToken)) { - throw new \InvalidArgumentException('non-nullable samsungPayToken cannot be null'); - } - $this->container['samsungPayToken'] = $samsungPayToken; - - return $this; - } - - /** - * Gets iban - * - * @return string - */ - public function getIban() + public function getThreeDS2SdkVersion() { - return $this->container['iban']; + return $this->container['threeDS2SdkVersion']; } /** - * Sets iban + * Sets threeDS2SdkVersion * - * @param string $iban The International Bank Account Number (IBAN). + * @param string|null $threeDS2SdkVersion Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. * * @return self */ - public function setIban($iban) + public function setThreeDS2SdkVersion($threeDS2SdkVersion) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); + if (is_null($threeDS2SdkVersion)) { + throw new \InvalidArgumentException('non-nullable threeDS2SdkVersion cannot be null'); } - $this->container['iban'] = $iban; + $this->container['threeDS2SdkVersion'] = $threeDS2SdkVersion; return $this; } /** - * Gets billingSequenceNumber + * Gets googlePayToken * * @return string */ - public function getBillingSequenceNumber() + public function getGooglePayToken() { - return $this->container['billingSequenceNumber']; + return $this->container['googlePayToken']; } /** - * Sets billingSequenceNumber + * Sets googlePayToken * - * @param string $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * @param string $googlePayToken The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. * * @return self */ - public function setBillingSequenceNumber($billingSequenceNumber) + public function setGooglePayToken($googlePayToken) { - if (is_null($billingSequenceNumber)) { - throw new \InvalidArgumentException('non-nullable billingSequenceNumber cannot be null'); + if (is_null($googlePayToken)) { + throw new \InvalidArgumentException('non-nullable googlePayToken cannot be null'); } - $this->container['billingSequenceNumber'] = $billingSequenceNumber; + $this->container['googlePayToken'] = $googlePayToken; return $this; } /** - * Gets visaCheckoutCallId + * Gets issuer * * @return string */ - public function getVisaCheckoutCallId() - { - return $this->container['visaCheckoutCallId']; - } - - /** - * Sets visaCheckoutCallId - * - * @param string $visaCheckoutCallId The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID. - * - * @return self - */ - public function setVisaCheckoutCallId($visaCheckoutCallId) - { - if (is_null($visaCheckoutCallId)) { - throw new \InvalidArgumentException('non-nullable visaCheckoutCallId cannot be null'); - } - $this->container['visaCheckoutCallId'] = $visaCheckoutCallId; - - return $this; - } - - /** - * Gets appId - * - * @return string|null - */ - public function getAppId() - { - return $this->container['appId']; - } - - /** - * Sets appId - * - * @param string|null $appId appId - * - * @return self - */ - public function setAppId($appId) - { - if (is_null($appId)) { - throw new \InvalidArgumentException('non-nullable appId cannot be null'); - } - $this->container['appId'] = $appId; - - return $this; - } - - /** - * Gets openid - * - * @return string|null - */ - public function getOpenid() - { - return $this->container['openid']; - } - - /** - * Sets openid - * - * @param string|null $openid openid - * - * @return self - */ - public function setOpenid($openid) - { - if (is_null($openid)) { - throw new \InvalidArgumentException('non-nullable openid cannot be null'); - } - $this->container['openid'] = $openid; - - return $this; - } - - /** - * Gets clickAndCollect - * - * @return string|null - */ - public function getClickAndCollect() + public function getIssuer() { - return $this->container['clickAndCollect']; + return $this->container['issuer']; } /** - * Sets clickAndCollect + * Sets issuer * - * @param string|null $clickAndCollect Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them. + * @param string $issuer The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. * * @return self */ - public function setClickAndCollect($clickAndCollect) + public function setIssuer($issuer) { - if (is_null($clickAndCollect)) { - throw new \InvalidArgumentException('non-nullable clickAndCollect cannot be null'); + if (is_null($issuer)) { + throw new \InvalidArgumentException('non-nullable issuer cannot be null'); } - $this->container['clickAndCollect'] = $clickAndCollect; + $this->container['issuer'] = $issuer; return $this; } diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index faaa4cc9b..83b32294b 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -51,7 +51,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', 'blockedPaymentMethods' => 'string[]', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -59,7 +59,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'enableOneClick' => 'bool', 'enablePayOut' => 'bool', 'enableRecurring' => 'bool', @@ -960,7 +960,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -970,7 +970,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1184,7 +1184,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1194,7 +1194,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 5927126c1..b71d1e6a9 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -51,7 +51,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', 'blockedPaymentMethods' => 'string[]', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -59,7 +59,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'enableOneClick' => 'bool', 'enablePayOut' => 'bool', 'enableRecurring' => 'bool', @@ -1010,7 +1010,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -1020,7 +1020,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1234,7 +1234,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1244,7 +1244,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ diff --git a/src/Adyen/Model/Checkout/DeliveryAddress.php b/src/Adyen/Model/Checkout/DeliveryAddress.php new file mode 100644 index 000000000..079dc1f63 --- /dev/null +++ b/src/Adyen/Model/Checkout/DeliveryAddress.php @@ -0,0 +1,637 @@ + + */ +class DeliveryAddress implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DeliveryAddress'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => 'string', + 'firstName' => 'string', + 'houseNumberOrName' => 'string', + 'lastName' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string', + 'street' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'country' => null, + 'firstName' => null, + 'houseNumberOrName' => null, + 'lastName' => null, + 'postalCode' => null, + 'stateOrProvince' => null, + 'street' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => false, + 'firstName' => false, + 'houseNumberOrName' => false, + 'lastName' => false, + 'postalCode' => false, + 'stateOrProvince' => false, + 'street' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'city' => 'city', + 'country' => 'country', + 'firstName' => 'firstName', + 'houseNumberOrName' => 'houseNumberOrName', + 'lastName' => 'lastName', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince', + 'street' => 'street' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'firstName' => 'setFirstName', + 'houseNumberOrName' => 'setHouseNumberOrName', + 'lastName' => 'setLastName', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince', + 'street' => 'setStreet' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + 'firstName' => 'getFirstName', + 'houseNumberOrName' => 'getHouseNumberOrName', + 'lastName' => 'getLastName', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince', + 'street' => 'getStreet' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('firstName', $data ?? [], null); + $this->setIfExists('houseNumberOrName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $data ?? [], null); + $this->setIfExists('street', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + if ($this->container['houseNumberOrName'] === null) { + $invalidProperties[] = "'houseNumberOrName' can't be null"; + } + if ($this->container['postalCode'] === null) { + $invalidProperties[] = "'postalCode' can't be null"; + } + if ($this->container['street'] === null) { + $invalidProperties[] = "'street' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets city + * + * @return string + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city The name of the city. Maximum length: 3000 characters. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets firstName + * + * @return string|null + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName firstName + * + * @return self + */ + public function setFirstName($firstName) + { + if (is_null($firstName)) { + throw new \InvalidArgumentException('non-nullable firstName cannot be null'); + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets houseNumberOrName + * + * @return string + */ + public function getHouseNumberOrName() + { + return $this->container['houseNumberOrName']; + } + + /** + * Sets houseNumberOrName + * + * @param string $houseNumberOrName The number or name of the house. Maximum length: 3000 characters. + * + * @return self + */ + public function setHouseNumberOrName($houseNumberOrName) + { + if (is_null($houseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); + } + $this->container['houseNumberOrName'] = $houseNumberOrName; + + return $this; + } + + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName lastName + * + * @return self + */ + public function setLastName($lastName) + { + if (is_null($lastName)) { + throw new \InvalidArgumentException('non-nullable lastName cannot be null'); + } + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets postalCode + * + * @return string + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string $postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince + * + * @return string|null + */ + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + return $this; + } + + /** + * Gets street + * + * @return string + */ + public function getStreet() + { + return $this->container['street']; + } + + /** + * Sets street + * + * @param string $street The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + * + * @return self + */ + public function setStreet($street) + { + if (is_null($street)) { + throw new \InvalidArgumentException('non-nullable street cannot be null'); + } + $this->container['street'] = $street; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/DokuDetails.php b/src/Adyen/Model/Checkout/DokuDetails.php index ee312f037..380af0987 100644 --- a/src/Adyen/Model/Checkout/DokuDetails.php +++ b/src/Adyen/Model/Checkout/DokuDetails.php @@ -248,6 +248,8 @@ public function getModelName() public const TYPE_BCA_VA = 'doku_bca_va'; public const TYPE_ALFAMART = 'doku_alfamart'; public const TYPE_INDOMARET = 'doku_indomaret'; + public const TYPE_WALLET = 'doku_wallet'; + public const TYPE_OVO = 'doku_ovo'; /** * Gets allowable values of the enum @@ -266,6 +268,8 @@ public function getTypeAllowableValues() self::TYPE_BCA_VA, self::TYPE_ALFAMART, self::TYPE_INDOMARET, + self::TYPE_WALLET, + self::TYPE_OVO, ]; } /** diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index 566e4c719..c73b846de 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -47,10 +47,12 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo', 'additionalAmount' => '\Adyen\Model\Checkout\Amount', 'additionalData' => 'array', + 'allowedPaymentMethods' => 'string[]', 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', + 'blockedPaymentMethods' => 'string[]', 'browserInfo' => '\Adyen\Model\Checkout\BrowserInfo', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -61,7 +63,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'dateOfBirth' => '\DateTime', 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'deliveryDate' => '\DateTime', 'deviceFingerprint' => 'string', 'donationAccount' => 'string', @@ -74,6 +76,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'fraudOffset' => 'int', 'fundOrigin' => '\Adyen\Model\Checkout\FundOrigin', 'fundRecipient' => '\Adyen\Model\Checkout\FundRecipient', + 'fundingSource' => 'string', 'industryUsage' => 'string', 'installments' => '\Adyen\Model\Checkout\Installments', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', @@ -98,6 +101,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'reference' => 'string', 'returnUrl' => 'string', 'riskData' => '\Adyen\Model\Checkout\RiskData', + 'selectedRecurringDetailReference' => 'string', 'sessionValidity' => 'string', 'shopperEmail' => 'string', 'shopperIP' => 'string', @@ -127,10 +131,12 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'accountInfo' => null, 'additionalAmount' => null, 'additionalData' => null, + 'allowedPaymentMethods' => null, 'amount' => null, 'applicationInfo' => null, 'authenticationData' => null, 'billingAddress' => null, + 'blockedPaymentMethods' => null, 'browserInfo' => null, 'captureDelayHours' => 'int32', 'channel' => null, @@ -154,6 +160,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'fraudOffset' => 'int32', 'fundOrigin' => null, 'fundRecipient' => null, + 'fundingSource' => null, 'industryUsage' => null, 'installments' => null, 'lineItems' => null, @@ -178,6 +185,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'reference' => null, 'returnUrl' => null, 'riskData' => null, + 'selectedRecurringDetailReference' => null, 'sessionValidity' => null, 'shopperEmail' => null, 'shopperIP' => null, @@ -205,10 +213,12 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'accountInfo' => false, 'additionalAmount' => false, 'additionalData' => false, + 'allowedPaymentMethods' => false, 'amount' => false, 'applicationInfo' => false, 'authenticationData' => false, 'billingAddress' => false, + 'blockedPaymentMethods' => false, 'browserInfo' => false, 'captureDelayHours' => true, 'channel' => false, @@ -232,6 +242,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'fraudOffset' => true, 'fundOrigin' => false, 'fundRecipient' => false, + 'fundingSource' => false, 'industryUsage' => false, 'installments' => false, 'lineItems' => false, @@ -256,6 +267,7 @@ class DonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerial 'reference' => false, 'returnUrl' => false, 'riskData' => false, + 'selectedRecurringDetailReference' => false, 'sessionValidity' => false, 'shopperEmail' => false, 'shopperIP' => false, @@ -363,10 +375,12 @@ public function isNullableSetToNull(string $property): bool 'accountInfo' => 'accountInfo', 'additionalAmount' => 'additionalAmount', 'additionalData' => 'additionalData', + 'allowedPaymentMethods' => 'allowedPaymentMethods', 'amount' => 'amount', 'applicationInfo' => 'applicationInfo', 'authenticationData' => 'authenticationData', 'billingAddress' => 'billingAddress', + 'blockedPaymentMethods' => 'blockedPaymentMethods', 'browserInfo' => 'browserInfo', 'captureDelayHours' => 'captureDelayHours', 'channel' => 'channel', @@ -390,6 +404,7 @@ public function isNullableSetToNull(string $property): bool 'fraudOffset' => 'fraudOffset', 'fundOrigin' => 'fundOrigin', 'fundRecipient' => 'fundRecipient', + 'fundingSource' => 'fundingSource', 'industryUsage' => 'industryUsage', 'installments' => 'installments', 'lineItems' => 'lineItems', @@ -414,6 +429,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'reference', 'returnUrl' => 'returnUrl', 'riskData' => 'riskData', + 'selectedRecurringDetailReference' => 'selectedRecurringDetailReference', 'sessionValidity' => 'sessionValidity', 'shopperEmail' => 'shopperEmail', 'shopperIP' => 'shopperIP', @@ -441,10 +457,12 @@ public function isNullableSetToNull(string $property): bool 'accountInfo' => 'setAccountInfo', 'additionalAmount' => 'setAdditionalAmount', 'additionalData' => 'setAdditionalData', + 'allowedPaymentMethods' => 'setAllowedPaymentMethods', 'amount' => 'setAmount', 'applicationInfo' => 'setApplicationInfo', 'authenticationData' => 'setAuthenticationData', 'billingAddress' => 'setBillingAddress', + 'blockedPaymentMethods' => 'setBlockedPaymentMethods', 'browserInfo' => 'setBrowserInfo', 'captureDelayHours' => 'setCaptureDelayHours', 'channel' => 'setChannel', @@ -468,6 +486,7 @@ public function isNullableSetToNull(string $property): bool 'fraudOffset' => 'setFraudOffset', 'fundOrigin' => 'setFundOrigin', 'fundRecipient' => 'setFundRecipient', + 'fundingSource' => 'setFundingSource', 'industryUsage' => 'setIndustryUsage', 'installments' => 'setInstallments', 'lineItems' => 'setLineItems', @@ -492,6 +511,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'setReference', 'returnUrl' => 'setReturnUrl', 'riskData' => 'setRiskData', + 'selectedRecurringDetailReference' => 'setSelectedRecurringDetailReference', 'sessionValidity' => 'setSessionValidity', 'shopperEmail' => 'setShopperEmail', 'shopperIP' => 'setShopperIP', @@ -519,10 +539,12 @@ public function isNullableSetToNull(string $property): bool 'accountInfo' => 'getAccountInfo', 'additionalAmount' => 'getAdditionalAmount', 'additionalData' => 'getAdditionalData', + 'allowedPaymentMethods' => 'getAllowedPaymentMethods', 'amount' => 'getAmount', 'applicationInfo' => 'getApplicationInfo', 'authenticationData' => 'getAuthenticationData', 'billingAddress' => 'getBillingAddress', + 'blockedPaymentMethods' => 'getBlockedPaymentMethods', 'browserInfo' => 'getBrowserInfo', 'captureDelayHours' => 'getCaptureDelayHours', 'channel' => 'getChannel', @@ -546,6 +568,7 @@ public function isNullableSetToNull(string $property): bool 'fraudOffset' => 'getFraudOffset', 'fundOrigin' => 'getFundOrigin', 'fundRecipient' => 'getFundRecipient', + 'fundingSource' => 'getFundingSource', 'industryUsage' => 'getIndustryUsage', 'installments' => 'getInstallments', 'lineItems' => 'getLineItems', @@ -570,6 +593,7 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'getReference', 'returnUrl' => 'getReturnUrl', 'riskData' => 'getRiskData', + 'selectedRecurringDetailReference' => 'getSelectedRecurringDetailReference', 'sessionValidity' => 'getSessionValidity', 'shopperEmail' => 'getShopperEmail', 'shopperIP' => 'getShopperIP', @@ -634,6 +658,7 @@ public function getModelName() public const CHANNEL_WEB = 'Web'; public const ENTITY_TYPE_NATURAL_PERSON = 'NaturalPerson'; public const ENTITY_TYPE_COMPANY_NAME = 'CompanyName'; + public const FUNDING_SOURCE_DEBIT = 'debit'; public const INDUSTRY_USAGE_DELAYED_CHARGE = 'delayedCharge'; public const INDUSTRY_USAGE_INSTALLMENT = 'installment'; public const INDUSTRY_USAGE_NO_SHOW = 'noShow'; @@ -670,6 +695,17 @@ public function getEntityTypeAllowableValues() self::ENTITY_TYPE_COMPANY_NAME, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_DEBIT, + ]; + } /** * Gets allowable values of the enum * @@ -728,10 +764,12 @@ public function __construct(array $data = null) $this->setIfExists('accountInfo', $data ?? [], null); $this->setIfExists('additionalAmount', $data ?? [], null); $this->setIfExists('additionalData', $data ?? [], null); + $this->setIfExists('allowedPaymentMethods', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('applicationInfo', $data ?? [], null); $this->setIfExists('authenticationData', $data ?? [], null); $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('blockedPaymentMethods', $data ?? [], null); $this->setIfExists('browserInfo', $data ?? [], null); $this->setIfExists('captureDelayHours', $data ?? [], null); $this->setIfExists('channel', $data ?? [], null); @@ -755,6 +793,7 @@ public function __construct(array $data = null) $this->setIfExists('fraudOffset', $data ?? [], null); $this->setIfExists('fundOrigin', $data ?? [], null); $this->setIfExists('fundRecipient', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('industryUsage', $data ?? [], null); $this->setIfExists('installments', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); @@ -779,6 +818,7 @@ public function __construct(array $data = null) $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('returnUrl', $data ?? [], null); $this->setIfExists('riskData', $data ?? [], null); + $this->setIfExists('selectedRecurringDetailReference', $data ?? [], null); $this->setIfExists('sessionValidity', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('shopperIP', $data ?? [], null); @@ -848,6 +888,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!is_null($this->container['fundingSource']) && !in_array($this->container['fundingSource'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'fundingSource', must be one of '%s'", + $this->container['fundingSource'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getIndustryUsageAllowableValues(); if (!is_null($this->container['industryUsage']) && !in_array($this->container['industryUsage'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -983,6 +1032,33 @@ public function setAdditionalData($additionalData) return $this; } + /** + * Gets allowedPaymentMethods + * + * @return string[]|null + */ + public function getAllowedPaymentMethods() + { + return $this->container['allowedPaymentMethods']; + } + + /** + * Sets allowedPaymentMethods + * + * @param string[]|null $allowedPaymentMethods List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` + * + * @return self + */ + public function setAllowedPaymentMethods($allowedPaymentMethods) + { + if (is_null($allowedPaymentMethods)) { + throw new \InvalidArgumentException('non-nullable allowedPaymentMethods cannot be null'); + } + $this->container['allowedPaymentMethods'] = $allowedPaymentMethods; + + return $this; + } + /** * Gets amount * @@ -1067,7 +1143,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -1077,7 +1153,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1091,6 +1167,33 @@ public function setBillingAddress($billingAddress) return $this; } + /** + * Gets blockedPaymentMethods + * + * @return string[]|null + */ + public function getBlockedPaymentMethods() + { + return $this->container['blockedPaymentMethods']; + } + + /** + * Sets blockedPaymentMethods + * + * @param string[]|null $blockedPaymentMethods List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` + * + * @return self + */ + public function setBlockedPaymentMethods($blockedPaymentMethods) + { + if (is_null($blockedPaymentMethods)) { + throw new \InvalidArgumentException('non-nullable blockedPaymentMethods cannot be null'); + } + $this->container['blockedPaymentMethods'] = $blockedPaymentMethods; + + return $this; + } + /** * Gets browserInfo * @@ -1374,7 +1477,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1384,7 +1487,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ @@ -1402,7 +1505,6 @@ public function setDeliveryAddress($deliveryAddress) * Gets deliveryDate * * @return \DateTime|null - * @deprecated */ public function getDeliveryDate() { @@ -1415,7 +1517,6 @@ public function getDeliveryDate() * @param \DateTime|null $deliveryDate The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 * * @return self - * @deprecated */ public function setDeliveryDate($deliveryDate) { @@ -1732,6 +1833,43 @@ public function setFundRecipient($fundRecipient) return $this; } + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $allowedValues = $this->getFundingSourceAllowableValues(); + if (!in_array($fundingSource, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'fundingSource', must be one of '%s'", + $fundingSource, + implode("', '", $allowedValues) + ) + ); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + /** * Gets industryUsage * @@ -2400,6 +2538,33 @@ public function setRiskData($riskData) return $this; } + /** + * Gets selectedRecurringDetailReference + * + * @return string|null + */ + public function getSelectedRecurringDetailReference() + { + return $this->container['selectedRecurringDetailReference']; + } + + /** + * Sets selectedRecurringDetailReference + * + * @param string|null $selectedRecurringDetailReference The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. + * + * @return self + */ + public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) + { + if (is_null($selectedRecurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); + } + $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; + + return $this; + } + /** * Gets sessionValidity * diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index 7d6e6d4b7..6b00a2254 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -50,7 +50,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\BillingAddress', 'browserInfo' => '\Adyen\Model\Checkout\BrowserInfo', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -61,7 +61,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'dateOfBirth' => '\DateTime', 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\DeliveryAddress', 'deliveryDate' => '\DateTime', 'deviceFingerprint' => 'string', 'enableOneClick' => 'bool', @@ -85,7 +85,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'order' => '\Adyen\Model\Checkout\EncryptedOrderData', 'orderReference' => 'string', 'origin' => 'string', - 'paymentMethod' => '\Adyen\Model\Checkout\CheckoutPaymentMethod', + 'paymentMethod' => '\Adyen\Model\Checkout\PaymentRequestPaymentMethod', 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', 'recurringExpiry' => 'string', 'recurringFrequency' => 'string', @@ -1043,7 +1043,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getBillingAddress() { @@ -1053,7 +1053,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\BillingAddress|null $billingAddress billingAddress * * @return self */ @@ -1350,7 +1350,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\DeliveryAddress|null */ public function getDeliveryAddress() { @@ -1360,7 +1360,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\DeliveryAddress|null $deliveryAddress deliveryAddress * * @return self */ @@ -2018,7 +2018,7 @@ public function setOrigin($origin) /** * Gets paymentMethod * - * @return \Adyen\Model\Checkout\CheckoutPaymentMethod + * @return \Adyen\Model\Checkout\PaymentRequestPaymentMethod */ public function getPaymentMethod() { @@ -2028,7 +2028,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Adyen\Model\Checkout\CheckoutPaymentMethod $paymentMethod paymentMethod + * @param \Adyen\Model\Checkout\PaymentRequestPaymentMethod $paymentMethod paymentMethod * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentRequestPaymentMethod.php b/src/Adyen/Model/Checkout/PaymentRequestPaymentMethod.php new file mode 100644 index 000000000..a2a4f740c --- /dev/null +++ b/src/Adyen/Model/Checkout/PaymentRequestPaymentMethod.php @@ -0,0 +1,2171 @@ + + */ +class PaymentRequestPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentRequest_paymentMethod'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'bankAccountNumber' => 'string', + 'bankAccountType' => 'string', + 'bankLocationId' => 'string', + 'checkoutAttemptId' => 'string', + 'encryptedBankAccountNumber' => 'string', + 'encryptedBankLocationId' => 'string', + 'ownerName' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string', + 'billingAddress' => 'string', + 'deliveryAddress' => 'string', + 'personalDetails' => 'string', + 'amazonPayToken' => 'string', + 'checkoutSessionId' => 'string', + 'applePayToken' => 'string', + 'fundingSource' => 'string', + 'holderName' => 'string', + 'issuer' => 'string', + 'blikCode' => 'string', + 'brand' => 'string', + 'cupsecureplusSmscode' => 'string', + 'cvc' => 'string', + 'encryptedCardNumber' => 'string', + 'encryptedExpiryMonth' => 'string', + 'encryptedExpiryYear' => 'string', + 'encryptedSecurityCode' => 'string', + 'expiryMonth' => 'string', + 'expiryYear' => 'string', + 'networkPaymentReference' => 'string', + 'number' => 'string', + 'shopperNotificationReference' => 'string', + 'threeDS2SdkVersion' => 'string', + 'firstName' => 'string', + 'lastName' => 'string', + 'shopperEmail' => 'string', + 'telephoneNumber' => 'string', + 'googlePayToken' => 'string', + 'subtype' => 'string', + 'masterpassTransactionId' => 'string', + 'orderID' => 'string', + 'payeePreferred' => 'string', + 'payerID' => 'string', + 'payerSelected' => 'string', + 'virtualPaymentAddress' => 'string', + 'samsungPayToken' => 'string', + 'iban' => 'string', + 'billingSequenceNumber' => 'string', + 'visaCheckoutCallId' => 'string', + 'appId' => 'string', + 'openid' => 'string', + 'clickAndCollect' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'bankAccountNumber' => null, + 'bankAccountType' => null, + 'bankLocationId' => null, + 'checkoutAttemptId' => null, + 'encryptedBankAccountNumber' => null, + 'encryptedBankLocationId' => null, + 'ownerName' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null, + 'billingAddress' => null, + 'deliveryAddress' => null, + 'personalDetails' => null, + 'amazonPayToken' => null, + 'checkoutSessionId' => null, + 'applePayToken' => null, + 'fundingSource' => null, + 'holderName' => null, + 'issuer' => null, + 'blikCode' => null, + 'brand' => null, + 'cupsecureplusSmscode' => null, + 'cvc' => null, + 'encryptedCardNumber' => null, + 'encryptedExpiryMonth' => null, + 'encryptedExpiryYear' => null, + 'encryptedSecurityCode' => null, + 'expiryMonth' => null, + 'expiryYear' => null, + 'networkPaymentReference' => null, + 'number' => null, + 'shopperNotificationReference' => null, + 'threeDS2SdkVersion' => null, + 'firstName' => null, + 'lastName' => null, + 'shopperEmail' => null, + 'telephoneNumber' => null, + 'googlePayToken' => null, + 'subtype' => null, + 'masterpassTransactionId' => null, + 'orderID' => null, + 'payeePreferred' => null, + 'payerID' => null, + 'payerSelected' => null, + 'virtualPaymentAddress' => null, + 'samsungPayToken' => null, + 'iban' => null, + 'billingSequenceNumber' => null, + 'visaCheckoutCallId' => null, + 'appId' => null, + 'openid' => null, + 'clickAndCollect' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'bankAccountNumber' => false, + 'bankAccountType' => false, + 'bankLocationId' => false, + 'checkoutAttemptId' => false, + 'encryptedBankAccountNumber' => false, + 'encryptedBankLocationId' => false, + 'ownerName' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false, + 'billingAddress' => false, + 'deliveryAddress' => false, + 'personalDetails' => false, + 'amazonPayToken' => false, + 'checkoutSessionId' => false, + 'applePayToken' => false, + 'fundingSource' => false, + 'holderName' => false, + 'issuer' => false, + 'blikCode' => false, + 'brand' => false, + 'cupsecureplusSmscode' => false, + 'cvc' => false, + 'encryptedCardNumber' => false, + 'encryptedExpiryMonth' => false, + 'encryptedExpiryYear' => false, + 'encryptedSecurityCode' => false, + 'expiryMonth' => false, + 'expiryYear' => false, + 'networkPaymentReference' => false, + 'number' => false, + 'shopperNotificationReference' => false, + 'threeDS2SdkVersion' => false, + 'firstName' => false, + 'lastName' => false, + 'shopperEmail' => false, + 'telephoneNumber' => false, + 'googlePayToken' => false, + 'subtype' => false, + 'masterpassTransactionId' => false, + 'orderID' => false, + 'payeePreferred' => false, + 'payerID' => false, + 'payerSelected' => false, + 'virtualPaymentAddress' => false, + 'samsungPayToken' => false, + 'iban' => false, + 'billingSequenceNumber' => false, + 'visaCheckoutCallId' => false, + 'appId' => false, + 'openid' => false, + 'clickAndCollect' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'bankAccountNumber' => 'bankAccountNumber', + 'bankAccountType' => 'bankAccountType', + 'bankLocationId' => 'bankLocationId', + 'checkoutAttemptId' => 'checkoutAttemptId', + 'encryptedBankAccountNumber' => 'encryptedBankAccountNumber', + 'encryptedBankLocationId' => 'encryptedBankLocationId', + 'ownerName' => 'ownerName', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type', + 'billingAddress' => 'billingAddress', + 'deliveryAddress' => 'deliveryAddress', + 'personalDetails' => 'personalDetails', + 'amazonPayToken' => 'amazonPayToken', + 'checkoutSessionId' => 'checkoutSessionId', + 'applePayToken' => 'applePayToken', + 'fundingSource' => 'fundingSource', + 'holderName' => 'holderName', + 'issuer' => 'issuer', + 'blikCode' => 'blikCode', + 'brand' => 'brand', + 'cupsecureplusSmscode' => 'cupsecureplus.smscode', + 'cvc' => 'cvc', + 'encryptedCardNumber' => 'encryptedCardNumber', + 'encryptedExpiryMonth' => 'encryptedExpiryMonth', + 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedSecurityCode' => 'encryptedSecurityCode', + 'expiryMonth' => 'expiryMonth', + 'expiryYear' => 'expiryYear', + 'networkPaymentReference' => 'networkPaymentReference', + 'number' => 'number', + 'shopperNotificationReference' => 'shopperNotificationReference', + 'threeDS2SdkVersion' => 'threeDS2SdkVersion', + 'firstName' => 'firstName', + 'lastName' => 'lastName', + 'shopperEmail' => 'shopperEmail', + 'telephoneNumber' => 'telephoneNumber', + 'googlePayToken' => 'googlePayToken', + 'subtype' => 'subtype', + 'masterpassTransactionId' => 'masterpassTransactionId', + 'orderID' => 'orderID', + 'payeePreferred' => 'payeePreferred', + 'payerID' => 'payerID', + 'payerSelected' => 'payerSelected', + 'virtualPaymentAddress' => 'virtualPaymentAddress', + 'samsungPayToken' => 'samsungPayToken', + 'iban' => 'iban', + 'billingSequenceNumber' => 'billingSequenceNumber', + 'visaCheckoutCallId' => 'visaCheckoutCallId', + 'appId' => 'appId', + 'openid' => 'openid', + 'clickAndCollect' => 'clickAndCollect' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'bankAccountNumber' => 'setBankAccountNumber', + 'bankAccountType' => 'setBankAccountType', + 'bankLocationId' => 'setBankLocationId', + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'encryptedBankAccountNumber' => 'setEncryptedBankAccountNumber', + 'encryptedBankLocationId' => 'setEncryptedBankLocationId', + 'ownerName' => 'setOwnerName', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType', + 'billingAddress' => 'setBillingAddress', + 'deliveryAddress' => 'setDeliveryAddress', + 'personalDetails' => 'setPersonalDetails', + 'amazonPayToken' => 'setAmazonPayToken', + 'checkoutSessionId' => 'setCheckoutSessionId', + 'applePayToken' => 'setApplePayToken', + 'fundingSource' => 'setFundingSource', + 'holderName' => 'setHolderName', + 'issuer' => 'setIssuer', + 'blikCode' => 'setBlikCode', + 'brand' => 'setBrand', + 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', + 'cvc' => 'setCvc', + 'encryptedCardNumber' => 'setEncryptedCardNumber', + 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedSecurityCode' => 'setEncryptedSecurityCode', + 'expiryMonth' => 'setExpiryMonth', + 'expiryYear' => 'setExpiryYear', + 'networkPaymentReference' => 'setNetworkPaymentReference', + 'number' => 'setNumber', + 'shopperNotificationReference' => 'setShopperNotificationReference', + 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName', + 'shopperEmail' => 'setShopperEmail', + 'telephoneNumber' => 'setTelephoneNumber', + 'googlePayToken' => 'setGooglePayToken', + 'subtype' => 'setSubtype', + 'masterpassTransactionId' => 'setMasterpassTransactionId', + 'orderID' => 'setOrderID', + 'payeePreferred' => 'setPayeePreferred', + 'payerID' => 'setPayerID', + 'payerSelected' => 'setPayerSelected', + 'virtualPaymentAddress' => 'setVirtualPaymentAddress', + 'samsungPayToken' => 'setSamsungPayToken', + 'iban' => 'setIban', + 'billingSequenceNumber' => 'setBillingSequenceNumber', + 'visaCheckoutCallId' => 'setVisaCheckoutCallId', + 'appId' => 'setAppId', + 'openid' => 'setOpenid', + 'clickAndCollect' => 'setClickAndCollect' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'bankAccountNumber' => 'getBankAccountNumber', + 'bankAccountType' => 'getBankAccountType', + 'bankLocationId' => 'getBankLocationId', + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'encryptedBankAccountNumber' => 'getEncryptedBankAccountNumber', + 'encryptedBankLocationId' => 'getEncryptedBankLocationId', + 'ownerName' => 'getOwnerName', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType', + 'billingAddress' => 'getBillingAddress', + 'deliveryAddress' => 'getDeliveryAddress', + 'personalDetails' => 'getPersonalDetails', + 'amazonPayToken' => 'getAmazonPayToken', + 'checkoutSessionId' => 'getCheckoutSessionId', + 'applePayToken' => 'getApplePayToken', + 'fundingSource' => 'getFundingSource', + 'holderName' => 'getHolderName', + 'issuer' => 'getIssuer', + 'blikCode' => 'getBlikCode', + 'brand' => 'getBrand', + 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', + 'cvc' => 'getCvc', + 'encryptedCardNumber' => 'getEncryptedCardNumber', + 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedSecurityCode' => 'getEncryptedSecurityCode', + 'expiryMonth' => 'getExpiryMonth', + 'expiryYear' => 'getExpiryYear', + 'networkPaymentReference' => 'getNetworkPaymentReference', + 'number' => 'getNumber', + 'shopperNotificationReference' => 'getShopperNotificationReference', + 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName', + 'shopperEmail' => 'getShopperEmail', + 'telephoneNumber' => 'getTelephoneNumber', + 'googlePayToken' => 'getGooglePayToken', + 'subtype' => 'getSubtype', + 'masterpassTransactionId' => 'getMasterpassTransactionId', + 'orderID' => 'getOrderID', + 'payeePreferred' => 'getPayeePreferred', + 'payerID' => 'getPayerID', + 'payerSelected' => 'getPayerSelected', + 'virtualPaymentAddress' => 'getVirtualPaymentAddress', + 'samsungPayToken' => 'getSamsungPayToken', + 'iban' => 'getIban', + 'billingSequenceNumber' => 'getBillingSequenceNumber', + 'visaCheckoutCallId' => 'getVisaCheckoutCallId', + 'appId' => 'getAppId', + 'openid' => 'getOpenid', + 'clickAndCollect' => 'getClickAndCollect' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('bankAccountNumber', $data ?? [], null); + $this->setIfExists('bankAccountType', $data ?? [], null); + $this->setIfExists('bankLocationId', $data ?? [], null); + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('encryptedBankAccountNumber', $data ?? [], null); + $this->setIfExists('encryptedBankLocationId', $data ?? [], null); + $this->setIfExists('ownerName', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'zip'); + $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('deliveryAddress', $data ?? [], null); + $this->setIfExists('personalDetails', $data ?? [], null); + $this->setIfExists('amazonPayToken', $data ?? [], null); + $this->setIfExists('checkoutSessionId', $data ?? [], null); + $this->setIfExists('applePayToken', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('holderName', $data ?? [], null); + $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('blikCode', $data ?? [], null); + $this->setIfExists('brand', $data ?? [], null); + $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); + $this->setIfExists('cvc', $data ?? [], null); + $this->setIfExists('encryptedCardNumber', $data ?? [], null); + $this->setIfExists('encryptedExpiryMonth', $data ?? [], null); + $this->setIfExists('encryptedExpiryYear', $data ?? [], null); + $this->setIfExists('encryptedSecurityCode', $data ?? [], null); + $this->setIfExists('expiryMonth', $data ?? [], null); + $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('networkPaymentReference', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); + $this->setIfExists('shopperNotificationReference', $data ?? [], null); + $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); + $this->setIfExists('firstName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + $this->setIfExists('shopperEmail', $data ?? [], null); + $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('googlePayToken', $data ?? [], null); + $this->setIfExists('subtype', $data ?? [], null); + $this->setIfExists('masterpassTransactionId', $data ?? [], null); + $this->setIfExists('orderID', $data ?? [], null); + $this->setIfExists('payeePreferred', $data ?? [], null); + $this->setIfExists('payerID', $data ?? [], null); + $this->setIfExists('payerSelected', $data ?? [], null); + $this->setIfExists('virtualPaymentAddress', $data ?? [], null); + $this->setIfExists('samsungPayToken', $data ?? [], null); + $this->setIfExists('iban', $data ?? [], null); + $this->setIfExists('billingSequenceNumber', $data ?? [], null); + $this->setIfExists('visaCheckoutCallId', $data ?? [], null); + $this->setIfExists('appId', $data ?? [], null); + $this->setIfExists('openid', $data ?? [], null); + $this->setIfExists('clickAndCollect', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['bankAccountNumber'] === null) { + $invalidProperties[] = "'bankAccountNumber' can't be null"; + } + + if ($this->container['ownerName'] === null) { + $invalidProperties[] = "'ownerName' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + + if ($this->container['applePayToken'] === null) { + $invalidProperties[] = "'applePayToken' can't be null"; + } + + if ($this->container['issuer'] === null) { + $invalidProperties[] = "'issuer' can't be null"; + } + if ($this->container['firstName'] === null) { + $invalidProperties[] = "'firstName' can't be null"; + } + if ($this->container['lastName'] === null) { + $invalidProperties[] = "'lastName' can't be null"; + } + if ($this->container['shopperEmail'] === null) { + $invalidProperties[] = "'shopperEmail' can't be null"; + } + if ($this->container['telephoneNumber'] === null) { + $invalidProperties[] = "'telephoneNumber' can't be null"; + } + if ($this->container['googlePayToken'] === null) { + $invalidProperties[] = "'googlePayToken' can't be null"; + } + + if ($this->container['masterpassTransactionId'] === null) { + $invalidProperties[] = "'masterpassTransactionId' can't be null"; + } + if ($this->container['samsungPayToken'] === null) { + $invalidProperties[] = "'samsungPayToken' can't be null"; + } + if ($this->container['iban'] === null) { + $invalidProperties[] = "'iban' can't be null"; + } + if ($this->container['billingSequenceNumber'] === null) { + $invalidProperties[] = "'billingSequenceNumber' can't be null"; + } + if ($this->container['visaCheckoutCallId'] === null) { + $invalidProperties[] = "'visaCheckoutCallId' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets bankAccountNumber + * + * @return string + */ + public function getBankAccountNumber() + { + return $this->container['bankAccountNumber']; + } + + /** + * Sets bankAccountNumber + * + * @param string $bankAccountNumber The bank account number (without separators). + * + * @return self + */ + public function setBankAccountNumber($bankAccountNumber) + { + if (is_null($bankAccountNumber)) { + throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); + } + $this->container['bankAccountNumber'] = $bankAccountNumber; + + return $this; + } + + /** + * Gets bankAccountType + * + * @return string|null + */ + public function getBankAccountType() + { + return $this->container['bankAccountType']; + } + + /** + * Sets bankAccountType + * + * @param string|null $bankAccountType The bank account type (checking, savings...). + * + * @return self + */ + public function setBankAccountType($bankAccountType) + { + if (is_null($bankAccountType)) { + throw new \InvalidArgumentException('non-nullable bankAccountType cannot be null'); + } + $this->container['bankAccountType'] = $bankAccountType; + + return $this; + } + + /** + * Gets bankLocationId + * + * @return string|null + */ + public function getBankLocationId() + { + return $this->container['bankLocationId']; + } + + /** + * Sets bankLocationId + * + * @param string|null $bankLocationId The bank routing number of the account. + * + * @return self + */ + public function setBankLocationId($bankLocationId) + { + if (is_null($bankLocationId)) { + throw new \InvalidArgumentException('non-nullable bankLocationId cannot be null'); + } + $this->container['bankLocationId'] = $bankLocationId; + + return $this; + } + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + if (is_null($checkoutAttemptId)) { + throw new \InvalidArgumentException('non-nullable checkoutAttemptId cannot be null'); + } + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets encryptedBankAccountNumber + * + * @return string|null + */ + public function getEncryptedBankAccountNumber() + { + return $this->container['encryptedBankAccountNumber']; + } + + /** + * Sets encryptedBankAccountNumber + * + * @param string|null $encryptedBankAccountNumber Encrypted bank account number. The bank account number (without separators). + * + * @return self + */ + public function setEncryptedBankAccountNumber($encryptedBankAccountNumber) + { + if (is_null($encryptedBankAccountNumber)) { + throw new \InvalidArgumentException('non-nullable encryptedBankAccountNumber cannot be null'); + } + $this->container['encryptedBankAccountNumber'] = $encryptedBankAccountNumber; + + return $this; + } + + /** + * Gets encryptedBankLocationId + * + * @return string|null + */ + public function getEncryptedBankLocationId() + { + return $this->container['encryptedBankLocationId']; + } + + /** + * Sets encryptedBankLocationId + * + * @param string|null $encryptedBankLocationId Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases. + * + * @return self + */ + public function setEncryptedBankLocationId($encryptedBankLocationId) + { + if (is_null($encryptedBankLocationId)) { + throw new \InvalidArgumentException('non-nullable encryptedBankLocationId cannot be null'); + } + $this->container['encryptedBankLocationId'] = $encryptedBankLocationId; + + return $this; + } + + /** + * Gets ownerName + * + * @return string + */ + public function getOwnerName() + { + return $this->container['ownerName']; + } + + /** + * Sets ownerName + * + * @param string $ownerName The name of the bank account holder. + * + * @return self + */ + public function setOwnerName($ownerName) + { + if (is_null($ownerName)) { + throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); + } + $this->container['ownerName'] = $ownerName; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated + */ + public function setRecurringDetailReference($recurringDetailReference) + { + if (is_null($recurringDetailReference)) { + throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); + } + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + if (is_null($storedPaymentMethodId)) { + throw new \InvalidArgumentException('non-nullable storedPaymentMethodId cannot be null'); + } + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **zip** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets billingAddress + * + * @return string|null + */ + public function getBillingAddress() + { + return $this->container['billingAddress']; + } + + /** + * Sets billingAddress + * + * @param string|null $billingAddress The address where to send the invoice. + * + * @return self + */ + public function setBillingAddress($billingAddress) + { + if (is_null($billingAddress)) { + throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); + } + $this->container['billingAddress'] = $billingAddress; + + return $this; + } + + /** + * Gets deliveryAddress + * + * @return string|null + */ + public function getDeliveryAddress() + { + return $this->container['deliveryAddress']; + } + + /** + * Sets deliveryAddress + * + * @param string|null $deliveryAddress The address where the goods should be delivered. + * + * @return self + */ + public function setDeliveryAddress($deliveryAddress) + { + if (is_null($deliveryAddress)) { + throw new \InvalidArgumentException('non-nullable deliveryAddress cannot be null'); + } + $this->container['deliveryAddress'] = $deliveryAddress; + + return $this; + } + + /** + * Gets personalDetails + * + * @return string|null + */ + public function getPersonalDetails() + { + return $this->container['personalDetails']; + } + + /** + * Sets personalDetails + * + * @param string|null $personalDetails Shopper name, date of birth, phone number, and email address. + * + * @return self + */ + public function setPersonalDetails($personalDetails) + { + if (is_null($personalDetails)) { + throw new \InvalidArgumentException('non-nullable personalDetails cannot be null'); + } + $this->container['personalDetails'] = $personalDetails; + + return $this; + } + + /** + * Gets amazonPayToken + * + * @return string|null + */ + public function getAmazonPayToken() + { + return $this->container['amazonPayToken']; + } + + /** + * Sets amazonPayToken + * + * @param string|null $amazonPayToken This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically. + * + * @return self + */ + public function setAmazonPayToken($amazonPayToken) + { + if (is_null($amazonPayToken)) { + throw new \InvalidArgumentException('non-nullable amazonPayToken cannot be null'); + } + $this->container['amazonPayToken'] = $amazonPayToken; + + return $this; + } + + /** + * Gets checkoutSessionId + * + * @return string|null + */ + public function getCheckoutSessionId() + { + return $this->container['checkoutSessionId']; + } + + /** + * Sets checkoutSessionId + * + * @param string|null $checkoutSessionId The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken. + * + * @return self + */ + public function setCheckoutSessionId($checkoutSessionId) + { + if (is_null($checkoutSessionId)) { + throw new \InvalidArgumentException('non-nullable checkoutSessionId cannot be null'); + } + $this->container['checkoutSessionId'] = $checkoutSessionId; + + return $this; + } + + /** + * Gets applePayToken + * + * @return string + */ + public function getApplePayToken() + { + return $this->container['applePayToken']; + } + + /** + * Sets applePayToken + * + * @param string $applePayToken The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. + * + * @return self + */ + public function setApplePayToken($applePayToken) + { + if (is_null($applePayToken)) { + throw new \InvalidArgumentException('non-nullable applePayToken cannot be null'); + } + $this->container['applePayToken'] = $applePayToken; + + return $this; + } + + /** + * Gets fundingSource + * + * @return string|null + */ + public function getFundingSource() + { + return $this->container['fundingSource']; + } + + /** + * Sets fundingSource + * + * @param string|null $fundingSource The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + * + * @return self + */ + public function setFundingSource($fundingSource) + { + if (is_null($fundingSource)) { + throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); + } + $this->container['fundingSource'] = $fundingSource; + + return $this; + } + + /** + * Gets holderName + * + * @return string|null + */ + public function getHolderName() + { + return $this->container['holderName']; + } + + /** + * Sets holderName + * + * @param string|null $holderName The name of the card holder. + * + * @return self + */ + public function setHolderName($holderName) + { + if (is_null($holderName)) { + throw new \InvalidArgumentException('non-nullable holderName cannot be null'); + } + $this->container['holderName'] = $holderName; + + return $this; + } + + /** + * Gets issuer + * + * @return string + */ + public function getIssuer() + { + return $this->container['issuer']; + } + + /** + * Sets issuer + * + * @param string $issuer The shopper's bank. Specify this with the issuer value that corresponds to this bank. + * + * @return self + */ + public function setIssuer($issuer) + { + if (is_null($issuer)) { + throw new \InvalidArgumentException('non-nullable issuer cannot be null'); + } + $this->container['issuer'] = $issuer; + + return $this; + } + + /** + * Gets blikCode + * + * @return string|null + */ + public function getBlikCode() + { + return $this->container['blikCode']; + } + + /** + * Sets blikCode + * + * @param string|null $blikCode BLIK code consisting of 6 digits. + * + * @return self + */ + public function setBlikCode($blikCode) + { + if (is_null($blikCode)) { + throw new \InvalidArgumentException('non-nullable blikCode cannot be null'); + } + $this->container['blikCode'] = $blikCode; + + return $this; + } + + /** + * Gets brand + * + * @return string|null + */ + public function getBrand() + { + return $this->container['brand']; + } + + /** + * Sets brand + * + * @param string|null $brand Secondary brand of the card. For example: **plastix**, **hmclub**. + * + * @return self + */ + public function setBrand($brand) + { + if (is_null($brand)) { + throw new \InvalidArgumentException('non-nullable brand cannot be null'); + } + $this->container['brand'] = $brand; + + return $this; + } + + /** + * Gets cupsecureplusSmscode + * + * @return string|null + * @deprecated + */ + public function getCupsecureplusSmscode() + { + return $this->container['cupsecureplusSmscode']; + } + + /** + * Sets cupsecureplusSmscode + * + * @param string|null $cupsecureplusSmscode cupsecureplusSmscode + * + * @return self + * @deprecated + */ + public function setCupsecureplusSmscode($cupsecureplusSmscode) + { + if (is_null($cupsecureplusSmscode)) { + throw new \InvalidArgumentException('non-nullable cupsecureplusSmscode cannot be null'); + } + $this->container['cupsecureplusSmscode'] = $cupsecureplusSmscode; + + return $this; + } + + /** + * Gets cvc + * + * @return string|null + */ + public function getCvc() + { + return $this->container['cvc']; + } + + /** + * Sets cvc + * + * @param string|null $cvc The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setCvc($cvc) + { + if (is_null($cvc)) { + throw new \InvalidArgumentException('non-nullable cvc cannot be null'); + } + $this->container['cvc'] = $cvc; + + return $this; + } + + /** + * Gets encryptedCardNumber + * + * @return string|null + */ + public function getEncryptedCardNumber() + { + return $this->container['encryptedCardNumber']; + } + + /** + * Sets encryptedCardNumber + * + * @param string|null $encryptedCardNumber The encrypted card number. + * + * @return self + */ + public function setEncryptedCardNumber($encryptedCardNumber) + { + if (is_null($encryptedCardNumber)) { + throw new \InvalidArgumentException('non-nullable encryptedCardNumber cannot be null'); + } + $this->container['encryptedCardNumber'] = $encryptedCardNumber; + + return $this; + } + + /** + * Gets encryptedExpiryMonth + * + * @return string|null + */ + public function getEncryptedExpiryMonth() + { + return $this->container['encryptedExpiryMonth']; + } + + /** + * Sets encryptedExpiryMonth + * + * @param string|null $encryptedExpiryMonth The encrypted card expiry month. + * + * @return self + */ + public function setEncryptedExpiryMonth($encryptedExpiryMonth) + { + if (is_null($encryptedExpiryMonth)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryMonth cannot be null'); + } + $this->container['encryptedExpiryMonth'] = $encryptedExpiryMonth; + + return $this; + } + + /** + * Gets encryptedExpiryYear + * + * @return string|null + */ + public function getEncryptedExpiryYear() + { + return $this->container['encryptedExpiryYear']; + } + + /** + * Sets encryptedExpiryYear + * + * @param string|null $encryptedExpiryYear The encrypted card expiry year. + * + * @return self + */ + public function setEncryptedExpiryYear($encryptedExpiryYear) + { + if (is_null($encryptedExpiryYear)) { + throw new \InvalidArgumentException('non-nullable encryptedExpiryYear cannot be null'); + } + $this->container['encryptedExpiryYear'] = $encryptedExpiryYear; + + return $this; + } + + /** + * Gets encryptedSecurityCode + * + * @return string|null + */ + public function getEncryptedSecurityCode() + { + return $this->container['encryptedSecurityCode']; + } + + /** + * Sets encryptedSecurityCode + * + * @param string|null $encryptedSecurityCode The encrypted card verification code. + * + * @return self + */ + public function setEncryptedSecurityCode($encryptedSecurityCode) + { + if (is_null($encryptedSecurityCode)) { + throw new \InvalidArgumentException('non-nullable encryptedSecurityCode cannot be null'); + } + $this->container['encryptedSecurityCode'] = $encryptedSecurityCode; + + return $this; + } + + /** + * Gets expiryMonth + * + * @return string|null + */ + public function getExpiryMonth() + { + return $this->container['expiryMonth']; + } + + /** + * Sets expiryMonth + * + * @param string|null $expiryMonth The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setExpiryMonth($expiryMonth) + { + if (is_null($expiryMonth)) { + throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); + } + $this->container['expiryMonth'] = $expiryMonth; + + return $this; + } + + /** + * Gets expiryYear + * + * @return string|null + */ + public function getExpiryYear() + { + return $this->container['expiryYear']; + } + + /** + * Sets expiryYear + * + * @param string|null $expiryYear The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setExpiryYear($expiryYear) + { + if (is_null($expiryYear)) { + throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); + } + $this->container['expiryYear'] = $expiryYear; + + return $this; + } + + /** + * Gets networkPaymentReference + * + * @return string|null + */ + public function getNetworkPaymentReference() + { + return $this->container['networkPaymentReference']; + } + + /** + * Sets networkPaymentReference + * + * @param string|null $networkPaymentReference The network token reference. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. + * + * @return self + */ + public function setNetworkPaymentReference($networkPaymentReference) + { + if (is_null($networkPaymentReference)) { + throw new \InvalidArgumentException('non-nullable networkPaymentReference cannot be null'); + } + $this->container['networkPaymentReference'] = $networkPaymentReference; + + return $this; + } + + /** + * Gets number + * + * @return string|null + */ + public function getNumber() + { + return $this->container['number']; + } + + /** + * Sets number + * + * @param string|null $number The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + * + * @return self + */ + public function setNumber($number) + { + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); + } + $this->container['number'] = $number; + + return $this; + } + + /** + * Gets shopperNotificationReference + * + * @return string|null + */ + public function getShopperNotificationReference() + { + return $this->container['shopperNotificationReference']; + } + + /** + * Sets shopperNotificationReference + * + * @param string|null $shopperNotificationReference The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. + * + * @return self + */ + public function setShopperNotificationReference($shopperNotificationReference) + { + if (is_null($shopperNotificationReference)) { + throw new \InvalidArgumentException('non-nullable shopperNotificationReference cannot be null'); + } + $this->container['shopperNotificationReference'] = $shopperNotificationReference; + + return $this; + } + + /** + * Gets threeDS2SdkVersion + * + * @return string|null + */ + public function getThreeDS2SdkVersion() + { + return $this->container['threeDS2SdkVersion']; + } + + /** + * Sets threeDS2SdkVersion + * + * @param string|null $threeDS2SdkVersion Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. + * + * @return self + */ + public function setThreeDS2SdkVersion($threeDS2SdkVersion) + { + if (is_null($threeDS2SdkVersion)) { + throw new \InvalidArgumentException('non-nullable threeDS2SdkVersion cannot be null'); + } + $this->container['threeDS2SdkVersion'] = $threeDS2SdkVersion; + + return $this; + } + + /** + * Gets firstName + * + * @return string + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string $firstName The shopper's first name. + * + * @return self + */ + public function setFirstName($firstName) + { + if (is_null($firstName)) { + throw new \InvalidArgumentException('non-nullable firstName cannot be null'); + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string $lastName The shopper's last name. + * + * @return self + */ + public function setLastName($lastName) + { + if (is_null($lastName)) { + throw new \InvalidArgumentException('non-nullable lastName cannot be null'); + } + $this->container['lastName'] = $lastName; + + return $this; + } + + /** + * Gets shopperEmail + * + * @return string + */ + public function getShopperEmail() + { + return $this->container['shopperEmail']; + } + + /** + * Sets shopperEmail + * + * @param string $shopperEmail + * + * @return self + */ + public function setShopperEmail($shopperEmail) + { + if (is_null($shopperEmail)) { + throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); + } + $this->container['shopperEmail'] = $shopperEmail; + + return $this; + } + + /** + * Gets telephoneNumber + * + * @return string + */ + public function getTelephoneNumber() + { + return $this->container['telephoneNumber']; + } + + /** + * Sets telephoneNumber + * + * @param string $telephoneNumber + * + * @return self + */ + public function setTelephoneNumber($telephoneNumber) + { + if (is_null($telephoneNumber)) { + throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); + } + $this->container['telephoneNumber'] = $telephoneNumber; + + return $this; + } + + /** + * Gets googlePayToken + * + * @return string + */ + public function getGooglePayToken() + { + return $this->container['googlePayToken']; + } + + /** + * Sets googlePayToken + * + * @param string $googlePayToken The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. + * + * @return self + */ + public function setGooglePayToken($googlePayToken) + { + if (is_null($googlePayToken)) { + throw new \InvalidArgumentException('non-nullable googlePayToken cannot be null'); + } + $this->container['googlePayToken'] = $googlePayToken; + + return $this; + } + + /** + * Gets subtype + * + * @return string|null + */ + public function getSubtype() + { + return $this->container['subtype']; + } + + /** + * Sets subtype + * + * @param string|null $subtype The type of flow to initiate. + * + * @return self + */ + public function setSubtype($subtype) + { + if (is_null($subtype)) { + throw new \InvalidArgumentException('non-nullable subtype cannot be null'); + } + $this->container['subtype'] = $subtype; + + return $this; + } + + /** + * Gets masterpassTransactionId + * + * @return string + */ + public function getMasterpassTransactionId() + { + return $this->container['masterpassTransactionId']; + } + + /** + * Sets masterpassTransactionId + * + * @param string $masterpassTransactionId The Masterpass transaction ID. + * + * @return self + */ + public function setMasterpassTransactionId($masterpassTransactionId) + { + if (is_null($masterpassTransactionId)) { + throw new \InvalidArgumentException('non-nullable masterpassTransactionId cannot be null'); + } + $this->container['masterpassTransactionId'] = $masterpassTransactionId; + + return $this; + } + + /** + * Gets orderID + * + * @return string|null + */ + public function getOrderID() + { + return $this->container['orderID']; + } + + /** + * Sets orderID + * + * @param string|null $orderID The unique ID associated with the order. + * + * @return self + */ + public function setOrderID($orderID) + { + if (is_null($orderID)) { + throw new \InvalidArgumentException('non-nullable orderID cannot be null'); + } + $this->container['orderID'] = $orderID; + + return $this; + } + + /** + * Gets payeePreferred + * + * @return string|null + */ + public function getPayeePreferred() + { + return $this->container['payeePreferred']; + } + + /** + * Sets payeePreferred + * + * @param string|null $payeePreferred IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED + * + * @return self + */ + public function setPayeePreferred($payeePreferred) + { + if (is_null($payeePreferred)) { + throw new \InvalidArgumentException('non-nullable payeePreferred cannot be null'); + } + $this->container['payeePreferred'] = $payeePreferred; + + return $this; + } + + /** + * Gets payerID + * + * @return string|null + */ + public function getPayerID() + { + return $this->container['payerID']; + } + + /** + * Sets payerID + * + * @param string|null $payerID The unique ID associated with the payer. + * + * @return self + */ + public function setPayerID($payerID) + { + if (is_null($payerID)) { + throw new \InvalidArgumentException('non-nullable payerID cannot be null'); + } + $this->container['payerID'] = $payerID; + + return $this; + } + + /** + * Gets payerSelected + * + * @return string|null + */ + public function getPayerSelected() + { + return $this->container['payerSelected']; + } + + /** + * Sets payerSelected + * + * @param string|null $payerSelected PAYPAL or PAYPAL_CREDIT + * + * @return self + */ + public function setPayerSelected($payerSelected) + { + if (is_null($payerSelected)) { + throw new \InvalidArgumentException('non-nullable payerSelected cannot be null'); + } + $this->container['payerSelected'] = $payerSelected; + + return $this; + } + + /** + * Gets virtualPaymentAddress + * + * @return string|null + */ + public function getVirtualPaymentAddress() + { + return $this->container['virtualPaymentAddress']; + } + + /** + * Sets virtualPaymentAddress + * + * @param string|null $virtualPaymentAddress The virtual payment address for UPI. + * + * @return self + */ + public function setVirtualPaymentAddress($virtualPaymentAddress) + { + if (is_null($virtualPaymentAddress)) { + throw new \InvalidArgumentException('non-nullable virtualPaymentAddress cannot be null'); + } + $this->container['virtualPaymentAddress'] = $virtualPaymentAddress; + + return $this; + } + + /** + * Gets samsungPayToken + * + * @return string + */ + public function getSamsungPayToken() + { + return $this->container['samsungPayToken']; + } + + /** + * Sets samsungPayToken + * + * @param string $samsungPayToken The payload you received from the Samsung Pay SDK response. + * + * @return self + */ + public function setSamsungPayToken($samsungPayToken) + { + if (is_null($samsungPayToken)) { + throw new \InvalidArgumentException('non-nullable samsungPayToken cannot be null'); + } + $this->container['samsungPayToken'] = $samsungPayToken; + + return $this; + } + + /** + * Gets iban + * + * @return string + */ + public function getIban() + { + return $this->container['iban']; + } + + /** + * Sets iban + * + * @param string $iban The International Bank Account Number (IBAN). + * + * @return self + */ + public function setIban($iban) + { + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); + } + $this->container['iban'] = $iban; + + return $this; + } + + /** + * Gets billingSequenceNumber + * + * @return string + */ + public function getBillingSequenceNumber() + { + return $this->container['billingSequenceNumber']; + } + + /** + * Sets billingSequenceNumber + * + * @param string $billingSequenceNumber The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + * + * @return self + */ + public function setBillingSequenceNumber($billingSequenceNumber) + { + if (is_null($billingSequenceNumber)) { + throw new \InvalidArgumentException('non-nullable billingSequenceNumber cannot be null'); + } + $this->container['billingSequenceNumber'] = $billingSequenceNumber; + + return $this; + } + + /** + * Gets visaCheckoutCallId + * + * @return string + */ + public function getVisaCheckoutCallId() + { + return $this->container['visaCheckoutCallId']; + } + + /** + * Sets visaCheckoutCallId + * + * @param string $visaCheckoutCallId The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID. + * + * @return self + */ + public function setVisaCheckoutCallId($visaCheckoutCallId) + { + if (is_null($visaCheckoutCallId)) { + throw new \InvalidArgumentException('non-nullable visaCheckoutCallId cannot be null'); + } + $this->container['visaCheckoutCallId'] = $visaCheckoutCallId; + + return $this; + } + + /** + * Gets appId + * + * @return string|null + */ + public function getAppId() + { + return $this->container['appId']; + } + + /** + * Sets appId + * + * @param string|null $appId appId + * + * @return self + */ + public function setAppId($appId) + { + if (is_null($appId)) { + throw new \InvalidArgumentException('non-nullable appId cannot be null'); + } + $this->container['appId'] = $appId; + + return $this; + } + + /** + * Gets openid + * + * @return string|null + */ + public function getOpenid() + { + return $this->container['openid']; + } + + /** + * Sets openid + * + * @param string|null $openid openid + * + * @return self + */ + public function setOpenid($openid) + { + if (is_null($openid)) { + throw new \InvalidArgumentException('non-nullable openid cannot be null'); + } + $this->container['openid'] = $openid; + + return $this; + } + + /** + * Gets clickAndCollect + * + * @return string|null + */ + public function getClickAndCollect() + { + return $this->container['clickAndCollect']; + } + + /** + * Sets clickAndCollect + * + * @param string|null $clickAndCollect Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them. + * + * @return self + */ + public function setClickAndCollect($clickAndCollect) + { + if (is_null($clickAndCollect)) { + throw new \InvalidArgumentException('non-nullable clickAndCollect cannot be null'); + } + $this->container['clickAndCollect'] = $clickAndCollect; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/SubMerchantInfo.php b/src/Adyen/Model/Checkout/SubMerchantInfo.php index e41e335da..2a95eb4db 100644 --- a/src/Adyen/Model/Checkout/SubMerchantInfo.php +++ b/src/Adyen/Model/Checkout/SubMerchantInfo.php @@ -44,7 +44,7 @@ class SubMerchantInfo implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'address' => '\Adyen\Model\Checkout\Address', + 'address' => '\Adyen\Model\Checkout\BillingAddress', 'id' => 'string', 'mcc' => 'string', 'name' => 'string', @@ -307,7 +307,7 @@ public function valid() /** * Gets address * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\BillingAddress|null */ public function getAddress() { @@ -317,7 +317,7 @@ public function getAddress() /** * Sets address * - * @param \Adyen\Model\Checkout\Address|null $address address + * @param \Adyen\Model\Checkout\BillingAddress|null $address address * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php index 78b86ecf1..f2d73ebb5 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php @@ -52,7 +52,6 @@ class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSeria 'requested' => 'bool', 'requestedLevel' => 'string', 'requestedSettings' => '\Adyen\Model\ConfigurationWebhooks\CapabilitySettings', - 'transferInstruments' => '\Adyen\Model\ConfigurationWebhooks\AccountSupportingEntityCapability[]', 'verificationStatus' => 'string' ]; @@ -72,7 +71,6 @@ class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSeria 'requested' => null, 'requestedLevel' => null, 'requestedSettings' => null, - 'transferInstruments' => null, 'verificationStatus' => null ]; @@ -90,7 +88,6 @@ class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSeria 'requested' => false, 'requestedLevel' => false, 'requestedSettings' => false, - 'transferInstruments' => false, 'verificationStatus' => false ]; @@ -188,7 +185,6 @@ public function isNullableSetToNull(string $property): bool 'requested' => 'requested', 'requestedLevel' => 'requestedLevel', 'requestedSettings' => 'requestedSettings', - 'transferInstruments' => 'transferInstruments', 'verificationStatus' => 'verificationStatus' ]; @@ -206,7 +202,6 @@ public function isNullableSetToNull(string $property): bool 'requested' => 'setRequested', 'requestedLevel' => 'setRequestedLevel', 'requestedSettings' => 'setRequestedSettings', - 'transferInstruments' => 'setTransferInstruments', 'verificationStatus' => 'setVerificationStatus' ]; @@ -224,7 +219,6 @@ public function isNullableSetToNull(string $property): bool 'requested' => 'getRequested', 'requestedLevel' => 'getRequestedLevel', 'requestedSettings' => 'getRequestedSettings', - 'transferInstruments' => 'getTransferInstruments', 'verificationStatus' => 'getVerificationStatus' ]; @@ -347,7 +341,6 @@ public function __construct(array $data = null) $this->setIfExists('requested', $data ?? [], null); $this->setIfExists('requestedLevel', $data ?? [], null); $this->setIfExists('requestedSettings', $data ?? [], null); - $this->setIfExists('transferInstruments', $data ?? [], null); $this->setIfExists('verificationStatus', $data ?? [], null); } @@ -656,33 +649,6 @@ public function setRequestedSettings($requestedSettings) return $this; } - /** - * Gets transferInstruments - * - * @return \Adyen\Model\ConfigurationWebhooks\AccountSupportingEntityCapability[]|null - */ - public function getTransferInstruments() - { - return $this->container['transferInstruments']; - } - - /** - * Sets transferInstruments - * - * @param \Adyen\Model\ConfigurationWebhooks\AccountSupportingEntityCapability[]|null $transferInstruments Contains the status of the transfer instruments associated with this capability. - * - * @return self - */ - public function setTransferInstruments($transferInstruments) - { - if (is_null($transferInstruments)) { - throw new \InvalidArgumentException('non-nullable transferInstruments cannot be null'); - } - $this->container['transferInstruments'] = $transferInstruments; - - return $this; - } - /** * Gets verificationStatus * diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php b/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php deleted file mode 100644 index 2d02ae5df..000000000 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php +++ /dev/null @@ -1,699 +0,0 @@ - - */ -class AccountSupportingEntityCapability implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'AccountSupportingEntityCapability'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'allowed' => 'bool', - 'allowedLevel' => 'string', - 'enabled' => 'bool', - 'id' => 'string', - 'requested' => 'bool', - 'requestedLevel' => 'string', - 'verificationStatus' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'allowed' => null, - 'allowedLevel' => null, - 'enabled' => null, - 'id' => null, - 'requested' => null, - 'requestedLevel' => null, - 'verificationStatus' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static $openAPINullables = [ - 'allowed' => false, - 'allowedLevel' => false, - 'enabled' => false, - 'id' => false, - 'requested' => false, - 'requestedLevel' => false, - 'verificationStatus' => 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 = [ - 'allowed' => 'allowed', - 'allowedLevel' => 'allowedLevel', - 'enabled' => 'enabled', - 'id' => 'id', - 'requested' => 'requested', - 'requestedLevel' => 'requestedLevel', - 'verificationStatus' => 'verificationStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'allowed' => 'setAllowed', - 'allowedLevel' => 'setAllowedLevel', - 'enabled' => 'setEnabled', - 'id' => 'setId', - 'requested' => 'setRequested', - 'requestedLevel' => 'setRequestedLevel', - 'verificationStatus' => 'setVerificationStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'allowed' => 'getAllowed', - 'allowedLevel' => 'getAllowedLevel', - 'enabled' => 'getEnabled', - 'id' => 'getId', - 'requested' => 'getRequested', - 'requestedLevel' => 'getRequestedLevel', - 'verificationStatus' => 'getVerificationStatus' - ]; - - /** - * 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 ALLOWED_LEVEL_HIGH = 'high'; - public const ALLOWED_LEVEL_LOW = 'low'; - public const ALLOWED_LEVEL_MEDIUM = 'medium'; - public const ALLOWED_LEVEL_NOT_APPLICABLE = 'notApplicable'; - public const REQUESTED_LEVEL_HIGH = 'high'; - public const REQUESTED_LEVEL_LOW = 'low'; - public const REQUESTED_LEVEL_MEDIUM = 'medium'; - public const REQUESTED_LEVEL_NOT_APPLICABLE = 'notApplicable'; - public const VERIFICATION_STATUS_INVALID = 'invalid'; - public const VERIFICATION_STATUS_PENDING = 'pending'; - public const VERIFICATION_STATUS_REJECTED = 'rejected'; - public const VERIFICATION_STATUS_VALID = 'valid'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getAllowedLevelAllowableValues() - { - return [ - self::ALLOWED_LEVEL_HIGH, - self::ALLOWED_LEVEL_LOW, - self::ALLOWED_LEVEL_MEDIUM, - self::ALLOWED_LEVEL_NOT_APPLICABLE, - ]; - } - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getRequestedLevelAllowableValues() - { - return [ - self::REQUESTED_LEVEL_HIGH, - self::REQUESTED_LEVEL_LOW, - self::REQUESTED_LEVEL_MEDIUM, - self::REQUESTED_LEVEL_NOT_APPLICABLE, - ]; - } - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getVerificationStatusAllowableValues() - { - return [ - self::VERIFICATION_STATUS_INVALID, - self::VERIFICATION_STATUS_PENDING, - self::VERIFICATION_STATUS_REJECTED, - self::VERIFICATION_STATUS_VALID, - ]; - } - /** - * 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('allowed', $data ?? [], null); - $this->setIfExists('allowedLevel', $data ?? [], null); - $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('requested', $data ?? [], null); - $this->setIfExists('requestedLevel', $data ?? [], null); - $this->setIfExists('verificationStatus', $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->getAllowedLevelAllowableValues(); - if (!is_null($this->container['allowedLevel']) && !in_array($this->container['allowedLevel'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'allowedLevel', must be one of '%s'", - $this->container['allowedLevel'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getRequestedLevelAllowableValues(); - if (!is_null($this->container['requestedLevel']) && !in_array($this->container['requestedLevel'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'requestedLevel', must be one of '%s'", - $this->container['requestedLevel'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getVerificationStatusAllowableValues(); - if (!is_null($this->container['verificationStatus']) && !in_array($this->container['verificationStatus'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'verificationStatus', must be one of '%s'", - $this->container['verificationStatus'], - 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 allowed - * - * @return bool|null - */ - public function getAllowed() - { - return $this->container['allowed']; - } - - /** - * Sets allowed - * - * @param bool|null $allowed Indicates whether the supporting entity capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. - * - * @return self - */ - public function setAllowed($allowed) - { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } - $this->container['allowed'] = $allowed; - - return $this; - } - - /** - * Gets allowedLevel - * - * @return string|null - */ - public function getAllowedLevel() - { - return $this->container['allowedLevel']; - } - - /** - * Sets allowedLevel - * - * @param string|null $allowedLevel The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - * - * @return self - */ - public function setAllowedLevel($allowedLevel) - { - if (is_null($allowedLevel)) { - throw new \InvalidArgumentException('non-nullable allowedLevel cannot be null'); - } - $allowedValues = $this->getAllowedLevelAllowableValues(); - if (!in_array($allowedLevel, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'allowedLevel', must be one of '%s'", - $allowedLevel, - implode("', '", $allowedValues) - ) - ); - } - $this->container['allowedLevel'] = $allowedLevel; - - return $this; - } - - /** - * Gets enabled - * - * @return bool|null - */ - public function getEnabled() - { - return $this->container['enabled']; - } - - /** - * Sets enabled - * - * @param bool|null $enabled Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. - * - * @return self - */ - public function setEnabled($enabled) - { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } - $this->container['enabled'] = $enabled; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id The ID of the supporting entity. - * - * @return self - */ - public function setId($id) - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets requested - * - * @return bool|null - */ - public function getRequested() - { - return $this->container['requested']; - } - - /** - * Sets requested - * - * @param bool|null $requested Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. - * - * @return self - */ - public function setRequested($requested) - { - if (is_null($requested)) { - throw new \InvalidArgumentException('non-nullable requested cannot be null'); - } - $this->container['requested'] = $requested; - - return $this; - } - - /** - * Gets requestedLevel - * - * @return string|null - */ - public function getRequestedLevel() - { - return $this->container['requestedLevel']; - } - - /** - * Sets requestedLevel - * - * @param string|null $requestedLevel The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - * - * @return self - */ - public function setRequestedLevel($requestedLevel) - { - if (is_null($requestedLevel)) { - throw new \InvalidArgumentException('non-nullable requestedLevel cannot be null'); - } - $allowedValues = $this->getRequestedLevelAllowableValues(); - if (!in_array($requestedLevel, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'requestedLevel', must be one of '%s'", - $requestedLevel, - implode("', '", $allowedValues) - ) - ); - } - $this->container['requestedLevel'] = $requestedLevel; - - return $this; - } - - /** - * Gets verificationStatus - * - * @return string|null - */ - public function getVerificationStatus() - { - return $this->container['verificationStatus']; - } - - /** - * Sets verificationStatus - * - * @param string|null $verificationStatus The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - * - * @return self - */ - public function setVerificationStatus($verificationStatus) - { - if (is_null($verificationStatus)) { - throw new \InvalidArgumentException('non-nullable verificationStatus cannot be null'); - } - $allowedValues = $this->getVerificationStatusAllowableValues(); - if (!in_array($verificationStatus, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'verificationStatus', must be one of '%s'", - $verificationStatus, - implode("', '", $allowedValues) - ) - ); - } - $this->container['verificationStatus'] = $verificationStatus; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } -} diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php index b20fa504e..bac903d22 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php @@ -453,7 +453,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php b/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php index 095bf5377..af80da79b 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php @@ -296,7 +296,7 @@ public function getSalesDayClosingTime() /** * Sets salesDayClosingTime * - * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. * * @return self */ @@ -323,7 +323,7 @@ public function getSettlementDelayDays() /** * Sets settlementDelayDays * - * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/pass-through-settlement). Default value: **null**. + * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/pass-through-settlement). Default value: **null**. * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php index d9a2be248..29af80cc9 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php @@ -277,16 +277,19 @@ public function getModelName() public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -303,16 +306,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php index 159ded8ec..b48c4c4dd 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php @@ -534,7 +534,7 @@ public function getProblems() /** * Sets problems * - * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of the verification errors from capabilities for this supporting entity. + * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems The verification errors related to capabilities for this supporting entity. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php index 39906621d..ec6c108b3 100644 --- a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php @@ -44,6 +44,7 @@ class GeneratePciDescriptionRequest implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $openAPITypes = [ + 'additionalSalesChannels' => 'string[]', 'language' => 'string' ]; @@ -55,6 +56,7 @@ class GeneratePciDescriptionRequest implements ModelInterface, ArrayAccess, \Jso * @psalm-var array */ protected static $openAPIFormats = [ + 'additionalSalesChannels' => null, 'language' => null ]; @@ -64,6 +66,7 @@ class GeneratePciDescriptionRequest implements ModelInterface, ArrayAccess, \Jso * @var boolean[] */ protected static $openAPINullables = [ + 'additionalSalesChannels' => false, 'language' => false ]; @@ -153,6 +156,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'additionalSalesChannels' => 'additionalSalesChannels', 'language' => 'language' ]; @@ -162,6 +166,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'additionalSalesChannels' => 'setAdditionalSalesChannels', 'language' => 'setLanguage' ]; @@ -171,6 +176,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'additionalSalesChannels' => 'getAdditionalSalesChannels', 'language' => 'getLanguage' ]; @@ -215,7 +221,25 @@ public function getModelName() return self::$openAPIModelName; } + public const ADDITIONAL_SALES_CHANNELS_E_COMMERCE = 'eCommerce'; + public const ADDITIONAL_SALES_CHANNELS_ECOM_MOTO = 'ecomMoto'; + public const ADDITIONAL_SALES_CHANNELS_POS = 'pos'; + public const ADDITIONAL_SALES_CHANNELS_POS_MOTO = 'posMoto'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAdditionalSalesChannelsAllowableValues() + { + return [ + self::ADDITIONAL_SALES_CHANNELS_E_COMMERCE, + self::ADDITIONAL_SALES_CHANNELS_ECOM_MOTO, + self::ADDITIONAL_SALES_CHANNELS_POS, + self::ADDITIONAL_SALES_CHANNELS_POS_MOTO, + ]; + } /** * Associative array for storing property values * @@ -231,6 +255,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('additionalSalesChannels', $data ?? [], null); $this->setIfExists('language', $data ?? [], null); } @@ -276,6 +301,42 @@ public function valid() } + /** + * Gets additionalSalesChannels + * + * @return string[]|null + */ + public function getAdditionalSalesChannels() + { + return $this->container['additionalSalesChannels']; + } + + /** + * Sets additionalSalesChannels + * + * @param string[]|null $additionalSalesChannels An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/create-stores/) and [add payment methods](https://docs.adyen.com/marketplaces-and-platforms/payment-methods/) for your user. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** + * + * @return self + */ + public function setAdditionalSalesChannels($additionalSalesChannels) + { + if (is_null($additionalSalesChannels)) { + throw new \InvalidArgumentException('non-nullable additionalSalesChannels cannot be null'); + } + $allowedValues = $this->getAdditionalSalesChannelsAllowableValues(); + if (array_diff($additionalSalesChannels, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'additionalSalesChannels', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['additionalSalesChannels'] = $additionalSalesChannels; + + return $this; + } + /** * Gets language * diff --git a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php index 57e32882a..d668b0830 100644 --- a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php @@ -333,7 +333,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + * @param string $accountNumber The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index b9c79e7af..629b6cc8f 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -251,7 +251,7 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_PROOF_OF_NATIONAL_ID_NUMBER = 'proofOfNationalIdNumber'; + public const TYPE_NATIONAL_ID_NUMBER = 'nationalIdNumber'; /** * Gets allowable values of the enum @@ -261,7 +261,7 @@ public function getModelName() public function getTypeAllowableValues() { return [ - self::TYPE_PROOF_OF_NATIONAL_ID_NUMBER, + self::TYPE_NATIONAL_ID_NUMBER, ]; } /** diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index 6e5fd33a6..b513da317 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -596,7 +596,7 @@ public function getProblems() /** * Sets problems * - * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of the verification errors from capabilities for the legal entity. + * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of verification errors related to capabilities for the legal entity. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php index 411cae7d6..7eec424fd 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php @@ -392,7 +392,7 @@ public function getAllowed() /** * Sets allowed * - * @param bool|null $allowed Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful + * @param bool|null $allowed Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful. * * @return self */ @@ -483,7 +483,7 @@ public function getRequested() /** * Sets requested * - * @param bool|null $requested Indicates whether the capability is requested. To check whether the Legal Entity is permitted to use the capability, + * @param bool|null $requested Indicates whether the capability is requested. To check whether the legal entity is permitted to use the capability, refer to the `allowed` field. * * @return self */ @@ -574,7 +574,7 @@ public function getTransferInstruments() /** * Sets transferInstruments * - * @param \Adyen\Model\LegalEntityManagement\SupportingEntityCapability[]|null $transferInstruments Capability status for transfer instruments associated with legal entity + * @param \Adyen\Model\LegalEntityManagement\SupportingEntityCapability[]|null $transferInstruments The capability status of transfer instruments associated with the legal entity. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php index ed621bfd4..250e8a786 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php @@ -364,7 +364,7 @@ public function getSettings() /** * Sets settings * - * @param array|null $settings Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, this value is set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. + * @param array|null $settings Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, these values are set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. By default, these value are set to **false**. Set the following values to **true** to require the user to sign PCI questionnaires based on their sales channels. The user must sign PCI questionnaires for all relevant sales channels. - **requirePciSignEcommerce** - **requirePciSignPos** - **requirePciSignEcomMoto** - **requirePciSignPosMoto** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php index 4460e3308..e9f9d7e55 100644 --- a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php @@ -310,7 +310,7 @@ public function getAllowed() /** * Sets allowed * - * @param bool|null $allowed Indicates whether the supporting entity capability is allowed. If a supporting entity is allowed but its parent legal entity is not, it means there are other supporting entities that failed validation. **The allowed supporting entity can still be used** + * @param bool|null $allowed Indicates whether the capability is allowed for the supporting entity. If a capability is allowed for a supporting entity but not for the parent legal entity, this means the legal entity has other supporting entities that failed verification. **You can use the allowed supporting entity** regardless of the verification status of other supporting entities. * * @return self */ @@ -391,7 +391,7 @@ public function getVerificationStatus() /** * Sets verificationStatus * - * @param string|null $verificationStatus The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. + * @param string|null $verificationStatus The status of the verification checks for the capability of the supporting entity. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php index a89e5fb8b..f5e75f6c2 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php @@ -393,7 +393,7 @@ public function getCapabilities() /** * Sets capabilities * - * @param array|null $capabilities List of capabilities for this supporting entity. + * @param array|null $capabilities List of capabilities for this transfer instrument. * * @return self */ @@ -501,7 +501,7 @@ public function getProblems() /** * Sets problems * - * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems List of the verification errors from capabilities for this supporting entity. + * @param \Adyen\Model\LegalEntityManagement\CapabilityProblem[]|null $problems The verification errors related to capabilities for this transfer instrument. * * @return self */ diff --git a/src/Adyen/Model/Management/Localization.php b/src/Adyen/Model/Management/Localization.php new file mode 100644 index 000000000..c0ea126ff --- /dev/null +++ b/src/Adyen/Model/Management/Localization.php @@ -0,0 +1,384 @@ + + */ +class Localization implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Localization'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'language' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'language' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'language' => 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 = [ + 'language' => 'language' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'language' => 'setLanguage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'language' => 'getLanguage' + ]; + + /** + * 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('language', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets language + * + * @return string|null + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string|null $language Language of the terminal. + * + * @return self + */ + public function setLanguage($language) + { + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); + } + $this->container['language'] = $language; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/TerminalSettings.php b/src/Adyen/Model/Management/TerminalSettings.php index 5c64af771..ca1aaa2a2 100644 --- a/src/Adyen/Model/Management/TerminalSettings.php +++ b/src/Adyen/Model/Management/TerminalSettings.php @@ -48,6 +48,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'connectivity' => '\Adyen\Model\Management\Connectivity', 'gratuities' => '\Adyen\Model\Management\Gratuity[]', 'hardware' => '\Adyen\Model\Management\Hardware', + 'localization' => '\Adyen\Model\Management\Localization', 'nexo' => '\Adyen\Model\Management\Nexo', 'offlineProcessing' => '\Adyen\Model\Management\OfflineProcessing', 'opi' => '\Adyen\Model\Management\Opi', @@ -75,6 +76,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'connectivity' => null, 'gratuities' => null, 'hardware' => null, + 'localization' => null, 'nexo' => null, 'offlineProcessing' => null, 'opi' => null, @@ -100,6 +102,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'connectivity' => false, 'gratuities' => false, 'hardware' => false, + 'localization' => false, 'nexo' => false, 'offlineProcessing' => false, 'opi' => false, @@ -205,6 +208,7 @@ public function isNullableSetToNull(string $property): bool 'connectivity' => 'connectivity', 'gratuities' => 'gratuities', 'hardware' => 'hardware', + 'localization' => 'localization', 'nexo' => 'nexo', 'offlineProcessing' => 'offlineProcessing', 'opi' => 'opi', @@ -230,6 +234,7 @@ public function isNullableSetToNull(string $property): bool 'connectivity' => 'setConnectivity', 'gratuities' => 'setGratuities', 'hardware' => 'setHardware', + 'localization' => 'setLocalization', 'nexo' => 'setNexo', 'offlineProcessing' => 'setOfflineProcessing', 'opi' => 'setOpi', @@ -255,6 +260,7 @@ public function isNullableSetToNull(string $property): bool 'connectivity' => 'getConnectivity', 'gratuities' => 'getGratuities', 'hardware' => 'getHardware', + 'localization' => 'getLocalization', 'nexo' => 'getNexo', 'offlineProcessing' => 'getOfflineProcessing', 'opi' => 'getOpi', @@ -331,6 +337,7 @@ public function __construct(array $data = null) $this->setIfExists('connectivity', $data ?? [], null); $this->setIfExists('gratuities', $data ?? [], null); $this->setIfExists('hardware', $data ?? [], null); + $this->setIfExists('localization', $data ?? [], null); $this->setIfExists('nexo', $data ?? [], null); $this->setIfExists('offlineProcessing', $data ?? [], null); $this->setIfExists('opi', $data ?? [], null); @@ -496,6 +503,33 @@ public function setHardware($hardware) return $this; } + /** + * Gets localization + * + * @return \Adyen\Model\Management\Localization|null + */ + public function getLocalization() + { + return $this->container['localization']; + } + + /** + * Sets localization + * + * @param \Adyen\Model\Management\Localization|null $localization localization + * + * @return self + */ + public function setLocalization($localization) + { + if (is_null($localization)) { + throw new \InvalidArgumentException('non-nullable localization cannot be null'); + } + $this->container['localization'] = $localization; + + return $this; + } + /** * Gets nexo * diff --git a/src/Adyen/Model/ManagementWebhooks/NotificationDataMessage.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php similarity index 89% rename from src/Adyen/Model/ManagementWebhooks/NotificationDataMessage.php rename to src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php index d7f151c43..97bea3c9d 100644 --- a/src/Adyen/Model/ManagementWebhooks/NotificationDataMessage.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php @@ -19,7 +19,7 @@ use Adyen\Model\ManagementWebhooks\ObjectSerializer; /** - * NotificationDataMessage Class Doc Comment + * PaymentMethodRequestRemovedNotificationRequest Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class NotificationDataMessage implements ModelInterface, ArrayAccess, \JsonSerializable +class PaymentMethodRequestRemovedNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class NotificationDataMessage implements ModelInterface, ArrayAccess, \JsonSeria * * @var string */ - protected static $openAPIModelName = 'NotificationDataMessage'; + protected static $openAPIModelName = 'PaymentMethodRequestRemovedNotificationRequest'; /** * Array of property to type mappings. Used for (de)serialization @@ -233,7 +233,19 @@ public function getModelName() return self::$openAPIModelName; } + public const TYPE_PAYMENT_METHOD_REQUEST_REMOVED = 'paymentMethod.requestRemoved'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAYMENT_METHOD_REQUEST_REMOVED, + ]; + } /** * Associative array for storing property values * @@ -294,6 +306,15 @@ public function listInvalidProperties() if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -412,6 +433,16 @@ public function setType($type) if (is_null($type)) { throw new \InvalidArgumentException('non-nullable type cannot be null'); } + $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; diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php new file mode 100644 index 000000000..7e88a3e45 --- /dev/null +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php @@ -0,0 +1,529 @@ + + */ +class PaymentMethodScheduledForRemovalNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentMethodScheduledForRemovalNotificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'createdAt' => '\DateTime', + 'data' => '\Adyen\Model\ManagementWebhooks\MidServiceNotificationData', + 'environment' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'createdAt' => 'date-time', + 'data' => null, + 'environment' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'createdAt' => false, + 'data' => false, + 'environment' => 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 = [ + 'createdAt' => 'createdAt', + 'data' => 'data', + 'environment' => 'environment', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'createdAt' => 'setCreatedAt', + 'data' => 'setData', + 'environment' => 'setEnvironment', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'createdAt' => 'getCreatedAt', + 'data' => 'getData', + 'environment' => 'getEnvironment', + '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_PAYMENT_METHOD_REQUEST_SCHEDULED_FOR_REMOVAL = 'paymentMethod.requestScheduledForRemoval'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAYMENT_METHOD_REQUEST_SCHEDULED_FOR_REMOVAL, + ]; + } + /** + * 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('createdAt', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('environment', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['environment'] === null) { + $invalidProperties[] = "'environment' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Timestamp for when the webhook was created. + * + * @return self + */ + public function setCreatedAt($createdAt) + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets data + * + * @return \Adyen\Model\ManagementWebhooks\MidServiceNotificationData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Adyen\Model\ManagementWebhooks\MidServiceNotificationData $data data + * + * @return self + */ + public function setData($data) + { + if (is_null($data)) { + throw new \InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets environment + * + * @return string + */ + public function getEnvironment() + { + return $this->container['environment']; + } + + /** + * Sets environment + * + * @param string $environment The environment from which the webhook originated. Possible values: **test**, **live**. + * + * @return self + */ + public function setEnvironment($environment) + { + if (is_null($environment)) { + throw new \InvalidArgumentException('non-nullable environment cannot be null'); + } + $this->container['environment'] = $environment; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of notification. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $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); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +}