diff --git a/src/Adyen/Model/Checkout/ApplePayDonations.php b/src/Adyen/Model/Checkout/ApplePayDonations.php new file mode 100644 index 000000000..e6506c10a --- /dev/null +++ b/src/Adyen/Model/Checkout/ApplePayDonations.php @@ -0,0 +1,623 @@ + + */ +class ApplePayDonations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ApplePayDonations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'applePayToken' => 'string', + 'checkoutAttemptId' => 'string', + 'fundingSource' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'applePayToken' => null, + 'checkoutAttemptId' => null, + 'fundingSource' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'applePayToken' => false, + 'checkoutAttemptId' => false, + 'fundingSource' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'applePayToken' => 'applePayToken', + 'checkoutAttemptId' => 'checkoutAttemptId', + 'fundingSource' => 'fundingSource', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'applePayToken' => 'setApplePayToken', + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'fundingSource' => 'setFundingSource', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'applePayToken' => 'getApplePayToken', + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'fundingSource' => 'getFundingSource', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FUNDING_SOURCE_CREDIT = 'credit'; + public const FUNDING_SOURCE_DEBIT = 'debit'; + public const TYPE_APPLEPAY = 'applepay'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_APPLEPAY, + ]; + } + /** + * 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('applePayToken', $data ?? [], null); + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'applepay'); + } + + /** + * 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['applePayToken'] === null) { + $invalidProperties[] = "'applePayToken' can't be null"; + } + $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->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets 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 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 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 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|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **applepay** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/BillDeskDetails.php b/src/Adyen/Model/Checkout/BillDeskDetails.php index e5b94af6a..1ca5a2a42 100644 --- a/src/Adyen/Model/Checkout/BillDeskDetails.php +++ b/src/Adyen/Model/Checkout/BillDeskDetails.php @@ -227,10 +227,8 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_BILLDESK_ONLINE = 'billdesk_online'; - public const TYPE_BILLDESK_WALLET = 'billdesk_wallet'; - public const TYPE_ONLINEBANKING_IN = 'onlinebanking_IN'; - public const TYPE_WALLET_IN = 'wallet_IN'; + public const TYPE_ONLINE = 'billdesk_online'; + public const TYPE_WALLET = 'billdesk_wallet'; /** * Gets allowable values of the enum @@ -240,10 +238,8 @@ public function getModelName() public function getTypeAllowableValues() { return [ - self::TYPE_BILLDESK_ONLINE, - self::TYPE_BILLDESK_WALLET, - self::TYPE_ONLINEBANKING_IN, - self::TYPE_WALLET_IN, + self::TYPE_ONLINE, + self::TYPE_WALLET, ]; } /** diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 2ec7a7274..9c3fba461 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -325,8 +325,10 @@ public function getModelName() public const FUNDING_SOURCE_CREDIT = 'credit'; 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_CARD = 'card'; /** @@ -349,8 +351,10 @@ public function getFundingSourceAllowableValues() public function getTypeAllowableValues() { return [ + self::TYPE_BCMC, self::TYPE_SCHEME, self::TYPE_NETWORK_TOKEN, + self::TYPE_GIFTCARD, self::TYPE_CARD, ]; } diff --git a/src/Adyen/Model/Checkout/CardDonations.php b/src/Adyen/Model/Checkout/CardDonations.php new file mode 100644 index 000000000..8da073e69 --- /dev/null +++ b/src/Adyen/Model/Checkout/CardDonations.php @@ -0,0 +1,1072 @@ + + */ +class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CardDonations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'brand' => 'string', + 'checkoutAttemptId' => 'string', + 'cupsecureplusSmscode' => 'string', + 'cvc' => 'string', + 'encryptedCardNumber' => 'string', + 'encryptedExpiryMonth' => 'string', + 'encryptedExpiryYear' => 'string', + 'encryptedSecurityCode' => 'string', + 'expiryMonth' => 'string', + 'expiryYear' => 'string', + 'fundingSource' => 'string', + 'holderName' => 'string', + 'networkPaymentReference' => 'string', + 'number' => 'string', + 'recurringDetailReference' => 'string', + 'shopperNotificationReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'threeDS2SdkVersion' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'brand' => null, + 'checkoutAttemptId' => null, + 'cupsecureplusSmscode' => null, + 'cvc' => null, + 'encryptedCardNumber' => null, + 'encryptedExpiryMonth' => null, + 'encryptedExpiryYear' => null, + 'encryptedSecurityCode' => null, + 'expiryMonth' => null, + 'expiryYear' => null, + 'fundingSource' => null, + 'holderName' => null, + 'networkPaymentReference' => null, + 'number' => null, + 'recurringDetailReference' => null, + 'shopperNotificationReference' => null, + 'storedPaymentMethodId' => null, + 'threeDS2SdkVersion' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'brand' => false, + 'checkoutAttemptId' => false, + 'cupsecureplusSmscode' => false, + 'cvc' => false, + 'encryptedCardNumber' => false, + 'encryptedExpiryMonth' => false, + 'encryptedExpiryYear' => false, + 'encryptedSecurityCode' => false, + 'expiryMonth' => false, + 'expiryYear' => false, + 'fundingSource' => false, + 'holderName' => false, + 'networkPaymentReference' => false, + 'number' => false, + 'recurringDetailReference' => false, + 'shopperNotificationReference' => false, + 'storedPaymentMethodId' => false, + 'threeDS2SdkVersion' => 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 = [ + 'brand' => 'brand', + 'checkoutAttemptId' => 'checkoutAttemptId', + 'cupsecureplusSmscode' => 'cupsecureplus.smscode', + 'cvc' => 'cvc', + 'encryptedCardNumber' => 'encryptedCardNumber', + 'encryptedExpiryMonth' => 'encryptedExpiryMonth', + 'encryptedExpiryYear' => 'encryptedExpiryYear', + 'encryptedSecurityCode' => 'encryptedSecurityCode', + 'expiryMonth' => 'expiryMonth', + 'expiryYear' => 'expiryYear', + 'fundingSource' => 'fundingSource', + 'holderName' => 'holderName', + 'networkPaymentReference' => 'networkPaymentReference', + 'number' => 'number', + 'recurringDetailReference' => 'recurringDetailReference', + 'shopperNotificationReference' => 'shopperNotificationReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'threeDS2SdkVersion' => 'threeDS2SdkVersion', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'brand' => 'setBrand', + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'cupsecureplusSmscode' => 'setCupsecureplusSmscode', + 'cvc' => 'setCvc', + 'encryptedCardNumber' => 'setEncryptedCardNumber', + 'encryptedExpiryMonth' => 'setEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'setEncryptedExpiryYear', + 'encryptedSecurityCode' => 'setEncryptedSecurityCode', + 'expiryMonth' => 'setExpiryMonth', + 'expiryYear' => 'setExpiryYear', + 'fundingSource' => 'setFundingSource', + 'holderName' => 'setHolderName', + 'networkPaymentReference' => 'setNetworkPaymentReference', + 'number' => 'setNumber', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'shopperNotificationReference' => 'setShopperNotificationReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'threeDS2SdkVersion' => 'setThreeDS2SdkVersion', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'brand' => 'getBrand', + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'cupsecureplusSmscode' => 'getCupsecureplusSmscode', + 'cvc' => 'getCvc', + 'encryptedCardNumber' => 'getEncryptedCardNumber', + 'encryptedExpiryMonth' => 'getEncryptedExpiryMonth', + 'encryptedExpiryYear' => 'getEncryptedExpiryYear', + 'encryptedSecurityCode' => 'getEncryptedSecurityCode', + 'expiryMonth' => 'getExpiryMonth', + 'expiryYear' => 'getExpiryYear', + 'fundingSource' => 'getFundingSource', + 'holderName' => 'getHolderName', + 'networkPaymentReference' => 'getNetworkPaymentReference', + 'number' => 'getNumber', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'shopperNotificationReference' => 'getShopperNotificationReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'threeDS2SdkVersion' => 'getThreeDS2SdkVersion', + '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 FUNDING_SOURCE_CREDIT = 'credit'; + 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_CARD = 'card'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BCMC, + self::TYPE_SCHEME, + self::TYPE_NETWORK_TOKEN, + self::TYPE_GIFTCARD, + self::TYPE_CARD, + ]; + } + /** + * 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('brand', $data ?? [], null); + $this->setIfExists('checkoutAttemptId', $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('fundingSource', $data ?? [], null); + $this->setIfExists('holderName', $data ?? [], null); + $this->setIfExists('networkPaymentReference', $data ?? [], null); + $this->setIfExists('number', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('shopperNotificationReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'scheme'); + } + + /** + * 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->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->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets 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 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 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 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 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 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 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 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 only for recurring payments in India. + * + * @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 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 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 type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type Default payment method details. Common for scheme payment methods, and for simple payment method details. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index 019ecab87..7c24da279 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -92,6 +92,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperReference' => 'string', 'shopperStatement' => 'string', 'showInstallmentAmount' => 'bool', + 'showRemovePaymentMethodButton' => 'bool', 'socialSecurityNumber' => 'string', 'splitCardFundingSources' => 'bool', 'splits' => '\Adyen\Model\Checkout\Split[]', @@ -160,6 +161,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperReference' => null, 'shopperStatement' => null, 'showInstallmentAmount' => null, + 'showRemovePaymentMethodButton' => null, 'socialSecurityNumber' => null, 'splitCardFundingSources' => null, 'splits' => null, @@ -226,6 +228,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperReference' => false, 'shopperStatement' => false, 'showInstallmentAmount' => false, + 'showRemovePaymentMethodButton' => false, 'socialSecurityNumber' => false, 'splitCardFundingSources' => false, 'splits' => false, @@ -372,6 +375,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'shopperReference', 'shopperStatement' => 'shopperStatement', 'showInstallmentAmount' => 'showInstallmentAmount', + 'showRemovePaymentMethodButton' => 'showRemovePaymentMethodButton', 'socialSecurityNumber' => 'socialSecurityNumber', 'splitCardFundingSources' => 'splitCardFundingSources', 'splits' => 'splits', @@ -438,6 +442,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'setShopperReference', 'shopperStatement' => 'setShopperStatement', 'showInstallmentAmount' => 'setShowInstallmentAmount', + 'showRemovePaymentMethodButton' => 'setShowRemovePaymentMethodButton', 'socialSecurityNumber' => 'setSocialSecurityNumber', 'splitCardFundingSources' => 'setSplitCardFundingSources', 'splits' => 'setSplits', @@ -504,6 +509,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'getShopperReference', 'shopperStatement' => 'getShopperStatement', 'showInstallmentAmount' => 'getShowInstallmentAmount', + 'showRemovePaymentMethodButton' => 'getShowRemovePaymentMethodButton', 'socialSecurityNumber' => 'getSocialSecurityNumber', 'splitCardFundingSources' => 'getSplitCardFundingSources', 'splits' => 'getSplits', @@ -701,6 +707,7 @@ public function __construct(array $data = null) $this->setIfExists('shopperReference', $data ?? [], null); $this->setIfExists('shopperStatement', $data ?? [], null); $this->setIfExists('showInstallmentAmount', $data ?? [], null); + $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); $this->setIfExists('splitCardFundingSources', $data ?? [], false); $this->setIfExists('splits', $data ?? [], null); @@ -2146,6 +2153,33 @@ public function setShowInstallmentAmount($showInstallmentAmount) return $this; } + /** + * Gets showRemovePaymentMethodButton + * + * @return bool|null + */ + public function getShowRemovePaymentMethodButton() + { + return $this->container['showRemovePaymentMethodButton']; + } + + /** + * Sets showRemovePaymentMethodButton + * + * @param bool|null $showRemovePaymentMethodButton Set to **true** to show a button that lets the shopper remove a stored payment method. + * + * @return self + */ + public function setShowRemovePaymentMethodButton($showRemovePaymentMethodButton) + { + if (is_null($showRemovePaymentMethodButton)) { + throw new \InvalidArgumentException('non-nullable showRemovePaymentMethodButton cannot be null'); + } + $this->container['showRemovePaymentMethodButton'] = $showRemovePaymentMethodButton; + + return $this; + } + /** * Gets socialSecurityNumber * @@ -2358,7 +2392,7 @@ public function getThemeId() /** * Sets themeId * - * @param string|null $themeId Sets a custom theme for the Adyen-hosted payment page. The value can be any of the **Theme ID** values from your Customer Area. + * @param string|null $themeId Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 654c205d3..4145e723b 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -94,6 +94,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperReference' => 'string', 'shopperStatement' => 'string', 'showInstallmentAmount' => 'bool', + 'showRemovePaymentMethodButton' => 'bool', 'socialSecurityNumber' => 'string', 'splitCardFundingSources' => 'bool', 'splits' => '\Adyen\Model\Checkout\Split[]', @@ -165,6 +166,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperReference' => null, 'shopperStatement' => null, 'showInstallmentAmount' => null, + 'showRemovePaymentMethodButton' => null, 'socialSecurityNumber' => null, 'splitCardFundingSources' => null, 'splits' => null, @@ -234,6 +236,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperReference' => false, 'shopperStatement' => false, 'showInstallmentAmount' => false, + 'showRemovePaymentMethodButton' => false, 'socialSecurityNumber' => false, 'splitCardFundingSources' => false, 'splits' => false, @@ -383,6 +386,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'shopperReference', 'shopperStatement' => 'shopperStatement', 'showInstallmentAmount' => 'showInstallmentAmount', + 'showRemovePaymentMethodButton' => 'showRemovePaymentMethodButton', 'socialSecurityNumber' => 'socialSecurityNumber', 'splitCardFundingSources' => 'splitCardFundingSources', 'splits' => 'splits', @@ -452,6 +456,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'setShopperReference', 'shopperStatement' => 'setShopperStatement', 'showInstallmentAmount' => 'setShowInstallmentAmount', + 'showRemovePaymentMethodButton' => 'setShowRemovePaymentMethodButton', 'socialSecurityNumber' => 'setSocialSecurityNumber', 'splitCardFundingSources' => 'setSplitCardFundingSources', 'splits' => 'setSplits', @@ -521,6 +526,7 @@ public function isNullableSetToNull(string $property): bool 'shopperReference' => 'getShopperReference', 'shopperStatement' => 'getShopperStatement', 'showInstallmentAmount' => 'getShowInstallmentAmount', + 'showRemovePaymentMethodButton' => 'getShowRemovePaymentMethodButton', 'socialSecurityNumber' => 'getSocialSecurityNumber', 'splitCardFundingSources' => 'getSplitCardFundingSources', 'splits' => 'getSplits', @@ -721,6 +727,7 @@ public function __construct(array $data = null) $this->setIfExists('shopperReference', $data ?? [], null); $this->setIfExists('shopperStatement', $data ?? [], null); $this->setIfExists('showInstallmentAmount', $data ?? [], null); + $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); $this->setIfExists('splitCardFundingSources', $data ?? [], false); $this->setIfExists('splits', $data ?? [], null); @@ -2227,6 +2234,33 @@ public function setShowInstallmentAmount($showInstallmentAmount) return $this; } + /** + * Gets showRemovePaymentMethodButton + * + * @return bool|null + */ + public function getShowRemovePaymentMethodButton() + { + return $this->container['showRemovePaymentMethodButton']; + } + + /** + * Sets showRemovePaymentMethodButton + * + * @param bool|null $showRemovePaymentMethodButton Set to **true** to show a button that lets the shopper remove a stored payment method. + * + * @return self + */ + public function setShowRemovePaymentMethodButton($showRemovePaymentMethodButton) + { + if (is_null($showRemovePaymentMethodButton)) { + throw new \InvalidArgumentException('non-nullable showRemovePaymentMethodButton cannot be null'); + } + $this->container['showRemovePaymentMethodButton'] = $showRemovePaymentMethodButton; + + return $this; + } + /** * Gets socialSecurityNumber * @@ -2439,7 +2473,7 @@ public function getThemeId() /** * Sets themeId * - * @param string|null $themeId Sets a custom theme for the Adyen-hosted payment page. The value can be any of the **Theme ID** values from your Customer Area. + * @param string|null $themeId Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. * * @return self */ diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index 6ed687297..e56b107fe 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -603,9 +603,6 @@ public function listInvalidProperties() ); } - if ($this->container['donationAccount'] === null) { - $invalidProperties[] = "'donationAccount' can't be null"; - } if ($this->container['merchantAccount'] === null) { $invalidProperties[] = "'merchantAccount' can't be null"; } @@ -1071,7 +1068,7 @@ public function setDeviceFingerprint($deviceFingerprint) /** * Gets donationAccount * - * @return string + * @return string|null */ public function getDonationAccount() { @@ -1081,7 +1078,7 @@ public function getDonationAccount() /** * Sets donationAccount * - * @param string $donationAccount Donation account to which the transaction is credited. + * @param string|null $donationAccount Donation account to which the transaction is credited. * * @return self */ diff --git a/src/Adyen/Model/Checkout/FundOrigin.php b/src/Adyen/Model/Checkout/FundOrigin.php index d82127fb5..ac455f09f 100644 --- a/src/Adyen/Model/Checkout/FundOrigin.php +++ b/src/Adyen/Model/Checkout/FundOrigin.php @@ -45,7 +45,10 @@ class FundOrigin implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'billingAddress' => '\Adyen\Model\Checkout\Address', - 'shopperName' => '\Adyen\Model\Checkout\Name' + 'shopperEmail' => 'string', + 'shopperName' => '\Adyen\Model\Checkout\Name', + 'telephoneNumber' => 'string', + 'walletIdentifier' => 'string' ]; /** @@ -57,7 +60,10 @@ class FundOrigin implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'billingAddress' => null, - 'shopperName' => null + 'shopperEmail' => null, + 'shopperName' => null, + 'telephoneNumber' => null, + 'walletIdentifier' => null ]; /** @@ -67,7 +73,10 @@ class FundOrigin implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'billingAddress' => false, - 'shopperName' => false + 'shopperEmail' => false, + 'shopperName' => false, + 'telephoneNumber' => false, + 'walletIdentifier' => false ]; /** @@ -157,7 +166,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'billingAddress' => 'billingAddress', - 'shopperName' => 'shopperName' + 'shopperEmail' => 'shopperEmail', + 'shopperName' => 'shopperName', + 'telephoneNumber' => 'telephoneNumber', + 'walletIdentifier' => 'walletIdentifier' ]; /** @@ -167,7 +179,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'billingAddress' => 'setBillingAddress', - 'shopperName' => 'setShopperName' + 'shopperEmail' => 'setShopperEmail', + 'shopperName' => 'setShopperName', + 'telephoneNumber' => 'setTelephoneNumber', + 'walletIdentifier' => 'setWalletIdentifier' ]; /** @@ -177,7 +192,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'billingAddress' => 'getBillingAddress', - 'shopperName' => 'getShopperName' + 'shopperEmail' => 'getShopperEmail', + 'shopperName' => 'getShopperName', + 'telephoneNumber' => 'getTelephoneNumber', + 'walletIdentifier' => 'getWalletIdentifier' ]; /** @@ -238,7 +256,10 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('billingAddress', $data ?? [], null); + $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('shopperName', $data ?? [], null); + $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('walletIdentifier', $data ?? [], null); } /** @@ -310,6 +331,33 @@ public function setBillingAddress($billingAddress) return $this; } + /** + * Gets shopperEmail + * + * @return string|null + */ + public function getShopperEmail() + { + return $this->container['shopperEmail']; + } + + /** + * Sets shopperEmail + * + * @param string|null $shopperEmail Email address of the person. + * + * @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 shopperName * @@ -336,6 +384,60 @@ public function setShopperName($shopperName) return $this; } + + /** + * Gets telephoneNumber + * + * @return string|null + */ + public function getTelephoneNumber() + { + return $this->container['telephoneNumber']; + } + + /** + * Sets telephoneNumber + * + * @param string|null $telephoneNumber Phone number of the person + * + * @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 walletIdentifier + * + * @return string|null + */ + public function getWalletIdentifier() + { + return $this->container['walletIdentifier']; + } + + /** + * Sets walletIdentifier + * + * @param string|null $walletIdentifier walletIdentifier + * + * @return self + */ + public function setWalletIdentifier($walletIdentifier) + { + if (is_null($walletIdentifier)) { + throw new \InvalidArgumentException('non-nullable walletIdentifier cannot be null'); + } + $this->container['walletIdentifier'] = $walletIdentifier; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/GooglePayDonations.php b/src/Adyen/Model/Checkout/GooglePayDonations.php new file mode 100644 index 000000000..a169e5b88 --- /dev/null +++ b/src/Adyen/Model/Checkout/GooglePayDonations.php @@ -0,0 +1,623 @@ + + */ +class GooglePayDonations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'GooglePayDonations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'fundingSource' => 'string', + 'googlePayToken' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutAttemptId' => null, + 'fundingSource' => null, + 'googlePayToken' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'fundingSource' => false, + 'googlePayToken' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'fundingSource' => 'fundingSource', + 'googlePayToken' => 'googlePayToken', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'fundingSource' => 'setFundingSource', + 'googlePayToken' => 'setGooglePayToken', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'fundingSource' => 'getFundingSource', + 'googlePayToken' => 'getGooglePayToken', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FUNDING_SOURCE_CREDIT = 'credit'; + public const FUNDING_SOURCE_DEBIT = 'debit'; + public const TYPE_GOOGLEPAY = 'googlepay'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_GOOGLEPAY, + ]; + } + /** + * 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('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('googlePayToken', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'googlepay'); + } + + /** + * 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->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) + ); + } + + if ($this->container['googlePayToken'] === null) { + $invalidProperties[] = "'googlePayToken' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets 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 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 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 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|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **googlepay**, **paywithgoogle** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/IdealDonations.php b/src/Adyen/Model/Checkout/IdealDonations.php new file mode 100644 index 000000000..32c60ffb0 --- /dev/null +++ b/src/Adyen/Model/Checkout/IdealDonations.php @@ -0,0 +1,556 @@ + + */ +class IdealDonations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'IdealDonations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'issuer' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutAttemptId' => null, + 'issuer' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'issuer' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'issuer' => 'issuer', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'issuer' => 'setIssuer', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'issuer' => 'getIssuer', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_IDEAL = 'ideal'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_IDEAL, + ]; + } + /** + * 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('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'ideal'); + } + + /** + * 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['issuer'] === null) { + $invalidProperties[] = "'issuer' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets 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 issuer + * + * @return string + */ + public function getIssuer() + { + return $this->container['issuer']; + } + + /** + * Sets issuer + * + * @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 setIssuer($issuer) + { + if (is_null($issuer)) { + throw new \InvalidArgumentException('non-nullable issuer cannot be null'); + } + $this->container['issuer'] = $issuer; + + 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|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **ideal** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDonations.php b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php new file mode 100644 index 000000000..fafa46a84 --- /dev/null +++ b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php @@ -0,0 +1,623 @@ + + */ +class PayWithGoogleDonations implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PayWithGoogleDonations'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'fundingSource' => 'string', + 'googlePayToken' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutAttemptId' => null, + 'fundingSource' => null, + 'googlePayToken' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'fundingSource' => false, + 'googlePayToken' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'fundingSource' => 'fundingSource', + 'googlePayToken' => 'googlePayToken', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'fundingSource' => 'setFundingSource', + 'googlePayToken' => 'setGooglePayToken', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'fundingSource' => 'getFundingSource', + 'googlePayToken' => 'getGooglePayToken', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const FUNDING_SOURCE_CREDIT = 'credit'; + public const FUNDING_SOURCE_DEBIT = 'debit'; + public const TYPE_PAYWITHGOOGLE = 'paywithgoogle'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFundingSourceAllowableValues() + { + return [ + self::FUNDING_SOURCE_CREDIT, + self::FUNDING_SOURCE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_PAYWITHGOOGLE, + ]; + } + /** + * 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('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('fundingSource', $data ?? [], null); + $this->setIfExists('googlePayToken', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], 'paywithgoogle'); + } + + /** + * 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->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) + ); + } + + if ($this->container['googlePayToken'] === null) { + $invalidProperties[] = "'googlePayToken' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets 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 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 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 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|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type **paywithgoogle** + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/PaymentRefundRequest.php b/src/Adyen/Model/Checkout/PaymentRefundRequest.php index ea1c28f65..834017f81 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRefundRequest.php @@ -50,7 +50,8 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'merchantAccount' => 'string', 'merchantRefundReason' => 'string', 'reference' => 'string', - 'splits' => '\Adyen\Model\Checkout\Split[]' + 'splits' => '\Adyen\Model\Checkout\Split[]', + 'store' => 'string' ]; /** @@ -67,7 +68,8 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'merchantAccount' => null, 'merchantRefundReason' => null, 'reference' => null, - 'splits' => null + 'splits' => null, + 'store' => null ]; /** @@ -82,7 +84,8 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'merchantAccount' => false, 'merchantRefundReason' => false, 'reference' => false, - 'splits' => false + 'splits' => false, + 'store' => false ]; /** @@ -177,7 +180,8 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'merchantAccount', 'merchantRefundReason' => 'merchantRefundReason', 'reference' => 'reference', - 'splits' => 'splits' + 'splits' => 'splits', + 'store' => 'store' ]; /** @@ -192,7 +196,8 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'setMerchantAccount', 'merchantRefundReason' => 'setMerchantRefundReason', 'reference' => 'setReference', - 'splits' => 'setSplits' + 'splits' => 'setSplits', + 'store' => 'setStore' ]; /** @@ -207,7 +212,8 @@ public function isNullableSetToNull(string $property): bool 'merchantAccount' => 'getMerchantAccount', 'merchantRefundReason' => 'getMerchantRefundReason', 'reference' => 'getReference', - 'splits' => 'getSplits' + 'splits' => 'getSplits', + 'store' => 'getStore' ]; /** @@ -294,6 +300,7 @@ public function __construct(array $data = null) $this->setIfExists('merchantRefundReason', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); + $this->setIfExists('store', $data ?? [], null); } /** @@ -551,6 +558,33 @@ public function setSplits($splits) return $this; } + + /** + * Gets store + * + * @return string|null + */ + public function getStore() + { + return $this->container['store']; + } + + /** + * Sets store + * + * @param string|null $store The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails. + * + * @return self + */ + public function setStore($store) + { + if (is_null($store)) { + throw new \InvalidArgumentException('non-nullable store cannot be null'); + } + $this->container['store'] = $store; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/PaymentRefundResponse.php b/src/Adyen/Model/Checkout/PaymentRefundResponse.php index b5864a2b7..5e28d424b 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundResponse.php +++ b/src/Adyen/Model/Checkout/PaymentRefundResponse.php @@ -52,7 +52,8 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'pspReference' => 'string', 'reference' => 'string', 'splits' => '\Adyen\Model\Checkout\Split[]', - 'status' => 'string' + 'status' => 'string', + 'store' => 'string' ]; /** @@ -71,7 +72,8 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'pspReference' => null, 'reference' => null, 'splits' => null, - 'status' => null + 'status' => null, + 'store' => null ]; /** @@ -88,7 +90,8 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'pspReference' => false, 'reference' => false, 'splits' => false, - 'status' => false + 'status' => false, + 'store' => false ]; /** @@ -185,7 +188,8 @@ public function isNullableSetToNull(string $property): bool 'pspReference' => 'pspReference', 'reference' => 'reference', 'splits' => 'splits', - 'status' => 'status' + 'status' => 'status', + 'store' => 'store' ]; /** @@ -202,7 +206,8 @@ public function isNullableSetToNull(string $property): bool 'pspReference' => 'setPspReference', 'reference' => 'setReference', 'splits' => 'setSplits', - 'status' => 'setStatus' + 'status' => 'setStatus', + 'store' => 'setStore' ]; /** @@ -219,7 +224,8 @@ public function isNullableSetToNull(string $property): bool 'pspReference' => 'getPspReference', 'reference' => 'getReference', 'splits' => 'getSplits', - 'status' => 'getStatus' + 'status' => 'getStatus', + 'store' => 'getStore' ]; /** @@ -320,6 +326,7 @@ public function __construct(array $data = null) $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('store', $data ?? [], null); } /** @@ -659,6 +666,33 @@ public function setStatus($status) return $this; } + + /** + * Gets store + * + * @return string|null + */ + public function getStore() + { + return $this->container['store']; + } + + /** + * Sets store + * + * @param string|null $store The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails. + * + * @return self + */ + public function setStore($store) + { + if (is_null($store)) { + throw new \InvalidArgumentException('non-nullable store cannot be null'); + } + $this->container['store'] = $store; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/StoredPaymentMethod.php b/src/Adyen/Model/Checkout/StoredPaymentMethod.php index e81aabbca..5a9688f0d 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethod.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethod.php @@ -44,12 +44,15 @@ class StoredPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $openAPITypes = [ + 'bankAccountNumber' => 'string', + 'bankLocationId' => 'string', 'brand' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', 'holderName' => 'string', 'iban' => 'string', 'id' => 'string', + 'label' => 'string', 'lastFour' => 'string', 'name' => 'string', 'networkTxReference' => 'string', @@ -68,12 +71,15 @@ class StoredPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $openAPIFormats = [ + 'bankAccountNumber' => null, + 'bankLocationId' => null, 'brand' => null, 'expiryMonth' => null, 'expiryYear' => null, 'holderName' => null, 'iban' => null, 'id' => null, + 'label' => null, 'lastFour' => null, 'name' => null, 'networkTxReference' => null, @@ -90,12 +96,15 @@ class StoredPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @var boolean[] */ protected static $openAPINullables = [ + 'bankAccountNumber' => false, + 'bankLocationId' => false, 'brand' => false, 'expiryMonth' => false, 'expiryYear' => false, 'holderName' => false, 'iban' => false, 'id' => false, + 'label' => false, 'lastFour' => false, 'name' => false, 'networkTxReference' => false, @@ -192,12 +201,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'bankAccountNumber' => 'bankAccountNumber', + 'bankLocationId' => 'bankLocationId', 'brand' => 'brand', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', 'holderName' => 'holderName', 'iban' => 'iban', 'id' => 'id', + 'label' => 'label', 'lastFour' => 'lastFour', 'name' => 'name', 'networkTxReference' => 'networkTxReference', @@ -214,12 +226,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'bankAccountNumber' => 'setBankAccountNumber', + 'bankLocationId' => 'setBankLocationId', 'brand' => 'setBrand', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', 'holderName' => 'setHolderName', 'iban' => 'setIban', 'id' => 'setId', + 'label' => 'setLabel', 'lastFour' => 'setLastFour', 'name' => 'setName', 'networkTxReference' => 'setNetworkTxReference', @@ -236,12 +251,15 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'bankAccountNumber' => 'getBankAccountNumber', + 'bankLocationId' => 'getBankLocationId', 'brand' => 'getBrand', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', 'holderName' => 'getHolderName', 'iban' => 'getIban', 'id' => 'getId', + 'label' => 'getLabel', 'lastFour' => 'getLastFour', 'name' => 'getName', 'networkTxReference' => 'getNetworkTxReference', @@ -309,12 +327,15 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('bankAccountNumber', $data ?? [], null); + $this->setIfExists('bankLocationId', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('iban', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('label', $data ?? [], null); $this->setIfExists('lastFour', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('networkTxReference', $data ?? [], null); @@ -367,6 +388,60 @@ public function valid() } + /** + * Gets bankAccountNumber + * + * @return string|null + */ + public function getBankAccountNumber() + { + return $this->container['bankAccountNumber']; + } + + /** + * Sets bankAccountNumber + * + * @param string|null $bankAccountNumber The bank account number (without separators). + * + * @return self + */ + public function setBankAccountNumber($bankAccountNumber) + { + if (is_null($bankAccountNumber)) { + throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); + } + $this->container['bankAccountNumber'] = $bankAccountNumber; + + return $this; + } + + /** + * Gets bankLocationId + * + * @return string|null + */ + public function getBankLocationId() + { + return $this->container['bankLocationId']; + } + + /** + * Sets bankLocationId + * + * @param string|null $bankLocationId The location id of the bank. The field value is `nil` in most cases. + * + * @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 brand * @@ -529,6 +604,33 @@ public function setId($id) return $this; } + /** + * Gets label + * + * @return string|null + */ + public function getLabel() + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label The shopper’s issuer account label + * + * @return self + */ + public function setLabel($label) + { + if (is_null($label)) { + throw new \InvalidArgumentException('non-nullable label cannot be null'); + } + $this->container['label'] = $label; + + return $this; + } + /** * Gets lastFour * diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php index b48c4c4dd..bcf447342 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php @@ -273,7 +273,6 @@ public function getModelName() public const CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS = 'receiveFromPlatformPayments'; public const CAPABILITY_ISSUE_BANK_ACCOUNT = 'issueBankAccount'; public const SERVICE_PAYMENT_PROCESSING = 'paymentProcessing'; - public const SERVICE_ISSUING = 'issuing'; public const SERVICE_BANKING = 'banking'; /** @@ -298,7 +297,6 @@ public function getServiceAllowableValues() { return [ self::SERVICE_PAYMENT_PROCESSING, - self::SERVICE_ISSUING, self::SERVICE_BANKING, ]; } @@ -588,7 +586,7 @@ public function getService() /** * Sets service * - * @param string $service The service for which you are creating the business line. Possible values: **paymentProcessing**, **issuing**, **banking** + * @param string $service The service for which you are creating the business line. Possible values: * **paymentProcessing** * **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php index e1fef84c8..49b6e13b0 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php @@ -261,7 +261,6 @@ public function getModelName() public const CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS = 'receiveFromPlatformPayments'; public const CAPABILITY_ISSUE_BANK_ACCOUNT = 'issueBankAccount'; public const SERVICE_PAYMENT_PROCESSING = 'paymentProcessing'; - public const SERVICE_ISSUING = 'issuing'; public const SERVICE_BANKING = 'banking'; /** @@ -286,7 +285,6 @@ public function getServiceAllowableValues() { return [ self::SERVICE_PAYMENT_PROCESSING, - self::SERVICE_ISSUING, self::SERVICE_BANKING, ]; } @@ -517,7 +515,7 @@ public function getService() /** * Sets service * - * @param string $service The service for which you are creating the business line. Possible values: **paymentProcessing**, **issuing**, **banking** + * @param string $service The service for which you are creating the business line. Possible values: * **paymentProcessing** * **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php index 97c615c03..df4374389 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php @@ -261,7 +261,6 @@ public function getModelName() public const CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS = 'receiveFromPlatformPayments'; public const CAPABILITY_ISSUE_BANK_ACCOUNT = 'issueBankAccount'; public const SERVICE_PAYMENT_PROCESSING = 'paymentProcessing'; - public const SERVICE_ISSUING = 'issuing'; public const SERVICE_BANKING = 'banking'; /** @@ -286,7 +285,6 @@ public function getServiceAllowableValues() { return [ self::SERVICE_PAYMENT_PROCESSING, - self::SERVICE_ISSUING, self::SERVICE_BANKING, ]; } @@ -508,7 +506,7 @@ public function getService() /** * Sets service * - * @param string|null $service The service for which you are creating the business line. Possible values: **paymentProcessing**, **issuing**, **banking** + * @param string|null $service The service for which you are creating the business line. Possible values: * **paymentProcessing** * **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php b/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php new file mode 100644 index 000000000..b0f4470ce --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php @@ -0,0 +1,384 @@ + + */ +class DataReviewConfirmationResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DataReviewConfirmationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'dataReviewedAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'dataReviewedAt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'dataReviewedAt' => 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 = [ + 'dataReviewedAt' => 'dataReviewedAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'dataReviewedAt' => 'setDataReviewedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'dataReviewedAt' => 'getDataReviewedAt' + ]; + + /** + * 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('dataReviewedAt', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets dataReviewedAt + * + * @return string|null + */ + public function getDataReviewedAt() + { + return $this->container['dataReviewedAt']; + } + + /** + * Sets dataReviewedAt + * + * @param string|null $dataReviewedAt Date when data review was confirmed. + * + * @return self + */ + public function setDataReviewedAt($dataReviewedAt) + { + if (is_null($dataReviewedAt)) { + throw new \InvalidArgumentException('non-nullable dataReviewedAt cannot be null'); + } + $this->container['dataReviewedAt'] = $dataReviewedAt; + + 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/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index 910c517b6..d503bbce2 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -58,7 +58,8 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string', 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership', - 'verificationDeadlines' => '\Adyen\Model\LegalEntityManagement\VerificationDeadline[]' + 'verificationDeadlines' => '\Adyen\Model\LegalEntityManagement\VerificationDeadline[]', + 'verificationPlan' => 'string' ]; /** @@ -83,7 +84,8 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'trust' => null, 'type' => null, 'unincorporatedPartnership' => null, - 'verificationDeadlines' => null + 'verificationDeadlines' => null, + 'verificationPlan' => null ]; /** @@ -106,7 +108,8 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'trust' => false, 'type' => false, 'unincorporatedPartnership' => false, - 'verificationDeadlines' => false + 'verificationDeadlines' => false, + 'verificationPlan' => false ]; /** @@ -209,7 +212,8 @@ public function isNullableSetToNull(string $property): bool 'trust' => 'trust', 'type' => 'type', 'unincorporatedPartnership' => 'unincorporatedPartnership', - 'verificationDeadlines' => 'verificationDeadlines' + 'verificationDeadlines' => 'verificationDeadlines', + 'verificationPlan' => 'verificationPlan' ]; /** @@ -232,7 +236,8 @@ public function isNullableSetToNull(string $property): bool 'trust' => 'setTrust', 'type' => 'setType', 'unincorporatedPartnership' => 'setUnincorporatedPartnership', - 'verificationDeadlines' => 'setVerificationDeadlines' + 'verificationDeadlines' => 'setVerificationDeadlines', + 'verificationPlan' => 'setVerificationPlan' ]; /** @@ -255,7 +260,8 @@ public function isNullableSetToNull(string $property): bool 'trust' => 'getTrust', 'type' => 'getType', 'unincorporatedPartnership' => 'getUnincorporatedPartnership', - 'verificationDeadlines' => 'getVerificationDeadlines' + 'verificationDeadlines' => 'getVerificationDeadlines', + 'verificationPlan' => 'getVerificationPlan' ]; /** @@ -350,6 +356,7 @@ public function __construct(array $data = null) $this->setIfExists('type', $data ?? [], null); $this->setIfExists('unincorporatedPartnership', $data ?? [], null); $this->setIfExists('verificationDeadlines', $data ?? [], null); + $this->setIfExists('verificationPlan', $data ?? [], null); } /** @@ -822,6 +829,33 @@ public function setVerificationDeadlines($verificationDeadlines) return $this; } + + /** + * Gets verificationPlan + * + * @return string|null + */ + public function getVerificationPlan() + { + return $this->container['verificationPlan']; + } + + /** + * Sets verificationPlan + * + * @param string|null $verificationPlan A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront). + * + * @return self + */ + public function setVerificationPlan($verificationPlan) + { + if (is_null($verificationPlan)) { + throw new \InvalidArgumentException('non-nullable verificationPlan cannot be null'); + } + $this->container['verificationPlan'] = $verificationPlan; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php index 53a1ab342..efab508a8 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php @@ -52,7 +52,8 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string', - 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership' + 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership', + 'verificationPlan' => 'string' ]; /** @@ -71,7 +72,8 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'soleProprietorship' => null, 'trust' => null, 'type' => null, - 'unincorporatedPartnership' => null + 'unincorporatedPartnership' => null, + 'verificationPlan' => null ]; /** @@ -88,7 +90,8 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'soleProprietorship' => false, 'trust' => false, 'type' => false, - 'unincorporatedPartnership' => false + 'unincorporatedPartnership' => false, + 'verificationPlan' => false ]; /** @@ -185,7 +188,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'soleProprietorship', 'trust' => 'trust', 'type' => 'type', - 'unincorporatedPartnership' => 'unincorporatedPartnership' + 'unincorporatedPartnership' => 'unincorporatedPartnership', + 'verificationPlan' => 'verificationPlan' ]; /** @@ -202,7 +206,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'setSoleProprietorship', 'trust' => 'setTrust', 'type' => 'setType', - 'unincorporatedPartnership' => 'setUnincorporatedPartnership' + 'unincorporatedPartnership' => 'setUnincorporatedPartnership', + 'verificationPlan' => 'setVerificationPlan' ]; /** @@ -219,7 +224,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'getSoleProprietorship', 'trust' => 'getTrust', 'type' => 'getType', - 'unincorporatedPartnership' => 'getUnincorporatedPartnership' + 'unincorporatedPartnership' => 'getUnincorporatedPartnership', + 'verificationPlan' => 'getVerificationPlan' ]; /** @@ -308,6 +314,7 @@ public function __construct(array $data = null) $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('unincorporatedPartnership', $data ?? [], null); + $this->setIfExists('verificationPlan', $data ?? [], null); } /** @@ -613,6 +620,33 @@ public function setUnincorporatedPartnership($unincorporatedPartnership) return $this; } + + /** + * Gets verificationPlan + * + * @return string|null + */ + public function getVerificationPlan() + { + return $this->container['verificationPlan']; + } + + /** + * Sets verificationPlan + * + * @param string|null $verificationPlan A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront). + * + * @return self + */ + public function setVerificationPlan($verificationPlan) + { + if (is_null($verificationPlan)) { + throw new \InvalidArgumentException('non-nullable verificationPlan cannot be null'); + } + $this->container['verificationPlan'] = $verificationPlan; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php index 88bb7e77d..193ee4660 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php @@ -52,7 +52,8 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string', - 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership' + 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership', + 'verificationPlan' => 'string' ]; /** @@ -71,7 +72,8 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'soleProprietorship' => null, 'trust' => null, 'type' => null, - 'unincorporatedPartnership' => null + 'unincorporatedPartnership' => null, + 'verificationPlan' => null ]; /** @@ -88,7 +90,8 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'soleProprietorship' => false, 'trust' => false, 'type' => false, - 'unincorporatedPartnership' => false + 'unincorporatedPartnership' => false, + 'verificationPlan' => false ]; /** @@ -185,7 +188,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'soleProprietorship', 'trust' => 'trust', 'type' => 'type', - 'unincorporatedPartnership' => 'unincorporatedPartnership' + 'unincorporatedPartnership' => 'unincorporatedPartnership', + 'verificationPlan' => 'verificationPlan' ]; /** @@ -202,7 +206,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'setSoleProprietorship', 'trust' => 'setTrust', 'type' => 'setType', - 'unincorporatedPartnership' => 'setUnincorporatedPartnership' + 'unincorporatedPartnership' => 'setUnincorporatedPartnership', + 'verificationPlan' => 'setVerificationPlan' ]; /** @@ -219,7 +224,8 @@ public function isNullableSetToNull(string $property): bool 'soleProprietorship' => 'getSoleProprietorship', 'trust' => 'getTrust', 'type' => 'getType', - 'unincorporatedPartnership' => 'getUnincorporatedPartnership' + 'unincorporatedPartnership' => 'getUnincorporatedPartnership', + 'verificationPlan' => 'getVerificationPlan' ]; /** @@ -308,6 +314,7 @@ public function __construct(array $data = null) $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('unincorporatedPartnership', $data ?? [], null); + $this->setIfExists('verificationPlan', $data ?? [], null); } /** @@ -616,6 +623,33 @@ public function setUnincorporatedPartnership($unincorporatedPartnership) return $this; } + + /** + * Gets verificationPlan + * + * @return string|null + */ + public function getVerificationPlan() + { + return $this->container['verificationPlan']; + } + + /** + * Sets verificationPlan + * + * @param string|null $verificationPlan A key-value pair that specifies the [verification process](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details/) for a legal entity. Set to **upfront** for [upfront verification](https://docs.adyen.com/marketplaces-and-platforms/collect-verification-details#upfront). + * + * @return self + */ + public function setVerificationPlan($verificationPlan) + { + if (is_null($verificationPlan)) { + throw new \InvalidArgumentException('non-nullable verificationPlan cannot be null'); + } + $this->container['verificationPlan'] = $verificationPlan; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php index 0e8c25fa9..54c1f06cf 100644 --- a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php +++ b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php @@ -46,6 +46,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab protected static $openAPITypes = [ 'countryOfGoverningLaw' => 'string', 'dateOfIncorporation' => 'string', + 'description' => 'string', 'doingBusinessAs' => 'string', 'name' => 'string', 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', @@ -66,6 +67,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab protected static $openAPIFormats = [ 'countryOfGoverningLaw' => null, 'dateOfIncorporation' => null, + 'description' => null, 'doingBusinessAs' => null, 'name' => null, 'principalPlaceOfBusiness' => null, @@ -84,6 +86,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab protected static $openAPINullables = [ 'countryOfGoverningLaw' => false, 'dateOfIncorporation' => false, + 'description' => false, 'doingBusinessAs' => false, 'name' => false, 'principalPlaceOfBusiness' => false, @@ -182,6 +185,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'countryOfGoverningLaw' => 'countryOfGoverningLaw', 'dateOfIncorporation' => 'dateOfIncorporation', + 'description' => 'description', 'doingBusinessAs' => 'doingBusinessAs', 'name' => 'name', 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', @@ -200,6 +204,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', 'dateOfIncorporation' => 'setDateOfIncorporation', + 'description' => 'setDescription', 'doingBusinessAs' => 'setDoingBusinessAs', 'name' => 'setName', 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', @@ -218,6 +223,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', 'dateOfIncorporation' => 'getDateOfIncorporation', + 'description' => 'getDescription', 'doingBusinessAs' => 'getDoingBusinessAs', 'name' => 'getName', 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', @@ -301,6 +307,7 @@ public function __construct(array $data = null) { $this->setIfExists('countryOfGoverningLaw', $data ?? [], null); $this->setIfExists('dateOfIncorporation', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); $this->setIfExists('doingBusinessAs', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); @@ -425,6 +432,33 @@ public function setDateOfIncorporation($dateOfIncorporation) return $this; } + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Short description about the Legal Arrangement. + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + /** * Gets doingBusinessAs * diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php index 45c3b7437..2b55b18e9 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php @@ -370,7 +370,7 @@ public function getRealLastFour() /** * Sets realLastFour * - * @param string|null $realLastFour Four last digits of the bank account number. + * @param string|null $realLastFour Four last digits of the bank account number. If the transfer instrument is created using [instant bank account verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding), and it is a virtual bank account, these digits may be different from the last four digits of the masked account number. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/Trust.php b/src/Adyen/Model/LegalEntityManagement/Trust.php index 4bcac8bfe..120e50cfd 100644 --- a/src/Adyen/Model/LegalEntityManagement/Trust.php +++ b/src/Adyen/Model/LegalEntityManagement/Trust.php @@ -46,6 +46,7 @@ class Trust implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'countryOfGoverningLaw' => 'string', 'dateOfIncorporation' => 'string', + 'description' => 'string', 'doingBusinessAs' => 'string', 'name' => 'string', 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', @@ -68,6 +69,7 @@ class Trust implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'countryOfGoverningLaw' => null, 'dateOfIncorporation' => null, + 'description' => null, 'doingBusinessAs' => null, 'name' => null, 'principalPlaceOfBusiness' => null, @@ -88,6 +90,7 @@ class Trust implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'countryOfGoverningLaw' => false, 'dateOfIncorporation' => false, + 'description' => false, 'doingBusinessAs' => false, 'name' => false, 'principalPlaceOfBusiness' => false, @@ -188,6 +191,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'countryOfGoverningLaw' => 'countryOfGoverningLaw', 'dateOfIncorporation' => 'dateOfIncorporation', + 'description' => 'description', 'doingBusinessAs' => 'doingBusinessAs', 'name' => 'name', 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', @@ -208,6 +212,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', 'dateOfIncorporation' => 'setDateOfIncorporation', + 'description' => 'setDescription', 'doingBusinessAs' => 'setDoingBusinessAs', 'name' => 'setName', 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', @@ -228,6 +233,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', 'dateOfIncorporation' => 'getDateOfIncorporation', + 'description' => 'getDescription', 'doingBusinessAs' => 'getDoingBusinessAs', 'name' => 'getName', 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', @@ -353,6 +359,7 @@ public function __construct(array $data = null) { $this->setIfExists('countryOfGoverningLaw', $data ?? [], null); $this->setIfExists('dateOfIncorporation', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); $this->setIfExists('doingBusinessAs', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); @@ -491,6 +498,33 @@ public function setDateOfIncorporation($dateOfIncorporation) return $this; } + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Short description about the trust. + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + /** * Gets doingBusinessAs * diff --git a/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php b/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php index ddbd6c8ce..8a9076d24 100644 --- a/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php +++ b/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php @@ -46,6 +46,7 @@ class UnincorporatedPartnership implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPITypes = [ 'countryOfGoverningLaw' => 'string', 'dateOfIncorporation' => 'string', + 'description' => 'string', 'doingBusinessAs' => 'string', 'name' => 'string', 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', @@ -67,6 +68,7 @@ class UnincorporatedPartnership implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPIFormats = [ 'countryOfGoverningLaw' => null, 'dateOfIncorporation' => null, + 'description' => null, 'doingBusinessAs' => null, 'name' => null, 'principalPlaceOfBusiness' => null, @@ -86,6 +88,7 @@ class UnincorporatedPartnership implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPINullables = [ 'countryOfGoverningLaw' => false, 'dateOfIncorporation' => false, + 'description' => false, 'doingBusinessAs' => false, 'name' => false, 'principalPlaceOfBusiness' => false, @@ -185,6 +188,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'countryOfGoverningLaw' => 'countryOfGoverningLaw', 'dateOfIncorporation' => 'dateOfIncorporation', + 'description' => 'description', 'doingBusinessAs' => 'doingBusinessAs', 'name' => 'name', 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', @@ -204,6 +208,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', 'dateOfIncorporation' => 'setDateOfIncorporation', + 'description' => 'setDescription', 'doingBusinessAs' => 'setDoingBusinessAs', 'name' => 'setName', 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', @@ -223,6 +228,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', 'dateOfIncorporation' => 'getDateOfIncorporation', + 'description' => 'getDescription', 'doingBusinessAs' => 'getDoingBusinessAs', 'name' => 'getName', 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', @@ -347,6 +353,7 @@ public function __construct(array $data = null) { $this->setIfExists('countryOfGoverningLaw', $data ?? [], null); $this->setIfExists('dateOfIncorporation', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); $this->setIfExists('doingBusinessAs', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); @@ -484,6 +491,33 @@ public function setDateOfIncorporation($dateOfIncorporation) return $this; } + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Short description about the Legal Arrangement. + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + /** * Gets doingBusinessAs * diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php index d56f2546f..9cd7ac9e1 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php @@ -419,7 +419,7 @@ public function getCapabilities() /** * Sets capabilities * - * @param string[] $capabilities The names of the capabilities to be disallowed. + * @param string[] $capabilities The list of capabilities that will be disallowed if information is not reviewed by the time of the deadline * * @return self */ diff --git a/src/Adyen/Model/Management/Configuration.php b/src/Adyen/Model/Management/Configuration.php index 22ce96bcb..7403bca3e 100644 --- a/src/Adyen/Model/Management/Configuration.php +++ b/src/Adyen/Model/Management/Configuration.php @@ -45,6 +45,7 @@ class Configuration implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'brand' => 'string', + 'country' => 'string[]', 'currencies' => '\Adyen\Model\Management\Currency[]', 'sources' => 'string[]' ]; @@ -58,6 +59,7 @@ class Configuration implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'brand' => null, + 'country' => null, 'currencies' => null, 'sources' => null ]; @@ -69,6 +71,7 @@ class Configuration implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'brand' => false, + 'country' => false, 'currencies' => false, 'sources' => false ]; @@ -160,6 +163,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'brand' => 'brand', + 'country' => 'country', 'currencies' => 'currencies', 'sources' => 'sources' ]; @@ -171,6 +175,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'brand' => 'setBrand', + 'country' => 'setCountry', 'currencies' => 'setCurrencies', 'sources' => 'setSources' ]; @@ -182,6 +187,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'brand' => 'getBrand', + 'country' => 'getCountry', 'currencies' => 'getCurrencies', 'sources' => 'getSources' ]; @@ -244,6 +250,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('brand', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); $this->setIfExists('currencies', $data ?? [], null); $this->setIfExists('sources', $data ?? [], null); } @@ -323,6 +330,33 @@ public function setBrand($brand) return $this; } + /** + * Gets country + * + * @return string[]|null + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string[]|null $country Countries, to filter different surcharge amounts for domestic or international cards. + * + * @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 currencies * diff --git a/src/Adyen/Model/Management/StoreSplitConfiguration.php b/src/Adyen/Model/Management/StoreSplitConfiguration.php index 2553ca53d..0073e5406 100644 --- a/src/Adyen/Model/Management/StoreSplitConfiguration.php +++ b/src/Adyen/Model/Management/StoreSplitConfiguration.php @@ -296,7 +296,7 @@ public function getBalanceAccountId() /** * Sets balanceAccountId * - * @param string|null $balanceAccountId The [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id) linked to the account holder. + * @param string|null $balanceAccountId The [unique identifier of the balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id) to which the split amount must be booked, depending on the defined [split logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/_merchantId_/splitConfigurations#request-rules-splitLogic). * * @return self */ @@ -323,7 +323,7 @@ public function getSplitConfigurationId() /** * Sets splitConfigurationId * - * @param string|null $splitConfigurationId The UUID of the [split configuration](https://docs.adyen.com/marketplaces-and-platforms/classic/split-configuration-for-stores) from the Customer Area. + * @param string|null $splitConfigurationId The unique identifier of the [split configuration profile](https://docs.adyen.com/marketplaces-and-platforms/automatic-split-configuration/create-split-configuration/). * * @return self */ diff --git a/src/Adyen/Model/Management/TapToPay.php b/src/Adyen/Model/Management/TapToPay.php new file mode 100644 index 000000000..4fc98a751 --- /dev/null +++ b/src/Adyen/Model/Management/TapToPay.php @@ -0,0 +1,384 @@ + + */ +class TapToPay implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TapToPay'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'merchantDisplayName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'merchantDisplayName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'merchantDisplayName' => 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 = [ + 'merchantDisplayName' => 'merchantDisplayName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'merchantDisplayName' => 'setMerchantDisplayName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'merchantDisplayName' => 'getMerchantDisplayName' + ]; + + /** + * 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('merchantDisplayName', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets merchantDisplayName + * + * @return string|null + */ + public function getMerchantDisplayName() + { + return $this->container['merchantDisplayName']; + } + + /** + * Sets merchantDisplayName + * + * @param string|null $merchantDisplayName Platform merchants can customize the text that appears on the TapToPay screen during a transaction + * + * @return self + */ + public function setMerchantDisplayName($merchantDisplayName) + { + if (is_null($merchantDisplayName)) { + throw new \InvalidArgumentException('non-nullable merchantDisplayName cannot be null'); + } + $this->container['merchantDisplayName'] = $merchantDisplayName; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/TerminalSettings.php b/src/Adyen/Model/Management/TerminalSettings.php index ca1aaa2a2..739410a01 100644 --- a/src/Adyen/Model/Management/TerminalSettings.php +++ b/src/Adyen/Model/Management/TerminalSettings.php @@ -60,6 +60,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'signature' => '\Adyen\Model\Management\Signature', 'standalone' => '\Adyen\Model\Management\Standalone', 'surcharge' => '\Adyen\Model\Management\Surcharge', + 'tapToPay' => '\Adyen\Model\Management\TapToPay', 'timeouts' => '\Adyen\Model\Management\Timeouts', 'wifiProfiles' => '\Adyen\Model\Management\WifiProfiles' ]; @@ -88,6 +89,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'signature' => null, 'standalone' => null, 'surcharge' => null, + 'tapToPay' => null, 'timeouts' => null, 'wifiProfiles' => null ]; @@ -114,6 +116,7 @@ class TerminalSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'signature' => false, 'standalone' => false, 'surcharge' => false, + 'tapToPay' => false, 'timeouts' => false, 'wifiProfiles' => false ]; @@ -220,6 +223,7 @@ public function isNullableSetToNull(string $property): bool 'signature' => 'signature', 'standalone' => 'standalone', 'surcharge' => 'surcharge', + 'tapToPay' => 'tapToPay', 'timeouts' => 'timeouts', 'wifiProfiles' => 'wifiProfiles' ]; @@ -246,6 +250,7 @@ public function isNullableSetToNull(string $property): bool 'signature' => 'setSignature', 'standalone' => 'setStandalone', 'surcharge' => 'setSurcharge', + 'tapToPay' => 'setTapToPay', 'timeouts' => 'setTimeouts', 'wifiProfiles' => 'setWifiProfiles' ]; @@ -272,6 +277,7 @@ public function isNullableSetToNull(string $property): bool 'signature' => 'getSignature', 'standalone' => 'getStandalone', 'surcharge' => 'getSurcharge', + 'tapToPay' => 'getTapToPay', 'timeouts' => 'getTimeouts', 'wifiProfiles' => 'getWifiProfiles' ]; @@ -349,6 +355,7 @@ public function __construct(array $data = null) $this->setIfExists('signature', $data ?? [], null); $this->setIfExists('standalone', $data ?? [], null); $this->setIfExists('surcharge', $data ?? [], null); + $this->setIfExists('tapToPay', $data ?? [], null); $this->setIfExists('timeouts', $data ?? [], null); $this->setIfExists('wifiProfiles', $data ?? [], null); } @@ -827,6 +834,33 @@ public function setSurcharge($surcharge) return $this; } + /** + * Gets tapToPay + * + * @return \Adyen\Model\Management\TapToPay|null + */ + public function getTapToPay() + { + return $this->container['tapToPay']; + } + + /** + * Sets tapToPay + * + * @param \Adyen\Model\Management\TapToPay|null $tapToPay tapToPay + * + * @return self + */ + public function setTapToPay($tapToPay) + { + if (is_null($tapToPay)) { + throw new \InvalidArgumentException('non-nullable tapToPay cannot be null'); + } + $this->container['tapToPay'] = $tapToPay; + + return $this; + } + /** * Gets timeouts * diff --git a/src/Adyen/Model/Management/UpdateStoreRequest.php b/src/Adyen/Model/Management/UpdateStoreRequest.php index b86f124c4..f39f9478e 100644 --- a/src/Adyen/Model/Management/UpdateStoreRequest.php +++ b/src/Adyen/Model/Management/UpdateStoreRequest.php @@ -48,6 +48,7 @@ class UpdateStoreRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'businessLineIds' => 'string[]', 'description' => 'string', 'externalReferenceId' => 'string', + 'phoneNumber' => 'string', 'splitConfiguration' => '\Adyen\Model\Management\StoreSplitConfiguration', 'status' => 'string' ]; @@ -64,6 +65,7 @@ class UpdateStoreRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'businessLineIds' => null, 'description' => null, 'externalReferenceId' => null, + 'phoneNumber' => null, 'splitConfiguration' => null, 'status' => null ]; @@ -78,6 +80,7 @@ class UpdateStoreRequest implements ModelInterface, ArrayAccess, \JsonSerializab 'businessLineIds' => false, 'description' => false, 'externalReferenceId' => false, + 'phoneNumber' => false, 'splitConfiguration' => false, 'status' => false ]; @@ -172,6 +175,7 @@ public function isNullableSetToNull(string $property): bool 'businessLineIds' => 'businessLineIds', 'description' => 'description', 'externalReferenceId' => 'externalReferenceId', + 'phoneNumber' => 'phoneNumber', 'splitConfiguration' => 'splitConfiguration', 'status' => 'status' ]; @@ -186,6 +190,7 @@ public function isNullableSetToNull(string $property): bool 'businessLineIds' => 'setBusinessLineIds', 'description' => 'setDescription', 'externalReferenceId' => 'setExternalReferenceId', + 'phoneNumber' => 'setPhoneNumber', 'splitConfiguration' => 'setSplitConfiguration', 'status' => 'setStatus' ]; @@ -200,6 +205,7 @@ public function isNullableSetToNull(string $property): bool 'businessLineIds' => 'getBusinessLineIds', 'description' => 'getDescription', 'externalReferenceId' => 'getExternalReferenceId', + 'phoneNumber' => 'getPhoneNumber', 'splitConfiguration' => 'getSplitConfiguration', 'status' => 'getStatus' ]; @@ -281,6 +287,7 @@ public function __construct(array $data = null) $this->setIfExists('businessLineIds', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('externalReferenceId', $data ?? [], null); + $this->setIfExists('phoneNumber', $data ?? [], null); $this->setIfExists('splitConfiguration', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); } @@ -444,6 +451,33 @@ public function setExternalReferenceId($externalReferenceId) return $this; } + /** + * Gets phoneNumber + * + * @return string|null + */ + public function getPhoneNumber() + { + return $this->container['phoneNumber']; + } + + /** + * Sets phoneNumber + * + * @param string|null $phoneNumber The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. + * + * @return self + */ + public function setPhoneNumber($phoneNumber) + { + if (is_null($phoneNumber)) { + throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); + } + $this->container['phoneNumber'] = $phoneNumber; + + return $this; + } + /** * Gets splitConfiguration * diff --git a/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php b/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php index 4b15bcb39..989610e52 100644 --- a/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php +++ b/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php @@ -548,7 +548,7 @@ public function getStatus() /** * Sets status * - * @param string $status The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **dataRequired**: the request is in a draft state because the required KYC data are missing. To check what data are missing, [get the details of the legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/get/legalEntities/_id_). * **capabilityPending**: the **receivePayments** capability is not allowed. * **updatesExpected**: the **receivePayments** capability is not allowed and the required KYC data are missing. To check what data are missing, [get the details of the legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/get/legalEntities/_id_). + * @param string $status The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **capabilityPending**: the **receivePayments** capability is not allowed. * * @return self */ diff --git a/src/Adyen/Model/Payments/PaymentRequest.php b/src/Adyen/Model/Payments/PaymentRequest.php index b012bd672..2132ae7d6 100644 --- a/src/Adyen/Model/Payments/PaymentRequest.php +++ b/src/Adyen/Model/Payments/PaymentRequest.php @@ -529,6 +529,7 @@ public function getModelName() public const ENTITY_TYPE_NATURAL_PERSON = 'NaturalPerson'; public const ENTITY_TYPE_COMPANY_NAME = 'CompanyName'; + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const RECURRING_PROCESSING_MODEL_CARD_ON_FILE = 'CardOnFile'; public const RECURRING_PROCESSING_MODEL_SUBSCRIPTION = 'Subscription'; @@ -558,6 +559,7 @@ public function getEntityTypeAllowableValues() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php new file mode 100644 index 000000000..6bcc0f7e1 --- /dev/null +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php @@ -0,0 +1,418 @@ + + */ +class ResponseAdditionalDataDomesticError implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataDomesticError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'domesticRefusalReasonRaw' => 'string', + 'domesticShopperAdvice' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'domesticRefusalReasonRaw' => null, + 'domesticShopperAdvice' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'domesticRefusalReasonRaw' => false, + 'domesticShopperAdvice' => 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 = [ + 'domesticRefusalReasonRaw' => 'domesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'domesticShopperAdvice' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domesticRefusalReasonRaw' => 'setDomesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'setDomesticShopperAdvice' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domesticRefusalReasonRaw' => 'getDomesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'getDomesticShopperAdvice' + ]; + + /** + * 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('domesticRefusalReasonRaw', $data ?? [], null); + $this->setIfExists('domesticShopperAdvice', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domesticRefusalReasonRaw + * + * @return string|null + */ + public function getDomesticRefusalReasonRaw() + { + return $this->container['domesticRefusalReasonRaw']; + } + + /** + * Sets domesticRefusalReasonRaw + * + * @param string|null $domesticRefusalReasonRaw The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. + * + * @return self + */ + public function setDomesticRefusalReasonRaw($domesticRefusalReasonRaw) + { + if (is_null($domesticRefusalReasonRaw)) { + throw new \InvalidArgumentException('non-nullable domesticRefusalReasonRaw cannot be null'); + } + $this->container['domesticRefusalReasonRaw'] = $domesticRefusalReasonRaw; + + return $this; + } + + /** + * Gets domesticShopperAdvice + * + * @return string|null + */ + public function getDomesticShopperAdvice() + { + return $this->container['domesticShopperAdvice']; + } + + /** + * Sets domesticShopperAdvice + * + * @param string|null $domesticShopperAdvice The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. + * + * @return self + */ + public function setDomesticShopperAdvice($domesticShopperAdvice) + { + if (is_null($domesticShopperAdvice)) { + throw new \InvalidArgumentException('non-nullable domesticShopperAdvice cannot be null'); + } + $this->container['domesticShopperAdvice'] = $domesticShopperAdvice; + + 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/Payments/Split.php b/src/Adyen/Model/Payments/Split.php index 1954e2b74..57cb71582 100644 --- a/src/Adyen/Model/Payments/Split.php +++ b/src/Adyen/Model/Payments/Split.php @@ -438,7 +438,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. + * @param string|null $reference Your unique reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/IssuedCard.php b/src/Adyen/Model/TransferWebhooks/IssuedCard.php index 8f53f0627..16fd407e0 100644 --- a/src/Adyen/Model/TransferWebhooks/IssuedCard.php +++ b/src/Adyen/Model/TransferWebhooks/IssuedCard.php @@ -44,9 +44,12 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'authorisationType' => 'string', 'panEntryMode' => 'string', 'processingType' => 'string', 'relayedAuthorisationData' => '\Adyen\Model\TransferWebhooks\RelayedAuthorisationData', + 'schemeTraceId' => 'string', + 'schemeUniqueTransactionId' => 'string', 'type' => 'string', 'validationFacts' => '\Adyen\Model\TransferWebhooks\TransferNotificationValidationFact[]' ]; @@ -59,9 +62,12 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'authorisationType' => null, 'panEntryMode' => null, 'processingType' => null, 'relayedAuthorisationData' => null, + 'schemeTraceId' => null, + 'schemeUniqueTransactionId' => null, 'type' => null, 'validationFacts' => null ]; @@ -72,9 +78,12 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'authorisationType' => false, 'panEntryMode' => false, 'processingType' => false, 'relayedAuthorisationData' => false, + 'schemeTraceId' => false, + 'schemeUniqueTransactionId' => false, 'type' => false, 'validationFacts' => false ]; @@ -165,9 +174,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'authorisationType' => 'authorisationType', 'panEntryMode' => 'panEntryMode', 'processingType' => 'processingType', 'relayedAuthorisationData' => 'relayedAuthorisationData', + 'schemeTraceId' => 'schemeTraceId', + 'schemeUniqueTransactionId' => 'schemeUniqueTransactionId', 'type' => 'type', 'validationFacts' => 'validationFacts' ]; @@ -178,9 +190,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'authorisationType' => 'setAuthorisationType', 'panEntryMode' => 'setPanEntryMode', 'processingType' => 'setProcessingType', 'relayedAuthorisationData' => 'setRelayedAuthorisationData', + 'schemeTraceId' => 'setSchemeTraceId', + 'schemeUniqueTransactionId' => 'setSchemeUniqueTransactionId', 'type' => 'setType', 'validationFacts' => 'setValidationFacts' ]; @@ -191,9 +206,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'authorisationType' => 'getAuthorisationType', 'panEntryMode' => 'getPanEntryMode', 'processingType' => 'getProcessingType', 'relayedAuthorisationData' => 'getRelayedAuthorisationData', + 'schemeTraceId' => 'getSchemeTraceId', + 'schemeUniqueTransactionId' => 'getSchemeUniqueTransactionId', 'type' => 'getType', 'validationFacts' => 'getValidationFacts' ]; @@ -317,9 +335,12 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('authorisationType', $data ?? [], null); $this->setIfExists('panEntryMode', $data ?? [], null); $this->setIfExists('processingType', $data ?? [], null); $this->setIfExists('relayedAuthorisationData', $data ?? [], null); + $this->setIfExists('schemeTraceId', $data ?? [], null); + $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'issuedCard'); $this->setIfExists('validationFacts', $data ?? [], null); } @@ -393,6 +414,33 @@ public function valid() } + /** + * Gets authorisationType + * + * @return string|null + */ + public function getAuthorisationType() + { + return $this->container['authorisationType']; + } + + /** + * Sets authorisationType + * + * @param string|null $authorisationType The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** + * + * @return self + */ + public function setAuthorisationType($authorisationType) + { + if (is_null($authorisationType)) { + throw new \InvalidArgumentException('non-nullable authorisationType cannot be null'); + } + $this->container['authorisationType'] = $authorisationType; + + return $this; + } + /** * Gets panEntryMode * @@ -494,6 +542,60 @@ public function setRelayedAuthorisationData($relayedAuthorisationData) return $this; } + /** + * Gets schemeTraceId + * + * @return string|null + */ + public function getSchemeTraceId() + { + return $this->container['schemeTraceId']; + } + + /** + * Sets schemeTraceId + * + * @param string|null $schemeTraceId The identifier of the original payment provided by the scheme. The Id could be alphanumeric or numeric depending on the scheme. The schemeTraceID should be referring to an original schemeUniqueTransactionID provided in an earlier payment (not necessarily processed by Adyen). Instances of available schemeTraceId is authAdjustment or recurring payments. + * + * @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 The unique identifier created by the scheme. The ID could be alphanumeric or numeric depending on the 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 type * diff --git a/src/Adyen/Model/TransferWebhooks/TransferData.php b/src/Adyen/Model/TransferWebhooks/TransferData.php index ff1752684..13fe044b9 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferData.php @@ -51,7 +51,7 @@ class TransferData implements ModelInterface, ArrayAccess, \JsonSerializable 'balances' => '\Adyen\Model\TransferWebhooks\BalanceMutation[]', 'category' => 'string', 'categoryData' => '\Adyen\Model\TransferWebhooks\TransferDataCategoryData', - 'counterparty' => '\Adyen\Model\TransferWebhooks\CounterpartyV3', + 'counterparty' => '\Adyen\Model\TransferWebhooks\TransferNotificationCounterParty', 'creationDate' => '\DateTime', 'description' => 'string', 'direction' => 'string', @@ -969,7 +969,7 @@ public function setCategoryData($categoryData) /** * Gets counterparty * - * @return \Adyen\Model\TransferWebhooks\CounterpartyV3|null + * @return \Adyen\Model\TransferWebhooks\TransferNotificationCounterParty|null */ public function getCounterparty() { @@ -979,7 +979,7 @@ public function getCounterparty() /** * Sets counterparty * - * @param \Adyen\Model\TransferWebhooks\CounterpartyV3|null $counterparty counterparty + * @param \Adyen\Model\TransferWebhooks\TransferNotificationCounterParty|null $counterparty counterparty * * @return self */ diff --git a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php index 5a2157b7d..cf210644e 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php @@ -49,9 +49,12 @@ class TransferDataCategoryData implements ModelInterface, ArrayAccess, \JsonSeri 'type' => 'string', 'modificationMerchantReference' => 'string', 'modificationPspReference' => 'string', + 'authorisationType' => 'string', 'panEntryMode' => 'string', 'processingType' => 'string', 'relayedAuthorisationData' => '\Adyen\Model\TransferWebhooks\RelayedAuthorisationData', + 'schemeTraceId' => 'string', + 'schemeUniqueTransactionId' => 'string', 'validationFacts' => '\Adyen\Model\TransferWebhooks\TransferNotificationValidationFact[]', 'paymentMerchantReference' => 'string', 'platformPaymentType' => 'string', @@ -70,9 +73,12 @@ class TransferDataCategoryData implements ModelInterface, ArrayAccess, \JsonSeri 'type' => null, 'modificationMerchantReference' => null, 'modificationPspReference' => null, + 'authorisationType' => null, 'panEntryMode' => null, 'processingType' => null, 'relayedAuthorisationData' => null, + 'schemeTraceId' => null, + 'schemeUniqueTransactionId' => null, 'validationFacts' => null, 'paymentMerchantReference' => null, 'platformPaymentType' => null, @@ -89,9 +95,12 @@ class TransferDataCategoryData implements ModelInterface, ArrayAccess, \JsonSeri 'type' => false, 'modificationMerchantReference' => false, 'modificationPspReference' => false, + 'authorisationType' => false, 'panEntryMode' => false, 'processingType' => false, 'relayedAuthorisationData' => false, + 'schemeTraceId' => false, + 'schemeUniqueTransactionId' => false, 'validationFacts' => false, 'paymentMerchantReference' => false, 'platformPaymentType' => false, @@ -188,9 +197,12 @@ public function isNullableSetToNull(string $property): bool 'type' => 'type', 'modificationMerchantReference' => 'modificationMerchantReference', 'modificationPspReference' => 'modificationPspReference', + 'authorisationType' => 'authorisationType', 'panEntryMode' => 'panEntryMode', 'processingType' => 'processingType', 'relayedAuthorisationData' => 'relayedAuthorisationData', + 'schemeTraceId' => 'schemeTraceId', + 'schemeUniqueTransactionId' => 'schemeUniqueTransactionId', 'validationFacts' => 'validationFacts', 'paymentMerchantReference' => 'paymentMerchantReference', 'platformPaymentType' => 'platformPaymentType', @@ -207,9 +219,12 @@ public function isNullableSetToNull(string $property): bool 'type' => 'setType', 'modificationMerchantReference' => 'setModificationMerchantReference', 'modificationPspReference' => 'setModificationPspReference', + 'authorisationType' => 'setAuthorisationType', 'panEntryMode' => 'setPanEntryMode', 'processingType' => 'setProcessingType', 'relayedAuthorisationData' => 'setRelayedAuthorisationData', + 'schemeTraceId' => 'setSchemeTraceId', + 'schemeUniqueTransactionId' => 'setSchemeUniqueTransactionId', 'validationFacts' => 'setValidationFacts', 'paymentMerchantReference' => 'setPaymentMerchantReference', 'platformPaymentType' => 'setPlatformPaymentType', @@ -226,9 +241,12 @@ public function isNullableSetToNull(string $property): bool 'type' => 'getType', 'modificationMerchantReference' => 'getModificationMerchantReference', 'modificationPspReference' => 'getModificationPspReference', + 'authorisationType' => 'getAuthorisationType', 'panEntryMode' => 'getPanEntryMode', 'processingType' => 'getProcessingType', 'relayedAuthorisationData' => 'getRelayedAuthorisationData', + 'schemeTraceId' => 'getSchemeTraceId', + 'schemeUniqueTransactionId' => 'getSchemeUniqueTransactionId', 'validationFacts' => 'getValidationFacts', 'paymentMerchantReference' => 'getPaymentMerchantReference', 'platformPaymentType' => 'getPlatformPaymentType', @@ -295,9 +313,12 @@ public function __construct(array $data = null) $this->setIfExists('type', $data ?? [], 'platformPayment'); $this->setIfExists('modificationMerchantReference', $data ?? [], null); $this->setIfExists('modificationPspReference', $data ?? [], null); + $this->setIfExists('authorisationType', $data ?? [], null); $this->setIfExists('panEntryMode', $data ?? [], null); $this->setIfExists('processingType', $data ?? [], null); $this->setIfExists('relayedAuthorisationData', $data ?? [], null); + $this->setIfExists('schemeTraceId', $data ?? [], null); + $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); $this->setIfExists('validationFacts', $data ?? [], null); $this->setIfExists('paymentMerchantReference', $data ?? [], null); $this->setIfExists('platformPaymentType', $data ?? [], null); @@ -459,6 +480,33 @@ public function setModificationPspReference($modificationPspReference) return $this; } + /** + * Gets authorisationType + * + * @return string|null + */ + public function getAuthorisationType() + { + return $this->container['authorisationType']; + } + + /** + * Sets authorisationType + * + * @param string|null $authorisationType The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** + * + * @return self + */ + public function setAuthorisationType($authorisationType) + { + if (is_null($authorisationType)) { + throw new \InvalidArgumentException('non-nullable authorisationType cannot be null'); + } + $this->container['authorisationType'] = $authorisationType; + + return $this; + } + /** * Gets panEntryMode * @@ -540,6 +588,60 @@ public function setRelayedAuthorisationData($relayedAuthorisationData) return $this; } + /** + * Gets schemeTraceId + * + * @return string|null + */ + public function getSchemeTraceId() + { + return $this->container['schemeTraceId']; + } + + /** + * Sets schemeTraceId + * + * @param string|null $schemeTraceId The identifier of the original payment provided by the scheme. The Id could be alphanumeric or numeric depending on the scheme. The schemeTraceID should be referring to an original schemeUniqueTransactionID provided in an earlier payment (not necessarily processed by Adyen). Instances of available schemeTraceId is authAdjustment or recurring payments. + * + * @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 The unique identifier created by the scheme. The ID could be alphanumeric or numeric depending on the 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 validationFacts * diff --git a/src/Adyen/Model/TransferWebhooks/TransferEvent.php b/src/Adyen/Model/TransferWebhooks/TransferEvent.php index 95f55258f..edd86561c 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferEvent.php +++ b/src/Adyen/Model/TransferWebhooks/TransferEvent.php @@ -53,8 +53,6 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable 'mutations' => '\Adyen\Model\TransferWebhooks\BalanceMutation[]', 'originalAmount' => '\Adyen\Model\TransferWebhooks\Amount', 'reason' => 'string', - 'schemeTraceID' => 'string', - 'schemeUniqueTransactionID' => 'string', 'status' => 'string', 'transactionId' => 'string', 'type' => 'string', @@ -79,8 +77,6 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable 'mutations' => null, 'originalAmount' => null, 'reason' => null, - 'schemeTraceID' => null, - 'schemeUniqueTransactionID' => null, 'status' => null, 'transactionId' => null, 'type' => null, @@ -103,8 +99,6 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable 'mutations' => false, 'originalAmount' => false, 'reason' => false, - 'schemeTraceID' => false, - 'schemeUniqueTransactionID' => false, 'status' => false, 'transactionId' => false, 'type' => false, @@ -207,8 +201,6 @@ public function isNullableSetToNull(string $property): bool 'mutations' => 'mutations', 'originalAmount' => 'originalAmount', 'reason' => 'reason', - 'schemeTraceID' => 'schemeTraceID', - 'schemeUniqueTransactionID' => 'schemeUniqueTransactionID', 'status' => 'status', 'transactionId' => 'transactionId', 'type' => 'type', @@ -231,8 +223,6 @@ public function isNullableSetToNull(string $property): bool 'mutations' => 'setMutations', 'originalAmount' => 'setOriginalAmount', 'reason' => 'setReason', - 'schemeTraceID' => 'setSchemeTraceID', - 'schemeUniqueTransactionID' => 'setSchemeUniqueTransactionID', 'status' => 'setStatus', 'transactionId' => 'setTransactionId', 'type' => 'setType', @@ -255,8 +245,6 @@ public function isNullableSetToNull(string $property): bool 'mutations' => 'getMutations', 'originalAmount' => 'getOriginalAmount', 'reason' => 'getReason', - 'schemeTraceID' => 'getSchemeTraceID', - 'schemeUniqueTransactionID' => 'getSchemeUniqueTransactionID', 'status' => 'getStatus', 'transactionId' => 'getTransactionId', 'type' => 'getType', @@ -524,8 +512,6 @@ public function __construct(array $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('type', $data ?? [], null); @@ -855,60 +841,6 @@ 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 * diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php new file mode 100644 index 000000000..89a95c22c --- /dev/null +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php @@ -0,0 +1,486 @@ + + */ +class TransferNotificationCounterParty implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransferNotificationCounterParty'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'balanceAccountId' => 'string', + 'bankAccount' => '\Adyen\Model\TransferWebhooks\BankAccountV3', + 'merchant' => '\Adyen\Model\TransferWebhooks\TransferNotificationMerchantData', + 'transferInstrumentId' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'balanceAccountId' => null, + 'bankAccount' => null, + 'merchant' => null, + 'transferInstrumentId' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'balanceAccountId' => false, + 'bankAccount' => false, + 'merchant' => false, + 'transferInstrumentId' => 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 = [ + 'balanceAccountId' => 'balanceAccountId', + 'bankAccount' => 'bankAccount', + 'merchant' => 'merchant', + 'transferInstrumentId' => 'transferInstrumentId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'balanceAccountId' => 'setBalanceAccountId', + 'bankAccount' => 'setBankAccount', + 'merchant' => 'setMerchant', + 'transferInstrumentId' => 'setTransferInstrumentId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'balanceAccountId' => 'getBalanceAccountId', + 'bankAccount' => 'getBankAccount', + 'merchant' => 'getMerchant', + 'transferInstrumentId' => 'getTransferInstrumentId' + ]; + + /** + * 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('balanceAccountId', $data ?? [], null); + $this->setIfExists('bankAccount', $data ?? [], null); + $this->setIfExists('merchant', $data ?? [], null); + $this->setIfExists('transferInstrumentId', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets balanceAccountId + * + * @return string|null + */ + public function getBalanceAccountId() + { + return $this->container['balanceAccountId']; + } + + /** + * Sets balanceAccountId + * + * @param string|null $balanceAccountId Unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). + * + * @return self + */ + public function setBalanceAccountId($balanceAccountId) + { + if (is_null($balanceAccountId)) { + throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); + } + $this->container['balanceAccountId'] = $balanceAccountId; + + return $this; + } + + /** + * Gets bankAccount + * + * @return \Adyen\Model\TransferWebhooks\BankAccountV3|null + */ + public function getBankAccount() + { + return $this->container['bankAccount']; + } + + /** + * Sets bankAccount + * + * @param \Adyen\Model\TransferWebhooks\BankAccountV3|null $bankAccount bankAccount + * + * @return self + */ + public function setBankAccount($bankAccount) + { + if (is_null($bankAccount)) { + throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); + } + $this->container['bankAccount'] = $bankAccount; + + return $this; + } + + /** + * Gets merchant + * + * @return \Adyen\Model\TransferWebhooks\TransferNotificationMerchantData|null + */ + public function getMerchant() + { + return $this->container['merchant']; + } + + /** + * Sets merchant + * + * @param \Adyen\Model\TransferWebhooks\TransferNotificationMerchantData|null $merchant merchant + * + * @return self + */ + public function setMerchant($merchant) + { + if (is_null($merchant)) { + throw new \InvalidArgumentException('non-nullable merchant cannot be null'); + } + $this->container['merchant'] = $merchant; + + return $this; + } + + /** + * Gets transferInstrumentId + * + * @return string|null + */ + public function getTransferInstrumentId() + { + return $this->container['transferInstrumentId']; + } + + /** + * Sets transferInstrumentId + * + * @param string|null $transferInstrumentId Unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * + * @return self + */ + public function setTransferInstrumentId($transferInstrumentId) + { + if (is_null($transferInstrumentId)) { + throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); + } + $this->container['transferInstrumentId'] = $transferInstrumentId; + + 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/TransferNotificationMerchantData.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php new file mode 100644 index 000000000..3ffd9db50 --- /dev/null +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php @@ -0,0 +1,588 @@ + + */ +class TransferNotificationMerchantData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TransferNotificationMerchantData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acquirerId' => 'string', + 'city' => 'string', + 'country' => 'string', + 'mcc' => 'string', + 'merchantId' => 'string', + 'name' => 'string', + 'postalCode' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'acquirerId' => null, + 'city' => null, + 'country' => null, + 'mcc' => null, + 'merchantId' => null, + 'name' => null, + 'postalCode' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'acquirerId' => false, + 'city' => false, + 'country' => false, + 'mcc' => false, + 'merchantId' => false, + 'name' => false, + 'postalCode' => 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 = [ + 'acquirerId' => 'acquirerId', + 'city' => 'city', + 'country' => 'country', + 'mcc' => 'mcc', + 'merchantId' => 'merchantId', + 'name' => 'name', + 'postalCode' => 'postalCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'acquirerId' => 'setAcquirerId', + 'city' => 'setCity', + 'country' => 'setCountry', + 'mcc' => 'setMcc', + 'merchantId' => 'setMerchantId', + 'name' => 'setName', + 'postalCode' => 'setPostalCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'acquirerId' => 'getAcquirerId', + 'city' => 'getCity', + 'country' => 'getCountry', + 'mcc' => 'getMcc', + 'merchantId' => 'getMerchantId', + 'name' => 'getName', + 'postalCode' => 'getPostalCode' + ]; + + /** + * 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('acquirerId', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('mcc', $data ?? [], null); + $this->setIfExists('merchantId', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets 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 city + * + * @return string|null + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city The city where the merchant is located. + * + * @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|null + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country The country where the merchant is located. + * + * @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 mcc + * + * @return string|null + */ + public function getMcc() + { + return $this->container['mcc']; + } + + /** + * Sets mcc + * + * @param string|null $mcc The merchant category code. + * + * @return self + */ + public function setMcc($mcc) + { + if (is_null($mcc)) { + throw new \InvalidArgumentException('non-nullable mcc cannot be null'); + } + $this->container['mcc'] = $mcc; + + return $this; + } + + /** + * Gets merchantId + * + * @return string|null + */ + public function getMerchantId() + { + return $this->container['merchantId']; + } + + /** + * Sets merchantId + * + * @param string|null $merchantId The merchant identifier. + * + * @return self + */ + public function setMerchantId($merchantId) + { + if (is_null($merchantId)) { + throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); + } + $this->container['merchantId'] = $merchantId; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the merchant's shop or service. + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets postalCode + * + * @return string|null + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string|null $postalCode The merchant postal code. + * + * @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; + } + /** + * 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/Transfers/IssuedCard.php b/src/Adyen/Model/Transfers/IssuedCard.php index 609bfd23b..23acbd83e 100644 --- a/src/Adyen/Model/Transfers/IssuedCard.php +++ b/src/Adyen/Model/Transfers/IssuedCard.php @@ -44,9 +44,12 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'authorisationType' => 'string', 'panEntryMode' => 'string', 'processingType' => 'string', 'relayedAuthorisationData' => '\Adyen\Model\Transfers\RelayedAuthorisationData', + 'schemeTraceId' => 'string', + 'schemeUniqueTransactionId' => 'string', 'type' => 'string', 'validationFacts' => '\Adyen\Model\Transfers\TransferNotificationValidationFact[]' ]; @@ -59,9 +62,12 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'authorisationType' => null, 'panEntryMode' => null, 'processingType' => null, 'relayedAuthorisationData' => null, + 'schemeTraceId' => null, + 'schemeUniqueTransactionId' => null, 'type' => null, 'validationFacts' => null ]; @@ -72,9 +78,12 @@ class IssuedCard implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'authorisationType' => false, 'panEntryMode' => false, 'processingType' => false, 'relayedAuthorisationData' => false, + 'schemeTraceId' => false, + 'schemeUniqueTransactionId' => false, 'type' => false, 'validationFacts' => false ]; @@ -165,9 +174,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'authorisationType' => 'authorisationType', 'panEntryMode' => 'panEntryMode', 'processingType' => 'processingType', 'relayedAuthorisationData' => 'relayedAuthorisationData', + 'schemeTraceId' => 'schemeTraceId', + 'schemeUniqueTransactionId' => 'schemeUniqueTransactionId', 'type' => 'type', 'validationFacts' => 'validationFacts' ]; @@ -178,9 +190,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'authorisationType' => 'setAuthorisationType', 'panEntryMode' => 'setPanEntryMode', 'processingType' => 'setProcessingType', 'relayedAuthorisationData' => 'setRelayedAuthorisationData', + 'schemeTraceId' => 'setSchemeTraceId', + 'schemeUniqueTransactionId' => 'setSchemeUniqueTransactionId', 'type' => 'setType', 'validationFacts' => 'setValidationFacts' ]; @@ -191,9 +206,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'authorisationType' => 'getAuthorisationType', 'panEntryMode' => 'getPanEntryMode', 'processingType' => 'getProcessingType', 'relayedAuthorisationData' => 'getRelayedAuthorisationData', + 'schemeTraceId' => 'getSchemeTraceId', + 'schemeUniqueTransactionId' => 'getSchemeUniqueTransactionId', 'type' => 'getType', 'validationFacts' => 'getValidationFacts' ]; @@ -317,9 +335,12 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('authorisationType', $data ?? [], null); $this->setIfExists('panEntryMode', $data ?? [], null); $this->setIfExists('processingType', $data ?? [], null); $this->setIfExists('relayedAuthorisationData', $data ?? [], null); + $this->setIfExists('schemeTraceId', $data ?? [], null); + $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); $this->setIfExists('type', $data ?? [], 'issuedCard'); $this->setIfExists('validationFacts', $data ?? [], null); } @@ -393,6 +414,33 @@ public function valid() } + /** + * Gets authorisationType + * + * @return string|null + */ + public function getAuthorisationType() + { + return $this->container['authorisationType']; + } + + /** + * Sets authorisationType + * + * @param string|null $authorisationType The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** + * + * @return self + */ + public function setAuthorisationType($authorisationType) + { + if (is_null($authorisationType)) { + throw new \InvalidArgumentException('non-nullable authorisationType cannot be null'); + } + $this->container['authorisationType'] = $authorisationType; + + return $this; + } + /** * Gets panEntryMode * @@ -494,6 +542,60 @@ public function setRelayedAuthorisationData($relayedAuthorisationData) return $this; } + /** + * Gets schemeTraceId + * + * @return string|null + */ + public function getSchemeTraceId() + { + return $this->container['schemeTraceId']; + } + + /** + * Sets schemeTraceId + * + * @param string|null $schemeTraceId The identifier of the original payment provided by the scheme. The Id could be alphanumeric or numeric depending on the scheme. The schemeTraceID should be referring to an original schemeUniqueTransactionID provided in an earlier payment (not necessarily processed by Adyen). Instances of available schemeTraceId is authAdjustment or recurring payments. + * + * @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 The unique identifier created by the scheme. The ID could be alphanumeric or numeric depending on the 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 type * diff --git a/src/Adyen/Model/Transfers/RestServiceError.php b/src/Adyen/Model/Transfers/RestServiceError.php index f561c550c..b116808df 100644 --- a/src/Adyen/Model/Transfers/RestServiceError.php +++ b/src/Adyen/Model/Transfers/RestServiceError.php @@ -495,7 +495,7 @@ public function getResponse() /** * Sets response * - * @param object|null $response JSON response payload. + * @param object|null $response response * * @return self */ diff --git a/src/Adyen/Model/Transfers/ReturnTransferResponse.php b/src/Adyen/Model/Transfers/ReturnTransferResponse.php index cec67a9e3..4d8da7289 100644 --- a/src/Adyen/Model/Transfers/ReturnTransferResponse.php +++ b/src/Adyen/Model/Transfers/ReturnTransferResponse.php @@ -387,7 +387,7 @@ public function getStatus() /** * Sets status * - * @param string|null $status The resulting status of the return. For example: **authorised**, **booked**, **error**. + * @param string|null $status The resulting status of the return. Possible values: **Authorised**, **Declined**. * * @return self */ diff --git a/src/Adyen/Model/Transfers/TransferCategoryData.php b/src/Adyen/Model/Transfers/TransferCategoryData.php index 8c033e8e8..b7ad502d0 100644 --- a/src/Adyen/Model/Transfers/TransferCategoryData.php +++ b/src/Adyen/Model/Transfers/TransferCategoryData.php @@ -49,9 +49,12 @@ class TransferCategoryData implements ModelInterface, ArrayAccess, \JsonSerializ 'type' => 'string', 'modificationMerchantReference' => 'string', 'modificationPspReference' => 'string', + 'authorisationType' => 'string', 'panEntryMode' => 'string', 'processingType' => 'string', 'relayedAuthorisationData' => '\Adyen\Model\Transfers\RelayedAuthorisationData', + 'schemeTraceId' => 'string', + 'schemeUniqueTransactionId' => 'string', 'validationFacts' => '\Adyen\Model\Transfers\TransferNotificationValidationFact[]', 'paymentMerchantReference' => 'string', 'platformPaymentType' => 'string', @@ -70,9 +73,12 @@ class TransferCategoryData implements ModelInterface, ArrayAccess, \JsonSerializ 'type' => null, 'modificationMerchantReference' => null, 'modificationPspReference' => null, + 'authorisationType' => null, 'panEntryMode' => null, 'processingType' => null, 'relayedAuthorisationData' => null, + 'schemeTraceId' => null, + 'schemeUniqueTransactionId' => null, 'validationFacts' => null, 'paymentMerchantReference' => null, 'platformPaymentType' => null, @@ -89,9 +95,12 @@ class TransferCategoryData implements ModelInterface, ArrayAccess, \JsonSerializ 'type' => false, 'modificationMerchantReference' => false, 'modificationPspReference' => false, + 'authorisationType' => false, 'panEntryMode' => false, 'processingType' => false, 'relayedAuthorisationData' => false, + 'schemeTraceId' => false, + 'schemeUniqueTransactionId' => false, 'validationFacts' => false, 'paymentMerchantReference' => false, 'platformPaymentType' => false, @@ -188,9 +197,12 @@ public function isNullableSetToNull(string $property): bool 'type' => 'type', 'modificationMerchantReference' => 'modificationMerchantReference', 'modificationPspReference' => 'modificationPspReference', + 'authorisationType' => 'authorisationType', 'panEntryMode' => 'panEntryMode', 'processingType' => 'processingType', 'relayedAuthorisationData' => 'relayedAuthorisationData', + 'schemeTraceId' => 'schemeTraceId', + 'schemeUniqueTransactionId' => 'schemeUniqueTransactionId', 'validationFacts' => 'validationFacts', 'paymentMerchantReference' => 'paymentMerchantReference', 'platformPaymentType' => 'platformPaymentType', @@ -207,9 +219,12 @@ public function isNullableSetToNull(string $property): bool 'type' => 'setType', 'modificationMerchantReference' => 'setModificationMerchantReference', 'modificationPspReference' => 'setModificationPspReference', + 'authorisationType' => 'setAuthorisationType', 'panEntryMode' => 'setPanEntryMode', 'processingType' => 'setProcessingType', 'relayedAuthorisationData' => 'setRelayedAuthorisationData', + 'schemeTraceId' => 'setSchemeTraceId', + 'schemeUniqueTransactionId' => 'setSchemeUniqueTransactionId', 'validationFacts' => 'setValidationFacts', 'paymentMerchantReference' => 'setPaymentMerchantReference', 'platformPaymentType' => 'setPlatformPaymentType', @@ -226,9 +241,12 @@ public function isNullableSetToNull(string $property): bool 'type' => 'getType', 'modificationMerchantReference' => 'getModificationMerchantReference', 'modificationPspReference' => 'getModificationPspReference', + 'authorisationType' => 'getAuthorisationType', 'panEntryMode' => 'getPanEntryMode', 'processingType' => 'getProcessingType', 'relayedAuthorisationData' => 'getRelayedAuthorisationData', + 'schemeTraceId' => 'getSchemeTraceId', + 'schemeUniqueTransactionId' => 'getSchemeUniqueTransactionId', 'validationFacts' => 'getValidationFacts', 'paymentMerchantReference' => 'getPaymentMerchantReference', 'platformPaymentType' => 'getPlatformPaymentType', @@ -295,9 +313,12 @@ public function __construct(array $data = null) $this->setIfExists('type', $data ?? [], 'platformPayment'); $this->setIfExists('modificationMerchantReference', $data ?? [], null); $this->setIfExists('modificationPspReference', $data ?? [], null); + $this->setIfExists('authorisationType', $data ?? [], null); $this->setIfExists('panEntryMode', $data ?? [], null); $this->setIfExists('processingType', $data ?? [], null); $this->setIfExists('relayedAuthorisationData', $data ?? [], null); + $this->setIfExists('schemeTraceId', $data ?? [], null); + $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); $this->setIfExists('validationFacts', $data ?? [], null); $this->setIfExists('paymentMerchantReference', $data ?? [], null); $this->setIfExists('platformPaymentType', $data ?? [], null); @@ -459,6 +480,33 @@ public function setModificationPspReference($modificationPspReference) return $this; } + /** + * Gets authorisationType + * + * @return string|null + */ + public function getAuthorisationType() + { + return $this->container['authorisationType']; + } + + /** + * Sets authorisationType + * + * @param string|null $authorisationType The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** + * + * @return self + */ + public function setAuthorisationType($authorisationType) + { + if (is_null($authorisationType)) { + throw new \InvalidArgumentException('non-nullable authorisationType cannot be null'); + } + $this->container['authorisationType'] = $authorisationType; + + return $this; + } + /** * Gets panEntryMode * @@ -540,6 +588,60 @@ public function setRelayedAuthorisationData($relayedAuthorisationData) return $this; } + /** + * Gets schemeTraceId + * + * @return string|null + */ + public function getSchemeTraceId() + { + return $this->container['schemeTraceId']; + } + + /** + * Sets schemeTraceId + * + * @param string|null $schemeTraceId The identifier of the original payment provided by the scheme. The Id could be alphanumeric or numeric depending on the scheme. The schemeTraceID should be referring to an original schemeUniqueTransactionID provided in an earlier payment (not necessarily processed by Adyen). Instances of available schemeTraceId is authAdjustment or recurring payments. + * + * @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 The unique identifier created by the scheme. The ID could be alphanumeric or numeric depending on the 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 validationFacts *