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/TransferWebhooks/TransferOperation.php b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php similarity index 76% rename from src/Adyen/Model/TransferWebhooks/TransferOperation.php rename to src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php index e692922e6..fbf6f1f19 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferOperation.php +++ b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php @@ -1,9 +1,9 @@ */ -class TransferOperation implements ModelInterface, ArrayAccess, \JsonSerializable +class CounterpartyBankRestriction implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class TransferOperation implements ModelInterface, ArrayAccess, \JsonSerializabl * * @var string */ - protected static $openAPIModelName = 'TransferOperation'; + protected static $openAPIModelName = 'CounterpartyBankRestriction'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,9 +44,8 @@ class TransferOperation implements ModelInterface, ArrayAccess, \JsonSerializabl * @var string[] */ protected static $openAPITypes = [ - 'direction' => 'string', - 'reference' => 'string', - 'type' => 'string' + 'operation' => 'string', + 'value' => '\Adyen\Model\BalancePlatform\BankIdentification[]' ]; /** @@ -57,9 +56,8 @@ class TransferOperation implements ModelInterface, ArrayAccess, \JsonSerializabl * @psalm-var array */ protected static $openAPIFormats = [ - 'direction' => null, - 'reference' => null, - 'type' => null + 'operation' => null, + 'value' => null ]; /** @@ -68,9 +66,8 @@ class TransferOperation implements ModelInterface, ArrayAccess, \JsonSerializabl * @var boolean[] */ protected static $openAPINullables = [ - 'direction' => false, - 'reference' => false, - 'type' => false + 'operation' => false, + 'value' => false ]; /** @@ -159,9 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'direction' => 'direction', - 'reference' => 'reference', - 'type' => 'type' + 'operation' => 'operation', + 'value' => 'value' ]; /** @@ -170,9 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'direction' => 'setDirection', - 'reference' => 'setReference', - 'type' => 'setType' + 'operation' => 'setOperation', + 'value' => 'setValue' ]; /** @@ -181,9 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'direction' => 'getDirection', - 'reference' => 'getReference', - 'type' => 'getType' + 'operation' => 'getOperation', + 'value' => 'getValue' ]; /** @@ -243,9 +237,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('direction', $data ?? [], null); - $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('operation', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -275,6 +268,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['operation'] === null) { + $invalidProperties[] = "'operation' can't be null"; + } return $invalidProperties; } @@ -291,82 +287,55 @@ public function valid() /** - * Gets direction - * - * @return string|null - */ - public function getDirection() - { - return $this->container['direction']; - } - - /** - * Sets direction - * - * @param string|null $direction The direction of the money movement. + * Gets operation * - * @return self - */ - public function setDirection($direction) - { - if (is_null($direction)) { - throw new \InvalidArgumentException('non-nullable direction cannot be null'); - } - $this->container['direction'] = $direction; - - return $this; - } - - /** - * Gets reference - * - * @return string|null + * @return string */ - public function getReference() + public function getOperation() { - return $this->container['reference']; + return $this->container['operation']; } /** - * Sets reference + * Sets operation * - * @param string|null $reference The reference returned when the amend was initiated. + * @param string $operation Defines how the condition must be evaluated. * * @return self */ - public function setReference($reference) + public function setOperation($operation) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); + if (is_null($operation)) { + throw new \InvalidArgumentException('non-nullable operation cannot be null'); } - $this->container['reference'] = $reference; + $this->container['operation'] = $operation; return $this; } /** - * Gets type + * Gets value * - * @return string|null + * @return \Adyen\Model\BalancePlatform\BankIdentification[]|null */ - public function getType() + public function getValue() { - return $this->container['type']; + return $this->container['value']; } /** - * Sets type + * Sets value * - * @param string|null $type The type of amend for the transfer. + * @param \Adyen\Model\BalancePlatform\BankIdentification[]|null $value List of counterparty Bank Institutions and the operation. * * @return self */ - public function setType($type) + public function setValue($value) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['type'] = $type; + $this->container['value'] = $value; return $this; } 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/ApplePayInfo.php b/src/Adyen/Model/Management/ApplePayInfo.php index 842662f33..3ab0f8b4b 100644 --- a/src/Adyen/Model/Management/ApplePayInfo.php +++ b/src/Adyen/Model/Management/ApplePayInfo.php @@ -261,6 +261,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['domains'] === null) { + $invalidProperties[] = "'domains' can't be null"; + } return $invalidProperties; } @@ -279,7 +282,7 @@ public function valid() /** * Gets domains * - * @return string[]|null + * @return string[] */ public function getDomains() { @@ -289,7 +292,7 @@ public function getDomains() /** * Sets domains * - * @param string[]|null $domains The list of merchant domains. Maximum: 99 domains per request. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/web-drop-in?tab=adyen-certificate-live_1#going-live). + * @param string[] $domains The list of merchant domains. Maximum: 99 domains per request. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/web-drop-in?tab=adyen-certificate-live_1#going-live). * * @return self */ diff --git a/src/Adyen/Model/Management/Hardware.php b/src/Adyen/Model/Management/Hardware.php index f2dfa3b9f..2352c3293 100644 --- a/src/Adyen/Model/Management/Hardware.php +++ b/src/Adyen/Model/Management/Hardware.php @@ -321,7 +321,7 @@ public function getRestartHour() /** * Sets restartHour * - * @param int|null $restartHour The hour (0 - 23) in which the device will reboot, reboot will happen in the timezone of the device + * @param int|null $restartHour The hour of the day when the terminal is set to reboot to apply the configuration and software updates. By default, the restart hour is at 6:00 AM in the timezone of the terminal Minimum vaoue: 0, maximum value: 23. * * @return self */ diff --git a/src/Adyen/Model/Management/KlarnaInfo.php b/src/Adyen/Model/Management/KlarnaInfo.php index fc9947116..3f02ebab3 100644 --- a/src/Adyen/Model/Management/KlarnaInfo.php +++ b/src/Adyen/Model/Management/KlarnaInfo.php @@ -303,6 +303,9 @@ public function listInvalidProperties() if ($this->container['disputeEmail'] === null) { $invalidProperties[] = "'disputeEmail' can't be null"; } + if ($this->container['region'] === null) { + $invalidProperties[] = "'region' can't be null"; + } $allowedValues = $this->getRegionAllowableValues(); if (!is_null($this->container['region']) && !in_array($this->container['region'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -387,7 +390,7 @@ public function setDisputeEmail($disputeEmail) /** * Gets region * - * @return string|null + * @return string */ public function getRegion() { @@ -397,7 +400,7 @@ public function getRegion() /** * Sets region * - * @param string|null $region The region of operation. For example, **NA**, **EU**, **CH**, **AU**. + * @param string $region The region of operation. For example, **NA**, **EU**, **CH**, **AU**. * * @return self */ diff --git a/src/Adyen/Model/Management/ListTerminalsResponse.php b/src/Adyen/Model/Management/ListTerminalsResponse.php index a05328ddb..d2c8ffd6a 100644 --- a/src/Adyen/Model/Management/ListTerminalsResponse.php +++ b/src/Adyen/Model/Management/ListTerminalsResponse.php @@ -343,7 +343,7 @@ public function getData() /** * Sets data * - * @param \Adyen\Model\Management\Terminal[]|null $data The list of terminals. + * @param \Adyen\Model\Management\Terminal[]|null $data The list of terminals and their details. * * @return self */ diff --git a/src/Adyen/Model/Management/Notification.php b/src/Adyen/Model/Management/Notification.php index 8c60d6807..26bfe32f1 100644 --- a/src/Adyen/Model/Management/Notification.php +++ b/src/Adyen/Model/Management/Notification.php @@ -289,7 +289,7 @@ public function getShowButton() /** * Sets showButton * - * @param bool|null $showButton Toggle to show or hide Notification button on the terminal + * @param bool|null $showButton Shows or hides the event notification button on the terminal screen. * * @return self */ diff --git a/src/Adyen/Model/Management/Payment.php b/src/Adyen/Model/Management/Payment.php index 1cb5fd1d4..508548f7c 100644 --- a/src/Adyen/Model/Management/Payment.php +++ b/src/Adyen/Model/Management/Payment.php @@ -44,6 +44,7 @@ class Payment implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'contactlessCurrency' => 'string', 'hideMinorUnitsInCurrencies' => 'string[]' ]; @@ -55,6 +56,7 @@ class Payment implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'contactlessCurrency' => null, 'hideMinorUnitsInCurrencies' => null ]; @@ -64,6 +66,7 @@ class Payment implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'contactlessCurrency' => false, 'hideMinorUnitsInCurrencies' => false ]; @@ -153,6 +156,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'contactlessCurrency' => 'contactlessCurrency', 'hideMinorUnitsInCurrencies' => 'hideMinorUnitsInCurrencies' ]; @@ -162,6 +166,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'contactlessCurrency' => 'setContactlessCurrency', 'hideMinorUnitsInCurrencies' => 'setHideMinorUnitsInCurrencies' ]; @@ -171,6 +176,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'contactlessCurrency' => 'getContactlessCurrency', 'hideMinorUnitsInCurrencies' => 'getHideMinorUnitsInCurrencies' ]; @@ -231,6 +237,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('contactlessCurrency', $data ?? [], null); $this->setIfExists('hideMinorUnitsInCurrencies', $data ?? [], null); } @@ -276,6 +283,33 @@ public function valid() } + /** + * Gets contactlessCurrency + * + * @return string|null + */ + public function getContactlessCurrency() + { + return $this->container['contactlessCurrency']; + } + + /** + * Sets contactlessCurrency + * + * @param string|null $contactlessCurrency The default currency for contactless payments on the payment terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. + * + * @return self + */ + public function setContactlessCurrency($contactlessCurrency) + { + if (is_null($contactlessCurrency)) { + throw new \InvalidArgumentException('non-nullable contactlessCurrency cannot be null'); + } + $this->container['contactlessCurrency'] = $contactlessCurrency; + + return $this; + } + /** * Gets hideMinorUnitsInCurrencies * diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index 5733869b4..f61aba3fc 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -250,7 +250,6 @@ public function getModelName() public const TYPES_WITH_ERRORS_CLEARPAY = 'clearpay'; public const TYPES_WITH_ERRORS_CUP = 'cup'; public const TYPES_WITH_ERRORS_DINERS = 'diners'; - public const TYPES_WITH_ERRORS_DIRECT_EBANKING = 'directEbanking'; public const TYPES_WITH_ERRORS_DIRECTDEBIT_GB = 'directdebit_GB'; public const TYPES_WITH_ERRORS_DISCOVER = 'discover'; public const TYPES_WITH_ERRORS_EBANKING_FI = 'ebanking_FI'; @@ -309,7 +308,6 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_CLEARPAY, self::TYPES_WITH_ERRORS_CUP, self::TYPES_WITH_ERRORS_DINERS, - self::TYPES_WITH_ERRORS_DIRECT_EBANKING, self::TYPES_WITH_ERRORS_DIRECTDEBIT_GB, self::TYPES_WITH_ERRORS_DISCOVER, self::TYPES_WITH_ERRORS_EBANKING_FI, @@ -460,7 +458,7 @@ public function getData() /** * Sets data * - * @param \Adyen\Model\Management\PaymentMethodWrapper[]|null $data Payment methods details. + * @param \Adyen\Model\Management\PaymentMethodWrapper[]|null $data The list of supported payment methods and their details. * * @return self */ diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index 971c9a767..bbbc31deb 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -422,7 +422,6 @@ public function getModelName() public const TYPE_CLEARPAY = 'clearpay'; public const TYPE_CUP = 'cup'; public const TYPE_DINERS = 'diners'; - public const TYPE_DIRECT_EBANKING = 'directEbanking'; public const TYPE_DIRECTDEBIT_GB = 'directdebit_GB'; public const TYPE_DISCOVER = 'discover'; public const TYPE_EBANKING_FI = 'ebanking_FI'; @@ -495,7 +494,6 @@ public function getTypeAllowableValues() self::TYPE_CLEARPAY, self::TYPE_CUP, self::TYPE_DINERS, - self::TYPE_DIRECT_EBANKING, self::TYPE_DIRECTDEBIT_GB, self::TYPE_DISCOVER, self::TYPE_EBANKING_FI, @@ -622,6 +620,9 @@ 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( @@ -1469,7 +1470,7 @@ public function setTwint($twint) /** * Gets type * - * @return string|null + * @return string */ public function getType() { @@ -1479,7 +1480,7 @@ public function getType() /** * Sets type * - * @param string|null $type Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + * @param string $type Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). * * @return self */ diff --git a/src/Adyen/Model/Management/SplitConfigurationLogic.php b/src/Adyen/Model/Management/SplitConfigurationLogic.php index 9667ea2bb..6d42a549e 100644 --- a/src/Adyen/Model/Management/SplitConfigurationLogic.php +++ b/src/Adyen/Model/Management/SplitConfigurationLogic.php @@ -44,11 +44,18 @@ class SplitConfigurationLogic implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openAPITypes = [ + 'acquiringFees' => 'string', 'additionalCommission' => '\Adyen\Model\Management\AdditionalCommission', + 'adyenCommission' => 'string', + 'adyenFees' => 'string', + 'adyenMarkup' => 'string', 'chargeback' => 'string', + 'chargebackCostAllocation' => 'string', 'commission' => '\Adyen\Model\Management\Commission', + 'interchange' => 'string', 'paymentFee' => 'string', 'remainder' => 'string', + 'schemeFee' => 'string', 'splitLogicId' => 'string', 'surcharge' => 'string', 'tip' => 'string' @@ -62,11 +69,18 @@ class SplitConfigurationLogic implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ + 'acquiringFees' => null, 'additionalCommission' => null, + 'adyenCommission' => null, + 'adyenFees' => null, + 'adyenMarkup' => null, 'chargeback' => null, + 'chargebackCostAllocation' => null, 'commission' => null, + 'interchange' => null, 'paymentFee' => null, 'remainder' => null, + 'schemeFee' => null, 'splitLogicId' => null, 'surcharge' => null, 'tip' => null @@ -78,11 +92,18 @@ class SplitConfigurationLogic implements ModelInterface, ArrayAccess, \JsonSeria * @var boolean[] */ protected static $openAPINullables = [ + 'acquiringFees' => false, 'additionalCommission' => false, + 'adyenCommission' => false, + 'adyenFees' => false, + 'adyenMarkup' => false, 'chargeback' => false, + 'chargebackCostAllocation' => false, 'commission' => false, + 'interchange' => false, 'paymentFee' => false, 'remainder' => false, + 'schemeFee' => false, 'splitLogicId' => false, 'surcharge' => false, 'tip' => false @@ -174,11 +195,18 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'acquiringFees' => 'acquiringFees', 'additionalCommission' => 'additionalCommission', + 'adyenCommission' => 'adyenCommission', + 'adyenFees' => 'adyenFees', + 'adyenMarkup' => 'adyenMarkup', 'chargeback' => 'chargeback', + 'chargebackCostAllocation' => 'chargebackCostAllocation', 'commission' => 'commission', + 'interchange' => 'interchange', 'paymentFee' => 'paymentFee', 'remainder' => 'remainder', + 'schemeFee' => 'schemeFee', 'splitLogicId' => 'splitLogicId', 'surcharge' => 'surcharge', 'tip' => 'tip' @@ -190,11 +218,18 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'acquiringFees' => 'setAcquiringFees', 'additionalCommission' => 'setAdditionalCommission', + 'adyenCommission' => 'setAdyenCommission', + 'adyenFees' => 'setAdyenFees', + 'adyenMarkup' => 'setAdyenMarkup', 'chargeback' => 'setChargeback', + 'chargebackCostAllocation' => 'setChargebackCostAllocation', 'commission' => 'setCommission', + 'interchange' => 'setInterchange', 'paymentFee' => 'setPaymentFee', 'remainder' => 'setRemainder', + 'schemeFee' => 'setSchemeFee', 'splitLogicId' => 'setSplitLogicId', 'surcharge' => 'setSurcharge', 'tip' => 'setTip' @@ -206,11 +241,18 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'acquiringFees' => 'getAcquiringFees', 'additionalCommission' => 'getAdditionalCommission', + 'adyenCommission' => 'getAdyenCommission', + 'adyenFees' => 'getAdyenFees', + 'adyenMarkup' => 'getAdyenMarkup', 'chargeback' => 'getChargeback', + 'chargebackCostAllocation' => 'getChargebackCostAllocation', 'commission' => 'getCommission', + 'interchange' => 'getInterchange', 'paymentFee' => 'getPaymentFee', 'remainder' => 'getRemainder', + 'schemeFee' => 'getSchemeFee', 'splitLogicId' => 'getSplitLogicId', 'surcharge' => 'getSurcharge', 'tip' => 'getTip' @@ -257,18 +299,80 @@ public function getModelName() return self::$openAPIModelName; } + public const ACQUIRING_FEES_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const ACQUIRING_FEES_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const ADYEN_COMMISSION_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const ADYEN_COMMISSION_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const ADYEN_FEES_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const ADYEN_FEES_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const ADYEN_MARKUP_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const ADYEN_MARKUP_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; public const CHARGEBACK_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; public const CHARGEBACK_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; public const CHARGEBACK_DEDUCT_ACCORDING_TO_SPLIT_RATIO = 'deductAccordingToSplitRatio'; + public const CHARGEBACK_COST_ALLOCATION_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const CHARGEBACK_COST_ALLOCATION_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const INTERCHANGE_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const INTERCHANGE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; public const PAYMENT_FEE_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; public const PAYMENT_FEE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; public const REMAINDER_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; public const REMAINDER_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; + public const SCHEME_FEE_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const SCHEME_FEE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; public const SURCHARGE_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; public const SURCHARGE_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; public const TIP_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; public const TIP_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAcquiringFeesAllowableValues() + { + return [ + self::ACQUIRING_FEES_DEDUCT_FROM_LIABLE_ACCOUNT, + self::ACQUIRING_FEES_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAdyenCommissionAllowableValues() + { + return [ + self::ADYEN_COMMISSION_DEDUCT_FROM_LIABLE_ACCOUNT, + self::ADYEN_COMMISSION_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAdyenFeesAllowableValues() + { + return [ + self::ADYEN_FEES_DEDUCT_FROM_LIABLE_ACCOUNT, + self::ADYEN_FEES_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAdyenMarkupAllowableValues() + { + return [ + self::ADYEN_MARKUP_DEDUCT_FROM_LIABLE_ACCOUNT, + self::ADYEN_MARKUP_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -282,6 +386,30 @@ public function getChargebackAllowableValues() self::CHARGEBACK_DEDUCT_ACCORDING_TO_SPLIT_RATIO, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChargebackCostAllocationAllowableValues() + { + return [ + self::CHARGEBACK_COST_ALLOCATION_DEDUCT_FROM_LIABLE_ACCOUNT, + self::CHARGEBACK_COST_ALLOCATION_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getInterchangeAllowableValues() + { + return [ + self::INTERCHANGE_DEDUCT_FROM_LIABLE_ACCOUNT, + self::INTERCHANGE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -306,6 +434,18 @@ public function getRemainderAllowableValues() self::REMAINDER_ADD_TO_ONE_BALANCE_ACCOUNT, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSchemeFeeAllowableValues() + { + return [ + self::SCHEME_FEE_DEDUCT_FROM_LIABLE_ACCOUNT, + self::SCHEME_FEE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -345,11 +485,18 @@ public function getTipAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('acquiringFees', $data ?? [], null); $this->setIfExists('additionalCommission', $data ?? [], null); + $this->setIfExists('adyenCommission', $data ?? [], null); + $this->setIfExists('adyenFees', $data ?? [], null); + $this->setIfExists('adyenMarkup', $data ?? [], null); $this->setIfExists('chargeback', $data ?? [], null); + $this->setIfExists('chargebackCostAllocation', $data ?? [], null); $this->setIfExists('commission', $data ?? [], null); + $this->setIfExists('interchange', $data ?? [], null); $this->setIfExists('paymentFee', $data ?? [], null); $this->setIfExists('remainder', $data ?? [], null); + $this->setIfExists('schemeFee', $data ?? [], null); $this->setIfExists('splitLogicId', $data ?? [], null); $this->setIfExists('surcharge', $data ?? [], null); $this->setIfExists('tip', $data ?? [], null); @@ -382,6 +529,42 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getAcquiringFeesAllowableValues(); + if (!is_null($this->container['acquiringFees']) && !in_array($this->container['acquiringFees'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'acquiringFees', must be one of '%s'", + $this->container['acquiringFees'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAdyenCommissionAllowableValues(); + if (!is_null($this->container['adyenCommission']) && !in_array($this->container['adyenCommission'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'adyenCommission', must be one of '%s'", + $this->container['adyenCommission'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAdyenFeesAllowableValues(); + if (!is_null($this->container['adyenFees']) && !in_array($this->container['adyenFees'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'adyenFees', must be one of '%s'", + $this->container['adyenFees'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAdyenMarkupAllowableValues(); + if (!is_null($this->container['adyenMarkup']) && !in_array($this->container['adyenMarkup'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'adyenMarkup', must be one of '%s'", + $this->container['adyenMarkup'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getChargebackAllowableValues(); if (!is_null($this->container['chargeback']) && !in_array($this->container['chargeback'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -391,12 +574,27 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getChargebackCostAllocationAllowableValues(); + if (!is_null($this->container['chargebackCostAllocation']) && !in_array($this->container['chargebackCostAllocation'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chargebackCostAllocation', must be one of '%s'", + $this->container['chargebackCostAllocation'], + implode("', '", $allowedValues) + ); + } + if ($this->container['commission'] === null) { $invalidProperties[] = "'commission' can't be null"; } - if ($this->container['paymentFee'] === null) { - $invalidProperties[] = "'paymentFee' can't be null"; + $allowedValues = $this->getInterchangeAllowableValues(); + if (!is_null($this->container['interchange']) && !in_array($this->container['interchange'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'interchange', must be one of '%s'", + $this->container['interchange'], + implode("', '", $allowedValues) + ); } + $allowedValues = $this->getPaymentFeeAllowableValues(); if (!is_null($this->container['paymentFee']) && !in_array($this->container['paymentFee'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -415,6 +613,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getSchemeFeeAllowableValues(); + if (!is_null($this->container['schemeFee']) && !in_array($this->container['schemeFee'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'schemeFee', must be one of '%s'", + $this->container['schemeFee'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getSurchargeAllowableValues(); if (!is_null($this->container['surcharge']) && !in_array($this->container['surcharge'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -448,6 +655,43 @@ public function valid() } + /** + * Gets acquiringFees + * + * @return string|null + */ + public function getAcquiringFees() + { + return $this->container['acquiringFees']; + } + + /** + * Sets acquiringFees + * + * @param string|null $acquiringFees Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setAcquiringFees($acquiringFees) + { + if (is_null($acquiringFees)) { + throw new \InvalidArgumentException('non-nullable acquiringFees cannot be null'); + } + $allowedValues = $this->getAcquiringFeesAllowableValues(); + if (!in_array($acquiringFees, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'acquiringFees', must be one of '%s'", + $acquiringFees, + implode("', '", $allowedValues) + ) + ); + } + $this->container['acquiringFees'] = $acquiringFees; + + return $this; + } + /** * Gets additionalCommission * @@ -475,6 +719,117 @@ public function setAdditionalCommission($additionalCommission) return $this; } + /** + * Gets adyenCommission + * + * @return string|null + */ + public function getAdyenCommission() + { + return $this->container['adyenCommission']; + } + + /** + * Sets adyenCommission + * + * @param string|null $adyenCommission Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setAdyenCommission($adyenCommission) + { + if (is_null($adyenCommission)) { + throw new \InvalidArgumentException('non-nullable adyenCommission cannot be null'); + } + $allowedValues = $this->getAdyenCommissionAllowableValues(); + if (!in_array($adyenCommission, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'adyenCommission', must be one of '%s'", + $adyenCommission, + implode("', '", $allowedValues) + ) + ); + } + $this->container['adyenCommission'] = $adyenCommission; + + return $this; + } + + /** + * Gets adyenFees + * + * @return string|null + */ + public function getAdyenFees() + { + return $this->container['adyenFees']; + } + + /** + * Sets adyenFees + * + * @param string|null $adyenFees Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setAdyenFees($adyenFees) + { + if (is_null($adyenFees)) { + throw new \InvalidArgumentException('non-nullable adyenFees cannot be null'); + } + $allowedValues = $this->getAdyenFeesAllowableValues(); + if (!in_array($adyenFees, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'adyenFees', must be one of '%s'", + $adyenFees, + implode("', '", $allowedValues) + ) + ); + } + $this->container['adyenFees'] = $adyenFees; + + return $this; + } + + /** + * Gets adyenMarkup + * + * @return string|null + */ + public function getAdyenMarkup() + { + return $this->container['adyenMarkup']; + } + + /** + * Sets adyenMarkup + * + * @param string|null $adyenMarkup Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setAdyenMarkup($adyenMarkup) + { + if (is_null($adyenMarkup)) { + throw new \InvalidArgumentException('non-nullable adyenMarkup cannot be null'); + } + $allowedValues = $this->getAdyenMarkupAllowableValues(); + if (!in_array($adyenMarkup, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'adyenMarkup', must be one of '%s'", + $adyenMarkup, + implode("', '", $allowedValues) + ) + ); + } + $this->container['adyenMarkup'] = $adyenMarkup; + + return $this; + } + /** * Gets chargeback * @@ -512,6 +867,43 @@ public function setChargeback($chargeback) return $this; } + /** + * Gets chargebackCostAllocation + * + * @return string|null + */ + public function getChargebackCostAllocation() + { + return $this->container['chargebackCostAllocation']; + } + + /** + * Sets chargebackCostAllocation + * + * @param string|null $chargebackCostAllocation Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + * + * @return self + */ + public function setChargebackCostAllocation($chargebackCostAllocation) + { + if (is_null($chargebackCostAllocation)) { + throw new \InvalidArgumentException('non-nullable chargebackCostAllocation cannot be null'); + } + $allowedValues = $this->getChargebackCostAllocationAllowableValues(); + if (!in_array($chargebackCostAllocation, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chargebackCostAllocation', must be one of '%s'", + $chargebackCostAllocation, + implode("', '", $allowedValues) + ) + ); + } + $this->container['chargebackCostAllocation'] = $chargebackCostAllocation; + + return $this; + } + /** * Gets commission * @@ -539,10 +931,47 @@ public function setCommission($commission) return $this; } + /** + * Gets interchange + * + * @return string|null + */ + public function getInterchange() + { + return $this->container['interchange']; + } + + /** + * Sets interchange + * + * @param string|null $interchange Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setInterchange($interchange) + { + if (is_null($interchange)) { + throw new \InvalidArgumentException('non-nullable interchange cannot be null'); + } + $allowedValues = $this->getInterchangeAllowableValues(); + if (!in_array($interchange, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'interchange', must be one of '%s'", + $interchange, + implode("', '", $allowedValues) + ) + ); + } + $this->container['interchange'] = $interchange; + + return $this; + } + /** * Gets paymentFee * - * @return string + * @return string|null */ public function getPaymentFee() { @@ -552,7 +981,7 @@ public function getPaymentFee() /** * Sets paymentFee * - * @param string $paymentFee Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @param string|null $paymentFee Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. * * @return self */ @@ -613,6 +1042,43 @@ public function setRemainder($remainder) return $this; } + /** + * Gets schemeFee + * + * @return string|null + */ + public function getSchemeFee() + { + return $this->container['schemeFee']; + } + + /** + * Sets schemeFee + * + * @param string|null $schemeFee Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setSchemeFee($schemeFee) + { + if (is_null($schemeFee)) { + throw new \InvalidArgumentException('non-nullable schemeFee cannot be null'); + } + $allowedValues = $this->getSchemeFeeAllowableValues(); + if (!in_array($schemeFee, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'schemeFee', must be one of '%s'", + $schemeFee, + implode("', '", $allowedValues) + ) + ); + } + $this->container['schemeFee'] = $schemeFee; + + return $this; + } + /** * Gets splitLogicId * diff --git a/src/Adyen/Model/Management/Store.php b/src/Adyen/Model/Management/Store.php index 97aee6ee6..05a5381d8 100644 --- a/src/Adyen/Model/Management/Store.php +++ b/src/Adyen/Model/Management/Store.php @@ -607,7 +607,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference A reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_) + * @param string|null $reference A reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_) * * @return self */ diff --git a/src/Adyen/Model/Management/StoreCreationRequest.php b/src/Adyen/Model/Management/StoreCreationRequest.php index 75f9987c4..84e0da8a3 100644 --- a/src/Adyen/Model/Management/StoreCreationRequest.php +++ b/src/Adyen/Model/Management/StoreCreationRequest.php @@ -431,7 +431,7 @@ public function getExternalReferenceId() /** * Sets externalReferenceId * - * @param string|null $externalReferenceId Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits. + * @param string|null $externalReferenceId The unique identifier of the store, used by certain payment methods and tax authorities. Accepts up to 14 digits. Required for CNPJ in Brazil, in the format 00.000.000/00git00-00 separated by dots, slashes, hyphens, or without separators. Optional for Zip in Australia and SIRET in France, required except for nonprofit organizations and incorporated associations. * * @return self */ diff --git a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php index 588c51c91..b6b2b1861 100644 --- a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php +++ b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php @@ -441,7 +441,7 @@ public function getExternalReferenceId() /** * Sets externalReferenceId * - * @param string|null $externalReferenceId Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits. + * @param string|null $externalReferenceId The unique identifier of the store, used by certain payment methods and tax authorities. Accepts up to 14 digits. Required for CNPJ in Brazil, in the format 00.000.000/00git00-00 separated by dots, slashes, hyphens, or without separators. Optional for Zip in Australia and SIRET in France, required except for nonprofit organizations and incorporated associations. * * @return self */ diff --git a/src/Adyen/Model/Management/SwishInfo.php b/src/Adyen/Model/Management/SwishInfo.php index fa9d393cf..9213615cc 100644 --- a/src/Adyen/Model/Management/SwishInfo.php +++ b/src/Adyen/Model/Management/SwishInfo.php @@ -261,6 +261,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['swishNumber'] === null) { + $invalidProperties[] = "'swishNumber' can't be null"; + } return $invalidProperties; } @@ -279,7 +282,7 @@ public function valid() /** * Gets swishNumber * - * @return string|null + * @return string */ public function getSwishNumber() { @@ -289,7 +292,7 @@ public function getSwishNumber() /** * Sets swishNumber * - * @param string|null $swishNumber Swish number. Format: 10 digits without spaces. For example, **1231111111**. + * @param string $swishNumber Swish number. Format: 10 digits without spaces. For example, **1231111111**. * * @return self */ diff --git a/src/Adyen/Model/Management/Terminal.php b/src/Adyen/Model/Management/Terminal.php index 4018cf820..3fa1d57af 100644 --- a/src/Adyen/Model/Management/Terminal.php +++ b/src/Adyen/Model/Management/Terminal.php @@ -427,6 +427,7 @@ public function valid() * Gets assigned * * @return bool|null + * @deprecated */ public function getAssigned() { @@ -439,6 +440,7 @@ public function getAssigned() * @param bool|null $assigned The [assignment status](https://docs.adyen.com/point-of-sale/automating-terminal-management/assign-terminals-api) of the terminal. If true, the terminal is assigned. If false, the terminal is in inventory and can't be boarded. * * @return self + * @deprecated */ public function setAssigned($assigned) { @@ -454,6 +456,7 @@ public function setAssigned($assigned) * Gets bluetoothIp * * @return string|null + * @deprecated */ public function getBluetoothIp() { @@ -466,6 +469,7 @@ public function getBluetoothIp() * @param string|null $bluetoothIp The Bluetooth IP address of the terminal. * * @return self + * @deprecated */ public function setBluetoothIp($bluetoothIp) { @@ -481,6 +485,7 @@ public function setBluetoothIp($bluetoothIp) * Gets bluetoothMac * * @return string|null + * @deprecated */ public function getBluetoothMac() { @@ -493,6 +498,7 @@ public function getBluetoothMac() * @param string|null $bluetoothMac The Bluetooth MAC address of the terminal. * * @return self + * @deprecated */ public function setBluetoothMac($bluetoothMac) { @@ -508,6 +514,7 @@ public function setBluetoothMac($bluetoothMac) * Gets city * * @return string|null + * @deprecated */ public function getCity() { @@ -520,6 +527,7 @@ public function getCity() * @param string|null $city The city where the terminal is located. * * @return self + * @deprecated */ public function setCity($city) { @@ -535,6 +543,7 @@ public function setCity($city) * Gets companyAccount * * @return string|null + * @deprecated */ public function getCompanyAccount() { @@ -547,6 +556,7 @@ public function getCompanyAccount() * @param string|null $companyAccount The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account. * * @return self + * @deprecated */ public function setCompanyAccount($companyAccount) { @@ -562,6 +572,7 @@ public function setCompanyAccount($companyAccount) * Gets countryCode * * @return string|null + * @deprecated */ public function getCountryCode() { @@ -574,6 +585,7 @@ public function getCountryCode() * @param string|null $countryCode The country code of the country where the terminal is located. * * @return self + * @deprecated */ public function setCountryCode($countryCode) { @@ -589,6 +601,7 @@ public function setCountryCode($countryCode) * Gets deviceModel * * @return string|null + * @deprecated */ public function getDeviceModel() { @@ -601,6 +614,7 @@ public function getDeviceModel() * @param string|null $deviceModel The model name of the terminal. * * @return self + * @deprecated */ public function setDeviceModel($deviceModel) { @@ -616,6 +630,7 @@ public function setDeviceModel($deviceModel) * Gets ethernetIp * * @return string|null + * @deprecated */ public function getEthernetIp() { @@ -628,6 +643,7 @@ public function getEthernetIp() * @param string|null $ethernetIp The ethernet IP address of the terminal. * * @return self + * @deprecated */ public function setEthernetIp($ethernetIp) { @@ -643,6 +659,7 @@ public function setEthernetIp($ethernetIp) * Gets ethernetMac * * @return string|null + * @deprecated */ public function getEthernetMac() { @@ -655,6 +672,7 @@ public function getEthernetMac() * @param string|null $ethernetMac The ethernet MAC address of the terminal. * * @return self + * @deprecated */ public function setEthernetMac($ethernetMac) { @@ -697,6 +715,7 @@ public function setFirmwareVersion($firmwareVersion) * Gets iccid * * @return string|null + * @deprecated */ public function getIccid() { @@ -709,6 +728,7 @@ public function getIccid() * @param string|null $iccid The integrated circuit card identifier (ICCID) of the SIM card in the terminal. * * @return self + * @deprecated */ public function setIccid($iccid) { @@ -751,6 +771,7 @@ public function setId($id) * Gets lastActivityDateTime * * @return \DateTime|null + * @deprecated */ public function getLastActivityDateTime() { @@ -763,6 +784,7 @@ public function getLastActivityDateTime() * @param \DateTime|null $lastActivityDateTime Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago. * * @return self + * @deprecated */ public function setLastActivityDateTime($lastActivityDateTime) { @@ -778,6 +800,7 @@ public function setLastActivityDateTime($lastActivityDateTime) * Gets lastTransactionDateTime * * @return \DateTime|null + * @deprecated */ public function getLastTransactionDateTime() { @@ -787,9 +810,10 @@ public function getLastTransactionDateTime() /** * Sets lastTransactionDateTime * - * @param \DateTime|null $lastTransactionDateTime Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago. + * @param \DateTime|null $lastTransactionDateTime Date and time of the last transaction on the terminal. * * @return self + * @deprecated */ public function setLastTransactionDateTime($lastTransactionDateTime) { @@ -805,6 +829,7 @@ public function setLastTransactionDateTime($lastTransactionDateTime) * Gets linkNegotiation * * @return string|null + * @deprecated */ public function getLinkNegotiation() { @@ -817,6 +842,7 @@ public function getLinkNegotiation() * @param string|null $linkNegotiation The Ethernet link negotiation that the terminal uses: - `auto`: Auto-negotiation - `100full`: 100 Mbps full duplex * * @return self + * @deprecated */ public function setLinkNegotiation($linkNegotiation) { @@ -859,6 +885,7 @@ public function setSerialNumber($serialNumber) * Gets simStatus * * @return string|null + * @deprecated */ public function getSimStatus() { @@ -871,6 +898,7 @@ public function getSimStatus() * @param string|null $simStatus On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal: ACTIVE or INVENTORY. * * @return self + * @deprecated */ public function setSimStatus($simStatus) { @@ -886,6 +914,7 @@ public function setSimStatus($simStatus) * Gets status * * @return string|null + * @deprecated */ public function getStatus() { @@ -898,6 +927,7 @@ public function getStatus() * @param string|null $status Indicates when the terminal was last online, whether the terminal is being reassigned, or whether the terminal is turned off. If the terminal was last online more that a week ago, it is also shown as turned off. * * @return self + * @deprecated */ public function setStatus($status) { @@ -913,6 +943,7 @@ public function setStatus($status) * Gets storeStatus * * @return string|null + * @deprecated */ public function getStoreStatus() { @@ -925,6 +956,7 @@ public function getStoreStatus() * @param string|null $storeStatus The status of the store that the terminal is assigned to. * * @return self + * @deprecated */ public function setStoreStatus($storeStatus) { @@ -940,6 +972,7 @@ public function setStoreStatus($storeStatus) * Gets wifiIp * * @return string|null + * @deprecated */ public function getWifiIp() { @@ -952,6 +985,7 @@ public function getWifiIp() * @param string|null $wifiIp The terminal's IP address in your Wi-Fi network. * * @return self + * @deprecated */ public function setWifiIp($wifiIp) { @@ -967,6 +1001,7 @@ public function setWifiIp($wifiIp) * Gets wifiMac * * @return string|null + * @deprecated */ public function getWifiMac() { @@ -979,6 +1014,7 @@ public function getWifiMac() * @param string|null $wifiMac The terminal's MAC address in your Wi-Fi network. * * @return self + * @deprecated */ public function setWifiMac($wifiMac) { @@ -994,6 +1030,7 @@ public function setWifiMac($wifiMac) * Gets wifiSsid * * @return string|null + * @deprecated */ public function getWifiSsid() { @@ -1006,6 +1043,7 @@ public function getWifiSsid() * @param string|null $wifiSsid The SSID of the Wi-Fi network that your terminal is connected to. * * @return self + * @deprecated */ public function setWifiSsid($wifiSsid) { diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php index 8e4f3b2e7..0b4013bf0 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php @@ -44,11 +44,18 @@ class UpdateSplitConfigurationLogicRequest implements ModelInterface, ArrayAcces * @var string[] */ protected static $openAPITypes = [ + 'acquiringFees' => 'string', 'additionalCommission' => '\Adyen\Model\Management\AdditionalCommission', + 'adyenCommission' => 'string', + 'adyenFees' => 'string', + 'adyenMarkup' => 'string', 'chargeback' => 'string', + 'chargebackCostAllocation' => 'string', 'commission' => '\Adyen\Model\Management\Commission', + 'interchange' => 'string', 'paymentFee' => 'string', 'remainder' => 'string', + 'schemeFee' => 'string', 'splitLogicId' => 'string', 'surcharge' => 'string', 'tip' => 'string' @@ -62,11 +69,18 @@ class UpdateSplitConfigurationLogicRequest implements ModelInterface, ArrayAcces * @psalm-var array */ protected static $openAPIFormats = [ + 'acquiringFees' => null, 'additionalCommission' => null, + 'adyenCommission' => null, + 'adyenFees' => null, + 'adyenMarkup' => null, 'chargeback' => null, + 'chargebackCostAllocation' => null, 'commission' => null, + 'interchange' => null, 'paymentFee' => null, 'remainder' => null, + 'schemeFee' => null, 'splitLogicId' => null, 'surcharge' => null, 'tip' => null @@ -78,11 +92,18 @@ class UpdateSplitConfigurationLogicRequest implements ModelInterface, ArrayAcces * @var boolean[] */ protected static $openAPINullables = [ + 'acquiringFees' => false, 'additionalCommission' => false, + 'adyenCommission' => false, + 'adyenFees' => false, + 'adyenMarkup' => false, 'chargeback' => false, + 'chargebackCostAllocation' => false, 'commission' => false, + 'interchange' => false, 'paymentFee' => false, 'remainder' => false, + 'schemeFee' => false, 'splitLogicId' => false, 'surcharge' => false, 'tip' => false @@ -174,11 +195,18 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'acquiringFees' => 'acquiringFees', 'additionalCommission' => 'additionalCommission', + 'adyenCommission' => 'adyenCommission', + 'adyenFees' => 'adyenFees', + 'adyenMarkup' => 'adyenMarkup', 'chargeback' => 'chargeback', + 'chargebackCostAllocation' => 'chargebackCostAllocation', 'commission' => 'commission', + 'interchange' => 'interchange', 'paymentFee' => 'paymentFee', 'remainder' => 'remainder', + 'schemeFee' => 'schemeFee', 'splitLogicId' => 'splitLogicId', 'surcharge' => 'surcharge', 'tip' => 'tip' @@ -190,11 +218,18 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'acquiringFees' => 'setAcquiringFees', 'additionalCommission' => 'setAdditionalCommission', + 'adyenCommission' => 'setAdyenCommission', + 'adyenFees' => 'setAdyenFees', + 'adyenMarkup' => 'setAdyenMarkup', 'chargeback' => 'setChargeback', + 'chargebackCostAllocation' => 'setChargebackCostAllocation', 'commission' => 'setCommission', + 'interchange' => 'setInterchange', 'paymentFee' => 'setPaymentFee', 'remainder' => 'setRemainder', + 'schemeFee' => 'setSchemeFee', 'splitLogicId' => 'setSplitLogicId', 'surcharge' => 'setSurcharge', 'tip' => 'setTip' @@ -206,11 +241,18 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'acquiringFees' => 'getAcquiringFees', 'additionalCommission' => 'getAdditionalCommission', + 'adyenCommission' => 'getAdyenCommission', + 'adyenFees' => 'getAdyenFees', + 'adyenMarkup' => 'getAdyenMarkup', 'chargeback' => 'getChargeback', + 'chargebackCostAllocation' => 'getChargebackCostAllocation', 'commission' => 'getCommission', + 'interchange' => 'getInterchange', 'paymentFee' => 'getPaymentFee', 'remainder' => 'getRemainder', + 'schemeFee' => 'getSchemeFee', 'splitLogicId' => 'getSplitLogicId', 'surcharge' => 'getSurcharge', 'tip' => 'getTip' @@ -257,18 +299,80 @@ public function getModelName() return self::$openAPIModelName; } + public const ACQUIRING_FEES_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const ACQUIRING_FEES_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const ADYEN_COMMISSION_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const ADYEN_COMMISSION_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const ADYEN_FEES_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const ADYEN_FEES_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const ADYEN_MARKUP_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const ADYEN_MARKUP_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; public const CHARGEBACK_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; public const CHARGEBACK_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; public const CHARGEBACK_DEDUCT_ACCORDING_TO_SPLIT_RATIO = 'deductAccordingToSplitRatio'; + public const CHARGEBACK_COST_ALLOCATION_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const CHARGEBACK_COST_ALLOCATION_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + public const INTERCHANGE_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const INTERCHANGE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; public const PAYMENT_FEE_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; public const PAYMENT_FEE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; public const REMAINDER_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; public const REMAINDER_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; + public const SCHEME_FEE_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const SCHEME_FEE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; public const SURCHARGE_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; public const SURCHARGE_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; public const TIP_ADD_TO_LIABLE_ACCOUNT = 'addToLiableAccount'; public const TIP_ADD_TO_ONE_BALANCE_ACCOUNT = 'addToOneBalanceAccount'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAcquiringFeesAllowableValues() + { + return [ + self::ACQUIRING_FEES_DEDUCT_FROM_LIABLE_ACCOUNT, + self::ACQUIRING_FEES_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAdyenCommissionAllowableValues() + { + return [ + self::ADYEN_COMMISSION_DEDUCT_FROM_LIABLE_ACCOUNT, + self::ADYEN_COMMISSION_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAdyenFeesAllowableValues() + { + return [ + self::ADYEN_FEES_DEDUCT_FROM_LIABLE_ACCOUNT, + self::ADYEN_FEES_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAdyenMarkupAllowableValues() + { + return [ + self::ADYEN_MARKUP_DEDUCT_FROM_LIABLE_ACCOUNT, + self::ADYEN_MARKUP_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -282,6 +386,30 @@ public function getChargebackAllowableValues() self::CHARGEBACK_DEDUCT_ACCORDING_TO_SPLIT_RATIO, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChargebackCostAllocationAllowableValues() + { + return [ + self::CHARGEBACK_COST_ALLOCATION_DEDUCT_FROM_LIABLE_ACCOUNT, + self::CHARGEBACK_COST_ALLOCATION_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getInterchangeAllowableValues() + { + return [ + self::INTERCHANGE_DEDUCT_FROM_LIABLE_ACCOUNT, + self::INTERCHANGE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -306,6 +434,18 @@ public function getRemainderAllowableValues() self::REMAINDER_ADD_TO_ONE_BALANCE_ACCOUNT, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSchemeFeeAllowableValues() + { + return [ + self::SCHEME_FEE_DEDUCT_FROM_LIABLE_ACCOUNT, + self::SCHEME_FEE_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -345,11 +485,18 @@ public function getTipAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('acquiringFees', $data ?? [], null); $this->setIfExists('additionalCommission', $data ?? [], null); + $this->setIfExists('adyenCommission', $data ?? [], null); + $this->setIfExists('adyenFees', $data ?? [], null); + $this->setIfExists('adyenMarkup', $data ?? [], null); $this->setIfExists('chargeback', $data ?? [], null); + $this->setIfExists('chargebackCostAllocation', $data ?? [], null); $this->setIfExists('commission', $data ?? [], null); + $this->setIfExists('interchange', $data ?? [], null); $this->setIfExists('paymentFee', $data ?? [], null); $this->setIfExists('remainder', $data ?? [], null); + $this->setIfExists('schemeFee', $data ?? [], null); $this->setIfExists('splitLogicId', $data ?? [], null); $this->setIfExists('surcharge', $data ?? [], null); $this->setIfExists('tip', $data ?? [], null); @@ -382,6 +529,42 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getAcquiringFeesAllowableValues(); + if (!is_null($this->container['acquiringFees']) && !in_array($this->container['acquiringFees'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'acquiringFees', must be one of '%s'", + $this->container['acquiringFees'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAdyenCommissionAllowableValues(); + if (!is_null($this->container['adyenCommission']) && !in_array($this->container['adyenCommission'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'adyenCommission', must be one of '%s'", + $this->container['adyenCommission'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAdyenFeesAllowableValues(); + if (!is_null($this->container['adyenFees']) && !in_array($this->container['adyenFees'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'adyenFees', must be one of '%s'", + $this->container['adyenFees'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAdyenMarkupAllowableValues(); + if (!is_null($this->container['adyenMarkup']) && !in_array($this->container['adyenMarkup'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'adyenMarkup', must be one of '%s'", + $this->container['adyenMarkup'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getChargebackAllowableValues(); if (!is_null($this->container['chargeback']) && !in_array($this->container['chargeback'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -391,12 +574,27 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getChargebackCostAllocationAllowableValues(); + if (!is_null($this->container['chargebackCostAllocation']) && !in_array($this->container['chargebackCostAllocation'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'chargebackCostAllocation', must be one of '%s'", + $this->container['chargebackCostAllocation'], + implode("', '", $allowedValues) + ); + } + if ($this->container['commission'] === null) { $invalidProperties[] = "'commission' can't be null"; } - if ($this->container['paymentFee'] === null) { - $invalidProperties[] = "'paymentFee' can't be null"; + $allowedValues = $this->getInterchangeAllowableValues(); + if (!is_null($this->container['interchange']) && !in_array($this->container['interchange'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'interchange', must be one of '%s'", + $this->container['interchange'], + implode("', '", $allowedValues) + ); } + $allowedValues = $this->getPaymentFeeAllowableValues(); if (!is_null($this->container['paymentFee']) && !in_array($this->container['paymentFee'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -415,6 +613,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getSchemeFeeAllowableValues(); + if (!is_null($this->container['schemeFee']) && !in_array($this->container['schemeFee'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'schemeFee', must be one of '%s'", + $this->container['schemeFee'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getSurchargeAllowableValues(); if (!is_null($this->container['surcharge']) && !in_array($this->container['surcharge'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -448,6 +655,43 @@ public function valid() } + /** + * Gets acquiringFees + * + * @return string|null + */ + public function getAcquiringFees() + { + return $this->container['acquiringFees']; + } + + /** + * Sets acquiringFees + * + * @param string|null $acquiringFees Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setAcquiringFees($acquiringFees) + { + if (is_null($acquiringFees)) { + throw new \InvalidArgumentException('non-nullable acquiringFees cannot be null'); + } + $allowedValues = $this->getAcquiringFeesAllowableValues(); + if (!in_array($acquiringFees, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'acquiringFees', must be one of '%s'", + $acquiringFees, + implode("', '", $allowedValues) + ) + ); + } + $this->container['acquiringFees'] = $acquiringFees; + + return $this; + } + /** * Gets additionalCommission * @@ -475,6 +719,117 @@ public function setAdditionalCommission($additionalCommission) return $this; } + /** + * Gets adyenCommission + * + * @return string|null + */ + public function getAdyenCommission() + { + return $this->container['adyenCommission']; + } + + /** + * Sets adyenCommission + * + * @param string|null $adyenCommission Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setAdyenCommission($adyenCommission) + { + if (is_null($adyenCommission)) { + throw new \InvalidArgumentException('non-nullable adyenCommission cannot be null'); + } + $allowedValues = $this->getAdyenCommissionAllowableValues(); + if (!in_array($adyenCommission, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'adyenCommission', must be one of '%s'", + $adyenCommission, + implode("', '", $allowedValues) + ) + ); + } + $this->container['adyenCommission'] = $adyenCommission; + + return $this; + } + + /** + * Gets adyenFees + * + * @return string|null + */ + public function getAdyenFees() + { + return $this->container['adyenFees']; + } + + /** + * Sets adyenFees + * + * @param string|null $adyenFees Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setAdyenFees($adyenFees) + { + if (is_null($adyenFees)) { + throw new \InvalidArgumentException('non-nullable adyenFees cannot be null'); + } + $allowedValues = $this->getAdyenFeesAllowableValues(); + if (!in_array($adyenFees, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'adyenFees', must be one of '%s'", + $adyenFees, + implode("', '", $allowedValues) + ) + ); + } + $this->container['adyenFees'] = $adyenFees; + + return $this; + } + + /** + * Gets adyenMarkup + * + * @return string|null + */ + public function getAdyenMarkup() + { + return $this->container['adyenMarkup']; + } + + /** + * Sets adyenMarkup + * + * @param string|null $adyenMarkup Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setAdyenMarkup($adyenMarkup) + { + if (is_null($adyenMarkup)) { + throw new \InvalidArgumentException('non-nullable adyenMarkup cannot be null'); + } + $allowedValues = $this->getAdyenMarkupAllowableValues(); + if (!in_array($adyenMarkup, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'adyenMarkup', must be one of '%s'", + $adyenMarkup, + implode("', '", $allowedValues) + ) + ); + } + $this->container['adyenMarkup'] = $adyenMarkup; + + return $this; + } + /** * Gets chargeback * @@ -512,6 +867,43 @@ public function setChargeback($chargeback) return $this; } + /** + * Gets chargebackCostAllocation + * + * @return string|null + */ + public function getChargebackCostAllocation() + { + return $this->container['chargebackCostAllocation']; + } + + /** + * Sets chargebackCostAllocation + * + * @param string|null $chargebackCostAllocation Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + * + * @return self + */ + public function setChargebackCostAllocation($chargebackCostAllocation) + { + if (is_null($chargebackCostAllocation)) { + throw new \InvalidArgumentException('non-nullable chargebackCostAllocation cannot be null'); + } + $allowedValues = $this->getChargebackCostAllocationAllowableValues(); + if (!in_array($chargebackCostAllocation, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'chargebackCostAllocation', must be one of '%s'", + $chargebackCostAllocation, + implode("', '", $allowedValues) + ) + ); + } + $this->container['chargebackCostAllocation'] = $chargebackCostAllocation; + + return $this; + } + /** * Gets commission * @@ -539,10 +931,47 @@ public function setCommission($commission) return $this; } + /** + * Gets interchange + * + * @return string|null + */ + public function getInterchange() + { + return $this->container['interchange']; + } + + /** + * Sets interchange + * + * @param string|null $interchange Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setInterchange($interchange) + { + if (is_null($interchange)) { + throw new \InvalidArgumentException('non-nullable interchange cannot be null'); + } + $allowedValues = $this->getInterchangeAllowableValues(); + if (!in_array($interchange, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'interchange', must be one of '%s'", + $interchange, + implode("', '", $allowedValues) + ) + ); + } + $this->container['interchange'] = $interchange; + + return $this; + } + /** * Gets paymentFee * - * @return string + * @return string|null */ public function getPaymentFee() { @@ -552,7 +981,7 @@ public function getPaymentFee() /** * Sets paymentFee * - * @param string $paymentFee Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * @param string|null $paymentFee Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. * * @return self */ @@ -613,6 +1042,43 @@ public function setRemainder($remainder) return $this; } + /** + * Gets schemeFee + * + * @return string|null + */ + public function getSchemeFee() + { + return $this->container['schemeFee']; + } + + /** + * Sets schemeFee + * + * @param string|null $schemeFee Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + * + * @return self + */ + public function setSchemeFee($schemeFee) + { + if (is_null($schemeFee)) { + throw new \InvalidArgumentException('non-nullable schemeFee cannot be null'); + } + $allowedValues = $this->getSchemeFeeAllowableValues(); + if (!in_array($schemeFee, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'schemeFee', must be one of '%s'", + $schemeFee, + implode("', '", $allowedValues) + ) + ); + } + $this->container['schemeFee'] = $schemeFee; + + return $this; + } + /** * Gets splitLogicId * diff --git a/src/Adyen/Model/Management/UpdateStoreRequest.php b/src/Adyen/Model/Management/UpdateStoreRequest.php index b35cc729b..b6b36fd0b 100644 --- a/src/Adyen/Model/Management/UpdateStoreRequest.php +++ b/src/Adyen/Model/Management/UpdateStoreRequest.php @@ -376,7 +376,7 @@ public function getBusinessLineIds() /** * Sets businessLineIds * - * @param string[]|null $businessLineIds The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. + * @param string[]|null $businessLineIds The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines__resParam_id) that the store is associated with. * * @return self */ diff --git a/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php b/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php index db9e82359..105dd7fe2 100644 --- a/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php +++ b/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php @@ -461,7 +461,7 @@ public function getId() /** * Sets id * - * @param string $id The identifier of the resource. + * @param string $id The unique identifier of the resource. * * @return self */ @@ -488,7 +488,7 @@ public function getMerchantId() /** * Sets merchantId * - * @param string $merchantId The identifier of the merchant account. + * @param string $merchantId The unique identifier of the merchant account. * * @return self */ @@ -579,7 +579,7 @@ public function getStoreId() /** * Sets storeId * - * @param string|null $storeId The identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any. + * @param string|null $storeId The unique identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any. * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php index 1164f9dca..41dc31064 100644 --- a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php @@ -53,8 +53,8 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'accountType' => 'string', 'institutionNumber' => 'string', 'transitNumber' => 'string', + 'clearingCode' => 'string', 'iban' => 'string', - 'accountSuffix' => 'string', 'additionalBankIdentification' => '\Adyen\Model\TransferWebhooks\AdditionalBankIdentification', 'bic' => 'string', 'clearingNumber' => 'string', @@ -78,8 +78,8 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'accountType' => null, 'institutionNumber' => null, 'transitNumber' => null, + 'clearingCode' => null, 'iban' => null, - 'accountSuffix' => null, 'additionalBankIdentification' => null, 'bic' => null, 'clearingNumber' => null, @@ -101,8 +101,8 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, 'accountType' => false, 'institutionNumber' => false, 'transitNumber' => false, + 'clearingCode' => false, 'iban' => false, - 'accountSuffix' => false, 'additionalBankIdentification' => false, 'bic' => false, 'clearingNumber' => false, @@ -204,8 +204,8 @@ public function isNullableSetToNull(string $property): bool 'accountType' => 'accountType', 'institutionNumber' => 'institutionNumber', 'transitNumber' => 'transitNumber', + 'clearingCode' => 'clearingCode', 'iban' => 'iban', - 'accountSuffix' => 'accountSuffix', 'additionalBankIdentification' => 'additionalBankIdentification', 'bic' => 'bic', 'clearingNumber' => 'clearingNumber', @@ -227,8 +227,8 @@ public function isNullableSetToNull(string $property): bool 'accountType' => 'setAccountType', 'institutionNumber' => 'setInstitutionNumber', 'transitNumber' => 'setTransitNumber', + 'clearingCode' => 'setClearingCode', 'iban' => 'setIban', - 'accountSuffix' => 'setAccountSuffix', 'additionalBankIdentification' => 'setAdditionalBankIdentification', 'bic' => 'setBic', 'clearingNumber' => 'setClearingNumber', @@ -250,8 +250,8 @@ public function isNullableSetToNull(string $property): bool 'accountType' => 'getAccountType', 'institutionNumber' => 'getInstitutionNumber', 'transitNumber' => 'getTransitNumber', + 'clearingCode' => 'getClearingCode', 'iban' => 'getIban', - 'accountSuffix' => 'getAccountSuffix', 'additionalBankIdentification' => 'getAdditionalBankIdentification', 'bic' => 'getBic', 'clearingNumber' => 'getClearingNumber', @@ -323,8 +323,8 @@ public function __construct(array $data = null) $this->setIfExists('accountType', $data ?? [], 'checking'); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); + $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); @@ -382,12 +382,12 @@ public function listInvalidProperties() if ($this->container['transitNumber'] === null) { $invalidProperties[] = "'transitNumber' can't be null"; } + if ($this->container['clearingCode'] === null) { + $invalidProperties[] = "'clearingCode' can't be null"; + } if ($this->container['iban'] === null) { $invalidProperties[] = "'iban' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } if ($this->container['bic'] === null) { $invalidProperties[] = "'bic' can't be null"; } @@ -509,7 +509,7 @@ public function getBankCode() /** * Sets bankCode * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + * @param string $bankCode The 4-digit bank code (Registreringsnummer) (without separators or whitespace). * * @return self */ @@ -632,55 +632,55 @@ public function setTransitNumber($transitNumber) } /** - * Gets iban + * Gets clearingCode * * @return string */ - public function getIban() + public function getClearingCode() { - return $this->container['iban']; + return $this->container['clearingCode']; } /** - * Sets iban + * Sets clearingCode * - * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + * @param string $clearingCode The 3-digit clearing code, without separators or whitespace. * * @return self */ - public function setIban($iban) + public function setClearingCode($clearingCode) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); + if (is_null($clearingCode)) { + throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); } - $this->container['iban'] = $iban; + $this->container['clearingCode'] = $clearingCode; return $this; } /** - * Gets accountSuffix + * Gets iban * * @return string */ - public function getAccountSuffix() + public function getIban() { - return $this->container['accountSuffix']; + return $this->container['iban']; } /** - * Sets accountSuffix + * Sets iban * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. + * @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. * * @return self */ - public function setAccountSuffix($accountSuffix) + public function setIban($iban) { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); + if (is_null($iban)) { + throw new \InvalidArgumentException('non-nullable iban cannot be null'); } - $this->container['accountSuffix'] = $accountSuffix; + $this->container['iban'] = $iban; return $this; } diff --git a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php index 5b00648b2..a4389434e 100644 --- a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php @@ -45,7 +45,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', - 'bankCode' => 'string', + 'clearingCode' => 'string', 'type' => 'string' ]; @@ -58,7 +58,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, - 'bankCode' => null, + 'clearingCode' => null, 'type' => null ]; @@ -69,7 +69,7 @@ class HKLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, - 'bankCode' => false, + 'clearingCode' => false, 'type' => false ]; @@ -160,7 +160,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', - 'bankCode' => 'bankCode', + 'clearingCode' => 'clearingCode', 'type' => 'type' ]; @@ -171,7 +171,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', - 'bankCode' => 'setBankCode', + 'clearingCode' => 'setClearingCode', 'type' => 'setType' ]; @@ -182,7 +182,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', - 'bankCode' => 'getBankCode', + 'clearingCode' => 'getClearingCode', 'type' => 'getType' ]; @@ -256,7 +256,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('bankCode', $data ?? [], null); + $this->setIfExists('clearingCode', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'hkLocal'); } @@ -290,8 +290,8 @@ public function listInvalidProperties() if ($this->container['accountNumber'] === null) { $invalidProperties[] = "'accountNumber' can't be null"; } - if ($this->container['bankCode'] === null) { - $invalidProperties[] = "'bankCode' can't be null"; + if ($this->container['clearingCode'] === null) { + $invalidProperties[] = "'clearingCode' can't be null"; } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; @@ -333,7 +333,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + * @param string $accountNumber The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * * @return self */ @@ -348,28 +348,28 @@ public function setAccountNumber($accountNumber) } /** - * Gets bankCode + * Gets clearingCode * * @return string */ - public function getBankCode() + public function getClearingCode() { - return $this->container['bankCode']; + return $this->container['clearingCode']; } /** - * Sets bankCode + * Sets clearingCode * - * @param string $bankCode The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. + * @param string $clearingCode The 3-digit clearing code, without separators or whitespace. * * @return self */ - public function setBankCode($bankCode) + public function setClearingCode($clearingCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); + if (is_null($clearingCode)) { + throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); } - $this->container['bankCode'] = $bankCode; + $this->container['clearingCode'] = $clearingCode; return $this; } diff --git a/src/Adyen/Model/TransferWebhooks/MerchantData.php b/src/Adyen/Model/TransferWebhooks/MerchantData.php index a856431dc..52161903d 100644 --- a/src/Adyen/Model/TransferWebhooks/MerchantData.php +++ b/src/Adyen/Model/TransferWebhooks/MerchantData.php @@ -44,6 +44,7 @@ class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'acquirerId' => 'string', 'mcc' => 'string', 'merchantId' => 'string', 'nameLocation' => '\Adyen\Model\TransferWebhooks\NameLocation', @@ -58,6 +59,7 @@ class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'acquirerId' => null, 'mcc' => null, 'merchantId' => null, 'nameLocation' => null, @@ -70,6 +72,7 @@ class MerchantData implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'acquirerId' => false, 'mcc' => false, 'merchantId' => false, 'nameLocation' => false, @@ -162,6 +165,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'acquirerId' => 'acquirerId', 'mcc' => 'mcc', 'merchantId' => 'merchantId', 'nameLocation' => 'nameLocation', @@ -174,6 +178,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'acquirerId' => 'setAcquirerId', 'mcc' => 'setMcc', 'merchantId' => 'setMerchantId', 'nameLocation' => 'setNameLocation', @@ -186,6 +191,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'acquirerId' => 'getAcquirerId', 'mcc' => 'getMcc', 'merchantId' => 'getMerchantId', 'nameLocation' => 'getNameLocation', @@ -249,6 +255,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('acquirerId', $data ?? [], null); $this->setIfExists('mcc', $data ?? [], null); $this->setIfExists('merchantId', $data ?? [], null); $this->setIfExists('nameLocation', $data ?? [], null); @@ -297,6 +304,33 @@ public function valid() } + /** + * Gets acquirerId + * + * @return string|null + */ + public function getAcquirerId() + { + return $this->container['acquirerId']; + } + + /** + * Sets acquirerId + * + * @param string|null $acquirerId The unique identifier of the merchant's acquirer. + * + * @return self + */ + public function setAcquirerId($acquirerId) + { + if (is_null($acquirerId)) { + throw new \InvalidArgumentException('non-nullable acquirerId cannot be null'); + } + $this->container['acquirerId'] = $acquirerId; + + return $this; + } + /** * Gets mcc * diff --git a/src/Adyen/Model/TransferWebhooks/Modification.php b/src/Adyen/Model/TransferWebhooks/Modification.php new file mode 100644 index 000000000..834de52d7 --- /dev/null +++ b/src/Adyen/Model/TransferWebhooks/Modification.php @@ -0,0 +1,677 @@ + + */ +class Modification implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Modification'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'direction' => 'string', + 'id' => 'string', + 'reference' => 'string', + 'status' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'direction' => null, + 'id' => null, + 'reference' => null, + 'status' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'direction' => false, + 'id' => false, + 'reference' => false, + 'status' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'direction' => 'direction', + 'id' => 'id', + 'reference' => 'reference', + 'status' => 'status', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'direction' => 'setDirection', + 'id' => 'setId', + 'reference' => 'setReference', + 'status' => 'setStatus', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'direction' => 'getDirection', + 'id' => 'getId', + 'reference' => 'getReference', + 'status' => 'getStatus', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const STATUS_APPROVAL_PENDING = 'approvalPending'; + public const STATUS_ATM_WITHDRAWAL = 'atmWithdrawal'; + public const STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING = 'atmWithdrawalReversalPending'; + public const STATUS_ATM_WITHDRAWAL_REVERSED = 'atmWithdrawalReversed'; + public const STATUS_AUTH_ADJUSTMENT_AUTHORISED = 'authAdjustmentAuthorised'; + public const STATUS_AUTH_ADJUSTMENT_ERROR = 'authAdjustmentError'; + public const STATUS_AUTH_ADJUSTMENT_REFUSED = 'authAdjustmentRefused'; + public const STATUS_AUTHORISED = 'authorised'; + public const STATUS_BANK_TRANSFER = 'bankTransfer'; + public const STATUS_BANK_TRANSFER_PENDING = 'bankTransferPending'; + public const STATUS_BOOKED = 'booked'; + public const STATUS_BOOKING_PENDING = 'bookingPending'; + public const STATUS_CANCELLED = 'cancelled'; + public const STATUS_CAPTURE_PENDING = 'capturePending'; + public const STATUS_CAPTURE_REVERSAL_PENDING = 'captureReversalPending'; + public const STATUS_CAPTURE_REVERSED = 'captureReversed'; + public const STATUS_CAPTURED = 'captured'; + public const STATUS_CAPTURED_EXTERNALLY = 'capturedExternally'; + public const STATUS_CHARGEBACK = 'chargeback'; + public const STATUS_CHARGEBACK_EXTERNALLY = 'chargebackExternally'; + public const STATUS_CHARGEBACK_PENDING = 'chargebackPending'; + public const STATUS_CHARGEBACK_REVERSAL_PENDING = 'chargebackReversalPending'; + public const STATUS_CHARGEBACK_REVERSED = 'chargebackReversed'; + public const STATUS_CREDITED = 'credited'; + public const STATUS_DEPOSIT_CORRECTION = 'depositCorrection'; + public const STATUS_DEPOSIT_CORRECTION_PENDING = 'depositCorrectionPending'; + public const STATUS_DISPUTE = 'dispute'; + public const STATUS_DISPUTE_CLOSED = 'disputeClosed'; + public const STATUS_DISPUTE_EXPIRED = 'disputeExpired'; + public const STATUS_DISPUTE_NEEDS_REVIEW = 'disputeNeedsReview'; + public const STATUS_ERROR = 'error'; + public const STATUS_EXPIRED = 'expired'; + public const STATUS_FAILED = 'failed'; + public const STATUS_FEE = 'fee'; + public const STATUS_FEE_PENDING = 'feePending'; + public const STATUS_INTERNAL_TRANSFER = 'internalTransfer'; + public const STATUS_INTERNAL_TRANSFER_PENDING = 'internalTransferPending'; + public const STATUS_INVOICE_DEDUCTION = 'invoiceDeduction'; + public const STATUS_INVOICE_DEDUCTION_PENDING = 'invoiceDeductionPending'; + public const STATUS_MANUAL_CORRECTION_PENDING = 'manualCorrectionPending'; + public const STATUS_MANUALLY_CORRECTED = 'manuallyCorrected'; + public const STATUS_MATCHED_STATEMENT = 'matchedStatement'; + public const STATUS_MATCHED_STATEMENT_PENDING = 'matchedStatementPending'; + public const STATUS_MERCHANT_PAYIN = 'merchantPayin'; + public const STATUS_MERCHANT_PAYIN_PENDING = 'merchantPayinPending'; + public const STATUS_MERCHANT_PAYIN_REVERSED = 'merchantPayinReversed'; + public const STATUS_MERCHANT_PAYIN_REVERSED_PENDING = 'merchantPayinReversedPending'; + public const STATUS_MISC_COST = 'miscCost'; + public const STATUS_MISC_COST_PENDING = 'miscCostPending'; + public const STATUS_PAYMENT_COST = 'paymentCost'; + public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; + public const STATUS_RECEIVED = 'received'; + public const STATUS_REFUND_PENDING = 'refundPending'; + public const STATUS_REFUND_REVERSAL_PENDING = 'refundReversalPending'; + public const STATUS_REFUND_REVERSED = 'refundReversed'; + public const STATUS_REFUNDED = 'refunded'; + public const STATUS_REFUNDED_EXTERNALLY = 'refundedExternally'; + public const STATUS_REFUSED = 'refused'; + public const STATUS_RESERVE_ADJUSTMENT = 'reserveAdjustment'; + public const STATUS_RESERVE_ADJUSTMENT_PENDING = 'reserveAdjustmentPending'; + public const STATUS_RETURNED = 'returned'; + public const STATUS_SECOND_CHARGEBACK = 'secondChargeback'; + public const STATUS_SECOND_CHARGEBACK_PENDING = 'secondChargebackPending'; + public const STATUS_UNDEFINED = 'undefined'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_APPROVAL_PENDING, + self::STATUS_ATM_WITHDRAWAL, + self::STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING, + self::STATUS_ATM_WITHDRAWAL_REVERSED, + self::STATUS_AUTH_ADJUSTMENT_AUTHORISED, + self::STATUS_AUTH_ADJUSTMENT_ERROR, + self::STATUS_AUTH_ADJUSTMENT_REFUSED, + self::STATUS_AUTHORISED, + self::STATUS_BANK_TRANSFER, + self::STATUS_BANK_TRANSFER_PENDING, + self::STATUS_BOOKED, + self::STATUS_BOOKING_PENDING, + self::STATUS_CANCELLED, + self::STATUS_CAPTURE_PENDING, + self::STATUS_CAPTURE_REVERSAL_PENDING, + self::STATUS_CAPTURE_REVERSED, + self::STATUS_CAPTURED, + self::STATUS_CAPTURED_EXTERNALLY, + self::STATUS_CHARGEBACK, + self::STATUS_CHARGEBACK_EXTERNALLY, + self::STATUS_CHARGEBACK_PENDING, + self::STATUS_CHARGEBACK_REVERSAL_PENDING, + self::STATUS_CHARGEBACK_REVERSED, + self::STATUS_CREDITED, + self::STATUS_DEPOSIT_CORRECTION, + self::STATUS_DEPOSIT_CORRECTION_PENDING, + self::STATUS_DISPUTE, + self::STATUS_DISPUTE_CLOSED, + self::STATUS_DISPUTE_EXPIRED, + self::STATUS_DISPUTE_NEEDS_REVIEW, + self::STATUS_ERROR, + self::STATUS_EXPIRED, + self::STATUS_FAILED, + self::STATUS_FEE, + self::STATUS_FEE_PENDING, + self::STATUS_INTERNAL_TRANSFER, + self::STATUS_INTERNAL_TRANSFER_PENDING, + self::STATUS_INVOICE_DEDUCTION, + self::STATUS_INVOICE_DEDUCTION_PENDING, + self::STATUS_MANUAL_CORRECTION_PENDING, + self::STATUS_MANUALLY_CORRECTED, + self::STATUS_MATCHED_STATEMENT, + self::STATUS_MATCHED_STATEMENT_PENDING, + self::STATUS_MERCHANT_PAYIN, + self::STATUS_MERCHANT_PAYIN_PENDING, + self::STATUS_MERCHANT_PAYIN_REVERSED, + self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING, + self::STATUS_MISC_COST, + self::STATUS_MISC_COST_PENDING, + self::STATUS_PAYMENT_COST, + self::STATUS_PAYMENT_COST_PENDING, + self::STATUS_RECEIVED, + self::STATUS_REFUND_PENDING, + self::STATUS_REFUND_REVERSAL_PENDING, + self::STATUS_REFUND_REVERSED, + self::STATUS_REFUNDED, + self::STATUS_REFUNDED_EXTERNALLY, + self::STATUS_REFUSED, + self::STATUS_RESERVE_ADJUSTMENT, + self::STATUS_RESERVE_ADJUSTMENT_PENDING, + self::STATUS_RETURNED, + self::STATUS_SECOND_CHARGEBACK, + self::STATUS_SECOND_CHARGEBACK_PENDING, + self::STATUS_UNDEFINED, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets direction + * + * @return string|null + */ + public function getDirection() + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param string|null $direction The direction of the money movement. + * + * @return self + */ + public function setDirection($direction) + { + if (is_null($direction)) { + throw new \InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Our reference for the modification. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference Your reference for the modification, used internally within your platform. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The status of the transfer event. + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of transfer modification. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php index 6e5793946..2b9efd6b1 100644 --- a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php @@ -45,8 +45,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPITypes = [ 'accountNumber' => 'string', - 'accountSuffix' => 'string', - 'bankCode' => 'string', 'type' => 'string' ]; @@ -59,8 +57,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPIFormats = [ 'accountNumber' => null, - 'accountSuffix' => null, - 'bankCode' => null, 'type' => null ]; @@ -71,8 +67,6 @@ class NZLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json */ protected static $openAPINullables = [ 'accountNumber' => false, - 'accountSuffix' => false, - 'bankCode' => false, 'type' => false ]; @@ -163,8 +157,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountNumber' => 'accountNumber', - 'accountSuffix' => 'accountSuffix', - 'bankCode' => 'bankCode', 'type' => 'type' ]; @@ -175,8 +167,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountNumber' => 'setAccountNumber', - 'accountSuffix' => 'setAccountSuffix', - 'bankCode' => 'setBankCode', 'type' => 'setType' ]; @@ -187,8 +177,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountNumber' => 'getAccountNumber', - 'accountSuffix' => 'getAccountSuffix', - 'bankCode' => 'getBankCode', 'type' => 'getType' ]; @@ -262,8 +250,6 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountSuffix', $data ?? [], null); - $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'nzLocal'); } @@ -297,12 +283,6 @@ public function listInvalidProperties() if ($this->container['accountNumber'] === null) { $invalidProperties[] = "'accountNumber' can't be null"; } - if ($this->container['accountSuffix'] === null) { - $invalidProperties[] = "'accountSuffix' can't be null"; - } - if ($this->container['bankCode'] === null) { - $invalidProperties[] = "'bankCode' can't be null"; - } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -343,7 +323,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber The 7-digit bank account number, without separators or whitespace. + * @param string $accountNumber The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. * * @return self */ @@ -357,60 +337,6 @@ public function setAccountNumber($accountNumber) return $this; } - /** - * Gets accountSuffix - * - * @return string - */ - public function getAccountSuffix() - { - return $this->container['accountSuffix']; - } - - /** - * Sets accountSuffix - * - * @param string $accountSuffix The 2- to 3-digit account suffix, without separators or whitespace. - * - * @return self - */ - public function setAccountSuffix($accountSuffix) - { - if (is_null($accountSuffix)) { - throw new \InvalidArgumentException('non-nullable accountSuffix cannot be null'); - } - $this->container['accountSuffix'] = $accountSuffix; - - return $this; - } - - /** - * Gets bankCode - * - * @return string - */ - public function getBankCode() - { - return $this->container['bankCode']; - } - - /** - * Sets bankCode - * - * @param string $bankCode The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - * - * @return self - */ - public function setBankCode($bankCode) - { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } - $this->container['bankCode'] = $bankCode; - - return $this; - } - /** * Gets type * diff --git a/src/Adyen/Model/TransferWebhooks/TransferData.php b/src/Adyen/Model/TransferWebhooks/TransferData.php index 8fd621927..bedc32804 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferData.php @@ -426,10 +426,18 @@ public function getModelName() public const PAN_ENTRY_MODE_MAGSTRIPE = 'magstripe'; public const PAN_ENTRY_MODE_MANUAL = 'manual'; public const PAN_ENTRY_MODE_TOKEN = 'token'; + public const PLATFORM_PAYMENT_TYPE_ACQUIRING_FEES = 'AcquiringFees'; + public const PLATFORM_PAYMENT_TYPE_ADYEN_COMMISSION = 'AdyenCommission'; + public const PLATFORM_PAYMENT_TYPE_ADYEN_FEES = 'AdyenFees'; + public const PLATFORM_PAYMENT_TYPE_ADYEN_MARKUP = 'AdyenMarkup'; public const PLATFORM_PAYMENT_TYPE_BALANCE_ACCOUNT = 'BalanceAccount'; public const PLATFORM_PAYMENT_TYPE_COMMISSION = 'Commission'; public const PLATFORM_PAYMENT_TYPE__DEFAULT = 'Default'; + public const PLATFORM_PAYMENT_TYPE_INTERCHANGE = 'Interchange'; public const PLATFORM_PAYMENT_TYPE_PAYMENT_FEE = 'PaymentFee'; + public const PLATFORM_PAYMENT_TYPE_REMAINDER = 'Remainder'; + public const PLATFORM_PAYMENT_TYPE_SCHEME_FEE = 'SchemeFee'; + public const PLATFORM_PAYMENT_TYPE_TOP_UP = 'TopUp'; public const PLATFORM_PAYMENT_TYPE_VAT = 'VAT'; public const PRIORITY_CROSS_BORDER = 'crossBorder'; public const PRIORITY_DIRECT_DEBIT = 'directDebit'; @@ -448,16 +456,19 @@ public function getModelName() public const PROCESSING_TYPE_TOKEN = 'token'; public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_APPROVAL_PENDING = 'approvalPending'; public const STATUS_ATM_WITHDRAWAL = 'atmWithdrawal'; @@ -508,10 +519,6 @@ public function getModelName() public const STATUS_MERCHANT_PAYIN_REVERSED_PENDING = 'merchantPayinReversedPending'; public const STATUS_MISC_COST = 'miscCost'; public const STATUS_MISC_COST_PENDING = 'miscCostPending'; - public const STATUS_OPERATION_AUTHORIZED = 'operationAuthorized'; - public const STATUS_OPERATION_BOOKED = 'operationBooked'; - public const STATUS_OPERATION_PENDING = 'operationPending'; - public const STATUS_OPERATION_RECEIVED = 'operationReceived'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; public const STATUS_RECEIVED = 'received'; @@ -530,13 +537,19 @@ public function getModelName() public const TYPE_ATM_WITHDRAWAL = 'atmWithdrawal'; public const TYPE_ATM_WITHDRAWAL_REVERSAL = 'atmWithdrawalReversal'; public const TYPE_BALANCE_ADJUSTMENT = 'balanceAdjustment'; + public const TYPE_BALANCE_MIGRATION = 'balanceMigration'; public const TYPE_BALANCE_ROLLOVER = 'balanceRollover'; public const TYPE_BANK_TRANSFER = 'bankTransfer'; public const TYPE_CAPTURE = 'capture'; public const TYPE_CAPTURE_REVERSAL = 'captureReversal'; public const TYPE_CARD_TRANSFER = 'cardTransfer'; + public const TYPE_CASH_OUT_FEE = 'cashOutFee'; + public const TYPE_CASH_OUT_FUNDING = 'cashOutFunding'; + public const TYPE_CASH_OUT_INSTRUCTION = 'cashOutInstruction'; public const TYPE_CHARGEBACK = 'chargeback'; + public const TYPE_CHARGEBACK_CORRECTION = 'chargebackCorrection'; public const TYPE_CHARGEBACK_REVERSAL = 'chargebackReversal'; + public const TYPE_CHARGEBACK_REVERSAL_CORRECTION = 'chargebackReversalCorrection'; public const TYPE_DEPOSIT_CORRECTION = 'depositCorrection'; public const TYPE_FEE = 'fee'; public const TYPE_GRANT = 'grant'; @@ -554,6 +567,7 @@ public function getModelName() public const TYPE_REPAYMENT = 'repayment'; public const TYPE_RESERVE_ADJUSTMENT = 'reserveAdjustment'; public const TYPE_SECOND_CHARGEBACK = 'secondChargeback'; + public const TYPE_SECOND_CHARGEBACK_CORRECTION = 'secondChargebackCorrection'; /** * Gets allowable values of the enum @@ -606,10 +620,18 @@ public function getPanEntryModeAllowableValues() public function getPlatformPaymentTypeAllowableValues() { return [ + self::PLATFORM_PAYMENT_TYPE_ACQUIRING_FEES, + self::PLATFORM_PAYMENT_TYPE_ADYEN_COMMISSION, + self::PLATFORM_PAYMENT_TYPE_ADYEN_FEES, + self::PLATFORM_PAYMENT_TYPE_ADYEN_MARKUP, self::PLATFORM_PAYMENT_TYPE_BALANCE_ACCOUNT, self::PLATFORM_PAYMENT_TYPE_COMMISSION, self::PLATFORM_PAYMENT_TYPE__DEFAULT, + self::PLATFORM_PAYMENT_TYPE_INTERCHANGE, self::PLATFORM_PAYMENT_TYPE_PAYMENT_FEE, + self::PLATFORM_PAYMENT_TYPE_REMAINDER, + self::PLATFORM_PAYMENT_TYPE_SCHEME_FEE, + self::PLATFORM_PAYMENT_TYPE_TOP_UP, self::PLATFORM_PAYMENT_TYPE_VAT, ]; } @@ -658,16 +680,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } @@ -728,10 +753,6 @@ public function getStatusAllowableValues() self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING, self::STATUS_MISC_COST, self::STATUS_MISC_COST_PENDING, - self::STATUS_OPERATION_AUTHORIZED, - self::STATUS_OPERATION_BOOKED, - self::STATUS_OPERATION_PENDING, - self::STATUS_OPERATION_RECEIVED, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, self::STATUS_RECEIVED, @@ -760,13 +781,19 @@ public function getTypeAllowableValues() self::TYPE_ATM_WITHDRAWAL, self::TYPE_ATM_WITHDRAWAL_REVERSAL, self::TYPE_BALANCE_ADJUSTMENT, + self::TYPE_BALANCE_MIGRATION, self::TYPE_BALANCE_ROLLOVER, self::TYPE_BANK_TRANSFER, self::TYPE_CAPTURE, self::TYPE_CAPTURE_REVERSAL, self::TYPE_CARD_TRANSFER, + self::TYPE_CASH_OUT_FEE, + self::TYPE_CASH_OUT_FUNDING, + self::TYPE_CASH_OUT_INSTRUCTION, self::TYPE_CHARGEBACK, + self::TYPE_CHARGEBACK_CORRECTION, self::TYPE_CHARGEBACK_REVERSAL, + self::TYPE_CHARGEBACK_REVERSAL_CORRECTION, self::TYPE_DEPOSIT_CORRECTION, self::TYPE_FEE, self::TYPE_GRANT, @@ -784,6 +811,7 @@ public function getTypeAllowableValues() self::TYPE_REPAYMENT, self::TYPE_RESERVE_ADJUSTMENT, self::TYPE_SECOND_CHARGEBACK, + self::TYPE_SECOND_CHARGEBACK_CORRECTION, ]; } /** @@ -1146,7 +1174,7 @@ public function getCategory() /** * Sets category * - * @param string $category The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + * @param string $category The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. * * @return self */ @@ -1538,7 +1566,7 @@ public function getPlatformPaymentType() /** * Sets platformPaymentType * - * @param string|null $platformPaymentType The type of the related split. + * @param string|null $platformPaymentType Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the [Balance Platform Accounting Report](https://docs.adyen.com/marketplaces-and-platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **BalanceAccount**: for the sale amount of the transaction. * **Commission**: for your platform's commission on the transaction. * **PaymentFee**: for the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **VAT**: for the Value Added Tax. * * @return self * @deprecated @@ -1576,7 +1604,7 @@ public function getPriority() /** * Sets priority * - * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + * @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/TransferEvent.php b/src/Adyen/Model/TransferWebhooks/TransferEvent.php index be692dbdf..8826632e4 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferEvent.php +++ b/src/Adyen/Model/TransferWebhooks/TransferEvent.php @@ -49,12 +49,14 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable 'bookingDate' => '\DateTime', 'estimatedArrivalTime' => '\DateTime', 'id' => 'string', + 'modification' => '\Adyen\Model\TransferWebhooks\Modification', 'mutations' => '\Adyen\Model\TransferWebhooks\BalanceMutation[]', 'originalAmount' => '\Adyen\Model\TransferWebhooks\Amount', 'reason' => 'string', + 'schemeTraceID' => 'string', + 'schemeUniqueTransactionID' => 'string', 'status' => 'string', 'transactionId' => 'string', - 'transferOperation' => '\Adyen\Model\TransferWebhooks\TransferOperation', 'type' => 'string', 'updateDate' => '\DateTime', 'valueDate' => '\DateTime' @@ -73,12 +75,14 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable 'bookingDate' => 'date-time', 'estimatedArrivalTime' => 'date-time', 'id' => null, + 'modification' => null, 'mutations' => null, 'originalAmount' => null, 'reason' => null, + 'schemeTraceID' => null, + 'schemeUniqueTransactionID' => null, 'status' => null, 'transactionId' => null, - 'transferOperation' => null, 'type' => null, 'updateDate' => 'date-time', 'valueDate' => 'date-time' @@ -95,12 +99,14 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable 'bookingDate' => false, 'estimatedArrivalTime' => false, 'id' => false, + 'modification' => false, 'mutations' => false, 'originalAmount' => false, 'reason' => false, + 'schemeTraceID' => false, + 'schemeUniqueTransactionID' => false, 'status' => false, 'transactionId' => false, - 'transferOperation' => false, 'type' => false, 'updateDate' => false, 'valueDate' => false @@ -197,12 +203,14 @@ public function isNullableSetToNull(string $property): bool 'bookingDate' => 'bookingDate', 'estimatedArrivalTime' => 'estimatedArrivalTime', 'id' => 'id', + 'modification' => 'modification', 'mutations' => 'mutations', 'originalAmount' => 'originalAmount', 'reason' => 'reason', + 'schemeTraceID' => 'schemeTraceID', + 'schemeUniqueTransactionID' => 'schemeUniqueTransactionID', 'status' => 'status', 'transactionId' => 'transactionId', - 'transferOperation' => 'transferOperation', 'type' => 'type', 'updateDate' => 'updateDate', 'valueDate' => 'valueDate' @@ -219,12 +227,14 @@ public function isNullableSetToNull(string $property): bool 'bookingDate' => 'setBookingDate', 'estimatedArrivalTime' => 'setEstimatedArrivalTime', 'id' => 'setId', + 'modification' => 'setModification', 'mutations' => 'setMutations', 'originalAmount' => 'setOriginalAmount', 'reason' => 'setReason', + 'schemeTraceID' => 'setSchemeTraceID', + 'schemeUniqueTransactionID' => 'setSchemeUniqueTransactionID', 'status' => 'setStatus', 'transactionId' => 'setTransactionId', - 'transferOperation' => 'setTransferOperation', 'type' => 'setType', 'updateDate' => 'setUpdateDate', 'valueDate' => 'setValueDate' @@ -241,12 +251,14 @@ public function isNullableSetToNull(string $property): bool 'bookingDate' => 'getBookingDate', 'estimatedArrivalTime' => 'getEstimatedArrivalTime', 'id' => 'getId', + 'modification' => 'getModification', 'mutations' => 'getMutations', 'originalAmount' => 'getOriginalAmount', 'reason' => 'getReason', + 'schemeTraceID' => 'getSchemeTraceID', + 'schemeUniqueTransactionID' => 'getSchemeUniqueTransactionID', 'status' => 'getStatus', 'transactionId' => 'getTransactionId', - 'transferOperation' => 'getTransferOperation', 'type' => 'getType', 'updateDate' => 'getUpdateDate', 'valueDate' => 'getValueDate' @@ -295,16 +307,19 @@ public function getModelName() public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_APPROVAL_PENDING = 'approvalPending'; public const STATUS_ATM_WITHDRAWAL = 'atmWithdrawal'; @@ -355,10 +370,6 @@ public function getModelName() public const STATUS_MERCHANT_PAYIN_REVERSED_PENDING = 'merchantPayinReversedPending'; public const STATUS_MISC_COST = 'miscCost'; public const STATUS_MISC_COST_PENDING = 'miscCostPending'; - public const STATUS_OPERATION_AUTHORIZED = 'operationAuthorized'; - public const STATUS_OPERATION_BOOKED = 'operationBooked'; - public const STATUS_OPERATION_PENDING = 'operationPending'; - public const STATUS_OPERATION_RECEIVED = 'operationReceived'; public const STATUS_PAYMENT_COST = 'paymentCost'; public const STATUS_PAYMENT_COST_PENDING = 'paymentCostPending'; public const STATUS_RECEIVED = 'received'; @@ -387,16 +398,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } @@ -457,10 +471,6 @@ public function getStatusAllowableValues() self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING, self::STATUS_MISC_COST, self::STATUS_MISC_COST_PENDING, - self::STATUS_OPERATION_AUTHORIZED, - self::STATUS_OPERATION_BOOKED, - self::STATUS_OPERATION_PENDING, - self::STATUS_OPERATION_RECEIVED, self::STATUS_PAYMENT_COST, self::STATUS_PAYMENT_COST_PENDING, self::STATUS_RECEIVED, @@ -510,12 +520,14 @@ public function __construct(array $data = null) $this->setIfExists('bookingDate', $data ?? [], null); $this->setIfExists('estimatedArrivalTime', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('modification', $data ?? [], null); $this->setIfExists('mutations', $data ?? [], null); $this->setIfExists('originalAmount', $data ?? [], null); $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('schemeTraceID', $data ?? [], null); + $this->setIfExists('schemeUniqueTransactionID', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('transactionId', $data ?? [], null); - $this->setIfExists('transferOperation', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('updateDate', $data ?? [], null); $this->setIfExists('valueDate', $data ?? [], null); @@ -725,6 +737,33 @@ public function setId($id) return $this; } + /** + * Gets modification + * + * @return \Adyen\Model\TransferWebhooks\Modification|null + */ + public function getModification() + { + return $this->container['modification']; + } + + /** + * Sets modification + * + * @param \Adyen\Model\TransferWebhooks\Modification|null $modification modification + * + * @return self + */ + public function setModification($modification) + { + if (is_null($modification)) { + throw new \InvalidArgumentException('non-nullable modification cannot be null'); + } + $this->container['modification'] = $modification; + + return $this; + } + /** * Gets mutations * @@ -816,6 +855,60 @@ public function setReason($reason) return $this; } + /** + * Gets schemeTraceID + * + * @return string|null + */ + public function getSchemeTraceID() + { + return $this->container['schemeTraceID']; + } + + /** + * Sets schemeTraceID + * + * @param string|null $schemeTraceID SchemeTraceID retrieved from scheme. + * + * @return self + */ + public function setSchemeTraceID($schemeTraceID) + { + if (is_null($schemeTraceID)) { + throw new \InvalidArgumentException('non-nullable schemeTraceID cannot be null'); + } + $this->container['schemeTraceID'] = $schemeTraceID; + + return $this; + } + + /** + * Gets schemeUniqueTransactionID + * + * @return string|null + */ + public function getSchemeUniqueTransactionID() + { + return $this->container['schemeUniqueTransactionID']; + } + + /** + * Sets schemeUniqueTransactionID + * + * @param string|null $schemeUniqueTransactionID SchemeUniqueTransactionID retrieved from scheme. + * + * @return self + */ + public function setSchemeUniqueTransactionID($schemeUniqueTransactionID) + { + if (is_null($schemeUniqueTransactionID)) { + throw new \InvalidArgumentException('non-nullable schemeUniqueTransactionID cannot be null'); + } + $this->container['schemeUniqueTransactionID'] = $schemeUniqueTransactionID; + + return $this; + } + /** * Gets status * @@ -880,33 +973,6 @@ public function setTransactionId($transactionId) return $this; } - /** - * Gets transferOperation - * - * @return \Adyen\Model\TransferWebhooks\TransferOperation|null - */ - public function getTransferOperation() - { - return $this->container['transferOperation']; - } - - /** - * Sets transferOperation - * - * @param \Adyen\Model\TransferWebhooks\TransferOperation|null $transferOperation transferOperation - * - * @return self - */ - public function setTransferOperation($transferOperation) - { - if (is_null($transferOperation)) { - throw new \InvalidArgumentException('non-nullable transferOperation cannot be null'); - } - $this->container['transferOperation'] = $transferOperation; - - return $this; - } - /** * Gets type * diff --git a/src/Adyen/Model/Transfers/Transaction.php b/src/Adyen/Model/Transfers/TransactionData.php similarity index 99% rename from src/Adyen/Model/Transfers/Transaction.php rename to src/Adyen/Model/Transfers/TransactionData.php index f915158db..6f0715dd3 100644 --- a/src/Adyen/Model/Transfers/Transaction.php +++ b/src/Adyen/Model/Transfers/TransactionData.php @@ -19,7 +19,7 @@ use Adyen\Model\Transfers\ObjectSerializer; /** - * Transaction Class Doc Comment + * TransactionData Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable +class TransactionData implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class Transaction implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'Transaction'; + protected static $openAPIModelName = 'TransactionData'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/src/Adyen/Model/Transfers/TransactionSearchResponse.php b/src/Adyen/Model/Transfers/TransactionSearchResponse.php index 3c586955c..d3d36d62c 100644 --- a/src/Adyen/Model/Transfers/TransactionSearchResponse.php +++ b/src/Adyen/Model/Transfers/TransactionSearchResponse.php @@ -45,7 +45,7 @@ class TransactionSearchResponse implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPITypes = [ 'links' => '\Adyen\Model\Transfers\Links', - 'data' => '\Adyen\Model\Transfers\Transaction[]' + 'data' => '\Adyen\Model\Transfers\TransactionData[]' ]; /** @@ -313,7 +313,7 @@ public function setLinks($links) /** * Gets data * - * @return \Adyen\Model\Transfers\Transaction[]|null + * @return \Adyen\Model\Transfers\TransactionData[]|null */ public function getData() { @@ -323,7 +323,7 @@ public function getData() /** * Sets data * - * @param \Adyen\Model\Transfers\Transaction[]|null $data Contains the transactions that match the query parameters. + * @param \Adyen\Model\Transfers\TransactionData[]|null $data Contains the transactions that match the query parameters. * * @return self */