From 2e966feaa1dd528d8c3597383e669bb261411c56 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Fri, 26 May 2023 13:07:33 +0000 Subject: [PATCH] [create-pull-request] automated change --- .../Model/BalancePlatform/AccountHolder.php | 2 +- .../BalancePlatform/AccountHolderInfo.php | 2 +- .../Model/BalancePlatform/BalanceAccount.php | 2 +- .../BalancePlatform/BalanceAccountBase.php | 2 +- .../BalancePlatform/BalanceAccountInfo.php | 2 +- .../BalanceAccountUpdateRequest.php | 2 +- .../Model/BalancePlatform/DeliveryAddress.php | 591 ++++++ .../Model/BalancePlatform/DeliveryContact.php | 6 +- src/Adyen/Model/Checkout/AccountInfo2.php | 1220 +++++++++++ .../Model/Checkout/AdditionalDataAirline.php | 56 +- .../Checkout/AdditionalDataCarRental.php | 46 +- .../Model/Checkout/AdditionalDataLevel23.php | 34 +- .../Model/Checkout/AdditionalDataLodging.php | 62 +- .../AdditionalDataTemporaryServices.php | 18 +- .../Address2.php | 163 +- src/Adyen/Model/Checkout/Amount2.php | 418 ++++ src/Adyen/Model/Checkout/ApplicationInfo2.php | 554 +++++ src/Adyen/Model/Checkout/BrowserInfo2.php | 648 ++++++ ...php => CheckoutDonationPaymentRequest.php} | 121 +- ...utDonationPaymentRequestPaymentMethod.php} | 74 +- ...Request.php => CheckoutPaymentRequest.php} | 121 +- .../Checkout/CreateCheckoutSessionRequest.php | 48 +- .../CreateCheckoutSessionResponse.php | 48 +- .../Checkout/CreatePaymentLinkRequest.php | 6 +- src/Adyen/Model/Checkout/ForexQuote2.php | 756 +++++++ .../Installments2.php} | 120 +- src/Adyen/Model/Checkout/Mandate.php | 21 +- src/Adyen/Model/Checkout/Mandate2.php | 744 +++++++ .../Model/Checkout/MerchantRiskIndicator2.php | 906 +++++++++ src/Adyen/Model/Checkout/Name2.php | 418 ++++ src/Adyen/Model/Checkout/PayPalDetails.php | 68 + src/Adyen/Model/Checkout/PaymentDetails.php | 8 +- .../Model/Checkout/PaymentLinkResponse.php | 6 +- .../Model/Checkout/PaymentSetupRequest.php | 12 +- .../Checkout/PlatformChargebackLogic.php | 6 +- .../Checkout/PlatformChargebackLogic2.php | 487 +++++ src/Adyen/Model/Checkout/Split.php | 12 + src/Adyen/Model/Checkout/Split2.php | 584 ++++++ .../Checkout/StoredPaymentMethodDetails.php | 2 - .../Model/Checkout/ThreeDS2RequestData2.php | 1800 +++++++++++++++++ .../Model/LegalEntityManagement/Address.php | 2 +- .../LegalEntityManagement/BankAccountInfo.php | 46 +- .../LegalEntityManagement/BusinessLine.php | 39 +- .../BusinessLineInfo.php | 39 +- .../BusinessLineInfoUpdate.php | 37 +- .../CapabilityProblemEntity.php | 2 + .../CapabilityProblemEntityRecursive.php | 2 + .../Model/LegalEntityManagement/Document.php | 4 +- .../IdentificationData.php | 4 +- .../LegalEntityAssociation.php | 4 +- .../LegalEntityManagement/Organization.php | 2 +- .../TransferInstrumentReference.php | 2 +- .../Model/Management/AfterpayTouchInfo.php | 387 ++++ src/Adyen/Model/Management/ClearpayInfo.php | 387 ++++ src/Adyen/Model/Management/CompanyUser.php | 50 +- .../Management/CreateCompanyUserRequest.php | 36 +- .../Management/CreateCompanyUserResponse.php | 50 +- .../Management/CreateMerchantUserRequest.php | 36 +- .../Model/Management/CreateUserResponse.php | 32 +- .../Model/Management/InvalidFieldWrapper.php | 384 ++++ src/Adyen/Model/Management/JSONObject.php | 6 +- .../Model/Management/JSONPathWrapper.php | 384 ++++ .../Management/ListTerminalsResponse.php | 116 +- src/Adyen/Model/Management/PaymentMethod.php | 102 + .../Management/PaymentMethodResponse.php | 10 +- .../Management/PaymentMethodSetupInfo.php | 106 + .../Model/Management/PaymentMethodWrapper.php | 384 ++++ .../Model/Management/RestServiceError.php | 6 +- .../Model/Management/StoreCreationRequest.php | 4 +- .../StoreCreationWithMerchantCodeRequest.php | 4 +- src/Adyen/Model/Management/Terminal.php | 36 + .../Model/Management/TerminalOrderRequest.php | 34 + src/Adyen/Model/Management/TwintInfo.php | 387 ++++ .../Management/UpdateCompanyUserRequest.php | 68 - .../Management/UpdateMerchantUserRequest.php | 68 - .../Management/UpdatePaymentMethodInfo.php | 126 +- src/Adyen/Model/Management/User.php | 32 +- src/Adyen/Model/Management/VippsInfo.php | 2 +- .../Model/Payments/AdditionalDataAirline.php | 56 +- .../Payments/AdditionalDataCarRental.php | 46 +- .../Model/Payments/AdditionalDataLevel23.php | 34 +- .../Model/Payments/AdditionalDataLodging.php | 62 +- .../AdditionalDataTemporaryServices.php | 18 +- src/Adyen/Model/Payments/Split.php | 12 + src/Adyen/Model/Transfers/Address2.php | 2 +- src/Adyen/Model/Transfers/Transfer.php | 2 +- src/Adyen/Model/Transfers/TransferInfo.php | 2 +- .../BankAccountValidationApi.php | 5 +- src/Adyen/Service/Checkout/PaymentsApi.php | 12 +- .../LegalEntityManagement/DocumentsApi.php | 5 +- 90 files changed, 12826 insertions(+), 1046 deletions(-) create mode 100644 src/Adyen/Model/BalancePlatform/DeliveryAddress.php create mode 100644 src/Adyen/Model/Checkout/AccountInfo2.php rename src/Adyen/Model/{BalancePlatform => Checkout}/Address2.php (78%) create mode 100644 src/Adyen/Model/Checkout/Amount2.php create mode 100644 src/Adyen/Model/Checkout/ApplicationInfo2.php create mode 100644 src/Adyen/Model/Checkout/BrowserInfo2.php rename src/Adyen/Model/Checkout/{PaymentDonationRequest.php => CheckoutDonationPaymentRequest.php} (93%) rename src/Adyen/Model/Checkout/{CheckoutPaymentMethod.php => CheckoutDonationPaymentRequestPaymentMethod.php} (96%) rename src/Adyen/Model/Checkout/{PaymentRequest.php => CheckoutPaymentRequest.php} (93%) create mode 100644 src/Adyen/Model/Checkout/ForexQuote2.php rename src/Adyen/Model/{Management/ShopperStatement.php => Checkout/Installments2.php} (75%) create mode 100644 src/Adyen/Model/Checkout/Mandate2.php create mode 100644 src/Adyen/Model/Checkout/MerchantRiskIndicator2.php create mode 100644 src/Adyen/Model/Checkout/Name2.php create mode 100644 src/Adyen/Model/Checkout/PlatformChargebackLogic2.php create mode 100644 src/Adyen/Model/Checkout/Split2.php create mode 100644 src/Adyen/Model/Checkout/ThreeDS2RequestData2.php create mode 100644 src/Adyen/Model/Management/AfterpayTouchInfo.php create mode 100644 src/Adyen/Model/Management/ClearpayInfo.php create mode 100644 src/Adyen/Model/Management/InvalidFieldWrapper.php create mode 100644 src/Adyen/Model/Management/JSONPathWrapper.php create mode 100644 src/Adyen/Model/Management/PaymentMethodWrapper.php create mode 100644 src/Adyen/Model/Management/TwintInfo.php diff --git a/src/Adyen/Model/BalancePlatform/AccountHolder.php b/src/Adyen/Model/BalancePlatform/AccountHolder.php index 3e017b887..f0b00a08b 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolder.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolder.php @@ -645,7 +645,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php index 045d8d14d..976d487bb 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php @@ -496,7 +496,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccount.php b/src/Adyen/Model/BalancePlatform/BalanceAccount.php index cc5af096c..b1f62d5dc 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccount.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccount.php @@ -570,7 +570,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php index e2f5eed94..d27a6ca17 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php @@ -536,7 +536,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php index e89859ba0..7dfb410f3 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php @@ -428,7 +428,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php index f047752ca..335754719 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php @@ -496,7 +496,7 @@ public function getTimeZone() /** * Sets timeZone * - * @param string|null $timeZone The [time zone](https://www.iana.org/time-zones) of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + * @param string|null $timeZone The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/DeliveryAddress.php b/src/Adyen/Model/BalancePlatform/DeliveryAddress.php new file mode 100644 index 000000000..623dfa472 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/DeliveryAddress.php @@ -0,0 +1,591 @@ + + */ +class DeliveryAddress implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DeliveryAddress'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'city' => 'string', + 'country' => 'string', + 'line1' => 'string', + 'line2' => 'string', + 'line3' => 'string', + 'postalCode' => 'string', + 'stateOrProvince' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'city' => null, + 'country' => null, + 'line1' => null, + 'line2' => null, + 'line3' => null, + 'postalCode' => null, + 'stateOrProvince' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'city' => false, + 'country' => false, + 'line1' => false, + 'line2' => false, + 'line3' => false, + 'postalCode' => false, + 'stateOrProvince' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'city' => 'city', + 'country' => 'country', + 'line1' => 'line1', + 'line2' => 'line2', + 'line3' => 'line3', + 'postalCode' => 'postalCode', + 'stateOrProvince' => 'stateOrProvince' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'city' => 'setCity', + 'country' => 'setCountry', + 'line1' => 'setLine1', + 'line2' => 'setLine2', + 'line3' => 'setLine3', + 'postalCode' => 'setPostalCode', + 'stateOrProvince' => 'setStateOrProvince' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'city' => 'getCity', + 'country' => 'getCountry', + 'line1' => 'getLine1', + 'line2' => 'getLine2', + 'line3' => 'getLine3', + 'postalCode' => 'getPostalCode', + 'stateOrProvince' => 'getStateOrProvince' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('line1', $data ?? [], null); + $this->setIfExists('line2', $data ?? [], null); + $this->setIfExists('line3', $data ?? [], null); + $this->setIfExists('postalCode', $data ?? [], null); + $this->setIfExists('stateOrProvince', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets city + * + * @return string|null + */ + public function getCity() + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city The name of the city. + * + * @return self + */ + public function setCity($city) + { + if (is_null($city)) { + throw new \InvalidArgumentException('non-nullable city cannot be null'); + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets country + * + * @return string + */ + public function getCountry() + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string $country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. >If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * + * @return self + */ + public function setCountry($country) + { + if (is_null($country)) { + throw new \InvalidArgumentException('non-nullable country cannot be null'); + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets line1 + * + * @return string|null + */ + public function getLine1() + { + return $this->container['line1']; + } + + /** + * Sets line1 + * + * @param string|null $line1 First line of the address. + * + * @return self + */ + public function setLine1($line1) + { + if (is_null($line1)) { + throw new \InvalidArgumentException('non-nullable line1 cannot be null'); + } + $this->container['line1'] = $line1; + + return $this; + } + + /** + * Gets line2 + * + * @return string|null + */ + public function getLine2() + { + return $this->container['line2']; + } + + /** + * Sets line2 + * + * @param string|null $line2 Second line of the address. + * + * @return self + */ + public function setLine2($line2) + { + if (is_null($line2)) { + throw new \InvalidArgumentException('non-nullable line2 cannot be null'); + } + $this->container['line2'] = $line2; + + return $this; + } + + /** + * Gets line3 + * + * @return string|null + */ + public function getLine3() + { + return $this->container['line3']; + } + + /** + * Sets line3 + * + * @param string|null $line3 Third line of the address. + * + * @return self + */ + public function setLine3($line3) + { + if (is_null($line3)) { + throw new \InvalidArgumentException('non-nullable line3 cannot be null'); + } + $this->container['line3'] = $line3; + + return $this; + } + + /** + * Gets postalCode + * + * @return string|null + */ + public function getPostalCode() + { + return $this->container['postalCode']; + } + + /** + * Sets postalCode + * + * @param string|null $postalCode The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. + * + * @return self + */ + public function setPostalCode($postalCode) + { + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + } + $this->container['postalCode'] = $postalCode; + + return $this; + } + + /** + * Gets stateOrProvince + * + * @return string|null + */ + public function getStateOrProvince() + { + return $this->container['stateOrProvince']; + } + + /** + * Sets stateOrProvince + * + * @param string|null $stateOrProvince The two-letterISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * + * @return self + */ + public function setStateOrProvince($stateOrProvince) + { + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + } + $this->container['stateOrProvince'] = $stateOrProvince; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/DeliveryContact.php b/src/Adyen/Model/BalancePlatform/DeliveryContact.php index 845fad5c5..4973f2b86 100644 --- a/src/Adyen/Model/BalancePlatform/DeliveryContact.php +++ b/src/Adyen/Model/BalancePlatform/DeliveryContact.php @@ -44,7 +44,7 @@ class DeliveryContact implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'address' => '\Adyen\Model\BalancePlatform\Address2', + 'address' => '\Adyen\Model\BalancePlatform\DeliveryAddress', 'email' => 'string', 'fullPhoneNumber' => 'string', 'name' => '\Adyen\Model\BalancePlatform\Name', @@ -320,7 +320,7 @@ public function valid() /** * Gets address * - * @return \Adyen\Model\BalancePlatform\Address2 + * @return \Adyen\Model\BalancePlatform\DeliveryAddress */ public function getAddress() { @@ -330,7 +330,7 @@ public function getAddress() /** * Sets address * - * @param \Adyen\Model\BalancePlatform\Address2 $address address + * @param \Adyen\Model\BalancePlatform\DeliveryAddress $address address * * @return self */ diff --git a/src/Adyen/Model/Checkout/AccountInfo2.php b/src/Adyen/Model/Checkout/AccountInfo2.php new file mode 100644 index 000000000..dd9c78c1e --- /dev/null +++ b/src/Adyen/Model/Checkout/AccountInfo2.php @@ -0,0 +1,1220 @@ + + */ +class AccountInfo2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccountInfo-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'accountAgeIndicator' => 'string', + 'accountChangeDate' => '\DateTime', + 'accountChangeIndicator' => 'string', + 'accountCreationDate' => '\DateTime', + 'accountType' => 'string', + 'addCardAttemptsDay' => 'int', + 'deliveryAddressUsageDate' => '\DateTime', + 'deliveryAddressUsageIndicator' => 'string', + 'homePhone' => 'string', + 'mobilePhone' => 'string', + 'passwordChangeDate' => '\DateTime', + 'passwordChangeIndicator' => 'string', + 'pastTransactionsDay' => 'int', + 'pastTransactionsYear' => 'int', + 'paymentAccountAge' => '\DateTime', + 'paymentAccountIndicator' => 'string', + 'purchasesLast6Months' => 'int', + 'suspiciousActivity' => 'bool', + 'workPhone' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'accountAgeIndicator' => null, + 'accountChangeDate' => 'date-time', + 'accountChangeIndicator' => null, + 'accountCreationDate' => 'date-time', + 'accountType' => null, + 'addCardAttemptsDay' => 'int32', + 'deliveryAddressUsageDate' => 'date-time', + 'deliveryAddressUsageIndicator' => null, + 'homePhone' => null, + 'mobilePhone' => null, + 'passwordChangeDate' => 'date-time', + 'passwordChangeIndicator' => null, + 'pastTransactionsDay' => 'int32', + 'pastTransactionsYear' => 'int32', + 'paymentAccountAge' => 'date-time', + 'paymentAccountIndicator' => null, + 'purchasesLast6Months' => 'int32', + 'suspiciousActivity' => null, + 'workPhone' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'accountAgeIndicator' => false, + 'accountChangeDate' => false, + 'accountChangeIndicator' => false, + 'accountCreationDate' => false, + 'accountType' => false, + 'addCardAttemptsDay' => true, + 'deliveryAddressUsageDate' => false, + 'deliveryAddressUsageIndicator' => false, + 'homePhone' => false, + 'mobilePhone' => false, + 'passwordChangeDate' => false, + 'passwordChangeIndicator' => false, + 'pastTransactionsDay' => true, + 'pastTransactionsYear' => true, + 'paymentAccountAge' => false, + 'paymentAccountIndicator' => false, + 'purchasesLast6Months' => true, + 'suspiciousActivity' => false, + 'workPhone' => 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 = [ + 'accountAgeIndicator' => 'accountAgeIndicator', + 'accountChangeDate' => 'accountChangeDate', + 'accountChangeIndicator' => 'accountChangeIndicator', + 'accountCreationDate' => 'accountCreationDate', + 'accountType' => 'accountType', + 'addCardAttemptsDay' => 'addCardAttemptsDay', + 'deliveryAddressUsageDate' => 'deliveryAddressUsageDate', + 'deliveryAddressUsageIndicator' => 'deliveryAddressUsageIndicator', + 'homePhone' => 'homePhone', + 'mobilePhone' => 'mobilePhone', + 'passwordChangeDate' => 'passwordChangeDate', + 'passwordChangeIndicator' => 'passwordChangeIndicator', + 'pastTransactionsDay' => 'pastTransactionsDay', + 'pastTransactionsYear' => 'pastTransactionsYear', + 'paymentAccountAge' => 'paymentAccountAge', + 'paymentAccountIndicator' => 'paymentAccountIndicator', + 'purchasesLast6Months' => 'purchasesLast6Months', + 'suspiciousActivity' => 'suspiciousActivity', + 'workPhone' => 'workPhone' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'accountAgeIndicator' => 'setAccountAgeIndicator', + 'accountChangeDate' => 'setAccountChangeDate', + 'accountChangeIndicator' => 'setAccountChangeIndicator', + 'accountCreationDate' => 'setAccountCreationDate', + 'accountType' => 'setAccountType', + 'addCardAttemptsDay' => 'setAddCardAttemptsDay', + 'deliveryAddressUsageDate' => 'setDeliveryAddressUsageDate', + 'deliveryAddressUsageIndicator' => 'setDeliveryAddressUsageIndicator', + 'homePhone' => 'setHomePhone', + 'mobilePhone' => 'setMobilePhone', + 'passwordChangeDate' => 'setPasswordChangeDate', + 'passwordChangeIndicator' => 'setPasswordChangeIndicator', + 'pastTransactionsDay' => 'setPastTransactionsDay', + 'pastTransactionsYear' => 'setPastTransactionsYear', + 'paymentAccountAge' => 'setPaymentAccountAge', + 'paymentAccountIndicator' => 'setPaymentAccountIndicator', + 'purchasesLast6Months' => 'setPurchasesLast6Months', + 'suspiciousActivity' => 'setSuspiciousActivity', + 'workPhone' => 'setWorkPhone' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'accountAgeIndicator' => 'getAccountAgeIndicator', + 'accountChangeDate' => 'getAccountChangeDate', + 'accountChangeIndicator' => 'getAccountChangeIndicator', + 'accountCreationDate' => 'getAccountCreationDate', + 'accountType' => 'getAccountType', + 'addCardAttemptsDay' => 'getAddCardAttemptsDay', + 'deliveryAddressUsageDate' => 'getDeliveryAddressUsageDate', + 'deliveryAddressUsageIndicator' => 'getDeliveryAddressUsageIndicator', + 'homePhone' => 'getHomePhone', + 'mobilePhone' => 'getMobilePhone', + 'passwordChangeDate' => 'getPasswordChangeDate', + 'passwordChangeIndicator' => 'getPasswordChangeIndicator', + 'pastTransactionsDay' => 'getPastTransactionsDay', + 'pastTransactionsYear' => 'getPastTransactionsYear', + 'paymentAccountAge' => 'getPaymentAccountAge', + 'paymentAccountIndicator' => 'getPaymentAccountIndicator', + 'purchasesLast6Months' => 'getPurchasesLast6Months', + 'suspiciousActivity' => 'getSuspiciousActivity', + 'workPhone' => 'getWorkPhone' + ]; + + /** + * 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 ACCOUNT_AGE_INDICATOR_NOT_APPLICABLE = 'notApplicable'; + public const ACCOUNT_AGE_INDICATOR_THIS_TRANSACTION = 'thisTransaction'; + public const ACCOUNT_AGE_INDICATOR_LESS_THAN30_DAYS = 'lessThan30Days'; + public const ACCOUNT_AGE_INDICATOR_FROM30_TO60_DAYS = 'from30To60Days'; + public const ACCOUNT_AGE_INDICATOR_MORE_THAN60_DAYS = 'moreThan60Days'; + public const ACCOUNT_CHANGE_INDICATOR_THIS_TRANSACTION = 'thisTransaction'; + public const ACCOUNT_CHANGE_INDICATOR_LESS_THAN30_DAYS = 'lessThan30Days'; + public const ACCOUNT_CHANGE_INDICATOR_FROM30_TO60_DAYS = 'from30To60Days'; + public const ACCOUNT_CHANGE_INDICATOR_MORE_THAN60_DAYS = 'moreThan60Days'; + public const ACCOUNT_TYPE_NOT_APPLICABLE = 'notApplicable'; + public const ACCOUNT_TYPE_CREDIT = 'credit'; + public const ACCOUNT_TYPE_DEBIT = 'debit'; + public const DELIVERY_ADDRESS_USAGE_INDICATOR_THIS_TRANSACTION = 'thisTransaction'; + public const DELIVERY_ADDRESS_USAGE_INDICATOR_LESS_THAN30_DAYS = 'lessThan30Days'; + public const DELIVERY_ADDRESS_USAGE_INDICATOR_FROM30_TO60_DAYS = 'from30To60Days'; + public const DELIVERY_ADDRESS_USAGE_INDICATOR_MORE_THAN60_DAYS = 'moreThan60Days'; + public const PASSWORD_CHANGE_INDICATOR_NOT_APPLICABLE = 'notApplicable'; + public const PASSWORD_CHANGE_INDICATOR_THIS_TRANSACTION = 'thisTransaction'; + public const PASSWORD_CHANGE_INDICATOR_LESS_THAN30_DAYS = 'lessThan30Days'; + public const PASSWORD_CHANGE_INDICATOR_FROM30_TO60_DAYS = 'from30To60Days'; + public const PASSWORD_CHANGE_INDICATOR_MORE_THAN60_DAYS = 'moreThan60Days'; + public const PAYMENT_ACCOUNT_INDICATOR_NOT_APPLICABLE = 'notApplicable'; + public const PAYMENT_ACCOUNT_INDICATOR_THIS_TRANSACTION = 'thisTransaction'; + public const PAYMENT_ACCOUNT_INDICATOR_LESS_THAN30_DAYS = 'lessThan30Days'; + public const PAYMENT_ACCOUNT_INDICATOR_FROM30_TO60_DAYS = 'from30To60Days'; + public const PAYMENT_ACCOUNT_INDICATOR_MORE_THAN60_DAYS = 'moreThan60Days'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAccountAgeIndicatorAllowableValues() + { + return [ + self::ACCOUNT_AGE_INDICATOR_NOT_APPLICABLE, + self::ACCOUNT_AGE_INDICATOR_THIS_TRANSACTION, + self::ACCOUNT_AGE_INDICATOR_LESS_THAN30_DAYS, + self::ACCOUNT_AGE_INDICATOR_FROM30_TO60_DAYS, + self::ACCOUNT_AGE_INDICATOR_MORE_THAN60_DAYS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAccountChangeIndicatorAllowableValues() + { + return [ + self::ACCOUNT_CHANGE_INDICATOR_THIS_TRANSACTION, + self::ACCOUNT_CHANGE_INDICATOR_LESS_THAN30_DAYS, + self::ACCOUNT_CHANGE_INDICATOR_FROM30_TO60_DAYS, + self::ACCOUNT_CHANGE_INDICATOR_MORE_THAN60_DAYS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAccountTypeAllowableValues() + { + return [ + self::ACCOUNT_TYPE_NOT_APPLICABLE, + self::ACCOUNT_TYPE_CREDIT, + self::ACCOUNT_TYPE_DEBIT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDeliveryAddressUsageIndicatorAllowableValues() + { + return [ + self::DELIVERY_ADDRESS_USAGE_INDICATOR_THIS_TRANSACTION, + self::DELIVERY_ADDRESS_USAGE_INDICATOR_LESS_THAN30_DAYS, + self::DELIVERY_ADDRESS_USAGE_INDICATOR_FROM30_TO60_DAYS, + self::DELIVERY_ADDRESS_USAGE_INDICATOR_MORE_THAN60_DAYS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPasswordChangeIndicatorAllowableValues() + { + return [ + self::PASSWORD_CHANGE_INDICATOR_NOT_APPLICABLE, + self::PASSWORD_CHANGE_INDICATOR_THIS_TRANSACTION, + self::PASSWORD_CHANGE_INDICATOR_LESS_THAN30_DAYS, + self::PASSWORD_CHANGE_INDICATOR_FROM30_TO60_DAYS, + self::PASSWORD_CHANGE_INDICATOR_MORE_THAN60_DAYS, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPaymentAccountIndicatorAllowableValues() + { + return [ + self::PAYMENT_ACCOUNT_INDICATOR_NOT_APPLICABLE, + self::PAYMENT_ACCOUNT_INDICATOR_THIS_TRANSACTION, + self::PAYMENT_ACCOUNT_INDICATOR_LESS_THAN30_DAYS, + self::PAYMENT_ACCOUNT_INDICATOR_FROM30_TO60_DAYS, + self::PAYMENT_ACCOUNT_INDICATOR_MORE_THAN60_DAYS, + ]; + } + /** + * 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('accountAgeIndicator', $data ?? [], null); + $this->setIfExists('accountChangeDate', $data ?? [], null); + $this->setIfExists('accountChangeIndicator', $data ?? [], null); + $this->setIfExists('accountCreationDate', $data ?? [], null); + $this->setIfExists('accountType', $data ?? [], null); + $this->setIfExists('addCardAttemptsDay', $data ?? [], null); + $this->setIfExists('deliveryAddressUsageDate', $data ?? [], null); + $this->setIfExists('deliveryAddressUsageIndicator', $data ?? [], null); + $this->setIfExists('homePhone', $data ?? [], null); + $this->setIfExists('mobilePhone', $data ?? [], null); + $this->setIfExists('passwordChangeDate', $data ?? [], null); + $this->setIfExists('passwordChangeIndicator', $data ?? [], null); + $this->setIfExists('pastTransactionsDay', $data ?? [], null); + $this->setIfExists('pastTransactionsYear', $data ?? [], null); + $this->setIfExists('paymentAccountAge', $data ?? [], null); + $this->setIfExists('paymentAccountIndicator', $data ?? [], null); + $this->setIfExists('purchasesLast6Months', $data ?? [], null); + $this->setIfExists('suspiciousActivity', $data ?? [], null); + $this->setIfExists('workPhone', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getAccountAgeIndicatorAllowableValues(); + if (!is_null($this->container['accountAgeIndicator']) && !in_array($this->container['accountAgeIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'accountAgeIndicator', must be one of '%s'", + $this->container['accountAgeIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAccountChangeIndicatorAllowableValues(); + if (!is_null($this->container['accountChangeIndicator']) && !in_array($this->container['accountChangeIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'accountChangeIndicator', must be one of '%s'", + $this->container['accountChangeIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAccountTypeAllowableValues(); + if (!is_null($this->container['accountType']) && !in_array($this->container['accountType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'accountType', must be one of '%s'", + $this->container['accountType'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDeliveryAddressUsageIndicatorAllowableValues(); + if (!is_null($this->container['deliveryAddressUsageIndicator']) && !in_array($this->container['deliveryAddressUsageIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'deliveryAddressUsageIndicator', must be one of '%s'", + $this->container['deliveryAddressUsageIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPasswordChangeIndicatorAllowableValues(); + if (!is_null($this->container['passwordChangeIndicator']) && !in_array($this->container['passwordChangeIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'passwordChangeIndicator', must be one of '%s'", + $this->container['passwordChangeIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPaymentAccountIndicatorAllowableValues(); + if (!is_null($this->container['paymentAccountIndicator']) && !in_array($this->container['paymentAccountIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'paymentAccountIndicator', must be one of '%s'", + $this->container['paymentAccountIndicator'], + 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 accountAgeIndicator + * + * @return string|null + */ + public function getAccountAgeIndicator() + { + return $this->container['accountAgeIndicator']; + } + + /** + * Sets accountAgeIndicator + * + * @param string|null $accountAgeIndicator Indicator for the length of time since this shopper account was created in the merchant's environment. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + * + * @return self + */ + public function setAccountAgeIndicator($accountAgeIndicator) + { + if (is_null($accountAgeIndicator)) { + throw new \InvalidArgumentException('non-nullable accountAgeIndicator cannot be null'); + } + $allowedValues = $this->getAccountAgeIndicatorAllowableValues(); + if (!in_array($accountAgeIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'accountAgeIndicator', must be one of '%s'", + $accountAgeIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['accountAgeIndicator'] = $accountAgeIndicator; + + return $this; + } + + /** + * Gets accountChangeDate + * + * @return \DateTime|null + */ + public function getAccountChangeDate() + { + return $this->container['accountChangeDate']; + } + + /** + * Sets accountChangeDate + * + * @param \DateTime|null $accountChangeDate Date when the shopper's account was last changed. + * + * @return self + */ + public function setAccountChangeDate($accountChangeDate) + { + if (is_null($accountChangeDate)) { + throw new \InvalidArgumentException('non-nullable accountChangeDate cannot be null'); + } + $this->container['accountChangeDate'] = $accountChangeDate; + + return $this; + } + + /** + * Gets accountChangeIndicator + * + * @return string|null + */ + public function getAccountChangeIndicator() + { + return $this->container['accountChangeIndicator']; + } + + /** + * Sets accountChangeIndicator + * + * @param string|null $accountChangeIndicator Indicator for the length of time since the shopper's account was last updated. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + * + * @return self + */ + public function setAccountChangeIndicator($accountChangeIndicator) + { + if (is_null($accountChangeIndicator)) { + throw new \InvalidArgumentException('non-nullable accountChangeIndicator cannot be null'); + } + $allowedValues = $this->getAccountChangeIndicatorAllowableValues(); + if (!in_array($accountChangeIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'accountChangeIndicator', must be one of '%s'", + $accountChangeIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['accountChangeIndicator'] = $accountChangeIndicator; + + return $this; + } + + /** + * Gets accountCreationDate + * + * @return \DateTime|null + */ + public function getAccountCreationDate() + { + return $this->container['accountCreationDate']; + } + + /** + * Sets accountCreationDate + * + * @param \DateTime|null $accountCreationDate Date when the shopper's account was created. + * + * @return self + */ + public function setAccountCreationDate($accountCreationDate) + { + if (is_null($accountCreationDate)) { + throw new \InvalidArgumentException('non-nullable accountCreationDate cannot be null'); + } + $this->container['accountCreationDate'] = $accountCreationDate; + + return $this; + } + + /** + * Gets accountType + * + * @return string|null + */ + public function getAccountType() + { + return $this->container['accountType']; + } + + /** + * Sets accountType + * + * @param string|null $accountType Indicates the type of account. For example, for a multi-account card product. Allowed values: * notApplicable * credit * debit + * + * @return self + */ + public function setAccountType($accountType) + { + if (is_null($accountType)) { + throw new \InvalidArgumentException('non-nullable accountType cannot be null'); + } + $allowedValues = $this->getAccountTypeAllowableValues(); + if (!in_array($accountType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'accountType', must be one of '%s'", + $accountType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['accountType'] = $accountType; + + return $this; + } + + /** + * Gets addCardAttemptsDay + * + * @return int|null + */ + public function getAddCardAttemptsDay() + { + return $this->container['addCardAttemptsDay']; + } + + /** + * Sets addCardAttemptsDay + * + * @param int|null $addCardAttemptsDay Number of attempts the shopper tried to add a card to their account in the last day. + * + * @return self + */ + public function setAddCardAttemptsDay($addCardAttemptsDay) + { + // Do nothing for nullable integers + $this->container['addCardAttemptsDay'] = $addCardAttemptsDay; + + return $this; + } + + /** + * Gets deliveryAddressUsageDate + * + * @return \DateTime|null + */ + public function getDeliveryAddressUsageDate() + { + return $this->container['deliveryAddressUsageDate']; + } + + /** + * Sets deliveryAddressUsageDate + * + * @param \DateTime|null $deliveryAddressUsageDate Date the selected delivery address was first used. + * + * @return self + */ + public function setDeliveryAddressUsageDate($deliveryAddressUsageDate) + { + if (is_null($deliveryAddressUsageDate)) { + throw new \InvalidArgumentException('non-nullable deliveryAddressUsageDate cannot be null'); + } + $this->container['deliveryAddressUsageDate'] = $deliveryAddressUsageDate; + + return $this; + } + + /** + * Gets deliveryAddressUsageIndicator + * + * @return string|null + */ + public function getDeliveryAddressUsageIndicator() + { + return $this->container['deliveryAddressUsageIndicator']; + } + + /** + * Sets deliveryAddressUsageIndicator + * + * @param string|null $deliveryAddressUsageIndicator Indicator for the length of time since this delivery address was first used. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + * + * @return self + */ + public function setDeliveryAddressUsageIndicator($deliveryAddressUsageIndicator) + { + if (is_null($deliveryAddressUsageIndicator)) { + throw new \InvalidArgumentException('non-nullable deliveryAddressUsageIndicator cannot be null'); + } + $allowedValues = $this->getDeliveryAddressUsageIndicatorAllowableValues(); + if (!in_array($deliveryAddressUsageIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'deliveryAddressUsageIndicator', must be one of '%s'", + $deliveryAddressUsageIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['deliveryAddressUsageIndicator'] = $deliveryAddressUsageIndicator; + + return $this; + } + + /** + * Gets homePhone + * + * @return string|null + * @deprecated + */ + public function getHomePhone() + { + return $this->container['homePhone']; + } + + /** + * Sets homePhone + * + * @param string|null $homePhone Shopper's home phone number (including the country code). + * + * @return self + * @deprecated + */ + public function setHomePhone($homePhone) + { + if (is_null($homePhone)) { + throw new \InvalidArgumentException('non-nullable homePhone cannot be null'); + } + $this->container['homePhone'] = $homePhone; + + return $this; + } + + /** + * Gets mobilePhone + * + * @return string|null + * @deprecated + */ + public function getMobilePhone() + { + return $this->container['mobilePhone']; + } + + /** + * Sets mobilePhone + * + * @param string|null $mobilePhone Shopper's mobile phone number (including the country code). + * + * @return self + * @deprecated + */ + public function setMobilePhone($mobilePhone) + { + if (is_null($mobilePhone)) { + throw new \InvalidArgumentException('non-nullable mobilePhone cannot be null'); + } + $this->container['mobilePhone'] = $mobilePhone; + + return $this; + } + + /** + * Gets passwordChangeDate + * + * @return \DateTime|null + */ + public function getPasswordChangeDate() + { + return $this->container['passwordChangeDate']; + } + + /** + * Sets passwordChangeDate + * + * @param \DateTime|null $passwordChangeDate Date when the shopper last changed their password. + * + * @return self + */ + public function setPasswordChangeDate($passwordChangeDate) + { + if (is_null($passwordChangeDate)) { + throw new \InvalidArgumentException('non-nullable passwordChangeDate cannot be null'); + } + $this->container['passwordChangeDate'] = $passwordChangeDate; + + return $this; + } + + /** + * Gets passwordChangeIndicator + * + * @return string|null + */ + public function getPasswordChangeIndicator() + { + return $this->container['passwordChangeIndicator']; + } + + /** + * Sets passwordChangeIndicator + * + * @param string|null $passwordChangeIndicator Indicator when the shopper has changed their password. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + * + * @return self + */ + public function setPasswordChangeIndicator($passwordChangeIndicator) + { + if (is_null($passwordChangeIndicator)) { + throw new \InvalidArgumentException('non-nullable passwordChangeIndicator cannot be null'); + } + $allowedValues = $this->getPasswordChangeIndicatorAllowableValues(); + if (!in_array($passwordChangeIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'passwordChangeIndicator', must be one of '%s'", + $passwordChangeIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['passwordChangeIndicator'] = $passwordChangeIndicator; + + return $this; + } + + /** + * Gets pastTransactionsDay + * + * @return int|null + */ + public function getPastTransactionsDay() + { + return $this->container['pastTransactionsDay']; + } + + /** + * Sets pastTransactionsDay + * + * @param int|null $pastTransactionsDay Number of all transactions (successful and abandoned) from this shopper in the past 24 hours. + * + * @return self + */ + public function setPastTransactionsDay($pastTransactionsDay) + { + // Do nothing for nullable integers + $this->container['pastTransactionsDay'] = $pastTransactionsDay; + + return $this; + } + + /** + * Gets pastTransactionsYear + * + * @return int|null + */ + public function getPastTransactionsYear() + { + return $this->container['pastTransactionsYear']; + } + + /** + * Sets pastTransactionsYear + * + * @param int|null $pastTransactionsYear Number of all transactions (successful and abandoned) from this shopper in the past year. + * + * @return self + */ + public function setPastTransactionsYear($pastTransactionsYear) + { + // Do nothing for nullable integers + $this->container['pastTransactionsYear'] = $pastTransactionsYear; + + return $this; + } + + /** + * Gets paymentAccountAge + * + * @return \DateTime|null + */ + public function getPaymentAccountAge() + { + return $this->container['paymentAccountAge']; + } + + /** + * Sets paymentAccountAge + * + * @param \DateTime|null $paymentAccountAge Date this payment method was added to the shopper's account. + * + * @return self + */ + public function setPaymentAccountAge($paymentAccountAge) + { + if (is_null($paymentAccountAge)) { + throw new \InvalidArgumentException('non-nullable paymentAccountAge cannot be null'); + } + $this->container['paymentAccountAge'] = $paymentAccountAge; + + return $this; + } + + /** + * Gets paymentAccountIndicator + * + * @return string|null + */ + public function getPaymentAccountIndicator() + { + return $this->container['paymentAccountIndicator']; + } + + /** + * Sets paymentAccountIndicator + * + * @param string|null $paymentAccountIndicator Indicator for the length of time since this payment method was added to this shopper's account. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days + * + * @return self + */ + public function setPaymentAccountIndicator($paymentAccountIndicator) + { + if (is_null($paymentAccountIndicator)) { + throw new \InvalidArgumentException('non-nullable paymentAccountIndicator cannot be null'); + } + $allowedValues = $this->getPaymentAccountIndicatorAllowableValues(); + if (!in_array($paymentAccountIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'paymentAccountIndicator', must be one of '%s'", + $paymentAccountIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['paymentAccountIndicator'] = $paymentAccountIndicator; + + return $this; + } + + /** + * Gets purchasesLast6Months + * + * @return int|null + */ + public function getPurchasesLast6Months() + { + return $this->container['purchasesLast6Months']; + } + + /** + * Sets purchasesLast6Months + * + * @param int|null $purchasesLast6Months Number of successful purchases in the last six months. + * + * @return self + */ + public function setPurchasesLast6Months($purchasesLast6Months) + { + // Do nothing for nullable integers + $this->container['purchasesLast6Months'] = $purchasesLast6Months; + + return $this; + } + + /** + * Gets suspiciousActivity + * + * @return bool|null + */ + public function getSuspiciousActivity() + { + return $this->container['suspiciousActivity']; + } + + /** + * Sets suspiciousActivity + * + * @param bool|null $suspiciousActivity Whether suspicious activity was recorded on this account. + * + * @return self + */ + public function setSuspiciousActivity($suspiciousActivity) + { + if (is_null($suspiciousActivity)) { + throw new \InvalidArgumentException('non-nullable suspiciousActivity cannot be null'); + } + $this->container['suspiciousActivity'] = $suspiciousActivity; + + return $this; + } + + /** + * Gets workPhone + * + * @return string|null + * @deprecated + */ + public function getWorkPhone() + { + return $this->container['workPhone']; + } + + /** + * Sets workPhone + * + * @param string|null $workPhone Shopper's work phone number (including the country code). + * + * @return self + * @deprecated + */ + public function setWorkPhone($workPhone) + { + if (is_null($workPhone)) { + throw new \InvalidArgumentException('non-nullable workPhone cannot be null'); + } + $this->container['workPhone'] = $workPhone; + + 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/AdditionalDataAirline.php b/src/Adyen/Model/Checkout/AdditionalDataAirline.php index c861f1e63..6b5fa6173 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataAirline.php +++ b/src/Adyen/Model/Checkout/AdditionalDataAirline.php @@ -481,7 +481,7 @@ public function getAirlineAgencyInvoiceNumber() /** * Sets airlineAgencyInvoiceNumber * - * @param string|null $airlineAgencyInvoiceNumber Reference number for the invoice, issued by the agency. * minLength: 1 * maxLength: 6 + * @param string|null $airlineAgencyInvoiceNumber The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters * * @return self */ @@ -508,7 +508,7 @@ public function getAirlineAgencyPlanName() /** * Sets airlineAgencyPlanName * - * @param string|null $airlineAgencyPlanName 2-letter agency plan identifier; alphabetical. * minLength: 2 * maxLength: 2 + * @param string|null $airlineAgencyPlanName The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters * * @return self */ @@ -535,7 +535,7 @@ public function getAirlineAirlineCode() /** * Sets airlineAirlineCode * - * @param string|null $airlineAirlineCode [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX); numeric. It identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 * maxLength: 3 + * @param string|null $airlineAirlineCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -562,7 +562,7 @@ public function getAirlineAirlineDesignatorCode() /** * Sets airlineAirlineDesignatorCode * - * @param string|null $airlineAirlineDesignatorCode [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + * @param string|null $airlineAirlineDesignatorCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -589,7 +589,7 @@ public function getAirlineBoardingFee() /** * Sets airlineBoardingFee * - * @param string|null $airlineBoardingFee Chargeable amount for boarding the plane. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 18 + * @param string|null $airlineBoardingFee The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 18 characters * * @return self */ @@ -616,7 +616,7 @@ public function getAirlineComputerizedReservationSystem() /** * Sets airlineComputerizedReservationSystem * - * @param string|null $airlineComputerizedReservationSystem The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Format: alphanumeric. * minLength: 4 * maxLength: 4 + * @param string|null $airlineComputerizedReservationSystem The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters * * @return self */ @@ -643,7 +643,7 @@ public function getAirlineCustomerReferenceNumber() /** * Sets airlineCustomerReferenceNumber * - * @param string|null $airlineCustomerReferenceNumber Reference number; alphanumeric. * minLength: 0 * maxLength: 20 + * @param string|null $airlineCustomerReferenceNumber The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not be all spaces * * @return self */ @@ -670,7 +670,7 @@ public function getAirlineDocumentType() /** * Sets airlineDocumentType * - * @param string|null $airlineDocumentType Optional 2-digit code; alphanumeric. It identifies the type of product of the transaction. The description of the code may appear on credit card statements. * Format: 2-digit code * Example: Passenger ticket = 01 * minLength: 2 * maxLength: 2 + * @param string|null $airlineDocumentType A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters * * @return self */ @@ -697,7 +697,7 @@ public function getAirlineFlightDate() /** * Sets airlineFlightDate * - * @param string|null $airlineFlightDate Flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 * maxLength: 16 + * @param string|null $airlineFlightDate The flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 characters * maxLength: 16 characters * * @return self */ @@ -724,7 +724,7 @@ public function getAirlineLegCarrierCode() /** * Sets airlineLegCarrierCode * - * @param string|null $airlineLegCarrierCode [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. This field is required/mandatory if the airline data includes leg details. * Format: IATA 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + * @param string|null $airlineLegCarrierCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -751,7 +751,7 @@ public function getAirlineLegClassOfTravel() /** * Sets airlineLegClassOfTravel * - * @param string|null $airlineLegClassOfTravel 1-letter travel class identifier; alphabetical. There is no standard; however, the following codes are used rather consistently: * F: first class * J: business class * Y: economy class * W: premium economy Limitations: * minLength: 1 * maxLength: 1 + * @param string|null $airlineLegClassOfTravel A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros * * @return self */ @@ -778,7 +778,7 @@ public function getAirlineLegDateOfTravel() /** * Sets airlineLegDateOfTravel * - * @param string|null $airlineLegDateOfTravel Date and time of travel. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-compliant. * Format: `yyyy-MM-dd HH:mm` * minLength: 16 * maxLength: 16 + * @param string|null $airlineLegDateOfTravel Date and time of travel in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format `yyyy-MM-dd HH:mm`. * Encoding: ASCII * minLength: 16 characters * maxLength: 16 characters * * @return self */ @@ -805,7 +805,7 @@ public function getAirlineLegDepartAirport() /** * Sets airlineLegDepartAirport * - * @param string|null $airlineLegDepartAirport Alphabetical identifier of the departure airport. This field is required if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + * @param string|null $airlineLegDepartAirport The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -832,7 +832,7 @@ public function getAirlineLegDepartTax() /** * Sets airlineLegDepartTax * - * @param string|null $airlineLegDepartTax [Departure tax](https://en.wikipedia.org/wiki/Departure_tax). Amount charged by a country to an individual upon their leaving. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 12 + * @param string|null $airlineLegDepartTax The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros * * @return self */ @@ -859,7 +859,7 @@ public function getAirlineLegDestinationCode() /** * Sets airlineLegDestinationCode * - * @param string|null $airlineLegDestinationCode Alphabetical identifier of the destination/arrival airport. This field is required/mandatory if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + * @param string|null $airlineLegDestinationCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -886,7 +886,7 @@ public function getAirlineLegFareBaseCode() /** * Sets airlineLegFareBaseCode * - * @param string|null $airlineLegFareBaseCode [Fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code); alphanumeric. * minLength: 1 * maxLength: 7 + * @param string|null $airlineLegFareBaseCode The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -913,7 +913,7 @@ public function getAirlineLegFlightNumber() /** * Sets airlineLegFlightNumber * - * @param string|null $airlineLegFlightNumber The flight identifier. * minLength: 1 * maxLength: 5 + * @param string|null $airlineLegFlightNumber The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -940,7 +940,7 @@ public function getAirlineLegStopOverCode() /** * Sets airlineLegStopOverCode * - * @param string|null $airlineLegStopOverCode 1-letter code that indicates whether the passenger is entitled to make a stopover. Only two types of characters are allowed: * O: Stopover allowed * X: Stopover not allowed Limitations: * minLength: 1 * maxLength: 1 + * @param string|null $airlineLegStopOverCode A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * * @return self */ @@ -967,7 +967,7 @@ public function getAirlinePassengerDateOfBirth() /** * Sets airlinePassengerDateOfBirth * - * @param string|null $airlinePassengerDateOfBirth Date of birth of the passenger. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 + * @param string|null $airlinePassengerDateOfBirth The passenger's date of birth. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 * * @return self */ @@ -994,7 +994,7 @@ public function getAirlinePassengerFirstName() /** * Sets airlinePassengerFirstName * - * @param string|null $airlinePassengerFirstName Passenger first name/given name. > This field is required/mandatory if the airline data includes passenger details or leg details. + * @param string|null $airlinePassengerFirstName The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII * * @return self */ @@ -1021,7 +1021,7 @@ public function getAirlinePassengerLastName() /** * Sets airlinePassengerLastName * - * @param string|null $airlinePassengerLastName Passenger last name/family name. > This field is required/mandatory if the airline data includes passenger details or leg details. + * @param string|null $airlinePassengerLastName The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII * * @return self */ @@ -1048,7 +1048,7 @@ public function getAirlinePassengerTelephoneNumber() /** * Sets airlinePassengerTelephoneNumber * - * @param string|null $airlinePassengerTelephoneNumber Telephone number of the passenger, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * minLength: 3 * maxLength: 30 + * @param string|null $airlinePassengerTelephoneNumber The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters * * @return self */ @@ -1075,7 +1075,7 @@ public function getAirlinePassengerTravellerType() /** * Sets airlinePassengerTravellerType * - * @param string|null $airlinePassengerTravellerType Passenger type code (PTC). IATA PTC values are 3-letter alphabetical. Example: ADT, SRC, CNN, INS. However, several carriers use non-standard codes that can be up to 5 alphanumeric characters. * minLength: 3 * maxLength: 6 + * @param string|null $airlinePassengerTravellerType The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters * * @return self */ @@ -1102,7 +1102,7 @@ public function getAirlinePassengerName() /** * Sets airlinePassengerName * - * @param string $airlinePassengerName Passenger name, initials, and a title. * Format: last name + first name or initials + title. * Example: *FLYER / MARY MS*. * minLength: 1 * maxLength: 49 + * @param string $airlinePassengerName The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1129,7 +1129,7 @@ public function getAirlineTicketIssueAddress() /** * Sets airlineTicketIssueAddress * - * @param string|null $airlineTicketIssueAddress Address of the place/agency that issued the ticket. * minLength: 0 * maxLength: 16 + * @param string|null $airlineTicketIssueAddress The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters * * @return self */ @@ -1156,7 +1156,7 @@ public function getAirlineTicketNumber() /** * Sets airlineTicketNumber * - * @param string|null $airlineTicketNumber The ticket's unique identifier. * minLength: 1 * maxLength: 150 + * @param string|null $airlineTicketNumber The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1183,7 +1183,7 @@ public function getAirlineTravelAgencyCode() /** * Sets airlineTravelAgencyCode * - * @param string|null $airlineTravelAgencyCode IATA number, also ARC number or ARC/IATA number. Unique identifier number for travel agencies. * minLength: 1 * maxLength: 8 + * @param string|null $airlineTravelAgencyCode The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1210,7 +1210,7 @@ public function getAirlineTravelAgencyName() /** * Sets airlineTravelAgencyName * - * @param string|null $airlineTravelAgencyName The name of the travel agency. * minLength: 1 * maxLength: 25 + * @param string|null $airlineTravelAgencyName The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataCarRental.php b/src/Adyen/Model/Checkout/AdditionalDataCarRental.php index 29625f501..d084eba71 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataCarRental.php +++ b/src/Adyen/Model/Checkout/AdditionalDataCarRental.php @@ -443,7 +443,7 @@ public function getCarRentalCheckOutDate() /** * Sets carRentalCheckOutDate * - * @param string|null $carRentalCheckOutDate Pick-up date. * Date format: `yyyyMMdd` + * @param string|null $carRentalCheckOutDate The pick-up date. * Date format: `yyyyMMdd` * * @return self */ @@ -470,7 +470,7 @@ public function getCarRentalCustomerServiceTollFreeNumber() /** * Sets carRentalCustomerServiceTollFreeNumber * - * @param string|null $carRentalCustomerServiceTollFreeNumber The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 + * @param string|null $carRentalCustomerServiceTollFreeNumber The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -497,7 +497,7 @@ public function getCarRentalDaysRented() /** * Sets carRentalDaysRented * - * @param string|null $carRentalDaysRented Number of days for which the car is being rented. * Format: Numeric * maxLength: 19 + * @param string|null $carRentalDaysRented Number of days for which the car is being rented. * Format: Numeric * maxLength: 2 * Must not be all spaces * * @return self */ @@ -524,7 +524,7 @@ public function getCarRentalFuelCharges() /** * Sets carRentalFuelCharges * - * @param string|null $carRentalFuelCharges Any fuel charges associated with the rental. * Format: Numeric * maxLength: 12 + * @param string|null $carRentalFuelCharges Any fuel charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * * @return self */ @@ -551,7 +551,7 @@ public function getCarRentalInsuranceCharges() /** * Sets carRentalInsuranceCharges * - * @param string|null $carRentalInsuranceCharges Any insurance charges associated with the rental. * Format: Numeric * maxLength: 12 + * @param string|null $carRentalInsuranceCharges Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces * Must not be all zeros * * @return self */ @@ -578,7 +578,7 @@ public function getCarRentalLocationCity() /** * Sets carRentalLocationCity * - * @param string|null $carRentalLocationCity The city from which the car is rented. * Format: Alphanumeric * maxLength: 18 + * @param string|null $carRentalLocationCity The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -605,7 +605,7 @@ public function getCarRentalLocationCountry() /** * Sets carRentalLocationCountry * - * @param string|null $carRentalLocationCountry The country from which the car is rented. * Format: Alphanumeric * maxLength: 2 + * @param string|null $carRentalLocationCountry The country where the car is rented, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 * * @return self */ @@ -632,7 +632,7 @@ public function getCarRentalLocationStateProvince() /** * Sets carRentalLocationStateProvince * - * @param string|null $carRentalLocationStateProvince The state or province from where the car is rented. * Format: Alphanumeric * maxLength: 3 + * @param string|null $carRentalLocationStateProvince The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -659,7 +659,7 @@ public function getCarRentalNoShowIndicator() /** * Sets carRentalNoShowIndicator * - * @param string|null $carRentalNoShowIndicator Indicates if the customer was a \"no-show\" (neither keeps nor cancels their booking). * Y - Customer was a no show. * N - Not applicable. + * @param string|null $carRentalNoShowIndicator Indicates if the customer didn't pick up their rental car. * Y - Customer did not pick up their car * N - Not applicable * * @return self */ @@ -686,7 +686,7 @@ public function getCarRentalOneWayDropOffCharges() /** * Sets carRentalOneWayDropOffCharges * - * @param string|null $carRentalOneWayDropOffCharges Charge associated with not returning a vehicle to the original rental location. + * @param string|null $carRentalOneWayDropOffCharges The charge for not returning a car to the original rental location, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 12 * * @return self */ @@ -713,7 +713,7 @@ public function getCarRentalRate() /** * Sets carRentalRate * - * @param string|null $carRentalRate Daily rental rate. * Format: Alphanumeric * maxLength: 12 + * @param string|null $carRentalRate The daily rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Alphanumeric * maxLength: 12 * * @return self */ @@ -740,7 +740,7 @@ public function getCarRentalRateIndicator() /** * Sets carRentalRateIndicator * - * @param string|null $carRentalRateIndicator Specifies whether the given rate is applied daily or weekly. * D - Daily rate. * W - Weekly rate. + * @param string|null $carRentalRateIndicator Specifies whether the given rate is applied daily or weekly. * D - Daily rate * W - Weekly rate * * @return self */ @@ -767,7 +767,7 @@ public function getCarRentalRentalAgreementNumber() /** * Sets carRentalRentalAgreementNumber * - * @param string|null $carRentalRentalAgreementNumber The rental agreement number associated with this car rental. * Format: Alphanumeric * maxLength: 9 + * @param string|null $carRentalRentalAgreementNumber The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -794,7 +794,7 @@ public function getCarRentalRentalClassId() /** * Sets carRentalRentalClassId * - * @param string|null $carRentalRentalClassId Daily rental rate. * Format: Alphanumeric * maxLength: 12 + * @param string|null $carRentalRentalClassId The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -821,7 +821,7 @@ public function getCarRentalRenterName() /** * Sets carRentalRenterName * - * @param string|null $carRentalRenterName The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 + * @param string|null $carRentalRenterName The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -848,7 +848,7 @@ public function getCarRentalReturnCity() /** * Sets carRentalReturnCity * - * @param string|null $carRentalReturnCity The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 + * @param string|null $carRentalReturnCity The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -875,7 +875,7 @@ public function getCarRentalReturnCountry() /** * Sets carRentalReturnCountry * - * @param string|null $carRentalReturnCountry The country where the car must be returned. * Format: Alphanumeric * maxLength: 2 + * @param string|null $carRentalReturnCountry The country where the car must be returned, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 * * @return self */ @@ -902,7 +902,7 @@ public function getCarRentalReturnDate() /** * Sets carRentalReturnDate * - * @param string|null $carRentalReturnDate The last date to return the car by. * Date format: `yyyyMMdd` + * @param string|null $carRentalReturnDate The last date to return the car by. * Date format: `yyyyMMdd` * maxLength: 8 * * @return self */ @@ -929,7 +929,7 @@ public function getCarRentalReturnLocationId() /** * Sets carRentalReturnLocationId * - * @param string|null $carRentalReturnLocationId Agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 + * @param string|null $carRentalReturnLocationId The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -956,7 +956,7 @@ public function getCarRentalReturnStateProvince() /** * Sets carRentalReturnStateProvince * - * @param string|null $carRentalReturnStateProvince The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 + * @param string|null $carRentalReturnStateProvince The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -983,7 +983,7 @@ public function getCarRentalTaxExemptIndicator() /** * Sets carRentalTaxExemptIndicator * - * @param string|null $carRentalTaxExemptIndicator Indicates whether the goods or services were tax-exempt, or tax was not collected. Values: * Y - Goods or services were tax exempt * N - Tax was not collected + * @param string|null $carRentalTaxExemptIndicator Indicates if the goods or services were tax-exempt, or if tax was not paid on them. Values: * Y - Goods or services were tax exempt * N - Tax was not collected * * @return self */ @@ -1010,7 +1010,7 @@ public function getTravelEntertainmentAuthDataDuration() /** * Sets travelEntertainmentAuthDataDuration * - * @param string|null $travelEntertainmentAuthDataDuration Number of nights. This should be included in the auth message. * Format: Numeric * maxLength: 2 + * @param string|null $travelEntertainmentAuthDataDuration Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 2 * * @return self */ @@ -1037,7 +1037,7 @@ public function getTravelEntertainmentAuthDataMarket() /** * Sets travelEntertainmentAuthDataMarket * - * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"A\" for Car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 + * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be 'A' for car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php index d82c7a0c2..62231910e 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLevel23.php @@ -401,7 +401,7 @@ public function getEnhancedSchemeDataCustomerReference() /** * Sets enhancedSchemeDataCustomerReference * - * @param string|null $enhancedSchemeDataCustomerReference Customer code, if supplied by a customer. Encoding: ASCII. Max length: 25 characters. > Required for Level 2 and Level 3 data. + * @param string|null $enhancedSchemeDataCustomerReference The customer code, if supplied by a customer. Encoding: ASCII Max length: 25 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -428,7 +428,7 @@ public function getEnhancedSchemeDataDestinationCountryCode() /** * Sets enhancedSchemeDataDestinationCountryCode * - * @param string|null $enhancedSchemeDataDestinationCountryCode Destination country code. Encoding: ASCII. Max length: 3 characters. + * @param string|null $enhancedSchemeDataDestinationCountryCode The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. Encoding: ASCII Fixed length: 3 characters * * @return self */ @@ -455,7 +455,7 @@ public function getEnhancedSchemeDataDestinationPostalCode() /** * Sets enhancedSchemeDataDestinationPostalCode * - * @param string|null $enhancedSchemeDataDestinationPostalCode The postal code of a destination address. Encoding: ASCII. Max length: 10 characters. > Required for American Express. + * @param string|null $enhancedSchemeDataDestinationPostalCode The postal code of the destination address. Encoding: ASCII Max length: 10 characters Must not start with a space * * @return self */ @@ -482,7 +482,7 @@ public function getEnhancedSchemeDataDestinationStateProvinceCode() /** * Sets enhancedSchemeDataDestinationStateProvinceCode * - * @param string|null $enhancedSchemeDataDestinationStateProvinceCode Destination state or province code. Encoding: ASCII.Max length: 3 characters. + * @param string|null $enhancedSchemeDataDestinationStateProvinceCode Destination state or province code. Encoding: ASCII Max length: 3 characters Must not start with a space * * @return self */ @@ -509,7 +509,7 @@ public function getEnhancedSchemeDataDutyAmount() /** * Sets enhancedSchemeDataDutyAmount * - * @param string|null $enhancedSchemeDataDutyAmount Duty amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataDutyAmount The duty amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -536,7 +536,7 @@ public function getEnhancedSchemeDataFreightAmount() /** * Sets enhancedSchemeDataFreightAmount * - * @param string|null $enhancedSchemeDataFreightAmount Shipping amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataFreightAmount The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -563,7 +563,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrCommodityCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrCommodityCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode Item commodity code. Encoding: ASCII. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode The [UNSPC commodity code](https://www.unspsc.org/) of the item. Encoding: ASCII Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -590,7 +590,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrDescription() /** * Sets enhancedSchemeDataItemDetailLineItemNrDescription * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription Item description. Encoding: ASCII. Max length: 26 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription A description of the item. Encoding: ASCII Max length: 26 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -617,7 +617,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrDiscountAmount() /** * Sets enhancedSchemeDataItemDetailLineItemNrDiscountAmount * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrDiscountAmount Discount amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrDiscountAmount The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -644,7 +644,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrProductCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrProductCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrProductCode Product code. Encoding: ASCII. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrProductCode The product code. Encoding: ASCII. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -671,7 +671,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrQuantity() /** * Sets enhancedSchemeDataItemDetailLineItemNrQuantity * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrQuantity Quantity, specified as an integer value. Value must be greater than 0. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrQuantity The number of items. Must be an integer greater than zero. Encoding: Numeric Max length: 12 characters Must not start with a space or be all spaces * * @return self */ @@ -698,7 +698,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrTotalAmount() /** * Sets enhancedSchemeDataItemDetailLineItemNrTotalAmount * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrTotalAmount Total amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrTotalAmount The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -725,7 +725,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure() /** * Sets enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure Item unit of measurement. Encoding: ASCII. Max length: 3 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure The unit of measurement for an item. Encoding: ASCII Max length: 3 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -752,7 +752,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrUnitPrice() /** * Sets enhancedSchemeDataItemDetailLineItemNrUnitPrice * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitPrice Unit price, specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitPrice The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -779,7 +779,7 @@ public function getEnhancedSchemeDataOrderDate() /** * Sets enhancedSchemeDataOrderDate * - * @param string|null $enhancedSchemeDataOrderDate Order date. * Format: `ddMMyy` Encoding: ASCII. Max length: 6 characters. + * @param string|null $enhancedSchemeDataOrderDate The order date. * Format: `ddMMyy` Encoding: ASCII Max length: 6 characters * * @return self */ @@ -806,7 +806,7 @@ public function getEnhancedSchemeDataShipFromPostalCode() /** * Sets enhancedSchemeDataShipFromPostalCode * - * @param string|null $enhancedSchemeDataShipFromPostalCode The postal code of a \"ship-from\" address. Encoding: ASCII. Max length: 10 characters. + * @param string|null $enhancedSchemeDataShipFromPostalCode The postal code of the address the item is shipped from. Encoding: ASCII Max length: 10 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -833,7 +833,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount Total tax amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. > Required for Level 2 and Level 3 data. + * @param string|null $enhancedSchemeDataTotalTaxAmount The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataLodging.php b/src/Adyen/Model/Checkout/AdditionalDataLodging.php index ab71ad8a9..3ec9a5f96 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataLodging.php +++ b/src/Adyen/Model/Checkout/AdditionalDataLodging.php @@ -56,7 +56,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => 'string', 'lodgingRoom1NumberOfNights' => 'string', 'lodgingRoom1Rate' => 'string', - 'lodgingRoom1Tax' => 'string', 'lodgingTotalRoomTax' => 'string', 'lodgingTotalTax' => 'string', 'travelEntertainmentAuthDataDuration' => 'string', @@ -83,7 +82,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => null, 'lodgingRoom1NumberOfNights' => null, 'lodgingRoom1Rate' => null, - 'lodgingRoom1Tax' => null, 'lodgingTotalRoomTax' => null, 'lodgingTotalTax' => null, 'travelEntertainmentAuthDataDuration' => null, @@ -108,7 +106,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => false, 'lodgingRoom1NumberOfNights' => false, 'lodgingRoom1Rate' => false, - 'lodgingRoom1Tax' => false, 'lodgingTotalRoomTax' => false, 'lodgingTotalTax' => false, 'travelEntertainmentAuthDataDuration' => false, @@ -213,7 +210,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'lodging.propertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'lodging.room1.numberOfNights', 'lodgingRoom1Rate' => 'lodging.room1.rate', - 'lodgingRoom1Tax' => 'lodging.room1.tax', 'lodgingTotalRoomTax' => 'lodging.totalRoomTax', 'lodgingTotalTax' => 'lodging.totalTax', 'travelEntertainmentAuthDataDuration' => 'travelEntertainmentAuthData.duration', @@ -238,7 +234,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'setLodgingPropertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'setLodgingRoom1NumberOfNights', 'lodgingRoom1Rate' => 'setLodgingRoom1Rate', - 'lodgingRoom1Tax' => 'setLodgingRoom1Tax', 'lodgingTotalRoomTax' => 'setLodgingTotalRoomTax', 'lodgingTotalTax' => 'setLodgingTotalTax', 'travelEntertainmentAuthDataDuration' => 'setTravelEntertainmentAuthDataDuration', @@ -263,7 +258,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'getLodgingPropertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'getLodgingRoom1NumberOfNights', 'lodgingRoom1Rate' => 'getLodgingRoom1Rate', - 'lodgingRoom1Tax' => 'getLodgingRoom1Tax', 'lodgingTotalRoomTax' => 'getLodgingTotalRoomTax', 'lodgingTotalTax' => 'getLodgingTotalTax', 'travelEntertainmentAuthDataDuration' => 'getTravelEntertainmentAuthDataDuration', @@ -339,7 +333,6 @@ public function __construct(array $data = null) $this->setIfExists('lodgingPropertyPhoneNumber', $data ?? [], null); $this->setIfExists('lodgingRoom1NumberOfNights', $data ?? [], null); $this->setIfExists('lodgingRoom1Rate', $data ?? [], null); - $this->setIfExists('lodgingRoom1Tax', $data ?? [], null); $this->setIfExists('lodgingTotalRoomTax', $data ?? [], null); $this->setIfExists('lodgingTotalTax', $data ?? [], null); $this->setIfExists('travelEntertainmentAuthDataDuration', $data ?? [], null); @@ -455,7 +448,7 @@ public function getLodgingCustomerServiceTollFreeNumber() /** * Sets lodgingCustomerServiceTollFreeNumber * - * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. + * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -482,7 +475,7 @@ public function getLodgingFireSafetyActIndicator() /** * Sets lodgingFireSafetyActIndicator * - * @param string|null $lodgingFireSafetyActIndicator Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Values can be: 'Y' or 'N'. * Format: alphabetic. * Max length: 1 character. + * @param string|null $lodgingFireSafetyActIndicator Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Must be 'Y' or 'N'. * Format: alphabetic * Max length: 1 character * * @return self */ @@ -509,7 +502,7 @@ public function getLodgingFolioCashAdvances() /** * Sets lodgingFolioCashAdvances * - * @param string|null $lodgingFolioCashAdvances The folio cash advances. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingFolioCashAdvances The folio cash advances, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * * @return self */ @@ -536,7 +529,7 @@ public function getLodgingFolioNumber() /** * Sets lodgingFolioNumber * - * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Format: alphanumeric. * Max length: 25 characters. + * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space * Must not be all zeros * * @return self */ @@ -563,7 +556,7 @@ public function getLodgingFoodBeverageCharges() /** * Sets lodgingFoodBeverageCharges * - * @param string|null $lodgingFoodBeverageCharges The additional charges for food and beverages associated with the booking. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingFoodBeverageCharges Any charges for food and beverages associated with the booking, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * * @return self */ @@ -590,7 +583,7 @@ public function getLodgingNoShowIndicator() /** * Sets lodgingNoShowIndicator * - * @param string|null $lodgingNoShowIndicator Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in. **N**: the customer checked in. + * @param string|null $lodgingNoShowIndicator Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in * **N**: the customer checked in * * @return self */ @@ -617,7 +610,7 @@ public function getLodgingPrepaidExpenses() /** * Sets lodgingPrepaidExpenses * - * @param string|null $lodgingPrepaidExpenses The prepaid expenses for the booking. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingPrepaidExpenses The prepaid expenses for the booking. * Format: numeric * Max length: 12 characters * * @return self */ @@ -644,7 +637,7 @@ public function getLodgingPropertyPhoneNumber() /** * Sets lodgingPropertyPhoneNumber * - * @param string|null $lodgingPropertyPhoneNumber Identifies the location of the lodging by its local phone number. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. + * @param string|null $lodgingPropertyPhoneNumber The lodging property location's phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -671,7 +664,7 @@ public function getLodgingRoom1NumberOfNights() /** * Sets lodgingRoom1NumberOfNights * - * @param string|null $lodgingRoom1NumberOfNights The total number of nights the room is booked for. * Format: numeric. * Max length: 4 characters. + * @param string|null $lodgingRoom1NumberOfNights The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 2 characters * * @return self */ @@ -698,7 +691,7 @@ public function getLodgingRoom1Rate() /** * Sets lodgingRoom1Rate * - * @param string|null $lodgingRoom1Rate The rate of the room. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingRoom1Rate The rate for the room, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -712,33 +705,6 @@ public function setLodgingRoom1Rate($lodgingRoom1Rate) return $this; } - /** - * Gets lodgingRoom1Tax - * - * @return string|null - */ - public function getLodgingRoom1Tax() - { - return $this->container['lodgingRoom1Tax']; - } - - /** - * Sets lodgingRoom1Tax - * - * @param string|null $lodgingRoom1Tax The total amount of tax to be paid. * Format: numeric. * Max length: 12 chracters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). - * - * @return self - */ - public function setLodgingRoom1Tax($lodgingRoom1Tax) - { - if (is_null($lodgingRoom1Tax)) { - throw new \InvalidArgumentException('non-nullable lodgingRoom1Tax cannot be null'); - } - $this->container['lodgingRoom1Tax'] = $lodgingRoom1Tax; - - return $this; - } - /** * Gets lodgingTotalRoomTax * @@ -752,7 +718,7 @@ public function getLodgingTotalRoomTax() /** * Sets lodgingTotalRoomTax * - * @param string|null $lodgingTotalRoomTax The total room tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingTotalRoomTax The total room tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -779,7 +745,7 @@ public function getLodgingTotalTax() /** * Sets lodgingTotalTax * - * @param string|null $lodgingTotalTax The total tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingTotalTax The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -806,7 +772,7 @@ public function getTravelEntertainmentAuthDataDuration() /** * Sets travelEntertainmentAuthDataDuration * - * @param string|null $travelEntertainmentAuthDataDuration The number of nights. This should be included in the auth message. * Format: numeric. * Max length: 2 characters. + * @param string|null $travelEntertainmentAuthDataDuration The number of nights. This should be included in the auth message. * Format: numeric * Max length: 2 characters * * @return self */ @@ -833,7 +799,7 @@ public function getTravelEntertainmentAuthDataMarket() /** * Sets travelEntertainmentAuthDataMarket * - * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"H\" for Hotel. This should be included in the auth message. * Format: alphanumeric. * Max length: 1 character. + * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted. Must be 'H' for Hotel. This should be included in the auth message. * Format: alphanumeric * Max length: 1 character * * @return self */ diff --git a/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php b/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php index 63964769d..755c28146 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php +++ b/src/Adyen/Model/Checkout/AdditionalDataTemporaryServices.php @@ -345,7 +345,7 @@ public function getEnhancedSchemeDataCustomerReference() /** * Sets enhancedSchemeDataCustomerReference * - * @param string|null $enhancedSchemeDataCustomerReference Customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 + * @param string|null $enhancedSchemeDataCustomerReference The customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 * * @return self */ @@ -372,7 +372,7 @@ public function getEnhancedSchemeDataEmployeeName() /** * Sets enhancedSchemeDataEmployeeName * - * @param string|null $enhancedSchemeDataEmployeeName Name or ID associated with the individual working in a temporary capacity. * maxLength: 40 + * @param string|null $enhancedSchemeDataEmployeeName The name or ID of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -399,7 +399,7 @@ public function getEnhancedSchemeDataJobDescription() /** * Sets enhancedSchemeDataJobDescription * - * @param string|null $enhancedSchemeDataJobDescription Description of the job or task of the individual working in a temporary capacity. * maxLength: 40 + * @param string|null $enhancedSchemeDataJobDescription The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -426,7 +426,7 @@ public function getEnhancedSchemeDataRegularHoursRate() /** * Sets enhancedSchemeDataRegularHoursRate * - * @param string|null $enhancedSchemeDataRegularHoursRate Amount paid per regular hours worked, minor units. * maxLength: 7 + * @param string|null $enhancedSchemeDataRegularHoursRate The amount paid for regular hours worked, [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 7 * Must not be empty * Can be all zeros * * @return self */ @@ -453,7 +453,7 @@ public function getEnhancedSchemeDataRegularHoursWorked() /** * Sets enhancedSchemeDataRegularHoursWorked * - * @param string|null $enhancedSchemeDataRegularHoursWorked Amount of time worked during a normal operation for the task or job. * maxLength: 7 + * @param string|null $enhancedSchemeDataRegularHoursWorked The hours worked. * maxLength: 7 * Must not be empty * Can be all zeros * * @return self */ @@ -480,7 +480,7 @@ public function getEnhancedSchemeDataRequestName() /** * Sets enhancedSchemeDataRequestName * - * @param string|null $enhancedSchemeDataRequestName Name of the individual requesting temporary services. * maxLength: 40 + * @param string|null $enhancedSchemeDataRequestName The name of the person requesting temporary services. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -507,7 +507,7 @@ public function getEnhancedSchemeDataTempStartDate() /** * Sets enhancedSchemeDataTempStartDate * - * @param string|null $enhancedSchemeDataTempStartDate Date for the beginning of the pay period. * Format: ddMMyy * maxLength: 6 + * @param string|null $enhancedSchemeDataTempStartDate The billing period start date. * Format: ddMMyy * maxLength: 6 * * @return self */ @@ -534,7 +534,7 @@ public function getEnhancedSchemeDataTempWeekEnding() /** * Sets enhancedSchemeDataTempWeekEnding * - * @param string|null $enhancedSchemeDataTempWeekEnding Date of the end of the billing cycle. * Format: ddMMyy * maxLength: 6 + * @param string|null $enhancedSchemeDataTempWeekEnding The billing period end date. * Format: ddMMyy * maxLength: 6 * * @return self */ @@ -561,7 +561,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount Total tax amount, in minor units. For example, 2000 means USD 20.00 * maxLength: 12 + * @param string|null $enhancedSchemeDataTotalTaxAmount The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00 * maxLength: 12 * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/Address2.php b/src/Adyen/Model/Checkout/Address2.php similarity index 78% rename from src/Adyen/Model/BalancePlatform/Address2.php rename to src/Adyen/Model/Checkout/Address2.php index 403ace51b..2d0505f67 100644 --- a/src/Adyen/Model/BalancePlatform/Address2.php +++ b/src/Adyen/Model/Checkout/Address2.php @@ -1,9 +1,9 @@ 'string', 'country' => 'string', - 'line1' => 'string', - 'line2' => 'string', - 'line3' => 'string', + 'houseNumberOrName' => 'string', 'postalCode' => 'string', - 'stateOrProvince' => 'string' + 'stateOrProvince' => 'string', + 'street' => 'string' ]; /** @@ -63,11 +62,10 @@ class Address2 implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'city' => null, 'country' => null, - 'line1' => null, - 'line2' => null, - 'line3' => null, + 'houseNumberOrName' => null, 'postalCode' => null, - 'stateOrProvince' => null + 'stateOrProvince' => null, + 'street' => null ]; /** @@ -78,11 +76,10 @@ class Address2 implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'city' => false, 'country' => false, - 'line1' => false, - 'line2' => false, - 'line3' => false, + 'houseNumberOrName' => false, 'postalCode' => false, - 'stateOrProvince' => false + 'stateOrProvince' => false, + 'street' => false ]; /** @@ -173,11 +170,10 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'city' => 'city', 'country' => 'country', - 'line1' => 'line1', - 'line2' => 'line2', - 'line3' => 'line3', + 'houseNumberOrName' => 'houseNumberOrName', 'postalCode' => 'postalCode', - 'stateOrProvince' => 'stateOrProvince' + 'stateOrProvince' => 'stateOrProvince', + 'street' => 'street' ]; /** @@ -188,11 +184,10 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'city' => 'setCity', 'country' => 'setCountry', - 'line1' => 'setLine1', - 'line2' => 'setLine2', - 'line3' => 'setLine3', + 'houseNumberOrName' => 'setHouseNumberOrName', 'postalCode' => 'setPostalCode', - 'stateOrProvince' => 'setStateOrProvince' + 'stateOrProvince' => 'setStateOrProvince', + 'street' => 'setStreet' ]; /** @@ -203,11 +198,10 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'city' => 'getCity', 'country' => 'getCountry', - 'line1' => 'getLine1', - 'line2' => 'getLine2', - 'line3' => 'getLine3', + 'houseNumberOrName' => 'getHouseNumberOrName', 'postalCode' => 'getPostalCode', - 'stateOrProvince' => 'getStateOrProvince' + 'stateOrProvince' => 'getStateOrProvince', + 'street' => 'getStreet' ]; /** @@ -269,11 +263,10 @@ public function __construct(array $data = null) { $this->setIfExists('city', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); - $this->setIfExists('line1', $data ?? [], null); - $this->setIfExists('line2', $data ?? [], null); - $this->setIfExists('line3', $data ?? [], null); + $this->setIfExists('houseNumberOrName', $data ?? [], null); $this->setIfExists('postalCode', $data ?? [], null); $this->setIfExists('stateOrProvince', $data ?? [], null); + $this->setIfExists('street', $data ?? [], null); } /** @@ -303,9 +296,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['country'] === null) { - $invalidProperties[] = "'country' can't be null"; - } return $invalidProperties; } @@ -334,7 +324,7 @@ public function getCity() /** * Sets city * - * @param string|null $city The name of the city. + * @param string|null $city The name of the city. Maximum length: 3000 characters. * * @return self */ @@ -351,7 +341,7 @@ public function setCity($city) /** * Gets country * - * @return string + * @return string|null */ public function getCountry() { @@ -361,7 +351,7 @@ public function getCountry() /** * Sets country * - * @param string $country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. >If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * @param string|null $country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. * * @return self */ @@ -376,136 +366,109 @@ public function setCountry($country) } /** - * Gets line1 + * Gets houseNumberOrName * * @return string|null */ - public function getLine1() + public function getHouseNumberOrName() { - return $this->container['line1']; + return $this->container['houseNumberOrName']; } /** - * Sets line1 + * Sets houseNumberOrName * - * @param string|null $line1 First line of the address. + * @param string|null $houseNumberOrName The number or name of the house. Maximum length: 3000 characters. * * @return self */ - public function setLine1($line1) + public function setHouseNumberOrName($houseNumberOrName) { - if (is_null($line1)) { - throw new \InvalidArgumentException('non-nullable line1 cannot be null'); + if (is_null($houseNumberOrName)) { + throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); } - $this->container['line1'] = $line1; + $this->container['houseNumberOrName'] = $houseNumberOrName; return $this; } /** - * Gets line2 - * - * @return string|null - */ - public function getLine2() - { - return $this->container['line2']; - } - - /** - * Sets line2 - * - * @param string|null $line2 Second line of the address. - * - * @return self - */ - public function setLine2($line2) - { - if (is_null($line2)) { - throw new \InvalidArgumentException('non-nullable line2 cannot be null'); - } - $this->container['line2'] = $line2; - - return $this; - } - - /** - * Gets line3 + * Gets postalCode * * @return string|null */ - public function getLine3() + public function getPostalCode() { - return $this->container['line3']; + return $this->container['postalCode']; } /** - * Sets line3 + * Sets postalCode * - * @param string|null $line3 Third line of the address. + * @param string|null $postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. * * @return self */ - public function setLine3($line3) + public function setPostalCode($postalCode) { - if (is_null($line3)) { - throw new \InvalidArgumentException('non-nullable line3 cannot be null'); + if (is_null($postalCode)) { + throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); } - $this->container['line3'] = $line3; + $this->container['postalCode'] = $postalCode; return $this; } /** - * Gets postalCode + * Gets stateOrProvince * * @return string|null */ - public function getPostalCode() + public function getStateOrProvince() { - return $this->container['postalCode']; + return $this->container['stateOrProvince']; } /** - * Sets postalCode + * Sets stateOrProvince * - * @param string|null $postalCode The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. + * @param string|null $stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. * * @return self */ - public function setPostalCode($postalCode) + public function setStateOrProvince($stateOrProvince) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); + if (is_null($stateOrProvince)) { + throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); } - $this->container['postalCode'] = $postalCode; + $this->container['stateOrProvince'] = $stateOrProvince; return $this; } /** - * Gets stateOrProvince + * Gets street * * @return string|null */ - public function getStateOrProvince() + public function getStreet() { - return $this->container['stateOrProvince']; + return $this->container['street']; } /** - * Sets stateOrProvince + * Sets street * - * @param string|null $stateOrProvince The two-letterISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + * @param string|null $street The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. * * @return self */ - public function setStateOrProvince($stateOrProvince) + public function setStreet($street) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); + if (is_null($street)) { + throw new \InvalidArgumentException('non-nullable street cannot be null'); } - $this->container['stateOrProvince'] = $stateOrProvince; + $this->container['street'] = $street; return $this; } diff --git a/src/Adyen/Model/Checkout/Amount2.php b/src/Adyen/Model/Checkout/Amount2.php new file mode 100644 index 000000000..14da4c7e5 --- /dev/null +++ b/src/Adyen/Model/Checkout/Amount2.php @@ -0,0 +1,418 @@ + + */ +class Amount2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Amount-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'currency' => 'string', + 'value' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'currency' => null, + 'value' => 'int64' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'currency' => false, + 'value' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'currency' => 'currency', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'currency' => 'setCurrency', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'currency' => 'getCurrency', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('currency', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + 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 currency + * + * @return string|null + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string|null $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setCurrency($currency) + { + if (is_null($currency)) { + throw new \InvalidArgumentException('non-nullable currency cannot be null'); + } + $this->container['currency'] = $currency; + + return $this; + } + + /** + * Gets value + * + * @return int|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param int|null $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/ApplicationInfo2.php b/src/Adyen/Model/Checkout/ApplicationInfo2.php new file mode 100644 index 000000000..c0e417ccd --- /dev/null +++ b/src/Adyen/Model/Checkout/ApplicationInfo2.php @@ -0,0 +1,554 @@ + + */ +class ApplicationInfo2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ApplicationInfo-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'adyenLibrary' => '\Adyen\Model\Checkout\CommonField', + 'adyenPaymentSource' => '\Adyen\Model\Checkout\CommonField', + 'externalPlatform' => '\Adyen\Model\Checkout\ExternalPlatform', + 'merchantApplication' => '\Adyen\Model\Checkout\CommonField', + 'merchantDevice' => '\Adyen\Model\Checkout\MerchantDevice', + 'shopperInteractionDevice' => '\Adyen\Model\Checkout\ShopperInteractionDevice' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'adyenLibrary' => null, + 'adyenPaymentSource' => null, + 'externalPlatform' => null, + 'merchantApplication' => null, + 'merchantDevice' => null, + 'shopperInteractionDevice' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'adyenLibrary' => false, + 'adyenPaymentSource' => false, + 'externalPlatform' => false, + 'merchantApplication' => false, + 'merchantDevice' => false, + 'shopperInteractionDevice' => 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 = [ + 'adyenLibrary' => 'adyenLibrary', + 'adyenPaymentSource' => 'adyenPaymentSource', + 'externalPlatform' => 'externalPlatform', + 'merchantApplication' => 'merchantApplication', + 'merchantDevice' => 'merchantDevice', + 'shopperInteractionDevice' => 'shopperInteractionDevice' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'adyenLibrary' => 'setAdyenLibrary', + 'adyenPaymentSource' => 'setAdyenPaymentSource', + 'externalPlatform' => 'setExternalPlatform', + 'merchantApplication' => 'setMerchantApplication', + 'merchantDevice' => 'setMerchantDevice', + 'shopperInteractionDevice' => 'setShopperInteractionDevice' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'adyenLibrary' => 'getAdyenLibrary', + 'adyenPaymentSource' => 'getAdyenPaymentSource', + 'externalPlatform' => 'getExternalPlatform', + 'merchantApplication' => 'getMerchantApplication', + 'merchantDevice' => 'getMerchantDevice', + 'shopperInteractionDevice' => 'getShopperInteractionDevice' + ]; + + /** + * 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('adyenLibrary', $data ?? [], null); + $this->setIfExists('adyenPaymentSource', $data ?? [], null); + $this->setIfExists('externalPlatform', $data ?? [], null); + $this->setIfExists('merchantApplication', $data ?? [], null); + $this->setIfExists('merchantDevice', $data ?? [], null); + $this->setIfExists('shopperInteractionDevice', $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 adyenLibrary + * + * @return \Adyen\Model\Checkout\CommonField|null + */ + public function getAdyenLibrary() + { + return $this->container['adyenLibrary']; + } + + /** + * Sets adyenLibrary + * + * @param \Adyen\Model\Checkout\CommonField|null $adyenLibrary adyenLibrary + * + * @return self + */ + public function setAdyenLibrary($adyenLibrary) + { + if (is_null($adyenLibrary)) { + throw new \InvalidArgumentException('non-nullable adyenLibrary cannot be null'); + } + $this->container['adyenLibrary'] = $adyenLibrary; + + return $this; + } + + /** + * Gets adyenPaymentSource + * + * @return \Adyen\Model\Checkout\CommonField|null + */ + public function getAdyenPaymentSource() + { + return $this->container['adyenPaymentSource']; + } + + /** + * Sets adyenPaymentSource + * + * @param \Adyen\Model\Checkout\CommonField|null $adyenPaymentSource adyenPaymentSource + * + * @return self + */ + public function setAdyenPaymentSource($adyenPaymentSource) + { + if (is_null($adyenPaymentSource)) { + throw new \InvalidArgumentException('non-nullable adyenPaymentSource cannot be null'); + } + $this->container['adyenPaymentSource'] = $adyenPaymentSource; + + return $this; + } + + /** + * Gets externalPlatform + * + * @return \Adyen\Model\Checkout\ExternalPlatform|null + */ + public function getExternalPlatform() + { + return $this->container['externalPlatform']; + } + + /** + * Sets externalPlatform + * + * @param \Adyen\Model\Checkout\ExternalPlatform|null $externalPlatform externalPlatform + * + * @return self + */ + public function setExternalPlatform($externalPlatform) + { + if (is_null($externalPlatform)) { + throw new \InvalidArgumentException('non-nullable externalPlatform cannot be null'); + } + $this->container['externalPlatform'] = $externalPlatform; + + return $this; + } + + /** + * Gets merchantApplication + * + * @return \Adyen\Model\Checkout\CommonField|null + */ + public function getMerchantApplication() + { + return $this->container['merchantApplication']; + } + + /** + * Sets merchantApplication + * + * @param \Adyen\Model\Checkout\CommonField|null $merchantApplication merchantApplication + * + * @return self + */ + public function setMerchantApplication($merchantApplication) + { + if (is_null($merchantApplication)) { + throw new \InvalidArgumentException('non-nullable merchantApplication cannot be null'); + } + $this->container['merchantApplication'] = $merchantApplication; + + return $this; + } + + /** + * Gets merchantDevice + * + * @return \Adyen\Model\Checkout\MerchantDevice|null + */ + public function getMerchantDevice() + { + return $this->container['merchantDevice']; + } + + /** + * Sets merchantDevice + * + * @param \Adyen\Model\Checkout\MerchantDevice|null $merchantDevice merchantDevice + * + * @return self + */ + public function setMerchantDevice($merchantDevice) + { + if (is_null($merchantDevice)) { + throw new \InvalidArgumentException('non-nullable merchantDevice cannot be null'); + } + $this->container['merchantDevice'] = $merchantDevice; + + return $this; + } + + /** + * Gets shopperInteractionDevice + * + * @return \Adyen\Model\Checkout\ShopperInteractionDevice|null + */ + public function getShopperInteractionDevice() + { + return $this->container['shopperInteractionDevice']; + } + + /** + * Sets shopperInteractionDevice + * + * @param \Adyen\Model\Checkout\ShopperInteractionDevice|null $shopperInteractionDevice shopperInteractionDevice + * + * @return self + */ + public function setShopperInteractionDevice($shopperInteractionDevice) + { + if (is_null($shopperInteractionDevice)) { + throw new \InvalidArgumentException('non-nullable shopperInteractionDevice cannot be null'); + } + $this->container['shopperInteractionDevice'] = $shopperInteractionDevice; + + 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/BrowserInfo2.php b/src/Adyen/Model/Checkout/BrowserInfo2.php new file mode 100644 index 000000000..5b9ef09fe --- /dev/null +++ b/src/Adyen/Model/Checkout/BrowserInfo2.php @@ -0,0 +1,648 @@ + + */ +class BrowserInfo2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'BrowserInfo-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acceptHeader' => 'string', + 'colorDepth' => 'int', + 'javaEnabled' => 'bool', + 'javaScriptEnabled' => 'bool', + 'language' => 'string', + 'screenHeight' => 'int', + 'screenWidth' => 'int', + 'timeZoneOffset' => 'int', + 'userAgent' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'acceptHeader' => null, + 'colorDepth' => 'int32', + 'javaEnabled' => null, + 'javaScriptEnabled' => null, + 'language' => null, + 'screenHeight' => 'int32', + 'screenWidth' => 'int32', + 'timeZoneOffset' => 'int32', + 'userAgent' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'acceptHeader' => false, + 'colorDepth' => true, + 'javaEnabled' => false, + 'javaScriptEnabled' => false, + 'language' => false, + 'screenHeight' => true, + 'screenWidth' => true, + 'timeZoneOffset' => true, + 'userAgent' => 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 = [ + 'acceptHeader' => 'acceptHeader', + 'colorDepth' => 'colorDepth', + 'javaEnabled' => 'javaEnabled', + 'javaScriptEnabled' => 'javaScriptEnabled', + 'language' => 'language', + 'screenHeight' => 'screenHeight', + 'screenWidth' => 'screenWidth', + 'timeZoneOffset' => 'timeZoneOffset', + 'userAgent' => 'userAgent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'acceptHeader' => 'setAcceptHeader', + 'colorDepth' => 'setColorDepth', + 'javaEnabled' => 'setJavaEnabled', + 'javaScriptEnabled' => 'setJavaScriptEnabled', + 'language' => 'setLanguage', + 'screenHeight' => 'setScreenHeight', + 'screenWidth' => 'setScreenWidth', + 'timeZoneOffset' => 'setTimeZoneOffset', + 'userAgent' => 'setUserAgent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'acceptHeader' => 'getAcceptHeader', + 'colorDepth' => 'getColorDepth', + 'javaEnabled' => 'getJavaEnabled', + 'javaScriptEnabled' => 'getJavaScriptEnabled', + 'language' => 'getLanguage', + 'screenHeight' => 'getScreenHeight', + 'screenWidth' => 'getScreenWidth', + 'timeZoneOffset' => 'getTimeZoneOffset', + 'userAgent' => 'getUserAgent' + ]; + + /** + * 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('acceptHeader', $data ?? [], null); + $this->setIfExists('colorDepth', $data ?? [], null); + $this->setIfExists('javaEnabled', $data ?? [], null); + $this->setIfExists('javaScriptEnabled', $data ?? [], true); + $this->setIfExists('language', $data ?? [], null); + $this->setIfExists('screenHeight', $data ?? [], null); + $this->setIfExists('screenWidth', $data ?? [], null); + $this->setIfExists('timeZoneOffset', $data ?? [], null); + $this->setIfExists('userAgent', $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 acceptHeader + * + * @return string|null + */ + public function getAcceptHeader() + { + return $this->container['acceptHeader']; + } + + /** + * Sets acceptHeader + * + * @param string|null $acceptHeader The accept header value of the shopper's browser. + * + * @return self + */ + public function setAcceptHeader($acceptHeader) + { + if (is_null($acceptHeader)) { + throw new \InvalidArgumentException('non-nullable acceptHeader cannot be null'); + } + $this->container['acceptHeader'] = $acceptHeader; + + return $this; + } + + /** + * Gets colorDepth + * + * @return int|null + */ + public function getColorDepth() + { + return $this->container['colorDepth']; + } + + /** + * Sets colorDepth + * + * @param int|null $colorDepth The color depth of the shopper's browser in bits per pixel. This should be obtained by using the browser's `screen.colorDepth` property. Accepted values: 1, 4, 8, 15, 16, 24, 30, 32 or 48 bit color depth. + * + * @return self + */ + public function setColorDepth($colorDepth) + { + // Do nothing for nullable integers + $this->container['colorDepth'] = $colorDepth; + + return $this; + } + + /** + * Gets javaEnabled + * + * @return bool|null + */ + public function getJavaEnabled() + { + return $this->container['javaEnabled']; + } + + /** + * Sets javaEnabled + * + * @param bool|null $javaEnabled Boolean value indicating if the shopper's browser is able to execute Java. + * + * @return self + */ + public function setJavaEnabled($javaEnabled) + { + if (is_null($javaEnabled)) { + throw new \InvalidArgumentException('non-nullable javaEnabled cannot be null'); + } + $this->container['javaEnabled'] = $javaEnabled; + + return $this; + } + + /** + * Gets javaScriptEnabled + * + * @return bool|null + */ + public function getJavaScriptEnabled() + { + return $this->container['javaScriptEnabled']; + } + + /** + * Sets javaScriptEnabled + * + * @param bool|null $javaScriptEnabled Boolean value indicating if the shopper's browser is able to execute JavaScript. A default 'true' value is assumed if the field is not present. + * + * @return self + */ + public function setJavaScriptEnabled($javaScriptEnabled) + { + if (is_null($javaScriptEnabled)) { + throw new \InvalidArgumentException('non-nullable javaScriptEnabled cannot be null'); + } + $this->container['javaScriptEnabled'] = $javaScriptEnabled; + + return $this; + } + + /** + * Gets language + * + * @return string|null + */ + public function getLanguage() + { + return $this->container['language']; + } + + /** + * Sets language + * + * @param string|null $language The `navigator.language` value of the shopper's browser (as defined in IETF BCP 47). + * + * @return self + */ + public function setLanguage($language) + { + if (is_null($language)) { + throw new \InvalidArgumentException('non-nullable language cannot be null'); + } + $this->container['language'] = $language; + + return $this; + } + + /** + * Gets screenHeight + * + * @return int|null + */ + public function getScreenHeight() + { + return $this->container['screenHeight']; + } + + /** + * Sets screenHeight + * + * @param int|null $screenHeight The total height of the shopper's device screen in pixels. + * + * @return self + */ + public function setScreenHeight($screenHeight) + { + // Do nothing for nullable integers + $this->container['screenHeight'] = $screenHeight; + + return $this; + } + + /** + * Gets screenWidth + * + * @return int|null + */ + public function getScreenWidth() + { + return $this->container['screenWidth']; + } + + /** + * Sets screenWidth + * + * @param int|null $screenWidth The total width of the shopper's device screen in pixels. + * + * @return self + */ + public function setScreenWidth($screenWidth) + { + // Do nothing for nullable integers + $this->container['screenWidth'] = $screenWidth; + + return $this; + } + + /** + * Gets timeZoneOffset + * + * @return int|null + */ + public function getTimeZoneOffset() + { + return $this->container['timeZoneOffset']; + } + + /** + * Sets timeZoneOffset + * + * @param int|null $timeZoneOffset Time difference between UTC time and the shopper's browser local time, in minutes. + * + * @return self + */ + public function setTimeZoneOffset($timeZoneOffset) + { + // Do nothing for nullable integers + $this->container['timeZoneOffset'] = $timeZoneOffset; + + return $this; + } + + /** + * Gets userAgent + * + * @return string|null + */ + public function getUserAgent() + { + return $this->container['userAgent']; + } + + /** + * Sets userAgent + * + * @param string|null $userAgent The user agent value of the shopper's browser. + * + * @return self + */ + public function setUserAgent($userAgent) + { + if (is_null($userAgent)) { + throw new \InvalidArgumentException('non-nullable userAgent cannot be null'); + } + $this->container['userAgent'] = $userAgent; + + 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/PaymentDonationRequest.php b/src/Adyen/Model/Checkout/CheckoutDonationPaymentRequest.php similarity index 93% rename from src/Adyen/Model/Checkout/PaymentDonationRequest.php rename to src/Adyen/Model/Checkout/CheckoutDonationPaymentRequest.php index a3e24c144..f1071fbf5 100644 --- a/src/Adyen/Model/Checkout/PaymentDonationRequest.php +++ b/src/Adyen/Model/Checkout/CheckoutDonationPaymentRequest.php @@ -19,7 +19,7 @@ use Adyen\Model\Checkout\ObjectSerializer; /** - * PaymentDonationRequest Class Doc Comment + * CheckoutDonationPaymentRequest Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerializable +class CheckoutDonationPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial * * @var string */ - protected static $openAPIModelName = 'PaymentDonationRequest'; + protected static $openAPIModelName = 'CheckoutDonationPaymentRequest'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,14 +44,14 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ - 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo', - 'additionalAmount' => '\Adyen\Model\Checkout\Amount', + 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo2', + 'additionalAmount' => '\Adyen\Model\Checkout\Amount2', 'additionalData' => 'array', - 'amount' => '\Adyen\Model\Checkout\Amount', - 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', + 'amount' => '\Adyen\Model\Checkout\Amount2', + 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo2', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', - 'browserInfo' => '\Adyen\Model\Checkout\BrowserInfo', + 'billingAddress' => '\Adyen\Model\Checkout\Address2', + 'browserInfo' => '\Adyen\Model\Checkout\BrowserInfo2', 'captureDelayHours' => 'int', 'channel' => 'string', 'checkoutAttemptId' => 'string', @@ -59,8 +59,8 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial 'conversionId' => 'string', 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', - 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote2', + 'deliveryAddress' => '\Adyen\Model\Checkout\Address2', 'deliveryDate' => '\DateTime', 'deviceFingerprint' => 'string', 'donationAccount' => 'string', @@ -72,20 +72,20 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial 'entityType' => 'string', 'fraudOffset' => 'int', 'industryUsage' => 'string', - 'installments' => '\Adyen\Model\Checkout\Installments', + 'installments' => '\Adyen\Model\Checkout\Installments2', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'localizedShopperStatement' => 'array', 'mandate' => '\Adyen\Model\Checkout\Mandate', 'mcc' => 'string', 'merchantAccount' => 'string', 'merchantOrderReference' => 'string', - 'merchantRiskIndicator' => '\Adyen\Model\Checkout\MerchantRiskIndicator', + 'merchantRiskIndicator' => '\Adyen\Model\Checkout\MerchantRiskIndicator2', 'metadata' => 'array', 'mpiData' => '\Adyen\Model\Checkout\ThreeDSecureData', 'order' => '\Adyen\Model\Checkout\EncryptedOrderData', 'orderReference' => 'string', 'origin' => 'string', - 'paymentMethod' => '\Adyen\Model\Checkout\CheckoutPaymentMethod', + 'paymentMethod' => '\Adyen\Model\Checkout\CheckoutDonationPaymentRequestPaymentMethod', 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', 'recurringExpiry' => 'string', 'recurringFrequency' => 'string', @@ -100,15 +100,15 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\Name2', 'shopperReference' => 'string', 'shopperStatement' => 'string', 'socialSecurityNumber' => 'string', - 'splits' => '\Adyen\Model\Checkout\Split[]', + 'splits' => '\Adyen\Model\Checkout\Split2[]', 'store' => 'string', 'storePaymentMethod' => 'bool', 'telephoneNumber' => 'string', - 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestData', + 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestData2', 'threeDSAuthenticationOnly' => 'bool', 'trustedShopper' => 'bool' ]; @@ -135,7 +135,7 @@ class PaymentDonationRequest implements ModelInterface, ArrayAccess, \JsonSerial 'company' => null, 'conversionId' => null, 'countryCode' => null, - 'dateOfBirth' => 'date', + 'dateOfBirth' => 'date-time', 'dccQuote' => null, 'deliveryAddress' => null, 'deliveryDate' => 'date-time', @@ -803,9 +803,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['amount'] === null) { - $invalidProperties[] = "'amount' can't be null"; - } $allowedValues = $this->getChannelAllowableValues(); if (!is_null($this->container['channel']) && !in_array($this->container['channel'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -836,12 +833,6 @@ public function listInvalidProperties() ); } - if ($this->container['merchantAccount'] === null) { - $invalidProperties[] = "'merchantAccount' can't be null"; - } - if ($this->container['paymentMethod'] === null) { - $invalidProperties[] = "'paymentMethod' can't be null"; - } $allowedValues = $this->getRecurringProcessingModelAllowableValues(); if (!is_null($this->container['recurringProcessingModel']) && !in_array($this->container['recurringProcessingModel'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -851,12 +842,6 @@ public function listInvalidProperties() ); } - if ($this->container['reference'] === null) { - $invalidProperties[] = "'reference' can't be null"; - } - if ($this->container['returnUrl'] === null) { - $invalidProperties[] = "'returnUrl' can't be null"; - } $allowedValues = $this->getShopperInteractionAllowableValues(); if (!is_null($this->container['shopperInteraction']) && !in_array($this->container['shopperInteraction'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -884,7 +869,7 @@ public function valid() /** * Gets accountInfo * - * @return \Adyen\Model\Checkout\AccountInfo|null + * @return \Adyen\Model\Checkout\AccountInfo2|null */ public function getAccountInfo() { @@ -894,7 +879,7 @@ public function getAccountInfo() /** * Sets accountInfo * - * @param \Adyen\Model\Checkout\AccountInfo|null $accountInfo accountInfo + * @param \Adyen\Model\Checkout\AccountInfo2|null $accountInfo accountInfo * * @return self */ @@ -911,7 +896,7 @@ public function setAccountInfo($accountInfo) /** * Gets additionalAmount * - * @return \Adyen\Model\Checkout\Amount|null + * @return \Adyen\Model\Checkout\Amount2|null */ public function getAdditionalAmount() { @@ -921,7 +906,7 @@ public function getAdditionalAmount() /** * Sets additionalAmount * - * @param \Adyen\Model\Checkout\Amount|null $additionalAmount additionalAmount + * @param \Adyen\Model\Checkout\Amount2|null $additionalAmount additionalAmount * * @return self */ @@ -965,7 +950,7 @@ public function setAdditionalData($additionalData) /** * Gets amount * - * @return \Adyen\Model\Checkout\Amount + * @return \Adyen\Model\Checkout\Amount2|null */ public function getAmount() { @@ -975,7 +960,7 @@ public function getAmount() /** * Sets amount * - * @param \Adyen\Model\Checkout\Amount $amount amount + * @param \Adyen\Model\Checkout\Amount2|null $amount amount * * @return self */ @@ -992,7 +977,7 @@ public function setAmount($amount) /** * Gets applicationInfo * - * @return \Adyen\Model\Checkout\ApplicationInfo|null + * @return \Adyen\Model\Checkout\ApplicationInfo2|null */ public function getApplicationInfo() { @@ -1002,7 +987,7 @@ public function getApplicationInfo() /** * Sets applicationInfo * - * @param \Adyen\Model\Checkout\ApplicationInfo|null $applicationInfo applicationInfo + * @param \Adyen\Model\Checkout\ApplicationInfo2|null $applicationInfo applicationInfo * * @return self */ @@ -1046,7 +1031,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\Address2|null */ public function getBillingAddress() { @@ -1056,7 +1041,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\Address2|null $billingAddress billingAddress * * @return self */ @@ -1073,7 +1058,7 @@ public function setBillingAddress($billingAddress) /** * Gets browserInfo * - * @return \Adyen\Model\Checkout\BrowserInfo|null + * @return \Adyen\Model\Checkout\BrowserInfo2|null */ public function getBrowserInfo() { @@ -1083,7 +1068,7 @@ public function getBrowserInfo() /** * Sets browserInfo * - * @param \Adyen\Model\Checkout\BrowserInfo|null $browserInfo browserInfo + * @param \Adyen\Model\Checkout\BrowserInfo2|null $browserInfo browserInfo * * @return self */ @@ -1299,7 +1284,7 @@ public function setDateOfBirth($dateOfBirth) /** * Gets dccQuote * - * @return \Adyen\Model\Checkout\ForexQuote|null + * @return \Adyen\Model\Checkout\ForexQuote2|null */ public function getDccQuote() { @@ -1309,7 +1294,7 @@ public function getDccQuote() /** * Sets dccQuote * - * @param \Adyen\Model\Checkout\ForexQuote|null $dccQuote dccQuote + * @param \Adyen\Model\Checkout\ForexQuote2|null $dccQuote dccQuote * * @return self */ @@ -1326,7 +1311,7 @@ public function setDccQuote($dccQuote) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\Address2|null */ public function getDeliveryAddress() { @@ -1336,7 +1321,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\Address2|null $deliveryAddress deliveryAddress * * @return self */ @@ -1668,7 +1653,7 @@ public function setIndustryUsage($industryUsage) /** * Gets installments * - * @return \Adyen\Model\Checkout\Installments|null + * @return \Adyen\Model\Checkout\Installments2|null */ public function getInstallments() { @@ -1678,7 +1663,7 @@ public function getInstallments() /** * Sets installments * - * @param \Adyen\Model\Checkout\Installments|null $installments installments + * @param \Adyen\Model\Checkout\Installments2|null $installments installments * * @return self */ @@ -1732,7 +1717,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. * * @return self */ @@ -1803,7 +1788,7 @@ public function setMcc($mcc) /** * Gets merchantAccount * - * @return string + * @return string|null */ public function getMerchantAccount() { @@ -1813,7 +1798,7 @@ public function getMerchantAccount() /** * Sets merchantAccount * - * @param string $merchantAccount The merchant account identifier, with which you want to process the transaction. + * @param string|null $merchantAccount The merchant account identifier, with which you want to process the transaction. * * @return self */ @@ -1857,7 +1842,7 @@ public function setMerchantOrderReference($merchantOrderReference) /** * Gets merchantRiskIndicator * - * @return \Adyen\Model\Checkout\MerchantRiskIndicator|null + * @return \Adyen\Model\Checkout\MerchantRiskIndicator2|null */ public function getMerchantRiskIndicator() { @@ -1867,7 +1852,7 @@ public function getMerchantRiskIndicator() /** * Sets merchantRiskIndicator * - * @param \Adyen\Model\Checkout\MerchantRiskIndicator|null $merchantRiskIndicator merchantRiskIndicator + * @param \Adyen\Model\Checkout\MerchantRiskIndicator2|null $merchantRiskIndicator merchantRiskIndicator * * @return self */ @@ -2019,7 +2004,7 @@ public function setOrigin($origin) /** * Gets paymentMethod * - * @return \Adyen\Model\Checkout\CheckoutPaymentMethod + * @return \Adyen\Model\Checkout\CheckoutDonationPaymentRequestPaymentMethod|null */ public function getPaymentMethod() { @@ -2029,7 +2014,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Adyen\Model\Checkout\CheckoutPaymentMethod $paymentMethod paymentMethod + * @param \Adyen\Model\Checkout\CheckoutDonationPaymentRequestPaymentMethod|null $paymentMethod paymentMethod * * @return self */ @@ -2218,7 +2203,7 @@ public function setRedirectToIssuerMethod($redirectToIssuerMethod) /** * Gets reference * - * @return string + * @return string|null */ public function getReference() { @@ -2228,7 +2213,7 @@ public function getReference() /** * Sets reference * - * @param string $reference The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. + * @param string|null $reference The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. * * @return self */ @@ -2245,7 +2230,7 @@ public function setReference($reference) /** * Gets returnUrl * - * @return string + * @return string|null */ public function getReturnUrl() { @@ -2255,7 +2240,7 @@ public function getReturnUrl() /** * Sets returnUrl * - * @param string $returnUrl The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` + * @param string|null $returnUrl The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` * * @return self */ @@ -2444,7 +2429,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\Name2|null */ public function getShopperName() { @@ -2454,7 +2439,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\Name2|null $shopperName shopperName * * @return self */ @@ -2552,7 +2537,7 @@ public function setSocialSecurityNumber($socialSecurityNumber) /** * Gets splits * - * @return \Adyen\Model\Checkout\Split[]|null + * @return \Adyen\Model\Checkout\Split2[]|null */ public function getSplits() { @@ -2562,7 +2547,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). + * @param \Adyen\Model\Checkout\Split2[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ @@ -2660,7 +2645,7 @@ public function setTelephoneNumber($telephoneNumber) /** * Gets threeDS2RequestData * - * @return \Adyen\Model\Checkout\ThreeDS2RequestData|null + * @return \Adyen\Model\Checkout\ThreeDS2RequestData2|null */ public function getThreeDS2RequestData() { @@ -2670,7 +2655,7 @@ public function getThreeDS2RequestData() /** * Sets threeDS2RequestData * - * @param \Adyen\Model\Checkout\ThreeDS2RequestData|null $threeDS2RequestData threeDS2RequestData + * @param \Adyen\Model\Checkout\ThreeDS2RequestData2|null $threeDS2RequestData threeDS2RequestData * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutDonationPaymentRequestPaymentMethod.php similarity index 96% rename from src/Adyen/Model/Checkout/CheckoutPaymentMethod.php rename to src/Adyen/Model/Checkout/CheckoutDonationPaymentRequestPaymentMethod.php index dc20e68d8..72cb8979b 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutDonationPaymentRequestPaymentMethod.php @@ -19,7 +19,7 @@ use Adyen\Model\Checkout\ObjectSerializer; /** - * CheckoutPaymentMethod Class Doc Comment + * CheckoutDonationPaymentRequestPaymentMethod Class Doc Comment * * @category Class * @description The type and required details of a payment method to use. @@ -28,7 +28,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable +class CheckoutDonationPaymentRequestPaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -37,7 +37,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali * * @var string */ - protected static $openAPIModelName = 'CheckoutPaymentMethod'; + protected static $openAPIModelName = 'CheckoutDonationPaymentRequest_paymentMethod'; /** * Array of property to type mappings. Used for (de)serialization @@ -83,7 +83,9 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'googlePayToken' => 'string', 'masterpassTransactionId' => 'string', 'orderID' => 'string', + 'payeePreferred' => 'string', 'payerID' => 'string', + 'payerSelected' => 'string', 'subtype' => 'string', 'virtualPaymentAddress' => 'string', 'samsungPayToken' => 'string', @@ -141,7 +143,9 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'googlePayToken' => null, 'masterpassTransactionId' => null, 'orderID' => null, + 'payeePreferred' => null, 'payerID' => null, + 'payerSelected' => null, 'subtype' => null, 'virtualPaymentAddress' => null, 'samsungPayToken' => null, @@ -197,7 +201,9 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'googlePayToken' => false, 'masterpassTransactionId' => false, 'orderID' => false, + 'payeePreferred' => false, 'payerID' => false, + 'payerSelected' => false, 'subtype' => false, 'virtualPaymentAddress' => false, 'samsungPayToken' => false, @@ -333,7 +339,9 @@ public function isNullableSetToNull(string $property): bool 'googlePayToken' => 'googlePayToken', 'masterpassTransactionId' => 'masterpassTransactionId', 'orderID' => 'orderID', + 'payeePreferred' => 'payeePreferred', 'payerID' => 'payerID', + 'payerSelected' => 'payerSelected', 'subtype' => 'subtype', 'virtualPaymentAddress' => 'virtualPaymentAddress', 'samsungPayToken' => 'samsungPayToken', @@ -389,7 +397,9 @@ public function isNullableSetToNull(string $property): bool 'googlePayToken' => 'setGooglePayToken', 'masterpassTransactionId' => 'setMasterpassTransactionId', 'orderID' => 'setOrderID', + 'payeePreferred' => 'setPayeePreferred', 'payerID' => 'setPayerID', + 'payerSelected' => 'setPayerSelected', 'subtype' => 'setSubtype', 'virtualPaymentAddress' => 'setVirtualPaymentAddress', 'samsungPayToken' => 'setSamsungPayToken', @@ -445,7 +455,9 @@ public function isNullableSetToNull(string $property): bool 'googlePayToken' => 'getGooglePayToken', 'masterpassTransactionId' => 'getMasterpassTransactionId', 'orderID' => 'getOrderID', + 'payeePreferred' => 'getPayeePreferred', 'payerID' => 'getPayerID', + 'payerSelected' => 'getPayerSelected', 'subtype' => 'getSubtype', 'virtualPaymentAddress' => 'getVirtualPaymentAddress', 'samsungPayToken' => 'getSamsungPayToken', @@ -551,7 +563,9 @@ public function __construct(array $data = null) $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('masterpassTransactionId', $data ?? [], null); $this->setIfExists('orderID', $data ?? [], null); + $this->setIfExists('payeePreferred', $data ?? [], null); $this->setIfExists('payerID', $data ?? [], null); + $this->setIfExists('payerSelected', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); $this->setIfExists('virtualPaymentAddress', $data ?? [], null); $this->setIfExists('samsungPayToken', $data ?? [], null); @@ -1683,6 +1697,33 @@ public function setOrderID($orderID) return $this; } + /** + * Gets payeePreferred + * + * @return string|null + */ + public function getPayeePreferred() + { + return $this->container['payeePreferred']; + } + + /** + * Sets payeePreferred + * + * @param string|null $payeePreferred IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED + * + * @return self + */ + public function setPayeePreferred($payeePreferred) + { + if (is_null($payeePreferred)) { + throw new \InvalidArgumentException('non-nullable payeePreferred cannot be null'); + } + $this->container['payeePreferred'] = $payeePreferred; + + return $this; + } + /** * Gets payerID * @@ -1710,6 +1751,33 @@ public function setPayerID($payerID) return $this; } + /** + * Gets payerSelected + * + * @return string|null + */ + public function getPayerSelected() + { + return $this->container['payerSelected']; + } + + /** + * Sets payerSelected + * + * @param string|null $payerSelected PAYPAL or PAYPAL_CREDIT + * + * @return self + */ + public function setPayerSelected($payerSelected) + { + if (is_null($payerSelected)) { + throw new \InvalidArgumentException('non-nullable payerSelected cannot be null'); + } + $this->container['payerSelected'] = $payerSelected; + + return $this; + } + /** * Gets subtype * diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/CheckoutPaymentRequest.php similarity index 93% rename from src/Adyen/Model/Checkout/PaymentRequest.php rename to src/Adyen/Model/Checkout/CheckoutPaymentRequest.php index c44a03ab9..e1431b96e 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentRequest.php @@ -19,7 +19,7 @@ use Adyen\Model\Checkout\ObjectSerializer; /** - * PaymentRequest Class Doc Comment + * CheckoutPaymentRequest Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable +class CheckoutPaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'PaymentRequest'; + protected static $openAPIModelName = 'CheckoutPaymentRequest'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,14 +44,14 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo', - 'additionalAmount' => '\Adyen\Model\Checkout\Amount', + 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo2', + 'additionalAmount' => '\Adyen\Model\Checkout\Amount2', 'additionalData' => 'array', - 'amount' => '\Adyen\Model\Checkout\Amount', - 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', + 'amount' => '\Adyen\Model\Checkout\Amount2', + 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo2', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', - 'browserInfo' => '\Adyen\Model\Checkout\BrowserInfo', + 'billingAddress' => '\Adyen\Model\Checkout\Address2', + 'browserInfo' => '\Adyen\Model\Checkout\BrowserInfo2', 'captureDelayHours' => 'int', 'channel' => 'string', 'checkoutAttemptId' => 'string', @@ -59,8 +59,8 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'conversionId' => 'string', 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', - 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'dccQuote' => '\Adyen\Model\Checkout\ForexQuote2', + 'deliveryAddress' => '\Adyen\Model\Checkout\Address2', 'deliveryDate' => '\DateTime', 'deviceFingerprint' => 'string', 'enableOneClick' => 'bool', @@ -69,20 +69,20 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'entityType' => 'string', 'fraudOffset' => 'int', 'industryUsage' => 'string', - 'installments' => '\Adyen\Model\Checkout\Installments', + 'installments' => '\Adyen\Model\Checkout\Installments2', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'localizedShopperStatement' => 'array', 'mandate' => '\Adyen\Model\Checkout\Mandate', 'mcc' => 'string', 'merchantAccount' => 'string', 'merchantOrderReference' => 'string', - 'merchantRiskIndicator' => '\Adyen\Model\Checkout\MerchantRiskIndicator', + 'merchantRiskIndicator' => '\Adyen\Model\Checkout\MerchantRiskIndicator2', 'metadata' => 'array', 'mpiData' => '\Adyen\Model\Checkout\ThreeDSecureData', 'order' => '\Adyen\Model\Checkout\EncryptedOrderData', 'orderReference' => 'string', 'origin' => 'string', - 'paymentMethod' => '\Adyen\Model\Checkout\CheckoutPaymentMethod', + 'paymentMethod' => '\Adyen\Model\Checkout\CheckoutDonationPaymentRequestPaymentMethod', 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', 'recurringExpiry' => 'string', 'recurringFrequency' => 'string', @@ -97,15 +97,15 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\Name2', 'shopperReference' => 'string', 'shopperStatement' => 'string', 'socialSecurityNumber' => 'string', - 'splits' => '\Adyen\Model\Checkout\Split[]', + 'splits' => '\Adyen\Model\Checkout\Split2[]', 'store' => 'string', 'storePaymentMethod' => 'bool', 'telephoneNumber' => 'string', - 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestData', + 'threeDS2RequestData' => '\Adyen\Model\Checkout\ThreeDS2RequestData2', 'threeDSAuthenticationOnly' => 'bool', 'trustedShopper' => 'bool' ]; @@ -132,7 +132,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'company' => null, 'conversionId' => null, 'countryCode' => null, - 'dateOfBirth' => 'date', + 'dateOfBirth' => 'date-time', 'dccQuote' => null, 'deliveryAddress' => null, 'deliveryDate' => 'date-time', @@ -782,9 +782,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['amount'] === null) { - $invalidProperties[] = "'amount' can't be null"; - } $allowedValues = $this->getChannelAllowableValues(); if (!is_null($this->container['channel']) && !in_array($this->container['channel'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -812,12 +809,6 @@ public function listInvalidProperties() ); } - if ($this->container['merchantAccount'] === null) { - $invalidProperties[] = "'merchantAccount' can't be null"; - } - if ($this->container['paymentMethod'] === null) { - $invalidProperties[] = "'paymentMethod' can't be null"; - } $allowedValues = $this->getRecurringProcessingModelAllowableValues(); if (!is_null($this->container['recurringProcessingModel']) && !in_array($this->container['recurringProcessingModel'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -827,12 +818,6 @@ public function listInvalidProperties() ); } - if ($this->container['reference'] === null) { - $invalidProperties[] = "'reference' can't be null"; - } - if ($this->container['returnUrl'] === null) { - $invalidProperties[] = "'returnUrl' can't be null"; - } $allowedValues = $this->getShopperInteractionAllowableValues(); if (!is_null($this->container['shopperInteraction']) && !in_array($this->container['shopperInteraction'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -860,7 +845,7 @@ public function valid() /** * Gets accountInfo * - * @return \Adyen\Model\Checkout\AccountInfo|null + * @return \Adyen\Model\Checkout\AccountInfo2|null */ public function getAccountInfo() { @@ -870,7 +855,7 @@ public function getAccountInfo() /** * Sets accountInfo * - * @param \Adyen\Model\Checkout\AccountInfo|null $accountInfo accountInfo + * @param \Adyen\Model\Checkout\AccountInfo2|null $accountInfo accountInfo * * @return self */ @@ -887,7 +872,7 @@ public function setAccountInfo($accountInfo) /** * Gets additionalAmount * - * @return \Adyen\Model\Checkout\Amount|null + * @return \Adyen\Model\Checkout\Amount2|null */ public function getAdditionalAmount() { @@ -897,7 +882,7 @@ public function getAdditionalAmount() /** * Sets additionalAmount * - * @param \Adyen\Model\Checkout\Amount|null $additionalAmount additionalAmount + * @param \Adyen\Model\Checkout\Amount2|null $additionalAmount additionalAmount * * @return self */ @@ -941,7 +926,7 @@ public function setAdditionalData($additionalData) /** * Gets amount * - * @return \Adyen\Model\Checkout\Amount + * @return \Adyen\Model\Checkout\Amount2|null */ public function getAmount() { @@ -951,7 +936,7 @@ public function getAmount() /** * Sets amount * - * @param \Adyen\Model\Checkout\Amount $amount amount + * @param \Adyen\Model\Checkout\Amount2|null $amount amount * * @return self */ @@ -968,7 +953,7 @@ public function setAmount($amount) /** * Gets applicationInfo * - * @return \Adyen\Model\Checkout\ApplicationInfo|null + * @return \Adyen\Model\Checkout\ApplicationInfo2|null */ public function getApplicationInfo() { @@ -978,7 +963,7 @@ public function getApplicationInfo() /** * Sets applicationInfo * - * @param \Adyen\Model\Checkout\ApplicationInfo|null $applicationInfo applicationInfo + * @param \Adyen\Model\Checkout\ApplicationInfo2|null $applicationInfo applicationInfo * * @return self */ @@ -1022,7 +1007,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\Address2|null */ public function getBillingAddress() { @@ -1032,7 +1017,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\Address2|null $billingAddress billingAddress * * @return self */ @@ -1049,7 +1034,7 @@ public function setBillingAddress($billingAddress) /** * Gets browserInfo * - * @return \Adyen\Model\Checkout\BrowserInfo|null + * @return \Adyen\Model\Checkout\BrowserInfo2|null */ public function getBrowserInfo() { @@ -1059,7 +1044,7 @@ public function getBrowserInfo() /** * Sets browserInfo * - * @param \Adyen\Model\Checkout\BrowserInfo|null $browserInfo browserInfo + * @param \Adyen\Model\Checkout\BrowserInfo2|null $browserInfo browserInfo * * @return self */ @@ -1275,7 +1260,7 @@ public function setDateOfBirth($dateOfBirth) /** * Gets dccQuote * - * @return \Adyen\Model\Checkout\ForexQuote|null + * @return \Adyen\Model\Checkout\ForexQuote2|null */ public function getDccQuote() { @@ -1285,7 +1270,7 @@ public function getDccQuote() /** * Sets dccQuote * - * @param \Adyen\Model\Checkout\ForexQuote|null $dccQuote dccQuote + * @param \Adyen\Model\Checkout\ForexQuote2|null $dccQuote dccQuote * * @return self */ @@ -1302,7 +1287,7 @@ public function setDccQuote($dccQuote) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\Address2|null */ public function getDeliveryAddress() { @@ -1312,7 +1297,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\Address2|null $deliveryAddress deliveryAddress * * @return self */ @@ -1563,7 +1548,7 @@ public function setIndustryUsage($industryUsage) /** * Gets installments * - * @return \Adyen\Model\Checkout\Installments|null + * @return \Adyen\Model\Checkout\Installments2|null */ public function getInstallments() { @@ -1573,7 +1558,7 @@ public function getInstallments() /** * Sets installments * - * @param \Adyen\Model\Checkout\Installments|null $installments installments + * @param \Adyen\Model\Checkout\Installments2|null $installments installments * * @return self */ @@ -1627,7 +1612,7 @@ public function getLocalizedShopperStatement() /** * Sets localizedShopperStatement * - * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * @param array|null $localizedShopperStatement This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. * * @return self */ @@ -1698,7 +1683,7 @@ public function setMcc($mcc) /** * Gets merchantAccount * - * @return string + * @return string|null */ public function getMerchantAccount() { @@ -1708,7 +1693,7 @@ public function getMerchantAccount() /** * Sets merchantAccount * - * @param string $merchantAccount The merchant account identifier, with which you want to process the transaction. + * @param string|null $merchantAccount The merchant account identifier, with which you want to process the transaction. * * @return self */ @@ -1752,7 +1737,7 @@ public function setMerchantOrderReference($merchantOrderReference) /** * Gets merchantRiskIndicator * - * @return \Adyen\Model\Checkout\MerchantRiskIndicator|null + * @return \Adyen\Model\Checkout\MerchantRiskIndicator2|null */ public function getMerchantRiskIndicator() { @@ -1762,7 +1747,7 @@ public function getMerchantRiskIndicator() /** * Sets merchantRiskIndicator * - * @param \Adyen\Model\Checkout\MerchantRiskIndicator|null $merchantRiskIndicator merchantRiskIndicator + * @param \Adyen\Model\Checkout\MerchantRiskIndicator2|null $merchantRiskIndicator merchantRiskIndicator * * @return self */ @@ -1914,7 +1899,7 @@ public function setOrigin($origin) /** * Gets paymentMethod * - * @return \Adyen\Model\Checkout\CheckoutPaymentMethod + * @return \Adyen\Model\Checkout\CheckoutDonationPaymentRequestPaymentMethod|null */ public function getPaymentMethod() { @@ -1924,7 +1909,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Adyen\Model\Checkout\CheckoutPaymentMethod $paymentMethod paymentMethod + * @param \Adyen\Model\Checkout\CheckoutDonationPaymentRequestPaymentMethod|null $paymentMethod paymentMethod * * @return self */ @@ -2113,7 +2098,7 @@ public function setRedirectToIssuerMethod($redirectToIssuerMethod) /** * Gets reference * - * @return string + * @return string|null */ public function getReference() { @@ -2123,7 +2108,7 @@ public function getReference() /** * Sets reference * - * @param string $reference The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. + * @param string|null $reference The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. * * @return self */ @@ -2140,7 +2125,7 @@ public function setReference($reference) /** * Gets returnUrl * - * @return string + * @return string|null */ public function getReturnUrl() { @@ -2150,7 +2135,7 @@ public function getReturnUrl() /** * Sets returnUrl * - * @param string $returnUrl The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` + * @param string|null $returnUrl The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` * * @return self */ @@ -2339,7 +2324,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\Name2|null */ public function getShopperName() { @@ -2349,7 +2334,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\Name2|null $shopperName shopperName * * @return self */ @@ -2447,7 +2432,7 @@ public function setSocialSecurityNumber($socialSecurityNumber) /** * Gets splits * - * @return \Adyen\Model\Checkout\Split[]|null + * @return \Adyen\Model\Checkout\Split2[]|null */ public function getSplits() { @@ -2457,7 +2442,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). + * @param \Adyen\Model\Checkout\Split2[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ @@ -2555,7 +2540,7 @@ public function setTelephoneNumber($telephoneNumber) /** * Gets threeDS2RequestData * - * @return \Adyen\Model\Checkout\ThreeDS2RequestData|null + * @return \Adyen\Model\Checkout\ThreeDS2RequestData2|null */ public function getThreeDS2RequestData() { @@ -2565,7 +2550,7 @@ public function getThreeDS2RequestData() /** * Sets threeDS2RequestData * - * @param \Adyen\Model\Checkout\ThreeDS2RequestData|null $threeDS2RequestData threeDS2RequestData + * @param \Adyen\Model\Checkout\ThreeDS2RequestData2|null $threeDS2RequestData threeDS2RequestData * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index 7a1d26a5a..e1e8fd99e 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -44,14 +44,14 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ - 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo', - 'additionalAmount' => '\Adyen\Model\Checkout\Amount', + 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo2', + 'additionalAmount' => '\Adyen\Model\Checkout\Amount2', 'additionalData' => 'array', 'allowedPaymentMethods' => 'string[]', - 'amount' => '\Adyen\Model\Checkout\Amount', - 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', + 'amount' => '\Adyen\Model\Checkout\Amount2', + 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo2', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\Address2', 'blockedPaymentMethods' => 'string[]', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -59,7 +59,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\Address2', 'enableOneClick' => 'bool', 'enablePayOut' => 'bool', 'enableRecurring' => 'bool', @@ -86,12 +86,12 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\Name2', 'shopperReference' => 'string', 'shopperStatement' => 'string', 'socialSecurityNumber' => 'string', 'splitCardFundingSources' => 'bool', - 'splits' => '\Adyen\Model\Checkout\Split[]', + 'splits' => '\Adyen\Model\Checkout\Split2[]', 'store' => 'string', 'storePaymentMethod' => 'bool', 'storePaymentMethodMode' => 'string', @@ -764,7 +764,7 @@ public function valid() /** * Gets accountInfo * - * @return \Adyen\Model\Checkout\AccountInfo|null + * @return \Adyen\Model\Checkout\AccountInfo2|null */ public function getAccountInfo() { @@ -774,7 +774,7 @@ public function getAccountInfo() /** * Sets accountInfo * - * @param \Adyen\Model\Checkout\AccountInfo|null $accountInfo accountInfo + * @param \Adyen\Model\Checkout\AccountInfo2|null $accountInfo accountInfo * * @return self */ @@ -791,7 +791,7 @@ public function setAccountInfo($accountInfo) /** * Gets additionalAmount * - * @return \Adyen\Model\Checkout\Amount|null + * @return \Adyen\Model\Checkout\Amount2|null */ public function getAdditionalAmount() { @@ -801,7 +801,7 @@ public function getAdditionalAmount() /** * Sets additionalAmount * - * @param \Adyen\Model\Checkout\Amount|null $additionalAmount additionalAmount + * @param \Adyen\Model\Checkout\Amount2|null $additionalAmount additionalAmount * * @return self */ @@ -872,7 +872,7 @@ public function setAllowedPaymentMethods($allowedPaymentMethods) /** * Gets amount * - * @return \Adyen\Model\Checkout\Amount + * @return \Adyen\Model\Checkout\Amount2 */ public function getAmount() { @@ -882,7 +882,7 @@ public function getAmount() /** * Sets amount * - * @param \Adyen\Model\Checkout\Amount $amount amount + * @param \Adyen\Model\Checkout\Amount2 $amount amount * * @return self */ @@ -899,7 +899,7 @@ public function setAmount($amount) /** * Gets applicationInfo * - * @return \Adyen\Model\Checkout\ApplicationInfo|null + * @return \Adyen\Model\Checkout\ApplicationInfo2|null */ public function getApplicationInfo() { @@ -909,7 +909,7 @@ public function getApplicationInfo() /** * Sets applicationInfo * - * @param \Adyen\Model\Checkout\ApplicationInfo|null $applicationInfo applicationInfo + * @param \Adyen\Model\Checkout\ApplicationInfo2|null $applicationInfo applicationInfo * * @return self */ @@ -953,7 +953,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\Address2|null */ public function getBillingAddress() { @@ -963,7 +963,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\Address2|null $billingAddress billingAddress * * @return self */ @@ -1177,7 +1177,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\Address2|null */ public function getDeliveryAddress() { @@ -1187,7 +1187,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\Address2|null $deliveryAddress deliveryAddress * * @return self */ @@ -1926,7 +1926,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\Name2|null */ public function getShopperName() { @@ -1936,7 +1936,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\Name2|null $shopperName shopperName * * @return self */ @@ -2061,7 +2061,7 @@ public function setSplitCardFundingSources($splitCardFundingSources) /** * Gets splits * - * @return \Adyen\Model\Checkout\Split[]|null + * @return \Adyen\Model\Checkout\Split2[]|null */ public function getSplits() { @@ -2071,7 +2071,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). + * @param \Adyen\Model\Checkout\Split2[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index aa0708b4a..3a687e986 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -44,14 +44,14 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $openAPITypes = [ - 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo', - 'additionalAmount' => '\Adyen\Model\Checkout\Amount', + 'accountInfo' => '\Adyen\Model\Checkout\AccountInfo2', + 'additionalAmount' => '\Adyen\Model\Checkout\Amount2', 'additionalData' => 'array', 'allowedPaymentMethods' => 'string[]', - 'amount' => '\Adyen\Model\Checkout\Amount', - 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', + 'amount' => '\Adyen\Model\Checkout\Amount2', + 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo2', 'authenticationData' => '\Adyen\Model\Checkout\AuthenticationData', - 'billingAddress' => '\Adyen\Model\Checkout\Address', + 'billingAddress' => '\Adyen\Model\Checkout\Address2', 'blockedPaymentMethods' => 'string[]', 'captureDelayHours' => 'int', 'channel' => 'string', @@ -59,7 +59,7 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'countryCode' => 'string', 'dateOfBirth' => '\DateTime', 'deliverAt' => '\DateTime', - 'deliveryAddress' => '\Adyen\Model\Checkout\Address', + 'deliveryAddress' => '\Adyen\Model\Checkout\Address2', 'enableOneClick' => 'bool', 'enablePayOut' => 'bool', 'enableRecurring' => 'bool', @@ -89,12 +89,12 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'shopperIP' => 'string', 'shopperInteraction' => 'string', 'shopperLocale' => 'string', - 'shopperName' => '\Adyen\Model\Checkout\Name', + 'shopperName' => '\Adyen\Model\Checkout\Name2', 'shopperReference' => 'string', 'shopperStatement' => 'string', 'socialSecurityNumber' => 'string', 'splitCardFundingSources' => 'bool', - 'splits' => '\Adyen\Model\Checkout\Split[]', + 'splits' => '\Adyen\Model\Checkout\Split2[]', 'store' => 'string', 'storePaymentMethod' => 'bool', 'storePaymentMethodMode' => 'string', @@ -814,7 +814,7 @@ public function valid() /** * Gets accountInfo * - * @return \Adyen\Model\Checkout\AccountInfo|null + * @return \Adyen\Model\Checkout\AccountInfo2|null */ public function getAccountInfo() { @@ -824,7 +824,7 @@ public function getAccountInfo() /** * Sets accountInfo * - * @param \Adyen\Model\Checkout\AccountInfo|null $accountInfo accountInfo + * @param \Adyen\Model\Checkout\AccountInfo2|null $accountInfo accountInfo * * @return self */ @@ -841,7 +841,7 @@ public function setAccountInfo($accountInfo) /** * Gets additionalAmount * - * @return \Adyen\Model\Checkout\Amount|null + * @return \Adyen\Model\Checkout\Amount2|null */ public function getAdditionalAmount() { @@ -851,7 +851,7 @@ public function getAdditionalAmount() /** * Sets additionalAmount * - * @param \Adyen\Model\Checkout\Amount|null $additionalAmount additionalAmount + * @param \Adyen\Model\Checkout\Amount2|null $additionalAmount additionalAmount * * @return self */ @@ -922,7 +922,7 @@ public function setAllowedPaymentMethods($allowedPaymentMethods) /** * Gets amount * - * @return \Adyen\Model\Checkout\Amount + * @return \Adyen\Model\Checkout\Amount2 */ public function getAmount() { @@ -932,7 +932,7 @@ public function getAmount() /** * Sets amount * - * @param \Adyen\Model\Checkout\Amount $amount amount + * @param \Adyen\Model\Checkout\Amount2 $amount amount * * @return self */ @@ -949,7 +949,7 @@ public function setAmount($amount) /** * Gets applicationInfo * - * @return \Adyen\Model\Checkout\ApplicationInfo|null + * @return \Adyen\Model\Checkout\ApplicationInfo2|null */ public function getApplicationInfo() { @@ -959,7 +959,7 @@ public function getApplicationInfo() /** * Sets applicationInfo * - * @param \Adyen\Model\Checkout\ApplicationInfo|null $applicationInfo applicationInfo + * @param \Adyen\Model\Checkout\ApplicationInfo2|null $applicationInfo applicationInfo * * @return self */ @@ -1003,7 +1003,7 @@ public function setAuthenticationData($authenticationData) /** * Gets billingAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\Address2|null */ public function getBillingAddress() { @@ -1013,7 +1013,7 @@ public function getBillingAddress() /** * Sets billingAddress * - * @param \Adyen\Model\Checkout\Address|null $billingAddress billingAddress + * @param \Adyen\Model\Checkout\Address2|null $billingAddress billingAddress * * @return self */ @@ -1227,7 +1227,7 @@ public function setDeliverAt($deliverAt) /** * Gets deliveryAddress * - * @return \Adyen\Model\Checkout\Address|null + * @return \Adyen\Model\Checkout\Address2|null */ public function getDeliveryAddress() { @@ -1237,7 +1237,7 @@ public function getDeliveryAddress() /** * Sets deliveryAddress * - * @param \Adyen\Model\Checkout\Address|null $deliveryAddress deliveryAddress + * @param \Adyen\Model\Checkout\Address2|null $deliveryAddress deliveryAddress * * @return self */ @@ -2067,7 +2067,7 @@ public function setShopperLocale($shopperLocale) /** * Gets shopperName * - * @return \Adyen\Model\Checkout\Name|null + * @return \Adyen\Model\Checkout\Name2|null */ public function getShopperName() { @@ -2077,7 +2077,7 @@ public function getShopperName() /** * Sets shopperName * - * @param \Adyen\Model\Checkout\Name|null $shopperName shopperName + * @param \Adyen\Model\Checkout\Name2|null $shopperName shopperName * * @return self */ @@ -2202,7 +2202,7 @@ public function setSplitCardFundingSources($splitCardFundingSources) /** * Gets splits * - * @return \Adyen\Model\Checkout\Split[]|null + * @return \Adyen\Model\Checkout\Split2[]|null */ public function getSplits() { @@ -2212,7 +2212,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). + * @param \Adyen\Model\Checkout\Split2[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreatePaymentLinkRequest.php b/src/Adyen/Model/Checkout/CreatePaymentLinkRequest.php index f4903be6b..40fc2b499 100644 --- a/src/Adyen/Model/Checkout/CreatePaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/CreatePaymentLinkRequest.php @@ -1138,7 +1138,7 @@ public function getRecurringProcessingModel() /** * Sets recurringProcessingModel * - * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when creating a token to store payment details. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. + * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. * * @return self */ @@ -1535,7 +1535,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). + * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ @@ -1589,7 +1589,7 @@ public function getStorePaymentMethodMode() /** * Sets storePaymentMethodMode * - * @param string|null $storePaymentMethodMode Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. + * @param string|null $storePaymentMethodMode Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. * * @return self */ diff --git a/src/Adyen/Model/Checkout/ForexQuote2.php b/src/Adyen/Model/Checkout/ForexQuote2.php new file mode 100644 index 000000000..006113807 --- /dev/null +++ b/src/Adyen/Model/Checkout/ForexQuote2.php @@ -0,0 +1,756 @@ + + */ +class ForexQuote2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ForexQuote-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'account' => 'string', + 'accountType' => 'string', + 'baseAmount' => '\Adyen\Model\Checkout\Amount2', + 'basePoints' => 'int', + 'buy' => '\Adyen\Model\Checkout\Amount2', + 'interbank' => '\Adyen\Model\Checkout\Amount2', + 'reference' => 'string', + 'sell' => '\Adyen\Model\Checkout\Amount2', + 'signature' => 'string', + 'source' => 'string', + 'type' => 'string', + 'validTill' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'account' => null, + 'accountType' => null, + 'baseAmount' => null, + 'basePoints' => 'int32', + 'buy' => null, + 'interbank' => null, + 'reference' => null, + 'sell' => null, + 'signature' => null, + 'source' => null, + 'type' => null, + 'validTill' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'account' => false, + 'accountType' => false, + 'baseAmount' => false, + 'basePoints' => true, + 'buy' => false, + 'interbank' => false, + 'reference' => false, + 'sell' => false, + 'signature' => false, + 'source' => false, + 'type' => false, + 'validTill' => 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 = [ + 'account' => 'account', + 'accountType' => 'accountType', + 'baseAmount' => 'baseAmount', + 'basePoints' => 'basePoints', + 'buy' => 'buy', + 'interbank' => 'interbank', + 'reference' => 'reference', + 'sell' => 'sell', + 'signature' => 'signature', + 'source' => 'source', + 'type' => 'type', + 'validTill' => 'validTill' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'account' => 'setAccount', + 'accountType' => 'setAccountType', + 'baseAmount' => 'setBaseAmount', + 'basePoints' => 'setBasePoints', + 'buy' => 'setBuy', + 'interbank' => 'setInterbank', + 'reference' => 'setReference', + 'sell' => 'setSell', + 'signature' => 'setSignature', + 'source' => 'setSource', + 'type' => 'setType', + 'validTill' => 'setValidTill' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'account' => 'getAccount', + 'accountType' => 'getAccountType', + 'baseAmount' => 'getBaseAmount', + 'basePoints' => 'getBasePoints', + 'buy' => 'getBuy', + 'interbank' => 'getInterbank', + 'reference' => 'getReference', + 'sell' => 'getSell', + 'signature' => 'getSignature', + 'source' => 'getSource', + 'type' => 'getType', + 'validTill' => 'getValidTill' + ]; + + /** + * 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('account', $data ?? [], null); + $this->setIfExists('accountType', $data ?? [], null); + $this->setIfExists('baseAmount', $data ?? [], null); + $this->setIfExists('basePoints', $data ?? [], null); + $this->setIfExists('buy', $data ?? [], null); + $this->setIfExists('interbank', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('sell', $data ?? [], null); + $this->setIfExists('signature', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('validTill', $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 account + * + * @return string|null + */ + public function getAccount() + { + return $this->container['account']; + } + + /** + * Sets account + * + * @param string|null $account The account name. + * + * @return self + */ + public function setAccount($account) + { + if (is_null($account)) { + throw new \InvalidArgumentException('non-nullable account cannot be null'); + } + $this->container['account'] = $account; + + return $this; + } + + /** + * Gets accountType + * + * @return string|null + */ + public function getAccountType() + { + return $this->container['accountType']; + } + + /** + * Sets accountType + * + * @param string|null $accountType The account type. + * + * @return self + */ + public function setAccountType($accountType) + { + if (is_null($accountType)) { + throw new \InvalidArgumentException('non-nullable accountType cannot be null'); + } + $this->container['accountType'] = $accountType; + + return $this; + } + + /** + * Gets baseAmount + * + * @return \Adyen\Model\Checkout\Amount2|null + */ + public function getBaseAmount() + { + return $this->container['baseAmount']; + } + + /** + * Sets baseAmount + * + * @param \Adyen\Model\Checkout\Amount2|null $baseAmount baseAmount + * + * @return self + */ + public function setBaseAmount($baseAmount) + { + if (is_null($baseAmount)) { + throw new \InvalidArgumentException('non-nullable baseAmount cannot be null'); + } + $this->container['baseAmount'] = $baseAmount; + + return $this; + } + + /** + * Gets basePoints + * + * @return int|null + */ + public function getBasePoints() + { + return $this->container['basePoints']; + } + + /** + * Sets basePoints + * + * @param int|null $basePoints The base points. + * + * @return self + */ + public function setBasePoints($basePoints) + { + // Do nothing for nullable integers + $this->container['basePoints'] = $basePoints; + + return $this; + } + + /** + * Gets buy + * + * @return \Adyen\Model\Checkout\Amount2|null + */ + public function getBuy() + { + return $this->container['buy']; + } + + /** + * Sets buy + * + * @param \Adyen\Model\Checkout\Amount2|null $buy buy + * + * @return self + */ + public function setBuy($buy) + { + if (is_null($buy)) { + throw new \InvalidArgumentException('non-nullable buy cannot be null'); + } + $this->container['buy'] = $buy; + + return $this; + } + + /** + * Gets interbank + * + * @return \Adyen\Model\Checkout\Amount2|null + */ + public function getInterbank() + { + return $this->container['interbank']; + } + + /** + * Sets interbank + * + * @param \Adyen\Model\Checkout\Amount2|null $interbank interbank + * + * @return self + */ + public function setInterbank($interbank) + { + if (is_null($interbank)) { + throw new \InvalidArgumentException('non-nullable interbank cannot be null'); + } + $this->container['interbank'] = $interbank; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The reference assigned to the forex quote request. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets sell + * + * @return \Adyen\Model\Checkout\Amount2|null + */ + public function getSell() + { + return $this->container['sell']; + } + + /** + * Sets sell + * + * @param \Adyen\Model\Checkout\Amount2|null $sell sell + * + * @return self + */ + public function setSell($sell) + { + if (is_null($sell)) { + throw new \InvalidArgumentException('non-nullable sell cannot be null'); + } + $this->container['sell'] = $sell; + + return $this; + } + + /** + * Gets signature + * + * @return string|null + */ + public function getSignature() + { + return $this->container['signature']; + } + + /** + * Sets signature + * + * @param string|null $signature The signature to validate the integrity. + * + * @return self + */ + public function setSignature($signature) + { + if (is_null($signature)) { + throw new \InvalidArgumentException('non-nullable signature cannot be null'); + } + $this->container['signature'] = $signature; + + return $this; + } + + /** + * Gets source + * + * @return string|null + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string|null $source The source of the forex quote. + * + * @return self + */ + public function setSource($source) + { + if (is_null($source)) { + throw new \InvalidArgumentException('non-nullable source cannot be null'); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of forex. + * + * @return self + */ + public function setType($type) + { + if (is_null($type)) { + throw new \InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets validTill + * + * @return \DateTime|null + */ + public function getValidTill() + { + return $this->container['validTill']; + } + + /** + * Sets validTill + * + * @param \DateTime|null $validTill The date until which the forex quote is valid. + * + * @return self + */ + public function setValidTill($validTill) + { + if (is_null($validTill)) { + throw new \InvalidArgumentException('non-nullable validTill cannot be null'); + } + $this->container['validTill'] = $validTill; + + 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/ShopperStatement.php b/src/Adyen/Model/Checkout/Installments2.php similarity index 75% rename from src/Adyen/Model/Management/ShopperStatement.php rename to src/Adyen/Model/Checkout/Installments2.php index f310117ff..d1805c715 100644 --- a/src/Adyen/Model/Management/ShopperStatement.php +++ b/src/Adyen/Model/Checkout/Installments2.php @@ -1,9 +1,9 @@ */ -class ShopperStatement implements ModelInterface, ArrayAccess, \JsonSerializable +class Installments2 implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class ShopperStatement implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'ShopperStatement'; + protected static $openAPIModelName = 'Installments-2'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,8 +44,8 @@ class ShopperStatement implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'doingBusinessAsName' => 'string', - 'type' => 'string' + 'plan' => 'string', + 'value' => 'int' ]; /** @@ -56,8 +56,8 @@ class ShopperStatement implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'doingBusinessAsName' => null, - 'type' => null + 'plan' => null, + 'value' => 'int32' ]; /** @@ -66,8 +66,8 @@ class ShopperStatement implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'doingBusinessAsName' => false, - 'type' => false + 'plan' => false, + 'value' => true ]; /** @@ -156,8 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'doingBusinessAsName' => 'doingBusinessAsName', - 'type' => 'type' + 'plan' => 'plan', + 'value' => 'value' ]; /** @@ -166,8 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'doingBusinessAsName' => 'setDoingBusinessAsName', - 'type' => 'setType' + 'plan' => 'setPlan', + 'value' => 'setValue' ]; /** @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'doingBusinessAsName' => 'getDoingBusinessAsName', - 'type' => 'getType' + 'plan' => 'getPlan', + 'value' => 'getValue' ]; /** @@ -221,21 +221,19 @@ public function getModelName() return self::$openAPIModelName; } - public const TYPE_APPEND = 'append'; - public const TYPE_DYNAMIC = 'dynamic'; - public const TYPE_FIXED = 'fixed'; + public const PLAN_REGULAR = 'regular'; + public const PLAN_REVOLVING = 'revolving'; /** * Gets allowable values of the enum * * @return string[] */ - public function getTypeAllowableValues() + public function getPlanAllowableValues() { return [ - self::TYPE_APPEND, - self::TYPE_DYNAMIC, - self::TYPE_FIXED, + self::PLAN_REGULAR, + self::PLAN_REVOLVING, ]; } /** @@ -253,8 +251,8 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('doingBusinessAsName', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dynamic'); + $this->setIfExists('plan', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -284,11 +282,11 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $allowedValues = $this->getPlanAllowableValues(); + if (!is_null($this->container['plan']) && !in_array($this->container['plan'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], + "invalid value '%s' for 'plan', must be one of '%s'", + $this->container['plan'], implode("', '", $allowedValues) ); } @@ -309,65 +307,63 @@ public function valid() /** - * Gets doingBusinessAsName + * Gets plan * * @return string|null */ - public function getDoingBusinessAsName() + public function getPlan() { - return $this->container['doingBusinessAsName']; + return $this->container['plan']; } /** - * Sets doingBusinessAsName + * Sets plan * - * @param string|null $doingBusinessAsName The name you want to be shown on the shopper's bank or credit card statement. Can't be all numbers. If a shopper statement is present, this field is required. + * @param string|null $plan The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** * * @return self */ - public function setDoingBusinessAsName($doingBusinessAsName) + public function setPlan($plan) { - if (is_null($doingBusinessAsName)) { - throw new \InvalidArgumentException('non-nullable doingBusinessAsName cannot be null'); + if (is_null($plan)) { + throw new \InvalidArgumentException('non-nullable plan cannot be null'); } - $this->container['doingBusinessAsName'] = $doingBusinessAsName; + $allowedValues = $this->getPlanAllowableValues(); + if (!in_array($plan, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'plan', must be one of '%s'", + $plan, + implode("', '", $allowedValues) + ) + ); + } + $this->container['plan'] = $plan; return $this; } /** - * Gets type + * Gets value * - * @return string|null + * @return int|null */ - public function getType() + public function getValue() { - return $this->container['type']; + return $this->container['value']; } /** - * Sets type + * Sets value * - * @param string|null $type The type of shopperstatement you want to use: fixed, append or dynamic + * @param int|null $value Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. * * @return self */ - public function setType($type) + public function setValue($value) { - 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; + // Do nothing for nullable integers + $this->container['value'] = $value; return $this; } diff --git a/src/Adyen/Model/Checkout/Mandate.php b/src/Adyen/Model/Checkout/Mandate.php index e377c35ca..8110bef58 100644 --- a/src/Adyen/Model/Checkout/Mandate.php +++ b/src/Adyen/Model/Checkout/Mandate.php @@ -366,9 +366,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['amount'] === null) { - $invalidProperties[] = "'amount' can't be null"; - } $allowedValues = $this->getAmountRuleAllowableValues(); if (!is_null($this->container['amountRule']) && !in_array($this->container['amountRule'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -387,12 +384,6 @@ public function listInvalidProperties() ); } - if ($this->container['endsAt'] === null) { - $invalidProperties[] = "'endsAt' can't be null"; - } - if ($this->container['frequency'] === null) { - $invalidProperties[] = "'frequency' can't be null"; - } $allowedValues = $this->getFrequencyAllowableValues(); if (!is_null($this->container['frequency']) && !in_array($this->container['frequency'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -420,7 +411,7 @@ public function valid() /** * Gets amount * - * @return string + * @return string|null */ public function getAmount() { @@ -430,7 +421,7 @@ public function getAmount() /** * Sets amount * - * @param string $amount The billing amount (in minor units) of the recurring transactions. + * @param string|null $amount The billing amount (in minor units) of the recurring transactions. * * @return self */ @@ -548,7 +539,7 @@ public function setBillingDay($billingDay) /** * Gets endsAt * - * @return string + * @return string|null */ public function getEndsAt() { @@ -558,7 +549,7 @@ public function getEndsAt() /** * Sets endsAt * - * @param string $endsAt End date of the billing plan, in YYYY-MM-DD format. + * @param string|null $endsAt End date of the billing plan, in YYYY-MM-DD format. * * @return self */ @@ -575,7 +566,7 @@ public function setEndsAt($endsAt) /** * Gets frequency * - * @return string + * @return string|null */ public function getFrequency() { @@ -585,7 +576,7 @@ public function getFrequency() /** * Sets frequency * - * @param string $frequency The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. + * @param string|null $frequency The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. * * @return self */ diff --git a/src/Adyen/Model/Checkout/Mandate2.php b/src/Adyen/Model/Checkout/Mandate2.php new file mode 100644 index 000000000..e9a299c39 --- /dev/null +++ b/src/Adyen/Model/Checkout/Mandate2.php @@ -0,0 +1,744 @@ + + */ +class Mandate2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Mandate-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'amount' => 'string', + 'amountRule' => 'string', + 'billingAttemptsRule' => 'string', + 'billingDay' => 'string', + 'endsAt' => 'string', + 'frequency' => 'string', + 'remarks' => 'string', + 'startsAt' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'amount' => null, + 'amountRule' => null, + 'billingAttemptsRule' => null, + 'billingDay' => null, + 'endsAt' => null, + 'frequency' => null, + 'remarks' => null, + 'startsAt' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'amount' => false, + 'amountRule' => false, + 'billingAttemptsRule' => false, + 'billingDay' => false, + 'endsAt' => false, + 'frequency' => false, + 'remarks' => false, + 'startsAt' => 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 = [ + 'amount' => 'amount', + 'amountRule' => 'amountRule', + 'billingAttemptsRule' => 'billingAttemptsRule', + 'billingDay' => 'billingDay', + 'endsAt' => 'endsAt', + 'frequency' => 'frequency', + 'remarks' => 'remarks', + 'startsAt' => 'startsAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'amountRule' => 'setAmountRule', + 'billingAttemptsRule' => 'setBillingAttemptsRule', + 'billingDay' => 'setBillingDay', + 'endsAt' => 'setEndsAt', + 'frequency' => 'setFrequency', + 'remarks' => 'setRemarks', + 'startsAt' => 'setStartsAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'amountRule' => 'getAmountRule', + 'billingAttemptsRule' => 'getBillingAttemptsRule', + 'billingDay' => 'getBillingDay', + 'endsAt' => 'getEndsAt', + 'frequency' => 'getFrequency', + 'remarks' => 'getRemarks', + 'startsAt' => 'getStartsAt' + ]; + + /** + * 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 AMOUNT_RULE_MAX = 'max'; + public const AMOUNT_RULE_EXACT = 'exact'; + public const BILLING_ATTEMPTS_RULE_ON = 'on'; + public const BILLING_ATTEMPTS_RULE_BEFORE = 'before'; + public const BILLING_ATTEMPTS_RULE_AFTER = 'after'; + public const FREQUENCY_ADHOC = 'adhoc'; + public const FREQUENCY_DAILY = 'daily'; + public const FREQUENCY_WEEKLY = 'weekly'; + public const FREQUENCY_BI_WEEKLY = 'biWeekly'; + public const FREQUENCY_MONTHLY = 'monthly'; + public const FREQUENCY_QUARTERLY = 'quarterly'; + public const FREQUENCY_HALF_YEARLY = 'halfYearly'; + public const FREQUENCY_YEARLY = 'yearly'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAmountRuleAllowableValues() + { + return [ + self::AMOUNT_RULE_MAX, + self::AMOUNT_RULE_EXACT, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getBillingAttemptsRuleAllowableValues() + { + return [ + self::BILLING_ATTEMPTS_RULE_ON, + self::BILLING_ATTEMPTS_RULE_BEFORE, + self::BILLING_ATTEMPTS_RULE_AFTER, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getFrequencyAllowableValues() + { + return [ + self::FREQUENCY_ADHOC, + self::FREQUENCY_DAILY, + self::FREQUENCY_WEEKLY, + self::FREQUENCY_BI_WEEKLY, + self::FREQUENCY_MONTHLY, + self::FREQUENCY_QUARTERLY, + self::FREQUENCY_HALF_YEARLY, + self::FREQUENCY_YEARLY, + ]; + } + /** + * 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('amount', $data ?? [], null); + $this->setIfExists('amountRule', $data ?? [], null); + $this->setIfExists('billingAttemptsRule', $data ?? [], null); + $this->setIfExists('billingDay', $data ?? [], null); + $this->setIfExists('endsAt', $data ?? [], null); + $this->setIfExists('frequency', $data ?? [], null); + $this->setIfExists('remarks', $data ?? [], null); + $this->setIfExists('startsAt', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + $allowedValues = $this->getAmountRuleAllowableValues(); + if (!is_null($this->container['amountRule']) && !in_array($this->container['amountRule'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'amountRule', must be one of '%s'", + $this->container['amountRule'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getBillingAttemptsRuleAllowableValues(); + if (!is_null($this->container['billingAttemptsRule']) && !in_array($this->container['billingAttemptsRule'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'billingAttemptsRule', must be one of '%s'", + $this->container['billingAttemptsRule'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['endsAt'] === null) { + $invalidProperties[] = "'endsAt' can't be null"; + } + if ($this->container['frequency'] === null) { + $invalidProperties[] = "'frequency' can't be null"; + } + $allowedValues = $this->getFrequencyAllowableValues(); + if (!is_null($this->container['frequency']) && !in_array($this->container['frequency'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'frequency', must be one of '%s'", + $this->container['frequency'], + 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 amount + * + * @return string + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param string $amount The billing amount (in minor units) of the recurring transactions. + * + * @return self + */ + public function setAmount($amount) + { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets amountRule + * + * @return string|null + */ + public function getAmountRule() + { + return $this->container['amountRule']; + } + + /** + * Sets amountRule + * + * @param string|null $amountRule The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`. + * + * @return self + */ + public function setAmountRule($amountRule) + { + if (is_null($amountRule)) { + throw new \InvalidArgumentException('non-nullable amountRule cannot be null'); + } + $allowedValues = $this->getAmountRuleAllowableValues(); + if (!in_array($amountRule, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'amountRule', must be one of '%s'", + $amountRule, + implode("', '", $allowedValues) + ) + ); + } + $this->container['amountRule'] = $amountRule; + + return $this; + } + + /** + * Gets billingAttemptsRule + * + * @return string|null + */ + public function getBillingAttemptsRule() + { + return $this->container['billingAttemptsRule']; + } + + /** + * Sets billingAttemptsRule + * + * @param string|null $billingAttemptsRule The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date. + * + * @return self + */ + public function setBillingAttemptsRule($billingAttemptsRule) + { + if (is_null($billingAttemptsRule)) { + throw new \InvalidArgumentException('non-nullable billingAttemptsRule cannot be null'); + } + $allowedValues = $this->getBillingAttemptsRuleAllowableValues(); + if (!in_array($billingAttemptsRule, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'billingAttemptsRule', must be one of '%s'", + $billingAttemptsRule, + implode("', '", $allowedValues) + ) + ); + } + $this->container['billingAttemptsRule'] = $billingAttemptsRule; + + return $this; + } + + /** + * Gets billingDay + * + * @return string|null + */ + public function getBillingDay() + { + return $this->container['billingDay']; + } + + /** + * Sets billingDay + * + * @param string|null $billingDay The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`. + * + * @return self + */ + public function setBillingDay($billingDay) + { + if (is_null($billingDay)) { + throw new \InvalidArgumentException('non-nullable billingDay cannot be null'); + } + $this->container['billingDay'] = $billingDay; + + return $this; + } + + /** + * Gets endsAt + * + * @return string + */ + public function getEndsAt() + { + return $this->container['endsAt']; + } + + /** + * Sets endsAt + * + * @param string $endsAt End date of the billing plan, in YYYY-MM-DD format. + * + * @return self + */ + public function setEndsAt($endsAt) + { + if (is_null($endsAt)) { + throw new \InvalidArgumentException('non-nullable endsAt cannot be null'); + } + $this->container['endsAt'] = $endsAt; + + return $this; + } + + /** + * Gets frequency + * + * @return string + */ + public function getFrequency() + { + return $this->container['frequency']; + } + + /** + * Sets frequency + * + * @param string $frequency The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. + * + * @return self + */ + public function setFrequency($frequency) + { + if (is_null($frequency)) { + throw new \InvalidArgumentException('non-nullable frequency cannot be null'); + } + $allowedValues = $this->getFrequencyAllowableValues(); + if (!in_array($frequency, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'frequency', must be one of '%s'", + $frequency, + implode("', '", $allowedValues) + ) + ); + } + $this->container['frequency'] = $frequency; + + return $this; + } + + /** + * Gets remarks + * + * @return string|null + */ + public function getRemarks() + { + return $this->container['remarks']; + } + + /** + * Sets remarks + * + * @param string|null $remarks The message shown by UPI to the shopper on the approval screen. + * + * @return self + */ + public function setRemarks($remarks) + { + if (is_null($remarks)) { + throw new \InvalidArgumentException('non-nullable remarks cannot be null'); + } + $this->container['remarks'] = $remarks; + + return $this; + } + + /** + * Gets startsAt + * + * @return string|null + */ + public function getStartsAt() + { + return $this->container['startsAt']; + } + + /** + * Sets startsAt + * + * @param string|null $startsAt Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date. + * + * @return self + */ + public function setStartsAt($startsAt) + { + if (is_null($startsAt)) { + throw new \InvalidArgumentException('non-nullable startsAt cannot be null'); + } + $this->container['startsAt'] = $startsAt; + + 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/MerchantRiskIndicator2.php b/src/Adyen/Model/Checkout/MerchantRiskIndicator2.php new file mode 100644 index 000000000..9001d40b3 --- /dev/null +++ b/src/Adyen/Model/Checkout/MerchantRiskIndicator2.php @@ -0,0 +1,906 @@ + + */ +class MerchantRiskIndicator2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MerchantRiskIndicator-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'addressMatch' => 'bool', + 'deliveryAddressIndicator' => 'string', + 'deliveryEmail' => 'string', + 'deliveryEmailAddress' => 'string', + 'deliveryTimeframe' => 'string', + 'giftCardAmount' => '\Adyen\Model\Checkout\Amount', + 'giftCardCount' => 'int', + 'giftCardCurr' => 'string', + 'preOrderDate' => '\DateTime', + 'preOrderPurchase' => 'bool', + 'preOrderPurchaseInd' => 'string', + 'reorderItems' => 'bool', + 'reorderItemsInd' => 'string', + 'shipIndicator' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'addressMatch' => null, + 'deliveryAddressIndicator' => null, + 'deliveryEmail' => null, + 'deliveryEmailAddress' => null, + 'deliveryTimeframe' => null, + 'giftCardAmount' => null, + 'giftCardCount' => 'int32', + 'giftCardCurr' => null, + 'preOrderDate' => 'date-time', + 'preOrderPurchase' => null, + 'preOrderPurchaseInd' => null, + 'reorderItems' => null, + 'reorderItemsInd' => null, + 'shipIndicator' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'addressMatch' => false, + 'deliveryAddressIndicator' => false, + 'deliveryEmail' => false, + 'deliveryEmailAddress' => false, + 'deliveryTimeframe' => false, + 'giftCardAmount' => false, + 'giftCardCount' => true, + 'giftCardCurr' => false, + 'preOrderDate' => false, + 'preOrderPurchase' => false, + 'preOrderPurchaseInd' => false, + 'reorderItems' => false, + 'reorderItemsInd' => false, + 'shipIndicator' => 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 = [ + 'addressMatch' => 'addressMatch', + 'deliveryAddressIndicator' => 'deliveryAddressIndicator', + 'deliveryEmail' => 'deliveryEmail', + 'deliveryEmailAddress' => 'deliveryEmailAddress', + 'deliveryTimeframe' => 'deliveryTimeframe', + 'giftCardAmount' => 'giftCardAmount', + 'giftCardCount' => 'giftCardCount', + 'giftCardCurr' => 'giftCardCurr', + 'preOrderDate' => 'preOrderDate', + 'preOrderPurchase' => 'preOrderPurchase', + 'preOrderPurchaseInd' => 'preOrderPurchaseInd', + 'reorderItems' => 'reorderItems', + 'reorderItemsInd' => 'reorderItemsInd', + 'shipIndicator' => 'shipIndicator' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'addressMatch' => 'setAddressMatch', + 'deliveryAddressIndicator' => 'setDeliveryAddressIndicator', + 'deliveryEmail' => 'setDeliveryEmail', + 'deliveryEmailAddress' => 'setDeliveryEmailAddress', + 'deliveryTimeframe' => 'setDeliveryTimeframe', + 'giftCardAmount' => 'setGiftCardAmount', + 'giftCardCount' => 'setGiftCardCount', + 'giftCardCurr' => 'setGiftCardCurr', + 'preOrderDate' => 'setPreOrderDate', + 'preOrderPurchase' => 'setPreOrderPurchase', + 'preOrderPurchaseInd' => 'setPreOrderPurchaseInd', + 'reorderItems' => 'setReorderItems', + 'reorderItemsInd' => 'setReorderItemsInd', + 'shipIndicator' => 'setShipIndicator' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'addressMatch' => 'getAddressMatch', + 'deliveryAddressIndicator' => 'getDeliveryAddressIndicator', + 'deliveryEmail' => 'getDeliveryEmail', + 'deliveryEmailAddress' => 'getDeliveryEmailAddress', + 'deliveryTimeframe' => 'getDeliveryTimeframe', + 'giftCardAmount' => 'getGiftCardAmount', + 'giftCardCount' => 'getGiftCardCount', + 'giftCardCurr' => 'getGiftCardCurr', + 'preOrderDate' => 'getPreOrderDate', + 'preOrderPurchase' => 'getPreOrderPurchase', + 'preOrderPurchaseInd' => 'getPreOrderPurchaseInd', + 'reorderItems' => 'getReorderItems', + 'reorderItemsInd' => 'getReorderItemsInd', + 'shipIndicator' => 'getShipIndicator' + ]; + + /** + * 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 DELIVERY_ADDRESS_INDICATOR_SHIP_TO_BILLING_ADDRESS = 'shipToBillingAddress'; + public const DELIVERY_ADDRESS_INDICATOR_SHIP_TO_VERIFIED_ADDRESS = 'shipToVerifiedAddress'; + public const DELIVERY_ADDRESS_INDICATOR_SHIP_TO_NEW_ADDRESS = 'shipToNewAddress'; + public const DELIVERY_ADDRESS_INDICATOR_SHIP_TO_STORE = 'shipToStore'; + public const DELIVERY_ADDRESS_INDICATOR_DIGITAL_GOODS = 'digitalGoods'; + public const DELIVERY_ADDRESS_INDICATOR_GOODS_NOT_SHIPPED = 'goodsNotShipped'; + public const DELIVERY_ADDRESS_INDICATOR_OTHER = 'other'; + public const DELIVERY_TIMEFRAME_ELECTRONIC_DELIVERY = 'electronicDelivery'; + public const DELIVERY_TIMEFRAME_SAME_DAY_SHIPPING = 'sameDayShipping'; + public const DELIVERY_TIMEFRAME_OVERNIGHT_SHIPPING = 'overnightShipping'; + public const DELIVERY_TIMEFRAME_TWO_OR_MORE_DAYS_SHIPPING = 'twoOrMoreDaysShipping'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDeliveryAddressIndicatorAllowableValues() + { + return [ + self::DELIVERY_ADDRESS_INDICATOR_SHIP_TO_BILLING_ADDRESS, + self::DELIVERY_ADDRESS_INDICATOR_SHIP_TO_VERIFIED_ADDRESS, + self::DELIVERY_ADDRESS_INDICATOR_SHIP_TO_NEW_ADDRESS, + self::DELIVERY_ADDRESS_INDICATOR_SHIP_TO_STORE, + self::DELIVERY_ADDRESS_INDICATOR_DIGITAL_GOODS, + self::DELIVERY_ADDRESS_INDICATOR_GOODS_NOT_SHIPPED, + self::DELIVERY_ADDRESS_INDICATOR_OTHER, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getDeliveryTimeframeAllowableValues() + { + return [ + self::DELIVERY_TIMEFRAME_ELECTRONIC_DELIVERY, + self::DELIVERY_TIMEFRAME_SAME_DAY_SHIPPING, + self::DELIVERY_TIMEFRAME_OVERNIGHT_SHIPPING, + self::DELIVERY_TIMEFRAME_TWO_OR_MORE_DAYS_SHIPPING, + ]; + } + /** + * 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('addressMatch', $data ?? [], null); + $this->setIfExists('deliveryAddressIndicator', $data ?? [], null); + $this->setIfExists('deliveryEmail', $data ?? [], null); + $this->setIfExists('deliveryEmailAddress', $data ?? [], null); + $this->setIfExists('deliveryTimeframe', $data ?? [], null); + $this->setIfExists('giftCardAmount', $data ?? [], null); + $this->setIfExists('giftCardCount', $data ?? [], null); + $this->setIfExists('giftCardCurr', $data ?? [], null); + $this->setIfExists('preOrderDate', $data ?? [], null); + $this->setIfExists('preOrderPurchase', $data ?? [], null); + $this->setIfExists('preOrderPurchaseInd', $data ?? [], null); + $this->setIfExists('reorderItems', $data ?? [], null); + $this->setIfExists('reorderItemsInd', $data ?? [], null); + $this->setIfExists('shipIndicator', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getDeliveryAddressIndicatorAllowableValues(); + if (!is_null($this->container['deliveryAddressIndicator']) && !in_array($this->container['deliveryAddressIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'deliveryAddressIndicator', must be one of '%s'", + $this->container['deliveryAddressIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getDeliveryTimeframeAllowableValues(); + if (!is_null($this->container['deliveryTimeframe']) && !in_array($this->container['deliveryTimeframe'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'deliveryTimeframe', must be one of '%s'", + $this->container['deliveryTimeframe'], + 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 addressMatch + * + * @return bool|null + */ + public function getAddressMatch() + { + return $this->container['addressMatch']; + } + + /** + * Sets addressMatch + * + * @param bool|null $addressMatch Whether the chosen delivery address is identical to the billing address. + * + * @return self + */ + public function setAddressMatch($addressMatch) + { + if (is_null($addressMatch)) { + throw new \InvalidArgumentException('non-nullable addressMatch cannot be null'); + } + $this->container['addressMatch'] = $addressMatch; + + return $this; + } + + /** + * Gets deliveryAddressIndicator + * + * @return string|null + */ + public function getDeliveryAddressIndicator() + { + return $this->container['deliveryAddressIndicator']; + } + + /** + * Sets deliveryAddressIndicator + * + * @param string|null $deliveryAddressIndicator Indicator regarding the delivery address. Allowed values: * `shipToBillingAddress` * `shipToVerifiedAddress` * `shipToNewAddress` * `shipToStore` * `digitalGoods` * `goodsNotShipped` * `other` + * + * @return self + */ + public function setDeliveryAddressIndicator($deliveryAddressIndicator) + { + if (is_null($deliveryAddressIndicator)) { + throw new \InvalidArgumentException('non-nullable deliveryAddressIndicator cannot be null'); + } + $allowedValues = $this->getDeliveryAddressIndicatorAllowableValues(); + if (!in_array($deliveryAddressIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'deliveryAddressIndicator', must be one of '%s'", + $deliveryAddressIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['deliveryAddressIndicator'] = $deliveryAddressIndicator; + + return $this; + } + + /** + * Gets deliveryEmail + * + * @return string|null + * @deprecated + */ + public function getDeliveryEmail() + { + return $this->container['deliveryEmail']; + } + + /** + * Sets deliveryEmail + * + * @param string|null $deliveryEmail The delivery email address (for digital goods). + * + * @return self + * @deprecated + */ + public function setDeliveryEmail($deliveryEmail) + { + if (is_null($deliveryEmail)) { + throw new \InvalidArgumentException('non-nullable deliveryEmail cannot be null'); + } + $this->container['deliveryEmail'] = $deliveryEmail; + + return $this; + } + + /** + * Gets deliveryEmailAddress + * + * @return string|null + */ + public function getDeliveryEmailAddress() + { + return $this->container['deliveryEmailAddress']; + } + + /** + * Sets deliveryEmailAddress + * + * @param string|null $deliveryEmailAddress For Electronic delivery, the email address to which the merchandise was delivered. Maximum length: 254 characters. + * + * @return self + */ + public function setDeliveryEmailAddress($deliveryEmailAddress) + { + if (is_null($deliveryEmailAddress)) { + throw new \InvalidArgumentException('non-nullable deliveryEmailAddress cannot be null'); + } + $this->container['deliveryEmailAddress'] = $deliveryEmailAddress; + + return $this; + } + + /** + * Gets deliveryTimeframe + * + * @return string|null + */ + public function getDeliveryTimeframe() + { + return $this->container['deliveryTimeframe']; + } + + /** + * Sets deliveryTimeframe + * + * @param string|null $deliveryTimeframe The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping` + * + * @return self + */ + public function setDeliveryTimeframe($deliveryTimeframe) + { + if (is_null($deliveryTimeframe)) { + throw new \InvalidArgumentException('non-nullable deliveryTimeframe cannot be null'); + } + $allowedValues = $this->getDeliveryTimeframeAllowableValues(); + if (!in_array($deliveryTimeframe, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'deliveryTimeframe', must be one of '%s'", + $deliveryTimeframe, + implode("', '", $allowedValues) + ) + ); + } + $this->container['deliveryTimeframe'] = $deliveryTimeframe; + + return $this; + } + + /** + * Gets giftCardAmount + * + * @return \Adyen\Model\Checkout\Amount|null + */ + public function getGiftCardAmount() + { + return $this->container['giftCardAmount']; + } + + /** + * Sets giftCardAmount + * + * @param \Adyen\Model\Checkout\Amount|null $giftCardAmount giftCardAmount + * + * @return self + */ + public function setGiftCardAmount($giftCardAmount) + { + if (is_null($giftCardAmount)) { + throw new \InvalidArgumentException('non-nullable giftCardAmount cannot be null'); + } + $this->container['giftCardAmount'] = $giftCardAmount; + + return $this; + } + + /** + * Gets giftCardCount + * + * @return int|null + */ + public function getGiftCardCount() + { + return $this->container['giftCardCount']; + } + + /** + * Sets giftCardCount + * + * @param int|null $giftCardCount For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. + * + * @return self + */ + public function setGiftCardCount($giftCardCount) + { + // Do nothing for nullable integers + $this->container['giftCardCount'] = $giftCardCount; + + return $this; + } + + /** + * Gets giftCardCurr + * + * @return string|null + */ + public function getGiftCardCurr() + { + return $this->container['giftCardCurr']; + } + + /** + * Sets giftCardCurr + * + * @param string|null $giftCardCurr For prepaid or gift card purchase, [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) three-digit currency code of the gift card, other than those listed in Table A.5 of the EMVCo 3D Secure Protocol and Core Functions Specification. + * + * @return self + */ + public function setGiftCardCurr($giftCardCurr) + { + if (is_null($giftCardCurr)) { + throw new \InvalidArgumentException('non-nullable giftCardCurr cannot be null'); + } + $this->container['giftCardCurr'] = $giftCardCurr; + + return $this; + } + + /** + * Gets preOrderDate + * + * @return \DateTime|null + */ + public function getPreOrderDate() + { + return $this->container['preOrderDate']; + } + + /** + * Sets preOrderDate + * + * @param \DateTime|null $preOrderDate For pre-order purchases, the expected date this product will be available to the shopper. + * + * @return self + */ + public function setPreOrderDate($preOrderDate) + { + if (is_null($preOrderDate)) { + throw new \InvalidArgumentException('non-nullable preOrderDate cannot be null'); + } + $this->container['preOrderDate'] = $preOrderDate; + + return $this; + } + + /** + * Gets preOrderPurchase + * + * @return bool|null + */ + public function getPreOrderPurchase() + { + return $this->container['preOrderPurchase']; + } + + /** + * Sets preOrderPurchase + * + * @param bool|null $preOrderPurchase Indicator for whether this transaction is for pre-ordering a product. + * + * @return self + */ + public function setPreOrderPurchase($preOrderPurchase) + { + if (is_null($preOrderPurchase)) { + throw new \InvalidArgumentException('non-nullable preOrderPurchase cannot be null'); + } + $this->container['preOrderPurchase'] = $preOrderPurchase; + + return $this; + } + + /** + * Gets preOrderPurchaseInd + * + * @return string|null + */ + public function getPreOrderPurchaseInd() + { + return $this->container['preOrderPurchaseInd']; + } + + /** + * Sets preOrderPurchaseInd + * + * @param string|null $preOrderPurchaseInd Indicates whether Cardholder is placing an order for merchandise with a future availability or release date. + * + * @return self + */ + public function setPreOrderPurchaseInd($preOrderPurchaseInd) + { + if (is_null($preOrderPurchaseInd)) { + throw new \InvalidArgumentException('non-nullable preOrderPurchaseInd cannot be null'); + } + $this->container['preOrderPurchaseInd'] = $preOrderPurchaseInd; + + return $this; + } + + /** + * Gets reorderItems + * + * @return bool|null + */ + public function getReorderItems() + { + return $this->container['reorderItems']; + } + + /** + * Sets reorderItems + * + * @param bool|null $reorderItems Indicator for whether the shopper has already purchased the same items in the past. + * + * @return self + */ + public function setReorderItems($reorderItems) + { + if (is_null($reorderItems)) { + throw new \InvalidArgumentException('non-nullable reorderItems cannot be null'); + } + $this->container['reorderItems'] = $reorderItems; + + return $this; + } + + /** + * Gets reorderItemsInd + * + * @return string|null + */ + public function getReorderItemsInd() + { + return $this->container['reorderItemsInd']; + } + + /** + * Sets reorderItemsInd + * + * @param string|null $reorderItemsInd Indicates whether the cardholder is reordering previously purchased merchandise. + * + * @return self + */ + public function setReorderItemsInd($reorderItemsInd) + { + if (is_null($reorderItemsInd)) { + throw new \InvalidArgumentException('non-nullable reorderItemsInd cannot be null'); + } + $this->container['reorderItemsInd'] = $reorderItemsInd; + + return $this; + } + + /** + * Gets shipIndicator + * + * @return string|null + */ + public function getShipIndicator() + { + return $this->container['shipIndicator']; + } + + /** + * Sets shipIndicator + * + * @param string|null $shipIndicator Indicates shipping method chosen for the transaction. + * + * @return self + */ + public function setShipIndicator($shipIndicator) + { + if (is_null($shipIndicator)) { + throw new \InvalidArgumentException('non-nullable shipIndicator cannot be null'); + } + $this->container['shipIndicator'] = $shipIndicator; + + 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/Name2.php b/src/Adyen/Model/Checkout/Name2.php new file mode 100644 index 000000000..881d86c98 --- /dev/null +++ b/src/Adyen/Model/Checkout/Name2.php @@ -0,0 +1,418 @@ + + */ +class Name2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Name-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'firstName' => 'string', + 'lastName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'firstName' => null, + 'lastName' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'firstName' => false, + 'lastName' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'firstName' => 'firstName', + 'lastName' => 'lastName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'firstName' => 'setFirstName', + 'lastName' => 'setLastName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'firstName' => 'getFirstName', + 'lastName' => 'getLastName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('firstName', $data ?? [], null); + $this->setIfExists('lastName', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets firstName + * + * @return string|null + */ + public function getFirstName() + { + return $this->container['firstName']; + } + + /** + * Sets firstName + * + * @param string|null $firstName The first name. + * + * @return self + */ + public function setFirstName($firstName) + { + if (is_null($firstName)) { + throw new \InvalidArgumentException('non-nullable firstName cannot be null'); + } + $this->container['firstName'] = $firstName; + + return $this; + } + + /** + * Gets lastName + * + * @return string|null + */ + public function getLastName() + { + return $this->container['lastName']; + } + + /** + * Sets lastName + * + * @param string|null $lastName The last name. + * + * @return self + */ + public function setLastName($lastName) + { + if (is_null($lastName)) { + throw new \InvalidArgumentException('non-nullable lastName cannot be null'); + } + $this->container['lastName'] = $lastName; + + return $this; + } + /** + * 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/PayPalDetails.php b/src/Adyen/Model/Checkout/PayPalDetails.php index 62ef54b82..80fc9504c 100644 --- a/src/Adyen/Model/Checkout/PayPalDetails.php +++ b/src/Adyen/Model/Checkout/PayPalDetails.php @@ -46,7 +46,9 @@ class PayPalDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'checkoutAttemptId' => 'string', 'orderID' => 'string', + 'payeePreferred' => 'string', 'payerID' => 'string', + 'payerSelected' => 'string', 'recurringDetailReference' => 'string', 'storedPaymentMethodId' => 'string', 'subtype' => 'string', @@ -63,7 +65,9 @@ class PayPalDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'checkoutAttemptId' => null, 'orderID' => null, + 'payeePreferred' => null, 'payerID' => null, + 'payerSelected' => null, 'recurringDetailReference' => null, 'storedPaymentMethodId' => null, 'subtype' => null, @@ -78,7 +82,9 @@ class PayPalDetails implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'checkoutAttemptId' => false, 'orderID' => false, + 'payeePreferred' => false, 'payerID' => false, + 'payerSelected' => false, 'recurringDetailReference' => false, 'storedPaymentMethodId' => false, 'subtype' => false, @@ -173,7 +179,9 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'checkoutAttemptId' => 'checkoutAttemptId', 'orderID' => 'orderID', + 'payeePreferred' => 'payeePreferred', 'payerID' => 'payerID', + 'payerSelected' => 'payerSelected', 'recurringDetailReference' => 'recurringDetailReference', 'storedPaymentMethodId' => 'storedPaymentMethodId', 'subtype' => 'subtype', @@ -188,7 +196,9 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'checkoutAttemptId' => 'setCheckoutAttemptId', 'orderID' => 'setOrderID', + 'payeePreferred' => 'setPayeePreferred', 'payerID' => 'setPayerID', + 'payerSelected' => 'setPayerSelected', 'recurringDetailReference' => 'setRecurringDetailReference', 'storedPaymentMethodId' => 'setStoredPaymentMethodId', 'subtype' => 'setSubtype', @@ -203,7 +213,9 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'checkoutAttemptId' => 'getCheckoutAttemptId', 'orderID' => 'getOrderID', + 'payeePreferred' => 'getPayeePreferred', 'payerID' => 'getPayerID', + 'payerSelected' => 'getPayerSelected', 'recurringDetailReference' => 'getRecurringDetailReference', 'storedPaymentMethodId' => 'getStoredPaymentMethodId', 'subtype' => 'getSubtype', @@ -295,7 +307,9 @@ public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('orderID', $data ?? [], null); + $this->setIfExists('payeePreferred', $data ?? [], null); $this->setIfExists('payerID', $data ?? [], null); + $this->setIfExists('payerSelected', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); @@ -419,6 +433,33 @@ public function setOrderID($orderID) return $this; } + /** + * Gets payeePreferred + * + * @return string|null + */ + public function getPayeePreferred() + { + return $this->container['payeePreferred']; + } + + /** + * Sets payeePreferred + * + * @param string|null $payeePreferred IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED + * + * @return self + */ + public function setPayeePreferred($payeePreferred) + { + if (is_null($payeePreferred)) { + throw new \InvalidArgumentException('non-nullable payeePreferred cannot be null'); + } + $this->container['payeePreferred'] = $payeePreferred; + + return $this; + } + /** * Gets payerID * @@ -446,6 +487,33 @@ public function setPayerID($payerID) return $this; } + /** + * Gets payerSelected + * + * @return string|null + */ + public function getPayerSelected() + { + return $this->container['payerSelected']; + } + + /** + * Sets payerSelected + * + * @param string|null $payerSelected PAYPAL or PAYPAL_CREDIT + * + * @return self + */ + public function setPayerSelected($payerSelected) + { + if (is_null($payerSelected)) { + throw new \InvalidArgumentException('non-nullable payerSelected cannot be null'); + } + $this->container['payerSelected'] = $payerSelected; + + return $this; + } + /** * Gets recurringDetailReference * diff --git a/src/Adyen/Model/Checkout/PaymentDetails.php b/src/Adyen/Model/Checkout/PaymentDetails.php index 8e421b5fb..cb3a138fd 100644 --- a/src/Adyen/Model/Checkout/PaymentDetails.php +++ b/src/Adyen/Model/Checkout/PaymentDetails.php @@ -256,10 +256,9 @@ public function getModelName() public const TYPE_MOLPAY_EBANKING_MY = 'molpay_ebanking_MY'; public const TYPE_MOLPAY_EBANKING_DIRECT_MY = 'molpay_ebanking_direct_MY'; public const TYPE_SWISH = 'swish'; + public const TYPE_PIX = 'pix'; public const TYPE_WALLEY = 'walley'; public const TYPE_WALLEY_B2B = 'walley_b2b'; - public const TYPE_PIX = 'pix'; - public const TYPE_BIZUM = 'bizum'; public const TYPE_ALMA = 'alma'; public const TYPE_MOLPAY_FPX = 'molpay_fpx'; public const TYPE_KONBINI = 'konbini'; @@ -305,6 +304,7 @@ public function getModelName() public const TYPE_MAYBANK2U_MAE = 'maybank2u_mae'; public const TYPE_DUITNOW = 'duitnow'; public const TYPE_PROMPTPAY = 'promptpay'; + public const TYPE_TWINT_POS = 'twint_pos'; public const TYPE_ALIPAY_HK = 'alipay_hk'; public const TYPE_ALIPAY_HK_WEB = 'alipay_hk_web'; public const TYPE_ALIPAY_HK_WAP = 'alipay_hk_wap'; @@ -354,10 +354,9 @@ public function getTypeAllowableValues() self::TYPE_MOLPAY_EBANKING_MY, self::TYPE_MOLPAY_EBANKING_DIRECT_MY, self::TYPE_SWISH, + self::TYPE_PIX, self::TYPE_WALLEY, self::TYPE_WALLEY_B2B, - self::TYPE_PIX, - self::TYPE_BIZUM, self::TYPE_ALMA, self::TYPE_MOLPAY_FPX, self::TYPE_KONBINI, @@ -403,6 +402,7 @@ public function getTypeAllowableValues() self::TYPE_MAYBANK2U_MAE, self::TYPE_DUITNOW, self::TYPE_PROMPTPAY, + self::TYPE_TWINT_POS, self::TYPE_ALIPAY_HK, self::TYPE_ALIPAY_HK_WEB, self::TYPE_ALIPAY_HK_WAP, diff --git a/src/Adyen/Model/Checkout/PaymentLinkResponse.php b/src/Adyen/Model/Checkout/PaymentLinkResponse.php index fab47d450..93c3aee3d 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkResponse.php +++ b/src/Adyen/Model/Checkout/PaymentLinkResponse.php @@ -1231,7 +1231,7 @@ public function getRecurringProcessingModel() /** * Sets recurringProcessingModel * - * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when creating a token to store payment details. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. + * @param string|null $recurringProcessingModel Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. * * @return self */ @@ -1628,7 +1628,7 @@ public function getSplits() /** * Sets splits * - * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how the payment should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). + * @param \Adyen\Model\Checkout\Split[]|null $splits An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). * * @return self */ @@ -1719,7 +1719,7 @@ public function getStorePaymentMethodMode() /** * Sets storePaymentMethodMode * - * @param string|null $storePaymentMethodMode Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. + * @param string|null $storePaymentMethodMode Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentSetupRequest.php b/src/Adyen/Model/Checkout/PaymentSetupRequest.php index 69fcd0520..26f49daaf 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupRequest.php +++ b/src/Adyen/Model/Checkout/PaymentSetupRequest.php @@ -70,14 +70,14 @@ class PaymentSetupRequest implements ModelInterface, ArrayAccess, \JsonSerializa 'installments' => '\Adyen\Model\Checkout\Installments', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'localizedShopperStatement' => 'array', - 'mandate' => '\Adyen\Model\Checkout\Mandate', + 'mandate' => '\Adyen\Model\Checkout\Mandate2', 'mcc' => 'string', 'merchantAccount' => 'string', 'merchantOrderReference' => 'string', 'metadata' => 'array', 'orderReference' => 'string', 'origin' => 'string', - 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic', + 'platformChargebackLogic' => '\Adyen\Model\Checkout\PlatformChargebackLogic2', 'recurringExpiry' => 'string', 'recurringFrequency' => 'string', 'reference' => 'string', @@ -1474,7 +1474,7 @@ public function setLocalizedShopperStatement($localizedShopperStatement) /** * Gets mandate * - * @return \Adyen\Model\Checkout\Mandate|null + * @return \Adyen\Model\Checkout\Mandate2|null */ public function getMandate() { @@ -1484,7 +1484,7 @@ public function getMandate() /** * Sets mandate * - * @param \Adyen\Model\Checkout\Mandate|null $mandate mandate + * @param \Adyen\Model\Checkout\Mandate2|null $mandate mandate * * @return self */ @@ -1663,7 +1663,7 @@ public function setOrigin($origin) /** * Gets platformChargebackLogic * - * @return \Adyen\Model\Checkout\PlatformChargebackLogic|null + * @return \Adyen\Model\Checkout\PlatformChargebackLogic2|null */ public function getPlatformChargebackLogic() { @@ -1673,7 +1673,7 @@ public function getPlatformChargebackLogic() /** * Sets platformChargebackLogic * - * @param \Adyen\Model\Checkout\PlatformChargebackLogic|null $platformChargebackLogic platformChargebackLogic + * @param \Adyen\Model\Checkout\PlatformChargebackLogic2|null $platformChargebackLogic platformChargebackLogic * * @return self */ diff --git a/src/Adyen/Model/Checkout/PlatformChargebackLogic.php b/src/Adyen/Model/Checkout/PlatformChargebackLogic.php index 9d20289df..7d77e96e4 100644 --- a/src/Adyen/Model/Checkout/PlatformChargebackLogic.php +++ b/src/Adyen/Model/Checkout/PlatformChargebackLogic.php @@ -328,7 +328,7 @@ public function getBehavior() /** * Sets behavior * - * @param string|null $behavior behavior + * @param string|null $behavior The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. * * @return self */ @@ -365,7 +365,7 @@ public function getCostAllocationAccount() /** * Sets costAllocationAccount * - * @param string|null $costAllocationAccount costAllocationAccount + * @param string|null $costAllocationAccount The unique identifier of the balance account to which the chargeback fees are booked. By default, the chargeback fees are booked to your liable balance account. * * @return self */ @@ -392,7 +392,7 @@ public function getTargetAccount() /** * Sets targetAccount * - * @param string|null $targetAccount targetAccount + * @param string|null $targetAccount The unique identifier of the balance account against which the disputed amount is booked. Required if `behavior` is **deductFromOneBalanceAccount**. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PlatformChargebackLogic2.php b/src/Adyen/Model/Checkout/PlatformChargebackLogic2.php new file mode 100644 index 000000000..63685b4c4 --- /dev/null +++ b/src/Adyen/Model/Checkout/PlatformChargebackLogic2.php @@ -0,0 +1,487 @@ + + */ +class PlatformChargebackLogic2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PlatformChargebackLogic-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'behavior' => 'string', + 'costAllocationAccount' => 'string', + 'targetAccount' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'behavior' => null, + 'costAllocationAccount' => null, + 'targetAccount' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'behavior' => false, + 'costAllocationAccount' => false, + 'targetAccount' => 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 = [ + 'behavior' => 'behavior', + 'costAllocationAccount' => 'costAllocationAccount', + 'targetAccount' => 'targetAccount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'behavior' => 'setBehavior', + 'costAllocationAccount' => 'setCostAllocationAccount', + 'targetAccount' => 'setTargetAccount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'behavior' => 'getBehavior', + 'costAllocationAccount' => 'getCostAllocationAccount', + 'targetAccount' => 'getTargetAccount' + ]; + + /** + * 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 BEHAVIOR_DEDUCT_ACCORDING_TO_SPLIT_RATIO = 'deductAccordingToSplitRatio'; + public const BEHAVIOR_DEDUCT_FROM_LIABLE_ACCOUNT = 'deductFromLiableAccount'; + public const BEHAVIOR_DEDUCT_FROM_ONE_BALANCE_ACCOUNT = 'deductFromOneBalanceAccount'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getBehaviorAllowableValues() + { + return [ + self::BEHAVIOR_DEDUCT_ACCORDING_TO_SPLIT_RATIO, + self::BEHAVIOR_DEDUCT_FROM_LIABLE_ACCOUNT, + self::BEHAVIOR_DEDUCT_FROM_ONE_BALANCE_ACCOUNT, + ]; + } + /** + * 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('behavior', $data ?? [], null); + $this->setIfExists('costAllocationAccount', $data ?? [], null); + $this->setIfExists('targetAccount', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getBehaviorAllowableValues(); + if (!is_null($this->container['behavior']) && !in_array($this->container['behavior'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'behavior', must be one of '%s'", + $this->container['behavior'], + 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 behavior + * + * @return string|null + */ + public function getBehavior() + { + return $this->container['behavior']; + } + + /** + * Sets behavior + * + * @param string|null $behavior behavior + * + * @return self + */ + public function setBehavior($behavior) + { + if (is_null($behavior)) { + throw new \InvalidArgumentException('non-nullable behavior cannot be null'); + } + $allowedValues = $this->getBehaviorAllowableValues(); + if (!in_array($behavior, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'behavior', must be one of '%s'", + $behavior, + implode("', '", $allowedValues) + ) + ); + } + $this->container['behavior'] = $behavior; + + return $this; + } + + /** + * Gets costAllocationAccount + * + * @return string|null + */ + public function getCostAllocationAccount() + { + return $this->container['costAllocationAccount']; + } + + /** + * Sets costAllocationAccount + * + * @param string|null $costAllocationAccount costAllocationAccount + * + * @return self + */ + public function setCostAllocationAccount($costAllocationAccount) + { + if (is_null($costAllocationAccount)) { + throw new \InvalidArgumentException('non-nullable costAllocationAccount cannot be null'); + } + $this->container['costAllocationAccount'] = $costAllocationAccount; + + return $this; + } + + /** + * Gets targetAccount + * + * @return string|null + */ + public function getTargetAccount() + { + return $this->container['targetAccount']; + } + + /** + * Sets targetAccount + * + * @param string|null $targetAccount targetAccount + * + * @return self + */ + public function setTargetAccount($targetAccount) + { + if (is_null($targetAccount)) { + throw new \InvalidArgumentException('non-nullable targetAccount cannot be null'); + } + $this->container['targetAccount'] = $targetAccount; + + 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/Split.php b/src/Adyen/Model/Checkout/Split.php index a68bfbd2d..e4026614a 100644 --- a/src/Adyen/Model/Checkout/Split.php +++ b/src/Adyen/Model/Checkout/Split.php @@ -244,6 +244,12 @@ public function getModelName() public const TYPE__DEFAULT = 'Default'; public const TYPE_MARKET_PLACE = 'MarketPlace'; public const TYPE_PAYMENT_FEE = 'PaymentFee'; + public const TYPE_PAYMENT_FEE_ACQUIRING = 'PaymentFeeAcquiring'; + public const TYPE_PAYMENT_FEE_ADYEN = 'PaymentFeeAdyen'; + public const TYPE_PAYMENT_FEE_ADYEN_COMMISSION = 'PaymentFeeAdyenCommission'; + public const TYPE_PAYMENT_FEE_ADYEN_MARKUP = 'PaymentFeeAdyenMarkup'; + public const TYPE_PAYMENT_FEE_INTERCHANGE = 'PaymentFeeInterchange'; + public const TYPE_PAYMENT_FEE_SCHEME_FEE = 'PaymentFeeSchemeFee'; public const TYPE_REMAINDER = 'Remainder'; public const TYPE_SURCHARGE = 'Surcharge'; public const TYPE_TIP = 'Tip'; @@ -263,6 +269,12 @@ public function getTypeAllowableValues() self::TYPE__DEFAULT, self::TYPE_MARKET_PLACE, self::TYPE_PAYMENT_FEE, + self::TYPE_PAYMENT_FEE_ACQUIRING, + self::TYPE_PAYMENT_FEE_ADYEN, + self::TYPE_PAYMENT_FEE_ADYEN_COMMISSION, + self::TYPE_PAYMENT_FEE_ADYEN_MARKUP, + self::TYPE_PAYMENT_FEE_INTERCHANGE, + self::TYPE_PAYMENT_FEE_SCHEME_FEE, self::TYPE_REMAINDER, self::TYPE_SURCHARGE, self::TYPE_TIP, diff --git a/src/Adyen/Model/Checkout/Split2.php b/src/Adyen/Model/Checkout/Split2.php new file mode 100644 index 000000000..b88695101 --- /dev/null +++ b/src/Adyen/Model/Checkout/Split2.php @@ -0,0 +1,584 @@ + + */ +class Split2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Split-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'account' => 'string', + 'amount' => '\Adyen\Model\Checkout\SplitAmount', + 'description' => 'string', + 'reference' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'account' => null, + 'amount' => null, + 'description' => null, + 'reference' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'account' => false, + 'amount' => false, + 'description' => false, + 'reference' => 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 = [ + 'account' => 'account', + 'amount' => 'amount', + 'description' => 'description', + 'reference' => 'reference', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'account' => 'setAccount', + 'amount' => 'setAmount', + 'description' => 'setDescription', + 'reference' => 'setReference', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'account' => 'getAccount', + 'amount' => 'getAmount', + 'description' => 'getDescription', + 'reference' => 'getReference', + '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_BALANCE_ACCOUNT = 'BalanceAccount'; + public const TYPE_COMMISSION = 'Commission'; + public const TYPE__DEFAULT = 'Default'; + public const TYPE_MARKET_PLACE = 'MarketPlace'; + public const TYPE_PAYMENT_FEE = 'PaymentFee'; + public const TYPE_PAYMENT_FEE_ACQUIRING = 'PaymentFeeAcquiring'; + public const TYPE_PAYMENT_FEE_ADYEN = 'PaymentFeeAdyen'; + public const TYPE_PAYMENT_FEE_ADYEN_COMMISSION = 'PaymentFeeAdyenCommission'; + public const TYPE_PAYMENT_FEE_ADYEN_MARKUP = 'PaymentFeeAdyenMarkup'; + public const TYPE_PAYMENT_FEE_INTERCHANGE = 'PaymentFeeInterchange'; + public const TYPE_PAYMENT_FEE_SCHEME_FEE = 'PaymentFeeSchemeFee'; + public const TYPE_REMAINDER = 'Remainder'; + public const TYPE_SURCHARGE = 'Surcharge'; + public const TYPE_TIP = 'Tip'; + public const TYPE_VAT = 'VAT'; + public const TYPE_VERIFICATION = 'Verification'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BALANCE_ACCOUNT, + self::TYPE_COMMISSION, + self::TYPE__DEFAULT, + self::TYPE_MARKET_PLACE, + self::TYPE_PAYMENT_FEE, + self::TYPE_PAYMENT_FEE_ACQUIRING, + self::TYPE_PAYMENT_FEE_ADYEN, + self::TYPE_PAYMENT_FEE_ADYEN_COMMISSION, + self::TYPE_PAYMENT_FEE_ADYEN_MARKUP, + self::TYPE_PAYMENT_FEE_INTERCHANGE, + self::TYPE_PAYMENT_FEE_SCHEME_FEE, + self::TYPE_REMAINDER, + self::TYPE_SURCHARGE, + self::TYPE_TIP, + self::TYPE_VAT, + self::TYPE_VERIFICATION, + ]; + } + /** + * 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('account', $data ?? [], null); + $this->setIfExists('amount', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets account + * + * @return string|null + */ + public function getAccount() + { + return $this->container['account']; + } + + /** + * Sets account + * + * @param string|null $account The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked. + * + * @return self + */ + public function setAccount($account) + { + if (is_null($account)) { + throw new \InvalidArgumentException('non-nullable account cannot be null'); + } + $this->container['account'] = $account; + + return $this; + } + + /** + * Gets amount + * + * @return \Adyen\Model\Checkout\SplitAmount|null + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param \Adyen\Model\Checkout\SplitAmount|null $amount amount + * + * @return self + */ + public function setAmount($amount) + { + if (is_null($amount)) { + throw new \InvalidArgumentException('non-nullable amount cannot be null'); + } + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Your description for the split item. + * + * @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 reference + * + * @return string|null + */ + public function getReference() + { + return $this->container['reference']; + } + + /** + * 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. + * + * @return self + */ + public function setReference($reference) + { + if (is_null($reference)) { + throw new \InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**. + * + * @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/StoredPaymentMethodDetails.php b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php index ea66b51f4..9f8cd55e5 100644 --- a/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php +++ b/src/Adyen/Model/Checkout/StoredPaymentMethodDetails.php @@ -250,7 +250,6 @@ public function getModelName() public const TYPE_GCASH = 'gcash'; public const TYPE_KAKAOPAY = 'kakaopay'; public const TYPE_TRUEMONEY = 'truemoney'; - public const TYPE_TWINT_POS = 'twint_pos'; /** * Gets allowable values of the enum @@ -277,7 +276,6 @@ public function getTypeAllowableValues() self::TYPE_GCASH, self::TYPE_KAKAOPAY, self::TYPE_TRUEMONEY, - self::TYPE_TWINT_POS, ]; } /** diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestData2.php b/src/Adyen/Model/Checkout/ThreeDS2RequestData2.php new file mode 100644 index 000000000..87f12a819 --- /dev/null +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestData2.php @@ -0,0 +1,1800 @@ + + */ +class ThreeDS2RequestData2 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ThreeDS2RequestData-2'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'acctInfo' => '\Adyen\Model\Checkout\AcctInfo', + 'acctType' => 'string', + 'acquirerBIN' => 'string', + 'acquirerMerchantID' => 'string', + 'addrMatch' => 'string', + 'authenticationOnly' => 'bool', + 'challengeIndicator' => 'string', + 'deviceRenderOptions' => '\Adyen\Model\Checkout\DeviceRenderOptions', + 'homePhone' => '\Adyen\Model\Checkout\Phone', + 'mcc' => 'string', + 'merchantName' => 'string', + 'messageVersion' => 'string', + 'mobilePhone' => '\Adyen\Model\Checkout\Phone', + 'notificationURL' => 'string', + 'payTokenInd' => 'bool', + 'paymentAuthenticationUseCase' => 'string', + 'purchaseInstalData' => 'string', + 'recurringExpiry' => 'string', + 'recurringFrequency' => 'string', + 'sdkAppID' => 'string', + 'sdkEphemPubKey' => '\Adyen\Model\Checkout\SDKEphemPubKey', + 'sdkMaxTimeout' => 'int', + 'sdkReferenceNumber' => 'string', + 'sdkTransID' => 'string', + 'threeDSCompInd' => 'string', + 'threeDSRequestorAuthenticationInd' => 'string', + 'threeDSRequestorAuthenticationInfo' => '\Adyen\Model\Checkout\ThreeDSRequestorAuthenticationInfo', + 'threeDSRequestorChallengeInd' => 'string', + 'threeDSRequestorID' => 'string', + 'threeDSRequestorName' => 'string', + 'threeDSRequestorPriorAuthenticationInfo' => '\Adyen\Model\Checkout\ThreeDSRequestorPriorAuthenticationInfo', + 'threeDSRequestorURL' => 'string', + 'transType' => 'string', + 'transactionType' => 'string', + 'whiteListStatus' => 'string', + 'workPhone' => '\Adyen\Model\Checkout\Phone' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'acctInfo' => null, + 'acctType' => null, + 'acquirerBIN' => null, + 'acquirerMerchantID' => null, + 'addrMatch' => null, + 'authenticationOnly' => null, + 'challengeIndicator' => null, + 'deviceRenderOptions' => null, + 'homePhone' => null, + 'mcc' => null, + 'merchantName' => null, + 'messageVersion' => null, + 'mobilePhone' => null, + 'notificationURL' => null, + 'payTokenInd' => null, + 'paymentAuthenticationUseCase' => null, + 'purchaseInstalData' => null, + 'recurringExpiry' => null, + 'recurringFrequency' => null, + 'sdkAppID' => null, + 'sdkEphemPubKey' => null, + 'sdkMaxTimeout' => 'int32', + 'sdkReferenceNumber' => null, + 'sdkTransID' => null, + 'threeDSCompInd' => null, + 'threeDSRequestorAuthenticationInd' => null, + 'threeDSRequestorAuthenticationInfo' => null, + 'threeDSRequestorChallengeInd' => null, + 'threeDSRequestorID' => null, + 'threeDSRequestorName' => null, + 'threeDSRequestorPriorAuthenticationInfo' => null, + 'threeDSRequestorURL' => null, + 'transType' => null, + 'transactionType' => null, + 'whiteListStatus' => null, + 'workPhone' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'acctInfo' => false, + 'acctType' => false, + 'acquirerBIN' => false, + 'acquirerMerchantID' => false, + 'addrMatch' => false, + 'authenticationOnly' => false, + 'challengeIndicator' => false, + 'deviceRenderOptions' => false, + 'homePhone' => false, + 'mcc' => false, + 'merchantName' => false, + 'messageVersion' => false, + 'mobilePhone' => false, + 'notificationURL' => false, + 'payTokenInd' => false, + 'paymentAuthenticationUseCase' => false, + 'purchaseInstalData' => false, + 'recurringExpiry' => false, + 'recurringFrequency' => false, + 'sdkAppID' => false, + 'sdkEphemPubKey' => false, + 'sdkMaxTimeout' => true, + 'sdkReferenceNumber' => false, + 'sdkTransID' => false, + 'threeDSCompInd' => false, + 'threeDSRequestorAuthenticationInd' => false, + 'threeDSRequestorAuthenticationInfo' => false, + 'threeDSRequestorChallengeInd' => false, + 'threeDSRequestorID' => false, + 'threeDSRequestorName' => false, + 'threeDSRequestorPriorAuthenticationInfo' => false, + 'threeDSRequestorURL' => false, + 'transType' => false, + 'transactionType' => false, + 'whiteListStatus' => false, + 'workPhone' => 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 = [ + 'acctInfo' => 'acctInfo', + 'acctType' => 'acctType', + 'acquirerBIN' => 'acquirerBIN', + 'acquirerMerchantID' => 'acquirerMerchantID', + 'addrMatch' => 'addrMatch', + 'authenticationOnly' => 'authenticationOnly', + 'challengeIndicator' => 'challengeIndicator', + 'deviceRenderOptions' => 'deviceRenderOptions', + 'homePhone' => 'homePhone', + 'mcc' => 'mcc', + 'merchantName' => 'merchantName', + 'messageVersion' => 'messageVersion', + 'mobilePhone' => 'mobilePhone', + 'notificationURL' => 'notificationURL', + 'payTokenInd' => 'payTokenInd', + 'paymentAuthenticationUseCase' => 'paymentAuthenticationUseCase', + 'purchaseInstalData' => 'purchaseInstalData', + 'recurringExpiry' => 'recurringExpiry', + 'recurringFrequency' => 'recurringFrequency', + 'sdkAppID' => 'sdkAppID', + 'sdkEphemPubKey' => 'sdkEphemPubKey', + 'sdkMaxTimeout' => 'sdkMaxTimeout', + 'sdkReferenceNumber' => 'sdkReferenceNumber', + 'sdkTransID' => 'sdkTransID', + 'threeDSCompInd' => 'threeDSCompInd', + 'threeDSRequestorAuthenticationInd' => 'threeDSRequestorAuthenticationInd', + 'threeDSRequestorAuthenticationInfo' => 'threeDSRequestorAuthenticationInfo', + 'threeDSRequestorChallengeInd' => 'threeDSRequestorChallengeInd', + 'threeDSRequestorID' => 'threeDSRequestorID', + 'threeDSRequestorName' => 'threeDSRequestorName', + 'threeDSRequestorPriorAuthenticationInfo' => 'threeDSRequestorPriorAuthenticationInfo', + 'threeDSRequestorURL' => 'threeDSRequestorURL', + 'transType' => 'transType', + 'transactionType' => 'transactionType', + 'whiteListStatus' => 'whiteListStatus', + 'workPhone' => 'workPhone' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'acctInfo' => 'setAcctInfo', + 'acctType' => 'setAcctType', + 'acquirerBIN' => 'setAcquirerBIN', + 'acquirerMerchantID' => 'setAcquirerMerchantID', + 'addrMatch' => 'setAddrMatch', + 'authenticationOnly' => 'setAuthenticationOnly', + 'challengeIndicator' => 'setChallengeIndicator', + 'deviceRenderOptions' => 'setDeviceRenderOptions', + 'homePhone' => 'setHomePhone', + 'mcc' => 'setMcc', + 'merchantName' => 'setMerchantName', + 'messageVersion' => 'setMessageVersion', + 'mobilePhone' => 'setMobilePhone', + 'notificationURL' => 'setNotificationURL', + 'payTokenInd' => 'setPayTokenInd', + 'paymentAuthenticationUseCase' => 'setPaymentAuthenticationUseCase', + 'purchaseInstalData' => 'setPurchaseInstalData', + 'recurringExpiry' => 'setRecurringExpiry', + 'recurringFrequency' => 'setRecurringFrequency', + 'sdkAppID' => 'setSdkAppID', + 'sdkEphemPubKey' => 'setSdkEphemPubKey', + 'sdkMaxTimeout' => 'setSdkMaxTimeout', + 'sdkReferenceNumber' => 'setSdkReferenceNumber', + 'sdkTransID' => 'setSdkTransID', + 'threeDSCompInd' => 'setThreeDSCompInd', + 'threeDSRequestorAuthenticationInd' => 'setThreeDSRequestorAuthenticationInd', + 'threeDSRequestorAuthenticationInfo' => 'setThreeDSRequestorAuthenticationInfo', + 'threeDSRequestorChallengeInd' => 'setThreeDSRequestorChallengeInd', + 'threeDSRequestorID' => 'setThreeDSRequestorID', + 'threeDSRequestorName' => 'setThreeDSRequestorName', + 'threeDSRequestorPriorAuthenticationInfo' => 'setThreeDSRequestorPriorAuthenticationInfo', + 'threeDSRequestorURL' => 'setThreeDSRequestorURL', + 'transType' => 'setTransType', + 'transactionType' => 'setTransactionType', + 'whiteListStatus' => 'setWhiteListStatus', + 'workPhone' => 'setWorkPhone' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'acctInfo' => 'getAcctInfo', + 'acctType' => 'getAcctType', + 'acquirerBIN' => 'getAcquirerBIN', + 'acquirerMerchantID' => 'getAcquirerMerchantID', + 'addrMatch' => 'getAddrMatch', + 'authenticationOnly' => 'getAuthenticationOnly', + 'challengeIndicator' => 'getChallengeIndicator', + 'deviceRenderOptions' => 'getDeviceRenderOptions', + 'homePhone' => 'getHomePhone', + 'mcc' => 'getMcc', + 'merchantName' => 'getMerchantName', + 'messageVersion' => 'getMessageVersion', + 'mobilePhone' => 'getMobilePhone', + 'notificationURL' => 'getNotificationURL', + 'payTokenInd' => 'getPayTokenInd', + 'paymentAuthenticationUseCase' => 'getPaymentAuthenticationUseCase', + 'purchaseInstalData' => 'getPurchaseInstalData', + 'recurringExpiry' => 'getRecurringExpiry', + 'recurringFrequency' => 'getRecurringFrequency', + 'sdkAppID' => 'getSdkAppID', + 'sdkEphemPubKey' => 'getSdkEphemPubKey', + 'sdkMaxTimeout' => 'getSdkMaxTimeout', + 'sdkReferenceNumber' => 'getSdkReferenceNumber', + 'sdkTransID' => 'getSdkTransID', + 'threeDSCompInd' => 'getThreeDSCompInd', + 'threeDSRequestorAuthenticationInd' => 'getThreeDSRequestorAuthenticationInd', + 'threeDSRequestorAuthenticationInfo' => 'getThreeDSRequestorAuthenticationInfo', + 'threeDSRequestorChallengeInd' => 'getThreeDSRequestorChallengeInd', + 'threeDSRequestorID' => 'getThreeDSRequestorID', + 'threeDSRequestorName' => 'getThreeDSRequestorName', + 'threeDSRequestorPriorAuthenticationInfo' => 'getThreeDSRequestorPriorAuthenticationInfo', + 'threeDSRequestorURL' => 'getThreeDSRequestorURL', + 'transType' => 'getTransType', + 'transactionType' => 'getTransactionType', + 'whiteListStatus' => 'getWhiteListStatus', + 'workPhone' => 'getWorkPhone' + ]; + + /** + * 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 ACCT_TYPE__01 = '01'; + public const ACCT_TYPE__02 = '02'; + public const ACCT_TYPE__03 = '03'; + public const ADDR_MATCH_Y = 'Y'; + public const ADDR_MATCH_N = 'N'; + public const CHALLENGE_INDICATOR_NO_PREFERENCE = 'noPreference'; + public const CHALLENGE_INDICATOR_REQUEST_NO_CHALLENGE = 'requestNoChallenge'; + public const CHALLENGE_INDICATOR_REQUEST_CHALLENGE = 'requestChallenge'; + public const CHALLENGE_INDICATOR_REQUEST_CHALLENGE_AS_MANDATE = 'requestChallengeAsMandate'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__01 = '01'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__02 = '02'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__03 = '03'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__04 = '04'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__05 = '05'; + public const THREE_DS_REQUESTOR_CHALLENGE_IND__06 = '06'; + public const TRANS_TYPE__01 = '01'; + public const TRANS_TYPE__03 = '03'; + public const TRANS_TYPE__10 = '10'; + public const TRANS_TYPE__11 = '11'; + public const TRANS_TYPE__28 = '28'; + public const TRANSACTION_TYPE_GOODS_OR_SERVICE_PURCHASE = 'goodsOrServicePurchase'; + public const TRANSACTION_TYPE_CHECK_ACCEPTANCE = 'checkAcceptance'; + public const TRANSACTION_TYPE_ACCOUNT_FUNDING = 'accountFunding'; + public const TRANSACTION_TYPE_QUASI_CASH_TRANSACTION = 'quasiCashTransaction'; + public const TRANSACTION_TYPE_PREPAID_ACTIVATION_AND_LOAD = 'prepaidActivationAndLoad'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAcctTypeAllowableValues() + { + return [ + self::ACCT_TYPE__01, + self::ACCT_TYPE__02, + self::ACCT_TYPE__03, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getAddrMatchAllowableValues() + { + return [ + self::ADDR_MATCH_Y, + self::ADDR_MATCH_N, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChallengeIndicatorAllowableValues() + { + return [ + self::CHALLENGE_INDICATOR_NO_PREFERENCE, + self::CHALLENGE_INDICATOR_REQUEST_NO_CHALLENGE, + self::CHALLENGE_INDICATOR_REQUEST_CHALLENGE, + self::CHALLENGE_INDICATOR_REQUEST_CHALLENGE_AS_MANDATE, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getThreeDSRequestorChallengeIndAllowableValues() + { + return [ + self::THREE_DS_REQUESTOR_CHALLENGE_IND__01, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__02, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__03, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__04, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__05, + self::THREE_DS_REQUESTOR_CHALLENGE_IND__06, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTransTypeAllowableValues() + { + return [ + self::TRANS_TYPE__01, + self::TRANS_TYPE__03, + self::TRANS_TYPE__10, + self::TRANS_TYPE__11, + self::TRANS_TYPE__28, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTransactionTypeAllowableValues() + { + return [ + self::TRANSACTION_TYPE_GOODS_OR_SERVICE_PURCHASE, + self::TRANSACTION_TYPE_CHECK_ACCEPTANCE, + self::TRANSACTION_TYPE_ACCOUNT_FUNDING, + self::TRANSACTION_TYPE_QUASI_CASH_TRANSACTION, + self::TRANSACTION_TYPE_PREPAID_ACTIVATION_AND_LOAD, + ]; + } + /** + * 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('acctInfo', $data ?? [], null); + $this->setIfExists('acctType', $data ?? [], null); + $this->setIfExists('acquirerBIN', $data ?? [], null); + $this->setIfExists('acquirerMerchantID', $data ?? [], null); + $this->setIfExists('addrMatch', $data ?? [], null); + $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('challengeIndicator', $data ?? [], null); + $this->setIfExists('deviceRenderOptions', $data ?? [], null); + $this->setIfExists('homePhone', $data ?? [], null); + $this->setIfExists('mcc', $data ?? [], null); + $this->setIfExists('merchantName', $data ?? [], null); + $this->setIfExists('messageVersion', $data ?? [], '2.1.0'); + $this->setIfExists('mobilePhone', $data ?? [], null); + $this->setIfExists('notificationURL', $data ?? [], null); + $this->setIfExists('payTokenInd', $data ?? [], null); + $this->setIfExists('paymentAuthenticationUseCase', $data ?? [], null); + $this->setIfExists('purchaseInstalData', $data ?? [], null); + $this->setIfExists('recurringExpiry', $data ?? [], null); + $this->setIfExists('recurringFrequency', $data ?? [], null); + $this->setIfExists('sdkAppID', $data ?? [], null); + $this->setIfExists('sdkEphemPubKey', $data ?? [], null); + $this->setIfExists('sdkMaxTimeout', $data ?? [], 60); + $this->setIfExists('sdkReferenceNumber', $data ?? [], null); + $this->setIfExists('sdkTransID', $data ?? [], null); + $this->setIfExists('threeDSCompInd', $data ?? [], null); + $this->setIfExists('threeDSRequestorAuthenticationInd', $data ?? [], null); + $this->setIfExists('threeDSRequestorAuthenticationInfo', $data ?? [], null); + $this->setIfExists('threeDSRequestorChallengeInd', $data ?? [], null); + $this->setIfExists('threeDSRequestorID', $data ?? [], null); + $this->setIfExists('threeDSRequestorName', $data ?? [], null); + $this->setIfExists('threeDSRequestorPriorAuthenticationInfo', $data ?? [], null); + $this->setIfExists('threeDSRequestorURL', $data ?? [], null); + $this->setIfExists('transType', $data ?? [], null); + $this->setIfExists('transactionType', $data ?? [], null); + $this->setIfExists('whiteListStatus', $data ?? [], null); + $this->setIfExists('workPhone', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getAcctTypeAllowableValues(); + if (!is_null($this->container['acctType']) && !in_array($this->container['acctType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'acctType', must be one of '%s'", + $this->container['acctType'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getAddrMatchAllowableValues(); + if (!is_null($this->container['addrMatch']) && !in_array($this->container['addrMatch'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'addrMatch', must be one of '%s'", + $this->container['addrMatch'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getChallengeIndicatorAllowableValues(); + if (!is_null($this->container['challengeIndicator']) && !in_array($this->container['challengeIndicator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'challengeIndicator', must be one of '%s'", + $this->container['challengeIndicator'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getThreeDSRequestorChallengeIndAllowableValues(); + if (!is_null($this->container['threeDSRequestorChallengeInd']) && !in_array($this->container['threeDSRequestorChallengeInd'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'threeDSRequestorChallengeInd', must be one of '%s'", + $this->container['threeDSRequestorChallengeInd'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTransTypeAllowableValues(); + if (!is_null($this->container['transType']) && !in_array($this->container['transType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'transType', must be one of '%s'", + $this->container['transType'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getTransactionTypeAllowableValues(); + if (!is_null($this->container['transactionType']) && !in_array($this->container['transactionType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'transactionType', must be one of '%s'", + $this->container['transactionType'], + 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 acctInfo + * + * @return \Adyen\Model\Checkout\AcctInfo|null + */ + public function getAcctInfo() + { + return $this->container['acctInfo']; + } + + /** + * Sets acctInfo + * + * @param \Adyen\Model\Checkout\AcctInfo|null $acctInfo acctInfo + * + * @return self + */ + public function setAcctInfo($acctInfo) + { + if (is_null($acctInfo)) { + throw new \InvalidArgumentException('non-nullable acctInfo cannot be null'); + } + $this->container['acctInfo'] = $acctInfo; + + return $this; + } + + /** + * Gets acctType + * + * @return string|null + */ + public function getAcctType() + { + return $this->container['acctType']; + } + + /** + * Sets acctType + * + * @param string|null $acctType Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit + * + * @return self + */ + public function setAcctType($acctType) + { + if (is_null($acctType)) { + throw new \InvalidArgumentException('non-nullable acctType cannot be null'); + } + $allowedValues = $this->getAcctTypeAllowableValues(); + if (!in_array($acctType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'acctType', must be one of '%s'", + $acctType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['acctType'] = $acctType; + + return $this; + } + + /** + * Gets acquirerBIN + * + * @return string|null + */ + public function getAcquirerBIN() + { + return $this->container['acquirerBIN']; + } + + /** + * Sets acquirerBIN + * + * @param string|null $acquirerBIN Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. + * + * @return self + */ + public function setAcquirerBIN($acquirerBIN) + { + if (is_null($acquirerBIN)) { + throw new \InvalidArgumentException('non-nullable acquirerBIN cannot be null'); + } + $this->container['acquirerBIN'] = $acquirerBIN; + + return $this; + } + + /** + * Gets acquirerMerchantID + * + * @return string|null + */ + public function getAcquirerMerchantID() + { + return $this->container['acquirerMerchantID']; + } + + /** + * Sets acquirerMerchantID + * + * @param string|null $acquirerMerchantID Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. + * + * @return self + */ + public function setAcquirerMerchantID($acquirerMerchantID) + { + if (is_null($acquirerMerchantID)) { + throw new \InvalidArgumentException('non-nullable acquirerMerchantID cannot be null'); + } + $this->container['acquirerMerchantID'] = $acquirerMerchantID; + + return $this; + } + + /** + * Gets addrMatch + * + * @return string|null + */ + public function getAddrMatch() + { + return $this->container['addrMatch']; + } + + /** + * Sets addrMatch + * + * @param string|null $addrMatch Indicates whether the Cardholder Shipping Address and Cardholder Billing Address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. + * + * @return self + */ + public function setAddrMatch($addrMatch) + { + if (is_null($addrMatch)) { + throw new \InvalidArgumentException('non-nullable addrMatch cannot be null'); + } + $allowedValues = $this->getAddrMatchAllowableValues(); + if (!in_array($addrMatch, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'addrMatch', must be one of '%s'", + $addrMatch, + implode("', '", $allowedValues) + ) + ); + } + $this->container['addrMatch'] = $addrMatch; + + return $this; + } + + /** + * Gets authenticationOnly + * + * @return bool|null + * @deprecated + */ + public function getAuthenticationOnly() + { + return $this->container['authenticationOnly']; + } + + /** + * Sets authenticationOnly + * + * @param bool|null $authenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + * + * @return self + * @deprecated + */ + public function setAuthenticationOnly($authenticationOnly) + { + if (is_null($authenticationOnly)) { + throw new \InvalidArgumentException('non-nullable authenticationOnly cannot be null'); + } + $this->container['authenticationOnly'] = $authenticationOnly; + + return $this; + } + + /** + * Gets challengeIndicator + * + * @return string|null + * @deprecated + */ + public function getChallengeIndicator() + { + return $this->container['challengeIndicator']; + } + + /** + * Sets challengeIndicator + * + * @param string|null $challengeIndicator Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` + * + * @return self + * @deprecated + */ + public function setChallengeIndicator($challengeIndicator) + { + if (is_null($challengeIndicator)) { + throw new \InvalidArgumentException('non-nullable challengeIndicator cannot be null'); + } + $allowedValues = $this->getChallengeIndicatorAllowableValues(); + if (!in_array($challengeIndicator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'challengeIndicator', must be one of '%s'", + $challengeIndicator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['challengeIndicator'] = $challengeIndicator; + + return $this; + } + + /** + * Gets deviceRenderOptions + * + * @return \Adyen\Model\Checkout\DeviceRenderOptions|null + */ + public function getDeviceRenderOptions() + { + return $this->container['deviceRenderOptions']; + } + + /** + * Sets deviceRenderOptions + * + * @param \Adyen\Model\Checkout\DeviceRenderOptions|null $deviceRenderOptions deviceRenderOptions + * + * @return self + */ + public function setDeviceRenderOptions($deviceRenderOptions) + { + if (is_null($deviceRenderOptions)) { + throw new \InvalidArgumentException('non-nullable deviceRenderOptions cannot be null'); + } + $this->container['deviceRenderOptions'] = $deviceRenderOptions; + + return $this; + } + + /** + * Gets homePhone + * + * @return \Adyen\Model\Checkout\Phone|null + */ + public function getHomePhone() + { + return $this->container['homePhone']; + } + + /** + * Sets homePhone + * + * @param \Adyen\Model\Checkout\Phone|null $homePhone homePhone + * + * @return self + */ + public function setHomePhone($homePhone) + { + if (is_null($homePhone)) { + throw new \InvalidArgumentException('non-nullable homePhone cannot be null'); + } + $this->container['homePhone'] = $homePhone; + + return $this; + } + + /** + * Gets mcc + * + * @return string|null + */ + public function getMcc() + { + return $this->container['mcc']; + } + + /** + * Sets mcc + * + * @param string|null $mcc Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. + * + * @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 merchantName + * + * @return string|null + */ + public function getMerchantName() + { + return $this->container['merchantName']; + } + + /** + * Sets merchantName + * + * @param string|null $merchantName Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account. + * + * @return self + */ + public function setMerchantName($merchantName) + { + if (is_null($merchantName)) { + throw new \InvalidArgumentException('non-nullable merchantName cannot be null'); + } + $this->container['merchantName'] = $merchantName; + + return $this; + } + + /** + * Gets messageVersion + * + * @return string|null + */ + public function getMessageVersion() + { + return $this->container['messageVersion']; + } + + /** + * Sets messageVersion + * + * @param string|null $messageVersion The `messageVersion` value indicating the 3D Secure 2 protocol version. + * + * @return self + */ + public function setMessageVersion($messageVersion) + { + if (is_null($messageVersion)) { + throw new \InvalidArgumentException('non-nullable messageVersion cannot be null'); + } + $this->container['messageVersion'] = $messageVersion; + + return $this; + } + + /** + * Gets mobilePhone + * + * @return \Adyen\Model\Checkout\Phone|null + */ + public function getMobilePhone() + { + return $this->container['mobilePhone']; + } + + /** + * Sets mobilePhone + * + * @param \Adyen\Model\Checkout\Phone|null $mobilePhone mobilePhone + * + * @return self + */ + public function setMobilePhone($mobilePhone) + { + if (is_null($mobilePhone)) { + throw new \InvalidArgumentException('non-nullable mobilePhone cannot be null'); + } + $this->container['mobilePhone'] = $mobilePhone; + + return $this; + } + + /** + * Gets notificationURL + * + * @return string|null + */ + public function getNotificationURL() + { + return $this->container['notificationURL']; + } + + /** + * Sets notificationURL + * + * @param string|null $notificationURL URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. + * + * @return self + */ + public function setNotificationURL($notificationURL) + { + if (is_null($notificationURL)) { + throw new \InvalidArgumentException('non-nullable notificationURL cannot be null'); + } + $this->container['notificationURL'] = $notificationURL; + + return $this; + } + + /** + * Gets payTokenInd + * + * @return bool|null + */ + public function getPayTokenInd() + { + return $this->container['payTokenInd']; + } + + /** + * Sets payTokenInd + * + * @param bool|null $payTokenInd Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS. + * + * @return self + */ + public function setPayTokenInd($payTokenInd) + { + if (is_null($payTokenInd)) { + throw new \InvalidArgumentException('non-nullable payTokenInd cannot be null'); + } + $this->container['payTokenInd'] = $payTokenInd; + + return $this; + } + + /** + * Gets paymentAuthenticationUseCase + * + * @return string|null + */ + public function getPaymentAuthenticationUseCase() + { + return $this->container['paymentAuthenticationUseCase']; + } + + /** + * Sets paymentAuthenticationUseCase + * + * @param string|null $paymentAuthenticationUseCase Indicates the type of payment for which an authentication is requested (message extension) + * + * @return self + */ + public function setPaymentAuthenticationUseCase($paymentAuthenticationUseCase) + { + if (is_null($paymentAuthenticationUseCase)) { + throw new \InvalidArgumentException('non-nullable paymentAuthenticationUseCase cannot be null'); + } + $this->container['paymentAuthenticationUseCase'] = $paymentAuthenticationUseCase; + + return $this; + } + + /** + * Gets purchaseInstalData + * + * @return string|null + */ + public function getPurchaseInstalData() + { + return $this->container['purchaseInstalData']; + } + + /** + * Sets purchaseInstalData + * + * @param string|null $purchaseInstalData Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters. + * + * @return self + */ + public function setPurchaseInstalData($purchaseInstalData) + { + if (is_null($purchaseInstalData)) { + throw new \InvalidArgumentException('non-nullable purchaseInstalData cannot be null'); + } + $this->container['purchaseInstalData'] = $purchaseInstalData; + + return $this; + } + + /** + * Gets recurringExpiry + * + * @return string|null + */ + public function getRecurringExpiry() + { + return $this->container['recurringExpiry']; + } + + /** + * Sets recurringExpiry + * + * @param string|null $recurringExpiry Date after which no further authorisations shall be performed. Format: YYYYMMDD + * + * @return self + */ + public function setRecurringExpiry($recurringExpiry) + { + if (is_null($recurringExpiry)) { + throw new \InvalidArgumentException('non-nullable recurringExpiry cannot be null'); + } + $this->container['recurringExpiry'] = $recurringExpiry; + + return $this; + } + + /** + * Gets recurringFrequency + * + * @return string|null + */ + public function getRecurringFrequency() + { + return $this->container['recurringFrequency']; + } + + /** + * Sets recurringFrequency + * + * @param string|null $recurringFrequency Indicates the minimum number of days between authorisations. Maximum length: 4 characters. + * + * @return self + */ + public function setRecurringFrequency($recurringFrequency) + { + if (is_null($recurringFrequency)) { + throw new \InvalidArgumentException('non-nullable recurringFrequency cannot be null'); + } + $this->container['recurringFrequency'] = $recurringFrequency; + + return $this; + } + + /** + * Gets sdkAppID + * + * @return string|null + */ + public function getSdkAppID() + { + return $this->container['sdkAppID']; + } + + /** + * Sets sdkAppID + * + * @param string|null $sdkAppID The `sdkAppID` value as received from the 3D Secure 2 SDK. + * + * @return self + */ + public function setSdkAppID($sdkAppID) + { + if (is_null($sdkAppID)) { + throw new \InvalidArgumentException('non-nullable sdkAppID cannot be null'); + } + $this->container['sdkAppID'] = $sdkAppID; + + return $this; + } + + /** + * Gets sdkEphemPubKey + * + * @return \Adyen\Model\Checkout\SDKEphemPubKey|null + */ + public function getSdkEphemPubKey() + { + return $this->container['sdkEphemPubKey']; + } + + /** + * Sets sdkEphemPubKey + * + * @param \Adyen\Model\Checkout\SDKEphemPubKey|null $sdkEphemPubKey sdkEphemPubKey + * + * @return self + */ + public function setSdkEphemPubKey($sdkEphemPubKey) + { + if (is_null($sdkEphemPubKey)) { + throw new \InvalidArgumentException('non-nullable sdkEphemPubKey cannot be null'); + } + $this->container['sdkEphemPubKey'] = $sdkEphemPubKey; + + return $this; + } + + /** + * Gets sdkMaxTimeout + * + * @return int|null + */ + public function getSdkMaxTimeout() + { + return $this->container['sdkMaxTimeout']; + } + + /** + * Sets sdkMaxTimeout + * + * @param int|null $sdkMaxTimeout The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. + * + * @return self + */ + public function setSdkMaxTimeout($sdkMaxTimeout) + { + // Do nothing for nullable integers + $this->container['sdkMaxTimeout'] = $sdkMaxTimeout; + + return $this; + } + + /** + * Gets sdkReferenceNumber + * + * @return string|null + */ + public function getSdkReferenceNumber() + { + return $this->container['sdkReferenceNumber']; + } + + /** + * Sets sdkReferenceNumber + * + * @param string|null $sdkReferenceNumber The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. + * + * @return self + */ + public function setSdkReferenceNumber($sdkReferenceNumber) + { + if (is_null($sdkReferenceNumber)) { + throw new \InvalidArgumentException('non-nullable sdkReferenceNumber cannot be null'); + } + $this->container['sdkReferenceNumber'] = $sdkReferenceNumber; + + return $this; + } + + /** + * Gets sdkTransID + * + * @return string|null + */ + public function getSdkTransID() + { + return $this->container['sdkTransID']; + } + + /** + * Sets sdkTransID + * + * @param string|null $sdkTransID The `sdkTransID` value as received from the 3D Secure 2 SDK. + * + * @return self + */ + public function setSdkTransID($sdkTransID) + { + if (is_null($sdkTransID)) { + throw new \InvalidArgumentException('non-nullable sdkTransID cannot be null'); + } + $this->container['sdkTransID'] = $sdkTransID; + + return $this; + } + + /** + * Gets threeDSCompInd + * + * @return string|null + */ + public function getThreeDSCompInd() + { + return $this->container['threeDSCompInd']; + } + + /** + * Sets threeDSCompInd + * + * @param string|null $threeDSCompInd Completion indicator for the device fingerprinting. + * + * @return self + */ + public function setThreeDSCompInd($threeDSCompInd) + { + if (is_null($threeDSCompInd)) { + throw new \InvalidArgumentException('non-nullable threeDSCompInd cannot be null'); + } + $this->container['threeDSCompInd'] = $threeDSCompInd; + + return $this; + } + + /** + * Gets threeDSRequestorAuthenticationInd + * + * @return string|null + */ + public function getThreeDSRequestorAuthenticationInd() + { + return $this->container['threeDSRequestorAuthenticationInd']; + } + + /** + * Sets threeDSRequestorAuthenticationInd + * + * @param string|null $threeDSRequestorAuthenticationInd Indicates the type of Authentication request. + * + * @return self + */ + public function setThreeDSRequestorAuthenticationInd($threeDSRequestorAuthenticationInd) + { + if (is_null($threeDSRequestorAuthenticationInd)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorAuthenticationInd cannot be null'); + } + $this->container['threeDSRequestorAuthenticationInd'] = $threeDSRequestorAuthenticationInd; + + return $this; + } + + /** + * Gets threeDSRequestorAuthenticationInfo + * + * @return \Adyen\Model\Checkout\ThreeDSRequestorAuthenticationInfo|null + */ + public function getThreeDSRequestorAuthenticationInfo() + { + return $this->container['threeDSRequestorAuthenticationInfo']; + } + + /** + * Sets threeDSRequestorAuthenticationInfo + * + * @param \Adyen\Model\Checkout\ThreeDSRequestorAuthenticationInfo|null $threeDSRequestorAuthenticationInfo threeDSRequestorAuthenticationInfo + * + * @return self + */ + public function setThreeDSRequestorAuthenticationInfo($threeDSRequestorAuthenticationInfo) + { + if (is_null($threeDSRequestorAuthenticationInfo)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorAuthenticationInfo cannot be null'); + } + $this->container['threeDSRequestorAuthenticationInfo'] = $threeDSRequestorAuthenticationInfo; + + return $this; + } + + /** + * Gets threeDSRequestorChallengeInd + * + * @return string|null + */ + public function getThreeDSRequestorChallengeInd() + { + return $this->container['threeDSRequestorChallengeInd']; + } + + /** + * Sets threeDSRequestorChallengeInd + * + * @param string|null $threeDSRequestorChallengeInd Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only + * + * @return self + */ + public function setThreeDSRequestorChallengeInd($threeDSRequestorChallengeInd) + { + if (is_null($threeDSRequestorChallengeInd)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorChallengeInd cannot be null'); + } + $allowedValues = $this->getThreeDSRequestorChallengeIndAllowableValues(); + if (!in_array($threeDSRequestorChallengeInd, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'threeDSRequestorChallengeInd', must be one of '%s'", + $threeDSRequestorChallengeInd, + implode("', '", $allowedValues) + ) + ); + } + $this->container['threeDSRequestorChallengeInd'] = $threeDSRequestorChallengeInd; + + return $this; + } + + /** + * Gets threeDSRequestorID + * + * @return string|null + */ + public function getThreeDSRequestorID() + { + return $this->container['threeDSRequestorID']; + } + + /** + * Sets threeDSRequestorID + * + * @param string|null $threeDSRequestorID Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2. + * + * @return self + */ + public function setThreeDSRequestorID($threeDSRequestorID) + { + if (is_null($threeDSRequestorID)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorID cannot be null'); + } + $this->container['threeDSRequestorID'] = $threeDSRequestorID; + + return $this; + } + + /** + * Gets threeDSRequestorName + * + * @return string|null + */ + public function getThreeDSRequestorName() + { + return $this->container['threeDSRequestorName']; + } + + /** + * Sets threeDSRequestorName + * + * @param string|null $threeDSRequestorName Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. + * + * @return self + */ + public function setThreeDSRequestorName($threeDSRequestorName) + { + if (is_null($threeDSRequestorName)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorName cannot be null'); + } + $this->container['threeDSRequestorName'] = $threeDSRequestorName; + + return $this; + } + + /** + * Gets threeDSRequestorPriorAuthenticationInfo + * + * @return \Adyen\Model\Checkout\ThreeDSRequestorPriorAuthenticationInfo|null + */ + public function getThreeDSRequestorPriorAuthenticationInfo() + { + return $this->container['threeDSRequestorPriorAuthenticationInfo']; + } + + /** + * Sets threeDSRequestorPriorAuthenticationInfo + * + * @param \Adyen\Model\Checkout\ThreeDSRequestorPriorAuthenticationInfo|null $threeDSRequestorPriorAuthenticationInfo threeDSRequestorPriorAuthenticationInfo + * + * @return self + */ + public function setThreeDSRequestorPriorAuthenticationInfo($threeDSRequestorPriorAuthenticationInfo) + { + if (is_null($threeDSRequestorPriorAuthenticationInfo)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorPriorAuthenticationInfo cannot be null'); + } + $this->container['threeDSRequestorPriorAuthenticationInfo'] = $threeDSRequestorPriorAuthenticationInfo; + + return $this; + } + + /** + * Gets threeDSRequestorURL + * + * @return string|null + */ + public function getThreeDSRequestorURL() + { + return $this->container['threeDSRequestorURL']; + } + + /** + * Sets threeDSRequestorURL + * + * @param string|null $threeDSRequestorURL URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. + * + * @return self + */ + public function setThreeDSRequestorURL($threeDSRequestorURL) + { + if (is_null($threeDSRequestorURL)) { + throw new \InvalidArgumentException('non-nullable threeDSRequestorURL cannot be null'); + } + $this->container['threeDSRequestorURL'] = $threeDSRequestorURL; + + return $this; + } + + /** + * Gets transType + * + * @return string|null + */ + public function getTransType() + { + return $this->container['transType']; + } + + /** + * Sets transType + * + * @param string|null $transType Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load + * + * @return self + */ + public function setTransType($transType) + { + if (is_null($transType)) { + throw new \InvalidArgumentException('non-nullable transType cannot be null'); + } + $allowedValues = $this->getTransTypeAllowableValues(); + if (!in_array($transType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'transType', must be one of '%s'", + $transType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['transType'] = $transType; + + return $this; + } + + /** + * Gets transactionType + * + * @return string|null + */ + public function getTransactionType() + { + return $this->container['transactionType']; + } + + /** + * Sets transactionType + * + * @param string|null $transactionType Identify the type of the transaction being authenticated. + * + * @return self + */ + public function setTransactionType($transactionType) + { + if (is_null($transactionType)) { + throw new \InvalidArgumentException('non-nullable transactionType cannot be null'); + } + $allowedValues = $this->getTransactionTypeAllowableValues(); + if (!in_array($transactionType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'transactionType', must be one of '%s'", + $transactionType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['transactionType'] = $transactionType; + + return $this; + } + + /** + * Gets whiteListStatus + * + * @return string|null + */ + public function getWhiteListStatus() + { + return $this->container['whiteListStatus']; + } + + /** + * Sets whiteListStatus + * + * @param string|null $whiteListStatus The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. + * + * @return self + */ + public function setWhiteListStatus($whiteListStatus) + { + if (is_null($whiteListStatus)) { + throw new \InvalidArgumentException('non-nullable whiteListStatus cannot be null'); + } + $this->container['whiteListStatus'] = $whiteListStatus; + + return $this; + } + + /** + * Gets workPhone + * + * @return \Adyen\Model\Checkout\Phone|null + */ + public function getWorkPhone() + { + return $this->container['workPhone']; + } + + /** + * Sets workPhone + * + * @param \Adyen\Model\Checkout\Phone|null $workPhone workPhone + * + * @return self + */ + public function setWorkPhone($workPhone) + { + if (is_null($workPhone)) { + throw new \InvalidArgumentException('non-nullable workPhone cannot be null'); + } + $this->container['workPhone'] = $workPhone; + + 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/Address.php b/src/Adyen/Model/LegalEntityManagement/Address.php index f789fbd1e..f08cb68ee 100644 --- a/src/Adyen/Model/LegalEntityManagement/Address.php +++ b/src/Adyen/Model/LegalEntityManagement/Address.php @@ -408,7 +408,7 @@ public function getStateOrProvince() /** * Sets stateOrProvince * - * @param string|null $stateOrProvince The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. If you specify the state or province, you must also send `city`, `postalCode`, and `street`. + * @param string|null $stateOrProvince The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. If you specify the state or province, you must also send `city`, `postalCode`, and `street`. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php index 2dd02ccb8..77b637fd6 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php @@ -46,7 +46,8 @@ class BankAccountInfo implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'accountIdentification' => '\Adyen\Model\LegalEntityManagement\BankAccount', 'accountType' => 'string', - 'countryCode' => 'string' + 'countryCode' => 'string', + 'trustedSource' => 'bool' ]; /** @@ -59,7 +60,8 @@ class BankAccountInfo implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'accountIdentification' => null, 'accountType' => null, - 'countryCode' => null + 'countryCode' => null, + 'trustedSource' => null ]; /** @@ -70,7 +72,8 @@ class BankAccountInfo implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'accountIdentification' => false, 'accountType' => false, - 'countryCode' => false + 'countryCode' => false, + 'trustedSource' => false ]; /** @@ -161,7 +164,8 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountIdentification' => 'accountIdentification', 'accountType' => 'accountType', - 'countryCode' => 'countryCode' + 'countryCode' => 'countryCode', + 'trustedSource' => 'trustedSource' ]; /** @@ -172,7 +176,8 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountIdentification' => 'setAccountIdentification', 'accountType' => 'setAccountType', - 'countryCode' => 'setCountryCode' + 'countryCode' => 'setCountryCode', + 'trustedSource' => 'setTrustedSource' ]; /** @@ -183,7 +188,8 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountIdentification' => 'getAccountIdentification', 'accountType' => 'getAccountType', - 'countryCode' => 'getCountryCode' + 'countryCode' => 'getCountryCode', + 'trustedSource' => 'getTrustedSource' ]; /** @@ -246,6 +252,7 @@ public function __construct(array $data = null) $this->setIfExists('accountIdentification', $data ?? [], null); $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('countryCode', $data ?? [], null); + $this->setIfExists('trustedSource', $data ?? [], null); } /** @@ -372,6 +379,33 @@ public function setCountryCode($countryCode) return $this; } + + /** + * Gets trustedSource + * + * @return bool|null + */ + public function getTrustedSource() + { + return $this->container['trustedSource']; + } + + /** + * Sets trustedSource + * + * @param bool|null $trustedSource Identifies if the bank account was created through [instant bank verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding). + * + * @return self + */ + public function setTrustedSource($trustedSource) + { + if (is_null($trustedSource)) { + throw new \InvalidArgumentException('non-nullable trustedSource cannot be null'); + } + $this->container['trustedSource'] = $trustedSource; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php index 425ba8aff..159ded8ec 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php @@ -269,10 +269,26 @@ public function getModelName() return self::$openAPIModelName; } + public const CAPABILITY_RECEIVE_PAYMENTS = 'receivePayments'; + 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'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCapabilityAllowableValues() + { + return [ + self::CAPABILITY_RECEIVE_PAYMENTS, + self::CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS, + self::CAPABILITY_ISSUE_BANK_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -340,6 +356,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getCapabilityAllowableValues(); + if (!is_null($this->container['capability']) && !in_array($this->container['capability'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'capability', must be one of '%s'", + $this->container['capability'], + implode("', '", $allowedValues) + ); + } + if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } @@ -390,7 +415,7 @@ public function getCapability() /** * Sets capability * - * @param string|null $capability The capability for which you are creating the business line. For example, **receivePayments**. + * @param string|null $capability The capability for which you are creating the business line. Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount** * * @return self * @deprecated @@ -400,6 +425,16 @@ public function setCapability($capability) if (is_null($capability)) { throw new \InvalidArgumentException('non-nullable capability cannot be null'); } + $allowedValues = $this->getCapabilityAllowableValues(); + if (!in_array($capability, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'capability', must be one of '%s'", + $capability, + implode("', '", $allowedValues) + ) + ); + } $this->container['capability'] = $capability; return $this; @@ -553,7 +588,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**, **issuing**, **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php index a4c57ddae..e1fef84c8 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php @@ -257,10 +257,26 @@ public function getModelName() return self::$openAPIModelName; } + public const CAPABILITY_RECEIVE_PAYMENTS = 'receivePayments'; + 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'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCapabilityAllowableValues() + { + return [ + self::CAPABILITY_RECEIVE_PAYMENTS, + self::CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS, + self::CAPABILITY_ISSUE_BANK_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -326,6 +342,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getCapabilityAllowableValues(); + if (!is_null($this->container['capability']) && !in_array($this->container['capability'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'capability', must be one of '%s'", + $this->container['capability'], + implode("', '", $allowedValues) + ); + } + if ($this->container['industryCode'] === null) { $invalidProperties[] = "'industryCode' can't be null"; } @@ -373,7 +398,7 @@ public function getCapability() /** * Sets capability * - * @param string|null $capability The capability for which you are creating the business line. For example, **receivePayments**. + * @param string|null $capability The capability for which you are creating the business line. Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount** * * @return self * @deprecated @@ -383,6 +408,16 @@ public function setCapability($capability) if (is_null($capability)) { throw new \InvalidArgumentException('non-nullable capability cannot be null'); } + $allowedValues = $this->getCapabilityAllowableValues(); + if (!in_array($capability, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'capability', must be one of '%s'", + $capability, + implode("', '", $allowedValues) + ) + ); + } $this->container['capability'] = $capability; return $this; @@ -482,7 +517,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**, **issuing**, **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php index f31318638..2329225c2 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php @@ -257,10 +257,26 @@ public function getModelName() return self::$openAPIModelName; } + public const CAPABILITY_RECEIVE_PAYMENTS = 'receivePayments'; + 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'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCapabilityAllowableValues() + { + return [ + self::CAPABILITY_RECEIVE_PAYMENTS, + self::CAPABILITY_RECEIVE_FROM_PLATFORM_PAYMENTS, + self::CAPABILITY_ISSUE_BANK_ACCOUNT, + ]; + } /** * Gets allowable values of the enum * @@ -326,6 +342,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getCapabilityAllowableValues(); + if (!is_null($this->container['capability']) && !in_array($this->container['capability'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'capability', must be one of '%s'", + $this->container['capability'], + implode("', '", $allowedValues) + ); + } + if ($this->container['service'] === null) { $invalidProperties[] = "'service' can't be null"; } @@ -377,6 +402,16 @@ public function setCapability($capability) if (is_null($capability)) { throw new \InvalidArgumentException('non-nullable capability cannot be null'); } + $allowedValues = $this->getCapabilityAllowableValues(); + if (!in_array($capability, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'capability', must be one of '%s'", + $capability, + implode("', '", $allowedValues) + ) + ); + } $this->container['capability'] = $capability; return $this; @@ -476,7 +511,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**, **issuing**, **banking** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php index 05a427816..ae97db0fd 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php @@ -236,6 +236,7 @@ public function getModelName() public const TYPE_BANK_ACCOUNT = 'BankAccount'; public const TYPE_DOCUMENT = 'Document'; public const TYPE_LEGAL_ENTITY = 'LegalEntity'; + public const TYPE_PRODUCT = 'product'; /** * Gets allowable values of the enum @@ -248,6 +249,7 @@ public function getTypeAllowableValues() self::TYPE_BANK_ACCOUNT, self::TYPE_DOCUMENT, self::TYPE_LEGAL_ENTITY, + self::TYPE_PRODUCT, ]; } /** diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php index 9e270d4d5..f8ddbbc68 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php @@ -230,6 +230,7 @@ public function getModelName() public const TYPE_BANK_ACCOUNT = 'BankAccount'; public const TYPE_DOCUMENT = 'Document'; public const TYPE_LEGAL_ENTITY = 'LegalEntity'; + public const TYPE_PRODUCT = 'product'; /** * Gets allowable values of the enum @@ -242,6 +243,7 @@ public function getTypeAllowableValues() self::TYPE_BANK_ACCOUNT, self::TYPE_DOCUMENT, self::TYPE_LEGAL_ENTITY, + self::TYPE_PRODUCT, ]; } /** diff --git a/src/Adyen/Model/LegalEntityManagement/Document.php b/src/Adyen/Model/LegalEntityManagement/Document.php index 7ce1199d3..5543264f1 100644 --- a/src/Adyen/Model/LegalEntityManagement/Document.php +++ b/src/Adyen/Model/LegalEntityManagement/Document.php @@ -300,6 +300,7 @@ public function getModelName() public const TYPE_PROOF_OF_ORGANIZATION_TAX_INFO = 'proofOfOrganizationTaxInfo'; public const TYPE_PROOF_OF_INDUSTRY = 'proofOfIndustry'; public const TYPE_CONSTITUTIONAL_DOCUMENT = 'constitutionalDocument'; + public const TYPE_PROOF_OF_FUNDING_OR_WEALTH_SOURCE = 'proofOfFundingOrWealthSource'; /** * Gets allowable values of the enum @@ -322,6 +323,7 @@ public function getTypeAllowableValues() self::TYPE_PROOF_OF_ORGANIZATION_TAX_INFO, self::TYPE_PROOF_OF_INDUSTRY, self::TYPE_CONSTITUTIONAL_DOCUMENT, + self::TYPE_PROOF_OF_FUNDING_OR_WEALTH_SOURCE, ]; } /** @@ -760,7 +762,7 @@ public function getType() /** * Sets type * - * @param string $type Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. When providing ID numbers: * For **individual**, the `type` values can be **driversLicense**, **identityCard**, **nationalIdNumber**, or **passport**. When uploading photo IDs: * For **individual**, the `type` values can be **identityCard**, **driversLicense**, or **passport**. When uploading other documents: * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, or **proofOfIndustry**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, or **proofOfIndividualTaxId**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * @param string $type Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. When providing ID numbers: * For **individual**, the `type` values can be **driversLicense**, **identityCard**, **nationalIdNumber**, or **passport**. When uploading photo IDs: * For **individual**, the `type` values can be **identityCard**, **driversLicense**, or **passport**. When uploading other documents: * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index 47db1b652..b290fd18b 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -264,6 +264,7 @@ public function getModelName() public const TYPE_PROOF_OF_ORGANIZATION_TAX_INFO = 'proofOfOrganizationTaxInfo'; public const TYPE_PROOF_OF_INDUSTRY = 'proofOfIndustry'; public const TYPE_CONSTITUTIONAL_DOCUMENT = 'constitutionalDocument'; + public const TYPE_PROOF_OF_FUNDING_OR_WEALTH_SOURCE = 'proofOfFundingOrWealthSource'; /** * Gets allowable values of the enum @@ -286,6 +287,7 @@ public function getTypeAllowableValues() self::TYPE_PROOF_OF_ORGANIZATION_TAX_INFO, self::TYPE_PROOF_OF_INDUSTRY, self::TYPE_CONSTITUTIONAL_DOCUMENT, + self::TYPE_PROOF_OF_FUNDING_OR_WEALTH_SOURCE, ]; } /** @@ -545,7 +547,7 @@ public function getType() /** * Sets type * - * @param string $type Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. When providing ID numbers: * For **individual**, the `type` values can be **driversLicense**, **identityCard**, **nationalIdNumber**, or **passport**. When uploading photo IDs: * For **individual**, the `type` values can be **identityCard**, **driversLicense**, or **passport**. When uploading other documents: * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, or **proofOfIndustry**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, or **proofOfIndividualTaxId**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * @param string $type Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. When providing ID numbers: * For **individual**, the `type` values can be **driversLicense**, **identityCard**, **nationalIdNumber**, or **passport**. When uploading photo IDs: * For **individual**, the `type` values can be **identityCard**, **driversLicense**, or **passport**. When uploading other documents: * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php index 58c973242..5104228cd 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php @@ -388,7 +388,7 @@ public function getEntityType() /** * Sets entityType * - * @param string|null $entityType The legal entity type of associated legal entity. For example, **organization**, **soleProprietorship** or **individual**. + * @param string|null $entityType The legal entity type of associated legal entity. For example, **organization**, **soleProprietorship** or **individual**. * * @return self */ @@ -496,7 +496,7 @@ public function getType() /** * Sets type * - * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. + * @param string $type Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/Organization.php b/src/Adyen/Model/LegalEntityManagement/Organization.php index d0a7b4191..329d5ba48 100644 --- a/src/Adyen/Model/LegalEntityManagement/Organization.php +++ b/src/Adyen/Model/LegalEntityManagement/Organization.php @@ -778,7 +778,7 @@ public function getType() /** * Sets type * - * @param string|null $type Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. + * @param string|null $type Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php index 1c0bc8b4c..45c3b7437 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php @@ -397,7 +397,7 @@ public function getTrustedSource() /** * Sets trustedSource * - * @param bool|null $trustedSource Identifies if the TI was created from a trusted source. + * @param bool|null $trustedSource Identifies if the bank account was created through [instant bank verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding). * * @return self */ diff --git a/src/Adyen/Model/Management/AfterpayTouchInfo.php b/src/Adyen/Model/Management/AfterpayTouchInfo.php new file mode 100644 index 000000000..57591d5bf --- /dev/null +++ b/src/Adyen/Model/Management/AfterpayTouchInfo.php @@ -0,0 +1,387 @@ + + */ +class AfterpayTouchInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AfterpayTouchInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'supportUrl' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'supportUrl' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'supportUrl' => 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 = [ + 'supportUrl' => 'supportUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'supportUrl' => 'setSupportUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'supportUrl' => 'getSupportUrl' + ]; + + /** + * 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('supportUrl', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['supportUrl'] === null) { + $invalidProperties[] = "'supportUrl' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets supportUrl + * + * @return string + */ + public function getSupportUrl() + { + return $this->container['supportUrl']; + } + + /** + * Sets supportUrl + * + * @param string $supportUrl Support Url + * + * @return self + */ + public function setSupportUrl($supportUrl) + { + if (is_null($supportUrl)) { + throw new \InvalidArgumentException('non-nullable supportUrl cannot be null'); + } + $this->container['supportUrl'] = $supportUrl; + + 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/ClearpayInfo.php b/src/Adyen/Model/Management/ClearpayInfo.php new file mode 100644 index 000000000..107e4072c --- /dev/null +++ b/src/Adyen/Model/Management/ClearpayInfo.php @@ -0,0 +1,387 @@ + + */ +class ClearpayInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ClearpayInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'supportUrl' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'supportUrl' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'supportUrl' => 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 = [ + 'supportUrl' => 'supportUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'supportUrl' => 'setSupportUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'supportUrl' => 'getSupportUrl' + ]; + + /** + * 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('supportUrl', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['supportUrl'] === null) { + $invalidProperties[] = "'supportUrl' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets supportUrl + * + * @return string + */ + public function getSupportUrl() + { + return $this->container['supportUrl']; + } + + /** + * Sets supportUrl + * + * @param string $supportUrl Support Url + * + * @return self + */ + public function setSupportUrl($supportUrl) + { + if (is_null($supportUrl)) { + throw new \InvalidArgumentException('non-nullable supportUrl cannot be null'); + } + $this->container['supportUrl'] = $supportUrl; + + 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/CompanyUser.php b/src/Adyen/Model/Management/CompanyUser.php index 43309e5b6..e571929f9 100644 --- a/src/Adyen/Model/Management/CompanyUser.php +++ b/src/Adyen/Model/Management/CompanyUser.php @@ -47,8 +47,8 @@ class CompanyUser implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => '\Adyen\Model\Management\Links', 'accountGroups' => 'string[]', 'active' => 'bool', + 'apps' => 'string[]', 'associatedMerchantAccounts' => 'string[]', - 'authnApps' => 'string[]', 'email' => 'string', 'id' => 'string', 'name' => '\Adyen\Model\Management\Name', @@ -68,8 +68,8 @@ class CompanyUser implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => null, 'accountGroups' => null, 'active' => null, + 'apps' => null, 'associatedMerchantAccounts' => null, - 'authnApps' => null, 'email' => null, 'id' => null, 'name' => null, @@ -87,8 +87,8 @@ class CompanyUser implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => false, 'accountGroups' => false, 'active' => false, + 'apps' => false, 'associatedMerchantAccounts' => false, - 'authnApps' => false, 'email' => false, 'id' => false, 'name' => false, @@ -186,8 +186,8 @@ public function isNullableSetToNull(string $property): bool 'links' => '_links', 'accountGroups' => 'accountGroups', 'active' => 'active', + 'apps' => 'apps', 'associatedMerchantAccounts' => 'associatedMerchantAccounts', - 'authnApps' => 'authnApps', 'email' => 'email', 'id' => 'id', 'name' => 'name', @@ -205,8 +205,8 @@ public function isNullableSetToNull(string $property): bool 'links' => 'setLinks', 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', + 'apps' => 'setApps', 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', - 'authnApps' => 'setAuthnApps', 'email' => 'setEmail', 'id' => 'setId', 'name' => 'setName', @@ -224,8 +224,8 @@ public function isNullableSetToNull(string $property): bool 'links' => 'getLinks', 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', + 'apps' => 'getApps', 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', - 'authnApps' => 'getAuthnApps', 'email' => 'getEmail', 'id' => 'getId', 'name' => 'getName', @@ -294,8 +294,8 @@ public function __construct(array $data = null) $this->setIfExists('links', $data ?? [], null); $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); + $this->setIfExists('apps', $data ?? [], null); $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -443,55 +443,55 @@ public function setActive($active) } /** - * Gets associatedMerchantAccounts + * Gets apps * * @return string[]|null */ - public function getAssociatedMerchantAccounts() + public function getApps() { - return $this->container['associatedMerchantAccounts']; + return $this->container['apps']; } /** - * Sets associatedMerchantAccounts + * Sets apps * - * @param string[]|null $associatedMerchantAccounts The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. + * @param string[]|null $apps Set of apps available to this user * * @return self */ - public function setAssociatedMerchantAccounts($associatedMerchantAccounts) + public function setApps($apps) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); + if (is_null($apps)) { + throw new \InvalidArgumentException('non-nullable apps cannot be null'); } - $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; + $this->container['apps'] = $apps; return $this; } /** - * Gets authnApps + * Gets associatedMerchantAccounts * * @return string[]|null */ - public function getAuthnApps() + public function getAssociatedMerchantAccounts() { - return $this->container['authnApps']; + return $this->container['associatedMerchantAccounts']; } /** - * Sets authnApps + * Sets associatedMerchantAccounts * - * @param string[]|null $authnApps Set of authn apps available to this user + * @param string[]|null $associatedMerchantAccounts The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. * * @return self */ - public function setAuthnApps($authnApps) + public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); + if (is_null($associatedMerchantAccounts)) { + throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); } - $this->container['authnApps'] = $authnApps; + $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; } diff --git a/src/Adyen/Model/Management/CreateCompanyUserRequest.php b/src/Adyen/Model/Management/CreateCompanyUserRequest.php index 5cf133c68..c6990b649 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyUserRequest.php @@ -46,7 +46,6 @@ class CreateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri protected static $openAPITypes = [ 'accountGroups' => 'string[]', 'associatedMerchantAccounts' => 'string[]', - 'authnApps' => 'string[]', 'email' => 'string', 'name' => '\Adyen\Model\Management\Name', 'roles' => 'string[]', @@ -64,7 +63,6 @@ class CreateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri protected static $openAPIFormats = [ 'accountGroups' => null, 'associatedMerchantAccounts' => null, - 'authnApps' => null, 'email' => null, 'name' => null, 'roles' => null, @@ -80,7 +78,6 @@ class CreateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri protected static $openAPINullables = [ 'accountGroups' => false, 'associatedMerchantAccounts' => false, - 'authnApps' => false, 'email' => false, 'name' => false, 'roles' => false, @@ -176,7 +173,6 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountGroups' => 'accountGroups', 'associatedMerchantAccounts' => 'associatedMerchantAccounts', - 'authnApps' => 'authnApps', 'email' => 'email', 'name' => 'name', 'roles' => 'roles', @@ -192,7 +188,6 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountGroups' => 'setAccountGroups', 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', - 'authnApps' => 'setAuthnApps', 'email' => 'setEmail', 'name' => 'setName', 'roles' => 'setRoles', @@ -208,7 +203,6 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountGroups' => 'getAccountGroups', 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', - 'authnApps' => 'getAuthnApps', 'email' => 'getEmail', 'name' => 'getName', 'roles' => 'getRoles', @@ -275,7 +269,6 @@ public function __construct(array $data = null) { $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); @@ -388,33 +381,6 @@ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) return $this; } - /** - * Gets authnApps - * - * @return string[]|null - */ - public function getAuthnApps() - { - return $this->container['authnApps']; - } - - /** - * Sets authnApps - * - * @param string[]|null $authnApps Set of authn apps to add to this user - * - * @return self - */ - public function setAuthnApps($authnApps) - { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); - } - $this->container['authnApps'] = $authnApps; - - return $this; - } - /** * Gets email * @@ -536,7 +502,7 @@ public function getUsername() /** * Sets username * - * @param string $username The username for this user. Allowed length: 255 alphanumeric characters. + * @param string $username The user's email address that will be their username. Must be the same as the one in the `email` field. * * @return self */ diff --git a/src/Adyen/Model/Management/CreateCompanyUserResponse.php b/src/Adyen/Model/Management/CreateCompanyUserResponse.php index 72fe184af..e568db7d6 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserResponse.php +++ b/src/Adyen/Model/Management/CreateCompanyUserResponse.php @@ -47,8 +47,8 @@ class CreateCompanyUserResponse implements ModelInterface, ArrayAccess, \JsonSer 'links' => '\Adyen\Model\Management\Links', 'accountGroups' => 'string[]', 'active' => 'bool', + 'apps' => 'string[]', 'associatedMerchantAccounts' => 'string[]', - 'authnApps' => 'string[]', 'email' => 'string', 'id' => 'string', 'name' => '\Adyen\Model\Management\Name', @@ -68,8 +68,8 @@ class CreateCompanyUserResponse implements ModelInterface, ArrayAccess, \JsonSer 'links' => null, 'accountGroups' => null, 'active' => null, + 'apps' => null, 'associatedMerchantAccounts' => null, - 'authnApps' => null, 'email' => null, 'id' => null, 'name' => null, @@ -87,8 +87,8 @@ class CreateCompanyUserResponse implements ModelInterface, ArrayAccess, \JsonSer 'links' => false, 'accountGroups' => false, 'active' => false, + 'apps' => false, 'associatedMerchantAccounts' => false, - 'authnApps' => false, 'email' => false, 'id' => false, 'name' => false, @@ -186,8 +186,8 @@ public function isNullableSetToNull(string $property): bool 'links' => '_links', 'accountGroups' => 'accountGroups', 'active' => 'active', + 'apps' => 'apps', 'associatedMerchantAccounts' => 'associatedMerchantAccounts', - 'authnApps' => 'authnApps', 'email' => 'email', 'id' => 'id', 'name' => 'name', @@ -205,8 +205,8 @@ public function isNullableSetToNull(string $property): bool 'links' => 'setLinks', 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', + 'apps' => 'setApps', 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', - 'authnApps' => 'setAuthnApps', 'email' => 'setEmail', 'id' => 'setId', 'name' => 'setName', @@ -224,8 +224,8 @@ public function isNullableSetToNull(string $property): bool 'links' => 'getLinks', 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', + 'apps' => 'getApps', 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', - 'authnApps' => 'getAuthnApps', 'email' => 'getEmail', 'id' => 'getId', 'name' => 'getName', @@ -294,8 +294,8 @@ public function __construct(array $data = null) $this->setIfExists('links', $data ?? [], null); $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); + $this->setIfExists('apps', $data ?? [], null); $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -443,55 +443,55 @@ public function setActive($active) } /** - * Gets associatedMerchantAccounts + * Gets apps * * @return string[]|null */ - public function getAssociatedMerchantAccounts() + public function getApps() { - return $this->container['associatedMerchantAccounts']; + return $this->container['apps']; } /** - * Sets associatedMerchantAccounts + * Sets apps * - * @param string[]|null $associatedMerchantAccounts The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. + * @param string[]|null $apps Set of apps available to this user * * @return self */ - public function setAssociatedMerchantAccounts($associatedMerchantAccounts) + public function setApps($apps) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); + if (is_null($apps)) { + throw new \InvalidArgumentException('non-nullable apps cannot be null'); } - $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; + $this->container['apps'] = $apps; return $this; } /** - * Gets authnApps + * Gets associatedMerchantAccounts * * @return string[]|null */ - public function getAuthnApps() + public function getAssociatedMerchantAccounts() { - return $this->container['authnApps']; + return $this->container['associatedMerchantAccounts']; } /** - * Sets authnApps + * Sets associatedMerchantAccounts * - * @param string[]|null $authnApps Set of authn apps available to this user + * @param string[]|null $associatedMerchantAccounts The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. * * @return self */ - public function setAuthnApps($authnApps) + public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); + if (is_null($associatedMerchantAccounts)) { + throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); } - $this->container['authnApps'] = $authnApps; + $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; } diff --git a/src/Adyen/Model/Management/CreateMerchantUserRequest.php b/src/Adyen/Model/Management/CreateMerchantUserRequest.php index 64a68f32b..deee403e0 100644 --- a/src/Adyen/Model/Management/CreateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantUserRequest.php @@ -45,7 +45,6 @@ class CreateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPITypes = [ 'accountGroups' => 'string[]', - 'authnApps' => 'string[]', 'email' => 'string', 'name' => '\Adyen\Model\Management\Name', 'roles' => 'string[]', @@ -62,7 +61,6 @@ class CreateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPIFormats = [ 'accountGroups' => null, - 'authnApps' => null, 'email' => null, 'name' => null, 'roles' => null, @@ -77,7 +75,6 @@ class CreateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer */ protected static $openAPINullables = [ 'accountGroups' => false, - 'authnApps' => false, 'email' => false, 'name' => false, 'roles' => false, @@ -172,7 +169,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'accountGroups' => 'accountGroups', - 'authnApps' => 'authnApps', 'email' => 'email', 'name' => 'name', 'roles' => 'roles', @@ -187,7 +183,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'accountGroups' => 'setAccountGroups', - 'authnApps' => 'setAuthnApps', 'email' => 'setEmail', 'name' => 'setName', 'roles' => 'setRoles', @@ -202,7 +197,6 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'accountGroups' => 'getAccountGroups', - 'authnApps' => 'getAuthnApps', 'email' => 'getEmail', 'name' => 'getName', 'roles' => 'getRoles', @@ -268,7 +262,6 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('accountGroups', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); @@ -354,33 +347,6 @@ public function setAccountGroups($accountGroups) return $this; } - /** - * Gets authnApps - * - * @return string[]|null - */ - public function getAuthnApps() - { - return $this->container['authnApps']; - } - - /** - * Sets authnApps - * - * @param string[]|null $authnApps Set of authn apps to add to this user - * - * @return self - */ - public function setAuthnApps($authnApps) - { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); - } - $this->container['authnApps'] = $authnApps; - - return $this; - } - /** * Gets email * @@ -502,7 +468,7 @@ public function getUsername() /** * Sets username * - * @param string $username The username for this user. Allowed length: 255 alphanumeric characters. + * @param string $username The user's email address that will be their username. Must be the same as the one in the `email` field. * * @return self */ diff --git a/src/Adyen/Model/Management/CreateUserResponse.php b/src/Adyen/Model/Management/CreateUserResponse.php index 152d3817f..60ebde706 100644 --- a/src/Adyen/Model/Management/CreateUserResponse.php +++ b/src/Adyen/Model/Management/CreateUserResponse.php @@ -47,7 +47,7 @@ class CreateUserResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'links' => '\Adyen\Model\Management\Links', 'accountGroups' => 'string[]', 'active' => 'bool', - 'authnApps' => 'string[]', + 'apps' => 'string[]', 'email' => 'string', 'id' => 'string', 'name' => '\Adyen\Model\Management\Name', @@ -67,7 +67,7 @@ class CreateUserResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'links' => null, 'accountGroups' => null, 'active' => null, - 'authnApps' => null, + 'apps' => null, 'email' => null, 'id' => null, 'name' => null, @@ -85,7 +85,7 @@ class CreateUserResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'links' => false, 'accountGroups' => false, 'active' => false, - 'authnApps' => false, + 'apps' => false, 'email' => false, 'id' => false, 'name' => false, @@ -183,7 +183,7 @@ public function isNullableSetToNull(string $property): bool 'links' => '_links', 'accountGroups' => 'accountGroups', 'active' => 'active', - 'authnApps' => 'authnApps', + 'apps' => 'apps', 'email' => 'email', 'id' => 'id', 'name' => 'name', @@ -201,7 +201,7 @@ public function isNullableSetToNull(string $property): bool 'links' => 'setLinks', 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', - 'authnApps' => 'setAuthnApps', + 'apps' => 'setApps', 'email' => 'setEmail', 'id' => 'setId', 'name' => 'setName', @@ -219,7 +219,7 @@ public function isNullableSetToNull(string $property): bool 'links' => 'getLinks', 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', - 'authnApps' => 'getAuthnApps', + 'apps' => 'getApps', 'email' => 'getEmail', 'id' => 'getId', 'name' => 'getName', @@ -288,7 +288,7 @@ public function __construct(array $data = null) $this->setIfExists('links', $data ?? [], null); $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); + $this->setIfExists('apps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -436,28 +436,28 @@ public function setActive($active) } /** - * Gets authnApps + * Gets apps * * @return string[]|null */ - public function getAuthnApps() + public function getApps() { - return $this->container['authnApps']; + return $this->container['apps']; } /** - * Sets authnApps + * Sets apps * - * @param string[]|null $authnApps Set of authn apps available to this user + * @param string[]|null $apps Set of apps available to this user * * @return self */ - public function setAuthnApps($authnApps) + public function setApps($apps) { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); + if (is_null($apps)) { + throw new \InvalidArgumentException('non-nullable apps cannot be null'); } - $this->container['authnApps'] = $authnApps; + $this->container['apps'] = $apps; return $this; } diff --git a/src/Adyen/Model/Management/InvalidFieldWrapper.php b/src/Adyen/Model/Management/InvalidFieldWrapper.php new file mode 100644 index 000000000..357145df7 --- /dev/null +++ b/src/Adyen/Model/Management/InvalidFieldWrapper.php @@ -0,0 +1,384 @@ + + */ +class InvalidFieldWrapper implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'InvalidFieldWrapper'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'invalidField' => '\Adyen\Model\Management\InvalidField' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'invalidField' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'invalidField' => 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 = [ + 'invalidField' => 'InvalidField' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'invalidField' => 'setInvalidField' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'invalidField' => 'getInvalidField' + ]; + + /** + * 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('invalidField', $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 invalidField + * + * @return \Adyen\Model\Management\InvalidField|null + */ + public function getInvalidField() + { + return $this->container['invalidField']; + } + + /** + * Sets invalidField + * + * @param \Adyen\Model\Management\InvalidField|null $invalidField invalidField + * + * @return self + */ + public function setInvalidField($invalidField) + { + if (is_null($invalidField)) { + throw new \InvalidArgumentException('non-nullable invalidField cannot be null'); + } + $this->container['invalidField'] = $invalidField; + + 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/JSONObject.php b/src/Adyen/Model/Management/JSONObject.php index 32df5be45..de992412f 100644 --- a/src/Adyen/Model/Management/JSONObject.php +++ b/src/Adyen/Model/Management/JSONObject.php @@ -44,7 +44,7 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'paths' => '\Adyen\Model\Management\JSONPath[]', + 'paths' => '\Adyen\Model\Management\JSONPathWrapper[]', 'rootPath' => '\Adyen\Model\Management\JSONPath' ]; @@ -286,7 +286,7 @@ public function valid() /** * Gets paths * - * @return \Adyen\Model\Management\JSONPath[]|null + * @return \Adyen\Model\Management\JSONPathWrapper[]|null */ public function getPaths() { @@ -296,7 +296,7 @@ public function getPaths() /** * Sets paths * - * @param \Adyen\Model\Management\JSONPath[]|null $paths paths + * @param \Adyen\Model\Management\JSONPathWrapper[]|null $paths paths * * @return self */ diff --git a/src/Adyen/Model/Management/JSONPathWrapper.php b/src/Adyen/Model/Management/JSONPathWrapper.php new file mode 100644 index 000000000..595430c9a --- /dev/null +++ b/src/Adyen/Model/Management/JSONPathWrapper.php @@ -0,0 +1,384 @@ + + */ +class JSONPathWrapper implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'JSONPathWrapper'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'jSONPath' => '\Adyen\Model\Management\JSONPath' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'jSONPath' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'jSONPath' => 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 = [ + 'jSONPath' => 'JSONPath' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'jSONPath' => 'setJSONPath' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'jSONPath' => 'getJSONPath' + ]; + + /** + * 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('jSONPath', $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 jSONPath + * + * @return \Adyen\Model\Management\JSONPath|null + */ + public function getJSONPath() + { + return $this->container['jSONPath']; + } + + /** + * Sets jSONPath + * + * @param \Adyen\Model\Management\JSONPath|null $jSONPath jSONPath + * + * @return self + */ + public function setJSONPath($jSONPath) + { + if (is_null($jSONPath)) { + throw new \InvalidArgumentException('non-nullable jSONPath cannot be null'); + } + $this->container['jSONPath'] = $jSONPath; + + 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/ListTerminalsResponse.php b/src/Adyen/Model/Management/ListTerminalsResponse.php index 7eacf4a0a..a05328ddb 100644 --- a/src/Adyen/Model/Management/ListTerminalsResponse.php +++ b/src/Adyen/Model/Management/ListTerminalsResponse.php @@ -44,7 +44,10 @@ class ListTerminalsResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'data' => '\Adyen\Model\Management\Terminal[]' + 'links' => '\Adyen\Model\Management\PaginationLinks', + 'data' => '\Adyen\Model\Management\Terminal[]', + 'itemsTotal' => 'int', + 'pagesTotal' => 'int' ]; /** @@ -55,7 +58,10 @@ class ListTerminalsResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'data' => null + 'links' => null, + 'data' => null, + 'itemsTotal' => 'int32', + 'pagesTotal' => 'int32' ]; /** @@ -64,7 +70,10 @@ class ListTerminalsResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static $openAPINullables = [ - 'data' => false + 'links' => false, + 'data' => false, + 'itemsTotal' => true, + 'pagesTotal' => true ]; /** @@ -153,7 +162,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'links' => '_links', + 'data' => 'data', + 'itemsTotal' => 'itemsTotal', + 'pagesTotal' => 'pagesTotal' ]; /** @@ -162,7 +174,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'links' => 'setLinks', + 'data' => 'setData', + 'itemsTotal' => 'setItemsTotal', + 'pagesTotal' => 'setPagesTotal' ]; /** @@ -171,7 +186,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'links' => 'getLinks', + 'data' => 'getData', + 'itemsTotal' => 'getItemsTotal', + 'pagesTotal' => 'getPagesTotal' ]; /** @@ -231,7 +249,10 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('links', $data ?? [], null); $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('itemsTotal', $data ?? [], null); + $this->setIfExists('pagesTotal', $data ?? [], null); } /** @@ -261,6 +282,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['itemsTotal'] === null) { + $invalidProperties[] = "'itemsTotal' can't be null"; + } + if ($this->container['pagesTotal'] === null) { + $invalidProperties[] = "'pagesTotal' can't be null"; + } return $invalidProperties; } @@ -276,6 +303,33 @@ public function valid() } + /** + * Gets links + * + * @return \Adyen\Model\Management\PaginationLinks|null + */ + public function getLinks() + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \Adyen\Model\Management\PaginationLinks|null $links links + * + * @return self + */ + public function setLinks($links) + { + if (is_null($links)) { + throw new \InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + /** * Gets data * @@ -302,6 +356,56 @@ public function setData($data) return $this; } + + /** + * Gets itemsTotal + * + * @return int + */ + public function getItemsTotal() + { + return $this->container['itemsTotal']; + } + + /** + * Sets itemsTotal + * + * @param int $itemsTotal Total number of items. + * + * @return self + */ + public function setItemsTotal($itemsTotal) + { + // Do nothing for nullable integers + $this->container['itemsTotal'] = $itemsTotal; + + return $this; + } + + /** + * Gets pagesTotal + * + * @return int + */ + public function getPagesTotal() + { + return $this->container['pagesTotal']; + } + + /** + * Sets pagesTotal + * + * @param int $pagesTotal Total number of pages. + * + * @return self + */ + public function setPagesTotal($pagesTotal) + { + // Do nothing for nullable integers + $this->container['pagesTotal'] = $pagesTotal; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index adbb66acc..ec629a823 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -44,11 +44,13 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'allowed' => 'bool', 'applePay' => '\Adyen\Model\Management\ApplePayInfo', 'bcmc' => '\Adyen\Model\Management\BcmcInfo', 'businessLineId' => 'string', 'cartesBancaires' => '\Adyen\Model\Management\CartesBancairesInfo', + 'clearpay' => '\Adyen\Model\Management\ClearpayInfo', 'countries' => 'string[]', 'currencies' => 'string[]', 'customRoutingFlags' => 'string[]', @@ -64,6 +66,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'sofort' => '\Adyen\Model\Management\SofortInfo', 'storeId' => 'string', 'swish' => '\Adyen\Model\Management\SwishInfo', + 'twint' => '\Adyen\Model\Management\TwintInfo', 'type' => 'string', 'verificationStatus' => 'string', 'vipps' => '\Adyen\Model\Management\VippsInfo' @@ -77,11 +80,13 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'afterpayTouch' => null, 'allowed' => null, 'applePay' => null, 'bcmc' => null, 'businessLineId' => null, 'cartesBancaires' => null, + 'clearpay' => null, 'countries' => null, 'currencies' => null, 'customRoutingFlags' => null, @@ -97,6 +102,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'sofort' => null, 'storeId' => null, 'swish' => null, + 'twint' => null, 'type' => null, 'verificationStatus' => null, 'vipps' => null @@ -108,11 +114,13 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'afterpayTouch' => false, 'allowed' => false, 'applePay' => false, 'bcmc' => false, 'businessLineId' => false, 'cartesBancaires' => false, + 'clearpay' => false, 'countries' => false, 'currencies' => false, 'customRoutingFlags' => false, @@ -128,6 +136,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'sofort' => false, 'storeId' => false, 'swish' => false, + 'twint' => false, 'type' => false, 'verificationStatus' => false, 'vipps' => false @@ -219,11 +228,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'afterpayTouch' => 'afterpayTouch', 'allowed' => 'allowed', 'applePay' => 'applePay', 'bcmc' => 'bcmc', 'businessLineId' => 'businessLineId', 'cartesBancaires' => 'cartesBancaires', + 'clearpay' => 'clearpay', 'countries' => 'countries', 'currencies' => 'currencies', 'customRoutingFlags' => 'customRoutingFlags', @@ -239,6 +250,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'sofort', 'storeId' => 'storeId', 'swish' => 'swish', + 'twint' => 'twint', 'type' => 'type', 'verificationStatus' => 'verificationStatus', 'vipps' => 'vipps' @@ -250,11 +262,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'afterpayTouch' => 'setAfterpayTouch', 'allowed' => 'setAllowed', 'applePay' => 'setApplePay', 'bcmc' => 'setBcmc', 'businessLineId' => 'setBusinessLineId', 'cartesBancaires' => 'setCartesBancaires', + 'clearpay' => 'setClearpay', 'countries' => 'setCountries', 'currencies' => 'setCurrencies', 'customRoutingFlags' => 'setCustomRoutingFlags', @@ -270,6 +284,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'setSofort', 'storeId' => 'setStoreId', 'swish' => 'setSwish', + 'twint' => 'setTwint', 'type' => 'setType', 'verificationStatus' => 'setVerificationStatus', 'vipps' => 'setVipps' @@ -281,11 +296,13 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'afterpayTouch' => 'getAfterpayTouch', 'allowed' => 'getAllowed', 'applePay' => 'getApplePay', 'bcmc' => 'getBcmc', 'businessLineId' => 'getBusinessLineId', 'cartesBancaires' => 'getCartesBancaires', + 'clearpay' => 'getClearpay', 'countries' => 'getCountries', 'currencies' => 'getCurrencies', 'customRoutingFlags' => 'getCustomRoutingFlags', @@ -301,6 +318,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'getSofort', 'storeId' => 'getStoreId', 'swish' => 'getSwish', + 'twint' => 'getTwint', 'type' => 'getType', 'verificationStatus' => 'getVerificationStatus', 'vipps' => 'getVipps' @@ -381,11 +399,13 @@ public function getVerificationStatusAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('allowed', $data ?? [], null); $this->setIfExists('applePay', $data ?? [], null); $this->setIfExists('bcmc', $data ?? [], null); $this->setIfExists('businessLineId', $data ?? [], null); $this->setIfExists('cartesBancaires', $data ?? [], null); + $this->setIfExists('clearpay', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); $this->setIfExists('currencies', $data ?? [], null); $this->setIfExists('customRoutingFlags', $data ?? [], null); @@ -401,6 +421,7 @@ public function __construct(array $data = null) $this->setIfExists('sofort', $data ?? [], null); $this->setIfExists('storeId', $data ?? [], null); $this->setIfExists('swish', $data ?? [], null); + $this->setIfExists('twint', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('verificationStatus', $data ?? [], null); $this->setIfExists('vipps', $data ?? [], null); @@ -460,6 +481,33 @@ public function valid() } + /** + * Gets afterpayTouch + * + * @return \Adyen\Model\Management\AfterpayTouchInfo|null + */ + public function getAfterpayTouch() + { + return $this->container['afterpayTouch']; + } + + /** + * Sets afterpayTouch + * + * @param \Adyen\Model\Management\AfterpayTouchInfo|null $afterpayTouch afterpayTouch + * + * @return self + */ + public function setAfterpayTouch($afterpayTouch) + { + if (is_null($afterpayTouch)) { + throw new \InvalidArgumentException('non-nullable afterpayTouch cannot be null'); + } + $this->container['afterpayTouch'] = $afterpayTouch; + + return $this; + } + /** * Gets allowed * @@ -595,6 +643,33 @@ public function setCartesBancaires($cartesBancaires) return $this; } + /** + * Gets clearpay + * + * @return \Adyen\Model\Management\ClearpayInfo|null + */ + public function getClearpay() + { + return $this->container['clearpay']; + } + + /** + * Sets clearpay + * + * @param \Adyen\Model\Management\ClearpayInfo|null $clearpay clearpay + * + * @return self + */ + public function setClearpay($clearpay) + { + if (is_null($clearpay)) { + throw new \InvalidArgumentException('non-nullable clearpay cannot be null'); + } + $this->container['clearpay'] = $clearpay; + + return $this; + } + /** * Gets countries * @@ -1000,6 +1075,33 @@ public function setSwish($swish) return $this; } + /** + * Gets twint + * + * @return \Adyen\Model\Management\TwintInfo|null + */ + public function getTwint() + { + return $this->container['twint']; + } + + /** + * Sets twint + * + * @param \Adyen\Model\Management\TwintInfo|null $twint twint + * + * @return self + */ + public function setTwint($twint) + { + if (is_null($twint)) { + throw new \InvalidArgumentException('non-nullable twint cannot be null'); + } + $this->container['twint'] = $twint; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index a46973265..188729423 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -45,7 +45,7 @@ class PaymentMethodResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static $openAPITypes = [ 'links' => '\Adyen\Model\Management\PaginationLinks', - 'data' => '\Adyen\Model\Management\PaymentMethod[]', + 'data' => '\Adyen\Model\Management\PaymentMethodWrapper[]', 'itemsTotal' => 'int', 'pagesTotal' => 'int', 'typesWithErrors' => 'string[]' @@ -281,6 +281,8 @@ public function getModelName() public const TYPES_WITH_ERRORS_PAYSHOP = 'payshop'; public const TYPES_WITH_ERRORS_SWISH = 'swish'; public const TYPES_WITH_ERRORS_TRUSTLY = 'trustly'; + public const TYPES_WITH_ERRORS_TWINT = 'twint'; + public const TYPES_WITH_ERRORS_TWINT_POS = 'twint_pos'; public const TYPES_WITH_ERRORS_VIPPS = 'vipps'; public const TYPES_WITH_ERRORS_VISA = 'visa'; public const TYPES_WITH_ERRORS_VISADEBIT = 'visadebit'; @@ -338,6 +340,8 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_PAYSHOP, self::TYPES_WITH_ERRORS_SWISH, self::TYPES_WITH_ERRORS_TRUSTLY, + self::TYPES_WITH_ERRORS_TWINT, + self::TYPES_WITH_ERRORS_TWINT_POS, self::TYPES_WITH_ERRORS_VIPPS, self::TYPES_WITH_ERRORS_VISA, self::TYPES_WITH_ERRORS_VISADEBIT, @@ -446,7 +450,7 @@ public function setLinks($links) /** * Gets data * - * @return \Adyen\Model\Management\PaymentMethod[]|null + * @return \Adyen\Model\Management\PaymentMethodWrapper[]|null */ public function getData() { @@ -456,7 +460,7 @@ public function getData() /** * Sets data * - * @param \Adyen\Model\Management\PaymentMethod[]|null $data Payment methods details. + * @param \Adyen\Model\Management\PaymentMethodWrapper[]|null $data Payment methods details. * * @return self */ diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index 142a6529f..df4d3c6b5 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -44,10 +44,12 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ + 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'applePay' => '\Adyen\Model\Management\ApplePayInfo', 'bcmc' => '\Adyen\Model\Management\BcmcInfo', 'businessLineId' => 'string', 'cartesBancaires' => '\Adyen\Model\Management\CartesBancairesInfo', + 'clearpay' => '\Adyen\Model\Management\ClearpayInfo', 'countries' => 'string[]', 'currencies' => 'string[]', 'customRoutingFlags' => 'string[]', @@ -61,6 +63,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'sofort' => '\Adyen\Model\Management\SofortInfo', 'storeId' => 'string', 'swish' => '\Adyen\Model\Management\SwishInfo', + 'twint' => '\Adyen\Model\Management\TwintInfo', 'type' => 'string', 'vipps' => '\Adyen\Model\Management\VippsInfo' ]; @@ -73,10 +76,12 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ + 'afterpayTouch' => null, 'applePay' => null, 'bcmc' => null, 'businessLineId' => null, 'cartesBancaires' => null, + 'clearpay' => null, 'countries' => null, 'currencies' => null, 'customRoutingFlags' => null, @@ -90,6 +95,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'sofort' => null, 'storeId' => null, 'swish' => null, + 'twint' => null, 'type' => null, 'vipps' => null ]; @@ -100,10 +106,12 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @var boolean[] */ protected static $openAPINullables = [ + 'afterpayTouch' => false, 'applePay' => false, 'bcmc' => false, 'businessLineId' => false, 'cartesBancaires' => false, + 'clearpay' => false, 'countries' => false, 'currencies' => false, 'customRoutingFlags' => false, @@ -117,6 +125,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'sofort' => false, 'storeId' => false, 'swish' => false, + 'twint' => false, 'type' => false, 'vipps' => false ]; @@ -207,10 +216,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'afterpayTouch' => 'afterpayTouch', 'applePay' => 'applePay', 'bcmc' => 'bcmc', 'businessLineId' => 'businessLineId', 'cartesBancaires' => 'cartesBancaires', + 'clearpay' => 'clearpay', 'countries' => 'countries', 'currencies' => 'currencies', 'customRoutingFlags' => 'customRoutingFlags', @@ -224,6 +235,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'sofort', 'storeId' => 'storeId', 'swish' => 'swish', + 'twint' => 'twint', 'type' => 'type', 'vipps' => 'vipps' ]; @@ -234,10 +246,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'afterpayTouch' => 'setAfterpayTouch', 'applePay' => 'setApplePay', 'bcmc' => 'setBcmc', 'businessLineId' => 'setBusinessLineId', 'cartesBancaires' => 'setCartesBancaires', + 'clearpay' => 'setClearpay', 'countries' => 'setCountries', 'currencies' => 'setCurrencies', 'customRoutingFlags' => 'setCustomRoutingFlags', @@ -251,6 +265,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'setSofort', 'storeId' => 'setStoreId', 'swish' => 'setSwish', + 'twint' => 'setTwint', 'type' => 'setType', 'vipps' => 'setVipps' ]; @@ -261,10 +276,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'afterpayTouch' => 'getAfterpayTouch', 'applePay' => 'getApplePay', 'bcmc' => 'getBcmc', 'businessLineId' => 'getBusinessLineId', 'cartesBancaires' => 'getCartesBancaires', + 'clearpay' => 'getClearpay', 'countries' => 'getCountries', 'currencies' => 'getCurrencies', 'customRoutingFlags' => 'getCustomRoutingFlags', @@ -278,6 +295,7 @@ public function isNullableSetToNull(string $property): bool 'sofort' => 'getSofort', 'storeId' => 'getStoreId', 'swish' => 'getSwish', + 'twint' => 'getTwint', 'type' => 'getType', 'vipps' => 'getVipps' ]; @@ -369,6 +387,8 @@ public function getModelName() public const TYPE_PAYSHOP = 'payshop'; public const TYPE_SWISH = 'swish'; public const TYPE_TRUSTLY = 'trustly'; + public const TYPE_TWINT = 'twint'; + public const TYPE_TWINT_POS = 'twint_pos'; public const TYPE_VIPPS = 'vipps'; public const TYPE_VISA = 'visa'; public const TYPE_VISADEBIT = 'visadebit'; @@ -440,6 +460,8 @@ public function getTypeAllowableValues() self::TYPE_PAYSHOP, self::TYPE_SWISH, self::TYPE_TRUSTLY, + self::TYPE_TWINT, + self::TYPE_TWINT_POS, self::TYPE_VIPPS, self::TYPE_VISA, self::TYPE_VISADEBIT, @@ -463,10 +485,12 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('applePay', $data ?? [], null); $this->setIfExists('bcmc', $data ?? [], null); $this->setIfExists('businessLineId', $data ?? [], null); $this->setIfExists('cartesBancaires', $data ?? [], null); + $this->setIfExists('clearpay', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); $this->setIfExists('currencies', $data ?? [], null); $this->setIfExists('customRoutingFlags', $data ?? [], null); @@ -480,6 +504,7 @@ public function __construct(array $data = null) $this->setIfExists('sofort', $data ?? [], null); $this->setIfExists('storeId', $data ?? [], null); $this->setIfExists('swish', $data ?? [], null); + $this->setIfExists('twint', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('vipps', $data ?? [], null); } @@ -544,6 +569,33 @@ public function valid() } + /** + * Gets afterpayTouch + * + * @return \Adyen\Model\Management\AfterpayTouchInfo|null + */ + public function getAfterpayTouch() + { + return $this->container['afterpayTouch']; + } + + /** + * Sets afterpayTouch + * + * @param \Adyen\Model\Management\AfterpayTouchInfo|null $afterpayTouch afterpayTouch + * + * @return self + */ + public function setAfterpayTouch($afterpayTouch) + { + if (is_null($afterpayTouch)) { + throw new \InvalidArgumentException('non-nullable afterpayTouch cannot be null'); + } + $this->container['afterpayTouch'] = $afterpayTouch; + + return $this; + } + /** * Gets applePay * @@ -652,6 +704,33 @@ public function setCartesBancaires($cartesBancaires) return $this; } + /** + * Gets clearpay + * + * @return \Adyen\Model\Management\ClearpayInfo|null + */ + public function getClearpay() + { + return $this->container['clearpay']; + } + + /** + * Sets clearpay + * + * @param \Adyen\Model\Management\ClearpayInfo|null $clearpay clearpay + * + * @return self + */ + public function setClearpay($clearpay) + { + if (is_null($clearpay)) { + throw new \InvalidArgumentException('non-nullable clearpay cannot be null'); + } + $this->container['clearpay'] = $clearpay; + + return $this; + } + /** * Gets countries * @@ -1013,6 +1092,33 @@ public function setSwish($swish) return $this; } + /** + * Gets twint + * + * @return \Adyen\Model\Management\TwintInfo|null + */ + public function getTwint() + { + return $this->container['twint']; + } + + /** + * Sets twint + * + * @param \Adyen\Model\Management\TwintInfo|null $twint twint + * + * @return self + */ + public function setTwint($twint) + { + if (is_null($twint)) { + throw new \InvalidArgumentException('non-nullable twint cannot be null'); + } + $this->container['twint'] = $twint; + + return $this; + } + /** * Gets type * diff --git a/src/Adyen/Model/Management/PaymentMethodWrapper.php b/src/Adyen/Model/Management/PaymentMethodWrapper.php new file mode 100644 index 000000000..fe06ccc8e --- /dev/null +++ b/src/Adyen/Model/Management/PaymentMethodWrapper.php @@ -0,0 +1,384 @@ + + */ +class PaymentMethodWrapper implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentMethodWrapper'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'paymentMethod' => '\Adyen\Model\Management\PaymentMethod' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'paymentMethod' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'paymentMethod' => 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 = [ + 'paymentMethod' => 'PaymentMethod' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'paymentMethod' => 'setPaymentMethod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'paymentMethod' => 'getPaymentMethod' + ]; + + /** + * 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('paymentMethod', $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 paymentMethod + * + * @return \Adyen\Model\Management\PaymentMethod|null + */ + public function getPaymentMethod() + { + return $this->container['paymentMethod']; + } + + /** + * Sets paymentMethod + * + * @param \Adyen\Model\Management\PaymentMethod|null $paymentMethod paymentMethod + * + * @return self + */ + public function setPaymentMethod($paymentMethod) + { + if (is_null($paymentMethod)) { + throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); + } + $this->container['paymentMethod'] = $paymentMethod; + + 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/RestServiceError.php b/src/Adyen/Model/Management/RestServiceError.php index a66ee465d..acf97d1ca 100644 --- a/src/Adyen/Model/Management/RestServiceError.php +++ b/src/Adyen/Model/Management/RestServiceError.php @@ -47,7 +47,7 @@ class RestServiceError implements ModelInterface, ArrayAccess, \JsonSerializable 'detail' => 'string', 'errorCode' => 'string', 'instance' => 'string', - 'invalidFields' => '\Adyen\Model\Management\InvalidField[]', + 'invalidFields' => '\Adyen\Model\Management\InvalidFieldWrapper[]', 'requestId' => 'string', 'response' => '\Adyen\Model\Management\JSONObject', 'status' => 'int', @@ -431,7 +431,7 @@ public function setInstance($instance) /** * Gets invalidFields * - * @return \Adyen\Model\Management\InvalidField[]|null + * @return \Adyen\Model\Management\InvalidFieldWrapper[]|null */ public function getInvalidFields() { @@ -441,7 +441,7 @@ public function getInvalidFields() /** * Sets invalidFields * - * @param \Adyen\Model\Management\InvalidField[]|null $invalidFields Detailed explanation of each validation error, when applicable. + * @param \Adyen\Model\Management\InvalidFieldWrapper[]|null $invalidFields Detailed explanation of each validation error, when applicable. * * @return self */ diff --git a/src/Adyen/Model/Management/StoreCreationRequest.php b/src/Adyen/Model/Management/StoreCreationRequest.php index 1392056e8..0b8999eb3 100644 --- a/src/Adyen/Model/Management/StoreCreationRequest.php +++ b/src/Adyen/Model/Management/StoreCreationRequest.php @@ -377,7 +377,7 @@ public function getBusinessLineIds() /** * Sets businessLineIds * - * @param string[]|null $businessLineIds The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. + * @param string[]|null $businessLineIds The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. * * @return self */ @@ -485,7 +485,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). + * @param string|null $reference Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). * * @return self */ diff --git a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php index 26bdb04fc..8d3179f0c 100644 --- a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php +++ b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php @@ -387,7 +387,7 @@ public function getBusinessLineIds() /** * Sets businessLineIds * - * @param string[]|null $businessLineIds The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. + * @param string[]|null $businessLineIds The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. * * @return self */ @@ -522,7 +522,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). + * @param string|null $reference Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). * * @return self */ diff --git a/src/Adyen/Model/Management/Terminal.php b/src/Adyen/Model/Management/Terminal.php index 4018cf820..3e729de42 100644 --- a/src/Adyen/Model/Management/Terminal.php +++ b/src/Adyen/Model/Management/Terminal.php @@ -427,6 +427,7 @@ public function valid() * Gets assigned * * @return bool|null + * @deprecated */ public function getAssigned() { @@ -439,6 +440,7 @@ public function getAssigned() * @param bool|null $assigned The [assignment status](https://docs.adyen.com/point-of-sale/automating-terminal-management/assign-terminals-api) of the terminal. If true, the terminal is assigned. If false, the terminal is in inventory and can't be boarded. * * @return self + * @deprecated */ public function setAssigned($assigned) { @@ -454,6 +456,7 @@ public function setAssigned($assigned) * Gets bluetoothIp * * @return string|null + * @deprecated */ public function getBluetoothIp() { @@ -466,6 +469,7 @@ public function getBluetoothIp() * @param string|null $bluetoothIp The Bluetooth IP address of the terminal. * * @return self + * @deprecated */ public function setBluetoothIp($bluetoothIp) { @@ -508,6 +512,7 @@ public function setBluetoothMac($bluetoothMac) * Gets city * * @return string|null + * @deprecated */ public function getCity() { @@ -520,6 +525,7 @@ public function getCity() * @param string|null $city The city where the terminal is located. * * @return self + * @deprecated */ public function setCity($city) { @@ -535,6 +541,7 @@ public function setCity($city) * Gets companyAccount * * @return string|null + * @deprecated */ public function getCompanyAccount() { @@ -547,6 +554,7 @@ public function getCompanyAccount() * @param string|null $companyAccount The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account. * * @return self + * @deprecated */ public function setCompanyAccount($companyAccount) { @@ -562,6 +570,7 @@ public function setCompanyAccount($companyAccount) * Gets countryCode * * @return string|null + * @deprecated */ public function getCountryCode() { @@ -574,6 +583,7 @@ public function getCountryCode() * @param string|null $countryCode The country code of the country where the terminal is located. * * @return self + * @deprecated */ public function setCountryCode($countryCode) { @@ -589,6 +599,7 @@ public function setCountryCode($countryCode) * Gets deviceModel * * @return string|null + * @deprecated */ public function getDeviceModel() { @@ -601,6 +612,7 @@ public function getDeviceModel() * @param string|null $deviceModel The model name of the terminal. * * @return self + * @deprecated */ public function setDeviceModel($deviceModel) { @@ -616,6 +628,7 @@ public function setDeviceModel($deviceModel) * Gets ethernetIp * * @return string|null + * @deprecated */ public function getEthernetIp() { @@ -628,6 +641,7 @@ public function getEthernetIp() * @param string|null $ethernetIp The ethernet IP address of the terminal. * * @return self + * @deprecated */ public function setEthernetIp($ethernetIp) { @@ -643,6 +657,7 @@ public function setEthernetIp($ethernetIp) * Gets ethernetMac * * @return string|null + * @deprecated */ public function getEthernetMac() { @@ -655,6 +670,7 @@ public function getEthernetMac() * @param string|null $ethernetMac The ethernet MAC address of the terminal. * * @return self + * @deprecated */ public function setEthernetMac($ethernetMac) { @@ -697,6 +713,7 @@ public function setFirmwareVersion($firmwareVersion) * Gets iccid * * @return string|null + * @deprecated */ public function getIccid() { @@ -709,6 +726,7 @@ public function getIccid() * @param string|null $iccid The integrated circuit card identifier (ICCID) of the SIM card in the terminal. * * @return self + * @deprecated */ public function setIccid($iccid) { @@ -751,6 +769,7 @@ public function setId($id) * Gets lastActivityDateTime * * @return \DateTime|null + * @deprecated */ public function getLastActivityDateTime() { @@ -763,6 +782,7 @@ public function getLastActivityDateTime() * @param \DateTime|null $lastActivityDateTime Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago. * * @return self + * @deprecated */ public function setLastActivityDateTime($lastActivityDateTime) { @@ -778,6 +798,7 @@ public function setLastActivityDateTime($lastActivityDateTime) * Gets lastTransactionDateTime * * @return \DateTime|null + * @deprecated */ public function getLastTransactionDateTime() { @@ -790,6 +811,7 @@ public function getLastTransactionDateTime() * @param \DateTime|null $lastTransactionDateTime Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago. * * @return self + * @deprecated */ public function setLastTransactionDateTime($lastTransactionDateTime) { @@ -805,6 +827,7 @@ public function setLastTransactionDateTime($lastTransactionDateTime) * Gets linkNegotiation * * @return string|null + * @deprecated */ public function getLinkNegotiation() { @@ -817,6 +840,7 @@ public function getLinkNegotiation() * @param string|null $linkNegotiation The Ethernet link negotiation that the terminal uses: - `auto`: Auto-negotiation - `100full`: 100 Mbps full duplex * * @return self + * @deprecated */ public function setLinkNegotiation($linkNegotiation) { @@ -859,6 +883,7 @@ public function setSerialNumber($serialNumber) * Gets simStatus * * @return string|null + * @deprecated */ public function getSimStatus() { @@ -871,6 +896,7 @@ public function getSimStatus() * @param string|null $simStatus On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal: ACTIVE or INVENTORY. * * @return self + * @deprecated */ public function setSimStatus($simStatus) { @@ -886,6 +912,7 @@ public function setSimStatus($simStatus) * Gets status * * @return string|null + * @deprecated */ public function getStatus() { @@ -898,6 +925,7 @@ public function getStatus() * @param string|null $status Indicates when the terminal was last online, whether the terminal is being reassigned, or whether the terminal is turned off. If the terminal was last online more that a week ago, it is also shown as turned off. * * @return self + * @deprecated */ public function setStatus($status) { @@ -913,6 +941,7 @@ public function setStatus($status) * Gets storeStatus * * @return string|null + * @deprecated */ public function getStoreStatus() { @@ -925,6 +954,7 @@ public function getStoreStatus() * @param string|null $storeStatus The status of the store that the terminal is assigned to. * * @return self + * @deprecated */ public function setStoreStatus($storeStatus) { @@ -940,6 +970,7 @@ public function setStoreStatus($storeStatus) * Gets wifiIp * * @return string|null + * @deprecated */ public function getWifiIp() { @@ -952,6 +983,7 @@ public function getWifiIp() * @param string|null $wifiIp The terminal's IP address in your Wi-Fi network. * * @return self + * @deprecated */ public function setWifiIp($wifiIp) { @@ -967,6 +999,7 @@ public function setWifiIp($wifiIp) * Gets wifiMac * * @return string|null + * @deprecated */ public function getWifiMac() { @@ -979,6 +1012,7 @@ public function getWifiMac() * @param string|null $wifiMac The terminal's MAC address in your Wi-Fi network. * * @return self + * @deprecated */ public function setWifiMac($wifiMac) { @@ -994,6 +1028,7 @@ public function setWifiMac($wifiMac) * Gets wifiSsid * * @return string|null + * @deprecated */ public function getWifiSsid() { @@ -1006,6 +1041,7 @@ public function getWifiSsid() * @param string|null $wifiSsid The SSID of the Wi-Fi network that your terminal is connected to. * * @return self + * @deprecated */ public function setWifiSsid($wifiSsid) { diff --git a/src/Adyen/Model/Management/TerminalOrderRequest.php b/src/Adyen/Model/Management/TerminalOrderRequest.php index 7e3f2e98b..baee03954 100644 --- a/src/Adyen/Model/Management/TerminalOrderRequest.php +++ b/src/Adyen/Model/Management/TerminalOrderRequest.php @@ -47,6 +47,7 @@ class TerminalOrderRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'billingEntityId' => 'string', 'customerOrderReference' => 'string', 'items' => '\Adyen\Model\Management\OrderItem[]', + 'orderType' => 'string', 'shippingLocationId' => 'string', 'taxId' => 'string' ]; @@ -62,6 +63,7 @@ class TerminalOrderRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'billingEntityId' => null, 'customerOrderReference' => null, 'items' => null, + 'orderType' => null, 'shippingLocationId' => null, 'taxId' => null ]; @@ -75,6 +77,7 @@ class TerminalOrderRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'billingEntityId' => false, 'customerOrderReference' => false, 'items' => false, + 'orderType' => false, 'shippingLocationId' => false, 'taxId' => false ]; @@ -168,6 +171,7 @@ public function isNullableSetToNull(string $property): bool 'billingEntityId' => 'billingEntityId', 'customerOrderReference' => 'customerOrderReference', 'items' => 'items', + 'orderType' => 'orderType', 'shippingLocationId' => 'shippingLocationId', 'taxId' => 'taxId' ]; @@ -181,6 +185,7 @@ public function isNullableSetToNull(string $property): bool 'billingEntityId' => 'setBillingEntityId', 'customerOrderReference' => 'setCustomerOrderReference', 'items' => 'setItems', + 'orderType' => 'setOrderType', 'shippingLocationId' => 'setShippingLocationId', 'taxId' => 'setTaxId' ]; @@ -194,6 +199,7 @@ public function isNullableSetToNull(string $property): bool 'billingEntityId' => 'getBillingEntityId', 'customerOrderReference' => 'getCustomerOrderReference', 'items' => 'getItems', + 'orderType' => 'getOrderType', 'shippingLocationId' => 'getShippingLocationId', 'taxId' => 'getTaxId' ]; @@ -258,6 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('billingEntityId', $data ?? [], null); $this->setIfExists('customerOrderReference', $data ?? [], null); $this->setIfExists('items', $data ?? [], null); + $this->setIfExists('orderType', $data ?? [], null); $this->setIfExists('shippingLocationId', $data ?? [], null); $this->setIfExists('taxId', $data ?? [], null); } @@ -385,6 +392,33 @@ public function setItems($items) return $this; } + /** + * Gets orderType + * + * @return string|null + */ + public function getOrderType() + { + return $this->container['orderType']; + } + + /** + * Sets orderType + * + * @param string|null $orderType Type of order + * + * @return self + */ + public function setOrderType($orderType) + { + if (is_null($orderType)) { + throw new \InvalidArgumentException('non-nullable orderType cannot be null'); + } + $this->container['orderType'] = $orderType; + + return $this; + } + /** * Gets shippingLocationId * diff --git a/src/Adyen/Model/Management/TwintInfo.php b/src/Adyen/Model/Management/TwintInfo.php new file mode 100644 index 000000000..31b53cf05 --- /dev/null +++ b/src/Adyen/Model/Management/TwintInfo.php @@ -0,0 +1,387 @@ + + */ +class TwintInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TwintInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'logo' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'logo' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'logo' => 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 = [ + 'logo' => 'logo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'logo' => 'setLogo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'logo' => 'getLogo' + ]; + + /** + * 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('logo', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['logo'] === null) { + $invalidProperties[] = "'logo' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets logo + * + * @return string + */ + public function getLogo() + { + return $this->container['logo']; + } + + /** + * Sets logo + * + * @param string $logo Twint logo. Format: Base64-encoded string. + * + * @return self + */ + public function setLogo($logo) + { + if (is_null($logo)) { + throw new \InvalidArgumentException('non-nullable logo cannot be null'); + } + $this->container['logo'] = $logo; + + 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/UpdateCompanyUserRequest.php b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php index 7d5e8e14d..0cf79d24f 100644 --- a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php @@ -47,8 +47,6 @@ class UpdateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'accountGroups' => 'string[]', 'active' => 'bool', 'associatedMerchantAccounts' => 'string[]', - 'authnAppsToAdd' => 'string[]', - 'authnAppsToRemove' => 'string[]', 'email' => 'string', 'name' => '\Adyen\Model\Management\Name2', 'roles' => 'string[]', @@ -66,8 +64,6 @@ class UpdateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'accountGroups' => null, 'active' => null, 'associatedMerchantAccounts' => null, - 'authnAppsToAdd' => null, - 'authnAppsToRemove' => null, 'email' => null, 'name' => null, 'roles' => null, @@ -83,8 +79,6 @@ class UpdateCompanyUserRequest implements ModelInterface, ArrayAccess, \JsonSeri 'accountGroups' => false, 'active' => false, 'associatedMerchantAccounts' => false, - 'authnAppsToAdd' => false, - 'authnAppsToRemove' => false, 'email' => false, 'name' => false, 'roles' => false, @@ -180,8 +174,6 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'accountGroups', 'active' => 'active', 'associatedMerchantAccounts' => 'associatedMerchantAccounts', - 'authnAppsToAdd' => 'authnAppsToAdd', - 'authnAppsToRemove' => 'authnAppsToRemove', 'email' => 'email', 'name' => 'name', 'roles' => 'roles', @@ -197,8 +189,6 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', 'associatedMerchantAccounts' => 'setAssociatedMerchantAccounts', - 'authnAppsToAdd' => 'setAuthnAppsToAdd', - 'authnAppsToRemove' => 'setAuthnAppsToRemove', 'email' => 'setEmail', 'name' => 'setName', 'roles' => 'setRoles', @@ -214,8 +204,6 @@ public function isNullableSetToNull(string $property): bool 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', 'associatedMerchantAccounts' => 'getAssociatedMerchantAccounts', - 'authnAppsToAdd' => 'getAuthnAppsToAdd', - 'authnAppsToRemove' => 'getAuthnAppsToRemove', 'email' => 'getEmail', 'name' => 'getName', 'roles' => 'getRoles', @@ -282,8 +270,6 @@ public function __construct(array $data = null) $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); $this->setIfExists('associatedMerchantAccounts', $data ?? [], null); - $this->setIfExists('authnAppsToAdd', $data ?? [], null); - $this->setIfExists('authnAppsToRemove', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); @@ -413,60 +399,6 @@ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) return $this; } - /** - * Gets authnAppsToAdd - * - * @return string[]|null - */ - public function getAuthnAppsToAdd() - { - return $this->container['authnAppsToAdd']; - } - - /** - * Sets authnAppsToAdd - * - * @param string[]|null $authnAppsToAdd Set of authn apps to add to this user - * - * @return self - */ - public function setAuthnAppsToAdd($authnAppsToAdd) - { - if (is_null($authnAppsToAdd)) { - throw new \InvalidArgumentException('non-nullable authnAppsToAdd cannot be null'); - } - $this->container['authnAppsToAdd'] = $authnAppsToAdd; - - return $this; - } - - /** - * Gets authnAppsToRemove - * - * @return string[]|null - */ - public function getAuthnAppsToRemove() - { - return $this->container['authnAppsToRemove']; - } - - /** - * Sets authnAppsToRemove - * - * @param string[]|null $authnAppsToRemove Set of authn apps to remove from this user - * - * @return self - */ - public function setAuthnAppsToRemove($authnAppsToRemove) - { - if (is_null($authnAppsToRemove)) { - throw new \InvalidArgumentException('non-nullable authnAppsToRemove cannot be null'); - } - $this->container['authnAppsToRemove'] = $authnAppsToRemove; - - return $this; - } - /** * Gets email * diff --git a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php index 85d8f7975..a4f582b77 100644 --- a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php @@ -46,8 +46,6 @@ class UpdateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPITypes = [ 'accountGroups' => 'string[]', 'active' => 'bool', - 'authnAppsToAdd' => 'string[]', - 'authnAppsToRemove' => 'string[]', 'email' => 'string', 'name' => '\Adyen\Model\Management\Name2', 'roles' => 'string[]', @@ -64,8 +62,6 @@ class UpdateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPIFormats = [ 'accountGroups' => null, 'active' => null, - 'authnAppsToAdd' => null, - 'authnAppsToRemove' => null, 'email' => null, 'name' => null, 'roles' => null, @@ -80,8 +76,6 @@ class UpdateMerchantUserRequest implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPINullables = [ 'accountGroups' => false, 'active' => false, - 'authnAppsToAdd' => false, - 'authnAppsToRemove' => false, 'email' => false, 'name' => false, 'roles' => false, @@ -176,8 +170,6 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'accountGroups' => 'accountGroups', 'active' => 'active', - 'authnAppsToAdd' => 'authnAppsToAdd', - 'authnAppsToRemove' => 'authnAppsToRemove', 'email' => 'email', 'name' => 'name', 'roles' => 'roles', @@ -192,8 +184,6 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', - 'authnAppsToAdd' => 'setAuthnAppsToAdd', - 'authnAppsToRemove' => 'setAuthnAppsToRemove', 'email' => 'setEmail', 'name' => 'setName', 'roles' => 'setRoles', @@ -208,8 +198,6 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', - 'authnAppsToAdd' => 'getAuthnAppsToAdd', - 'authnAppsToRemove' => 'getAuthnAppsToRemove', 'email' => 'getEmail', 'name' => 'getName', 'roles' => 'getRoles', @@ -275,8 +263,6 @@ public function __construct(array $data = null) { $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); - $this->setIfExists('authnAppsToAdd', $data ?? [], null); - $this->setIfExists('authnAppsToRemove', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('roles', $data ?? [], null); @@ -379,60 +365,6 @@ public function setActive($active) return $this; } - /** - * Gets authnAppsToAdd - * - * @return string[]|null - */ - public function getAuthnAppsToAdd() - { - return $this->container['authnAppsToAdd']; - } - - /** - * Sets authnAppsToAdd - * - * @param string[]|null $authnAppsToAdd Set of authn apps to add to this user - * - * @return self - */ - public function setAuthnAppsToAdd($authnAppsToAdd) - { - if (is_null($authnAppsToAdd)) { - throw new \InvalidArgumentException('non-nullable authnAppsToAdd cannot be null'); - } - $this->container['authnAppsToAdd'] = $authnAppsToAdd; - - return $this; - } - - /** - * Gets authnAppsToRemove - * - * @return string[]|null - */ - public function getAuthnAppsToRemove() - { - return $this->container['authnAppsToRemove']; - } - - /** - * Sets authnAppsToRemove - * - * @param string[]|null $authnAppsToRemove Set of authn apps to remove from this user - * - * @return self - */ - public function setAuthnAppsToRemove($authnAppsToRemove) - { - if (is_null($authnAppsToRemove)) { - throw new \InvalidArgumentException('non-nullable authnAppsToRemove cannot be null'); - } - $this->container['authnAppsToRemove'] = $authnAppsToRemove; - - return $this; - } - /** * Gets email * diff --git a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index 0d53a3277..a5d23c0e7 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -44,11 +44,11 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openAPITypes = [ + 'bcmc' => '\Adyen\Model\Management\BcmcInfo', + 'cartesBancaires' => '\Adyen\Model\Management\CartesBancairesInfo', 'countries' => 'string[]', 'currencies' => 'string[]', - 'customRoutingFlags' => 'string[]', 'enabled' => 'bool', - 'shopperStatement' => '\Adyen\Model\Management\ShopperStatement', 'storeIds' => 'string[]' ]; @@ -60,11 +60,11 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ + 'bcmc' => null, + 'cartesBancaires' => null, 'countries' => null, 'currencies' => null, - 'customRoutingFlags' => null, 'enabled' => null, - 'shopperStatement' => null, 'storeIds' => null ]; @@ -74,11 +74,11 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @var boolean[] */ protected static $openAPINullables = [ + 'bcmc' => false, + 'cartesBancaires' => false, 'countries' => false, 'currencies' => false, - 'customRoutingFlags' => false, 'enabled' => false, - 'shopperStatement' => false, 'storeIds' => false ]; @@ -168,11 +168,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'bcmc' => 'bcmc', + 'cartesBancaires' => 'cartesBancaires', 'countries' => 'countries', 'currencies' => 'currencies', - 'customRoutingFlags' => 'customRoutingFlags', 'enabled' => 'enabled', - 'shopperStatement' => 'shopperStatement', 'storeIds' => 'storeIds' ]; @@ -182,11 +182,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'bcmc' => 'setBcmc', + 'cartesBancaires' => 'setCartesBancaires', 'countries' => 'setCountries', 'currencies' => 'setCurrencies', - 'customRoutingFlags' => 'setCustomRoutingFlags', 'enabled' => 'setEnabled', - 'shopperStatement' => 'setShopperStatement', 'storeIds' => 'setStoreIds' ]; @@ -196,11 +196,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'bcmc' => 'getBcmc', + 'cartesBancaires' => 'getCartesBancaires', 'countries' => 'getCountries', 'currencies' => 'getCurrencies', - 'customRoutingFlags' => 'getCustomRoutingFlags', 'enabled' => 'getEnabled', - 'shopperStatement' => 'getShopperStatement', 'storeIds' => 'getStoreIds' ]; @@ -261,11 +261,11 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('bcmc', $data ?? [], null); + $this->setIfExists('cartesBancaires', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); $this->setIfExists('currencies', $data ?? [], null); - $this->setIfExists('customRoutingFlags', $data ?? [], null); $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('shopperStatement', $data ?? [], null); $this->setIfExists('storeIds', $data ?? [], null); } @@ -312,136 +312,136 @@ public function valid() /** - * Gets countries + * Gets bcmc * - * @return string[]|null + * @return \Adyen\Model\Management\BcmcInfo|null */ - public function getCountries() + public function getBcmc() { - return $this->container['countries']; + return $this->container['bcmc']; } /** - * Sets countries + * Sets bcmc * - * @param string[]|null $countries The list of countries where a payment method is available. By default, all countries supported by the payment method. + * @param \Adyen\Model\Management\BcmcInfo|null $bcmc bcmc * * @return self */ - public function setCountries($countries) + public function setBcmc($bcmc) { - if (is_null($countries)) { - throw new \InvalidArgumentException('non-nullable countries cannot be null'); + if (is_null($bcmc)) { + throw new \InvalidArgumentException('non-nullable bcmc cannot be null'); } - $this->container['countries'] = $countries; + $this->container['bcmc'] = $bcmc; return $this; } /** - * Gets currencies + * Gets cartesBancaires * - * @return string[]|null + * @return \Adyen\Model\Management\CartesBancairesInfo|null */ - public function getCurrencies() + public function getCartesBancaires() { - return $this->container['currencies']; + return $this->container['cartesBancaires']; } /** - * Sets currencies + * Sets cartesBancaires * - * @param string[]|null $currencies The list of currencies that a payment method supports. By default, all currencies supported by the payment method. + * @param \Adyen\Model\Management\CartesBancairesInfo|null $cartesBancaires cartesBancaires * * @return self */ - public function setCurrencies($currencies) + public function setCartesBancaires($cartesBancaires) { - if (is_null($currencies)) { - throw new \InvalidArgumentException('non-nullable currencies cannot be null'); + if (is_null($cartesBancaires)) { + throw new \InvalidArgumentException('non-nullable cartesBancaires cannot be null'); } - $this->container['currencies'] = $currencies; + $this->container['cartesBancaires'] = $cartesBancaires; return $this; } /** - * Gets customRoutingFlags + * Gets countries * * @return string[]|null */ - public function getCustomRoutingFlags() + public function getCountries() { - return $this->container['customRoutingFlags']; + return $this->container['countries']; } /** - * Sets customRoutingFlags + * Sets countries * - * @param string[]|null $customRoutingFlags Custom routing flags for acquirer routing. + * @param string[]|null $countries The list of countries where a payment method is available. By default, all countries supported by the payment method. * * @return self */ - public function setCustomRoutingFlags($customRoutingFlags) + public function setCountries($countries) { - if (is_null($customRoutingFlags)) { - throw new \InvalidArgumentException('non-nullable customRoutingFlags cannot be null'); + if (is_null($countries)) { + throw new \InvalidArgumentException('non-nullable countries cannot be null'); } - $this->container['customRoutingFlags'] = $customRoutingFlags; + $this->container['countries'] = $countries; return $this; } /** - * Gets enabled + * Gets currencies * - * @return bool|null + * @return string[]|null */ - public function getEnabled() + public function getCurrencies() { - return $this->container['enabled']; + return $this->container['currencies']; } /** - * Sets enabled + * Sets currencies * - * @param bool|null $enabled Indicates whether the payment method is enabled (**true**) or disabled (**false**). + * @param string[]|null $currencies The list of currencies that a payment method supports. By default, all currencies supported by the payment method. * * @return self */ - public function setEnabled($enabled) + public function setCurrencies($currencies) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + if (is_null($currencies)) { + throw new \InvalidArgumentException('non-nullable currencies cannot be null'); } - $this->container['enabled'] = $enabled; + $this->container['currencies'] = $currencies; return $this; } /** - * Gets shopperStatement + * Gets enabled * - * @return \Adyen\Model\Management\ShopperStatement|null + * @return bool|null */ - public function getShopperStatement() + public function getEnabled() { - return $this->container['shopperStatement']; + return $this->container['enabled']; } /** - * Sets shopperStatement + * Sets enabled * - * @param \Adyen\Model\Management\ShopperStatement|null $shopperStatement shopperStatement + * @param bool|null $enabled Indicates whether the payment method is enabled (**true**) or disabled (**false**). * * @return self */ - public function setShopperStatement($shopperStatement) + public function setEnabled($enabled) { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); + if (is_null($enabled)) { + throw new \InvalidArgumentException('non-nullable enabled cannot be null'); } - $this->container['shopperStatement'] = $shopperStatement; + $this->container['enabled'] = $enabled; return $this; } diff --git a/src/Adyen/Model/Management/User.php b/src/Adyen/Model/Management/User.php index f31b7e45b..d198a75e6 100644 --- a/src/Adyen/Model/Management/User.php +++ b/src/Adyen/Model/Management/User.php @@ -47,7 +47,7 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => '\Adyen\Model\Management\Links', 'accountGroups' => 'string[]', 'active' => 'bool', - 'authnApps' => 'string[]', + 'apps' => 'string[]', 'email' => 'string', 'id' => 'string', 'name' => '\Adyen\Model\Management\Name', @@ -67,7 +67,7 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => null, 'accountGroups' => null, 'active' => null, - 'authnApps' => null, + 'apps' => null, 'email' => null, 'id' => null, 'name' => null, @@ -85,7 +85,7 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable 'links' => false, 'accountGroups' => false, 'active' => false, - 'authnApps' => false, + 'apps' => false, 'email' => false, 'id' => false, 'name' => false, @@ -183,7 +183,7 @@ public function isNullableSetToNull(string $property): bool 'links' => '_links', 'accountGroups' => 'accountGroups', 'active' => 'active', - 'authnApps' => 'authnApps', + 'apps' => 'apps', 'email' => 'email', 'id' => 'id', 'name' => 'name', @@ -201,7 +201,7 @@ public function isNullableSetToNull(string $property): bool 'links' => 'setLinks', 'accountGroups' => 'setAccountGroups', 'active' => 'setActive', - 'authnApps' => 'setAuthnApps', + 'apps' => 'setApps', 'email' => 'setEmail', 'id' => 'setId', 'name' => 'setName', @@ -219,7 +219,7 @@ public function isNullableSetToNull(string $property): bool 'links' => 'getLinks', 'accountGroups' => 'getAccountGroups', 'active' => 'getActive', - 'authnApps' => 'getAuthnApps', + 'apps' => 'getApps', 'email' => 'getEmail', 'id' => 'getId', 'name' => 'getName', @@ -288,7 +288,7 @@ public function __construct(array $data = null) $this->setIfExists('links', $data ?? [], null); $this->setIfExists('accountGroups', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); - $this->setIfExists('authnApps', $data ?? [], null); + $this->setIfExists('apps', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -436,28 +436,28 @@ public function setActive($active) } /** - * Gets authnApps + * Gets apps * * @return string[]|null */ - public function getAuthnApps() + public function getApps() { - return $this->container['authnApps']; + return $this->container['apps']; } /** - * Sets authnApps + * Sets apps * - * @param string[]|null $authnApps Set of authn apps available to this user + * @param string[]|null $apps Set of apps available to this user * * @return self */ - public function setAuthnApps($authnApps) + public function setApps($apps) { - if (is_null($authnApps)) { - throw new \InvalidArgumentException('non-nullable authnApps cannot be null'); + if (is_null($apps)) { + throw new \InvalidArgumentException('non-nullable apps cannot be null'); } - $this->container['authnApps'] = $authnApps; + $this->container['apps'] = $apps; return $this; } diff --git a/src/Adyen/Model/Management/VippsInfo.php b/src/Adyen/Model/Management/VippsInfo.php index 824fba5f6..e7824dc92 100644 --- a/src/Adyen/Model/Management/VippsInfo.php +++ b/src/Adyen/Model/Management/VippsInfo.php @@ -326,7 +326,7 @@ public function getSubscriptionCancelUrl() /** * Sets subscriptionCancelUrl * - * @param string|null $subscriptionCancelUrl Vipps subscription cancel url + * @param string|null $subscriptionCancelUrl Vipps subscription cancel url (required in case of [recurring payments](https://docs.adyen.com/online-payments/tokenization)) * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataAirline.php b/src/Adyen/Model/Payments/AdditionalDataAirline.php index 35f8d727b..71b161bf5 100644 --- a/src/Adyen/Model/Payments/AdditionalDataAirline.php +++ b/src/Adyen/Model/Payments/AdditionalDataAirline.php @@ -481,7 +481,7 @@ public function getAirlineAgencyInvoiceNumber() /** * Sets airlineAgencyInvoiceNumber * - * @param string|null $airlineAgencyInvoiceNumber Reference number for the invoice, issued by the agency. * minLength: 1 * maxLength: 6 + * @param string|null $airlineAgencyInvoiceNumber The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters * * @return self */ @@ -508,7 +508,7 @@ public function getAirlineAgencyPlanName() /** * Sets airlineAgencyPlanName * - * @param string|null $airlineAgencyPlanName 2-letter agency plan identifier; alphabetical. * minLength: 2 * maxLength: 2 + * @param string|null $airlineAgencyPlanName The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters * * @return self */ @@ -535,7 +535,7 @@ public function getAirlineAirlineCode() /** * Sets airlineAirlineCode * - * @param string|null $airlineAirlineCode [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX); numeric. It identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 * maxLength: 3 + * @param string|null $airlineAirlineCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -562,7 +562,7 @@ public function getAirlineAirlineDesignatorCode() /** * Sets airlineAirlineDesignatorCode * - * @param string|null $airlineAirlineDesignatorCode [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + * @param string|null $airlineAirlineDesignatorCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -589,7 +589,7 @@ public function getAirlineBoardingFee() /** * Sets airlineBoardingFee * - * @param string|null $airlineBoardingFee Chargeable amount for boarding the plane. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 18 + * @param string|null $airlineBoardingFee The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 18 characters * * @return self */ @@ -616,7 +616,7 @@ public function getAirlineComputerizedReservationSystem() /** * Sets airlineComputerizedReservationSystem * - * @param string|null $airlineComputerizedReservationSystem The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Format: alphanumeric. * minLength: 4 * maxLength: 4 + * @param string|null $airlineComputerizedReservationSystem The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters * * @return self */ @@ -643,7 +643,7 @@ public function getAirlineCustomerReferenceNumber() /** * Sets airlineCustomerReferenceNumber * - * @param string|null $airlineCustomerReferenceNumber Reference number; alphanumeric. * minLength: 0 * maxLength: 20 + * @param string|null $airlineCustomerReferenceNumber The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not be all spaces * * @return self */ @@ -670,7 +670,7 @@ public function getAirlineDocumentType() /** * Sets airlineDocumentType * - * @param string|null $airlineDocumentType Optional 2-digit code; alphanumeric. It identifies the type of product of the transaction. The description of the code may appear on credit card statements. * Format: 2-digit code * Example: Passenger ticket = 01 * minLength: 2 * maxLength: 2 + * @param string|null $airlineDocumentType A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters * * @return self */ @@ -697,7 +697,7 @@ public function getAirlineFlightDate() /** * Sets airlineFlightDate * - * @param string|null $airlineFlightDate Flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 * maxLength: 16 + * @param string|null $airlineFlightDate The flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 characters * maxLength: 16 characters * * @return self */ @@ -724,7 +724,7 @@ public function getAirlineLegCarrierCode() /** * Sets airlineLegCarrierCode * - * @param string|null $airlineLegCarrierCode [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. This field is required/mandatory if the airline data includes leg details. * Format: IATA 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + * @param string|null $airlineLegCarrierCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -751,7 +751,7 @@ public function getAirlineLegClassOfTravel() /** * Sets airlineLegClassOfTravel * - * @param string|null $airlineLegClassOfTravel 1-letter travel class identifier; alphabetical. There is no standard; however, the following codes are used rather consistently: * F: first class * J: business class * Y: economy class * W: premium economy Limitations: * minLength: 1 * maxLength: 1 + * @param string|null $airlineLegClassOfTravel A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros * * @return self */ @@ -778,7 +778,7 @@ public function getAirlineLegDateOfTravel() /** * Sets airlineLegDateOfTravel * - * @param string|null $airlineLegDateOfTravel Date and time of travel. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-compliant. * Format: `yyyy-MM-dd HH:mm` * minLength: 16 * maxLength: 16 + * @param string|null $airlineLegDateOfTravel Date and time of travel in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format `yyyy-MM-dd HH:mm`. * Encoding: ASCII * minLength: 16 characters * maxLength: 16 characters * * @return self */ @@ -805,7 +805,7 @@ public function getAirlineLegDepartAirport() /** * Sets airlineLegDepartAirport * - * @param string|null $airlineLegDepartAirport Alphabetical identifier of the departure airport. This field is required if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + * @param string|null $airlineLegDepartAirport The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -832,7 +832,7 @@ public function getAirlineLegDepartTax() /** * Sets airlineLegDepartTax * - * @param string|null $airlineLegDepartTax [Departure tax](https://en.wikipedia.org/wiki/Departure_tax). Amount charged by a country to an individual upon their leaving. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 12 + * @param string|null $airlineLegDepartTax The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros * * @return self */ @@ -859,7 +859,7 @@ public function getAirlineLegDestinationCode() /** * Sets airlineLegDestinationCode * - * @param string|null $airlineLegDestinationCode Alphabetical identifier of the destination/arrival airport. This field is required/mandatory if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + * @param string|null $airlineLegDestinationCode The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -886,7 +886,7 @@ public function getAirlineLegFareBaseCode() /** * Sets airlineLegFareBaseCode * - * @param string|null $airlineLegFareBaseCode [Fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code); alphanumeric. * minLength: 1 * maxLength: 7 + * @param string|null $airlineLegFareBaseCode The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -913,7 +913,7 @@ public function getAirlineLegFlightNumber() /** * Sets airlineLegFlightNumber * - * @param string|null $airlineLegFlightNumber The flight identifier. * minLength: 1 * maxLength: 5 + * @param string|null $airlineLegFlightNumber The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -940,7 +940,7 @@ public function getAirlineLegStopOverCode() /** * Sets airlineLegStopOverCode * - * @param string|null $airlineLegStopOverCode 1-letter code that indicates whether the passenger is entitled to make a stopover. Only two types of characters are allowed: * O: Stopover allowed * X: Stopover not allowed Limitations: * minLength: 1 * maxLength: 1 + * @param string|null $airlineLegStopOverCode A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * * @return self */ @@ -967,7 +967,7 @@ public function getAirlinePassengerDateOfBirth() /** * Sets airlinePassengerDateOfBirth * - * @param string|null $airlinePassengerDateOfBirth Date of birth of the passenger. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 + * @param string|null $airlinePassengerDateOfBirth The passenger's date of birth. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 * * @return self */ @@ -994,7 +994,7 @@ public function getAirlinePassengerFirstName() /** * Sets airlinePassengerFirstName * - * @param string|null $airlinePassengerFirstName Passenger first name/given name. > This field is required/mandatory if the airline data includes passenger details or leg details. + * @param string|null $airlinePassengerFirstName The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII * * @return self */ @@ -1021,7 +1021,7 @@ public function getAirlinePassengerLastName() /** * Sets airlinePassengerLastName * - * @param string|null $airlinePassengerLastName Passenger last name/family name. > This field is required/mandatory if the airline data includes passenger details or leg details. + * @param string|null $airlinePassengerLastName The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII * * @return self */ @@ -1048,7 +1048,7 @@ public function getAirlinePassengerTelephoneNumber() /** * Sets airlinePassengerTelephoneNumber * - * @param string|null $airlinePassengerTelephoneNumber Telephone number of the passenger, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * minLength: 3 * maxLength: 30 + * @param string|null $airlinePassengerTelephoneNumber The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters * * @return self */ @@ -1075,7 +1075,7 @@ public function getAirlinePassengerTravellerType() /** * Sets airlinePassengerTravellerType * - * @param string|null $airlinePassengerTravellerType Passenger type code (PTC). IATA PTC values are 3-letter alphabetical. Example: ADT, SRC, CNN, INS. However, several carriers use non-standard codes that can be up to 5 alphanumeric characters. * minLength: 3 * maxLength: 6 + * @param string|null $airlinePassengerTravellerType The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters * * @return self */ @@ -1102,7 +1102,7 @@ public function getAirlinePassengerName() /** * Sets airlinePassengerName * - * @param string $airlinePassengerName Passenger name, initials, and a title. * Format: last name + first name or initials + title. * Example: *FLYER / MARY MS*. * minLength: 1 * maxLength: 49 + * @param string $airlinePassengerName The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1129,7 +1129,7 @@ public function getAirlineTicketIssueAddress() /** * Sets airlineTicketIssueAddress * - * @param string|null $airlineTicketIssueAddress Address of the place/agency that issued the ticket. * minLength: 0 * maxLength: 16 + * @param string|null $airlineTicketIssueAddress The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters * * @return self */ @@ -1156,7 +1156,7 @@ public function getAirlineTicketNumber() /** * Sets airlineTicketNumber * - * @param string|null $airlineTicketNumber The ticket's unique identifier. * minLength: 1 * maxLength: 150 + * @param string|null $airlineTicketNumber The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1183,7 +1183,7 @@ public function getAirlineTravelAgencyCode() /** * Sets airlineTravelAgencyCode * - * @param string|null $airlineTravelAgencyCode IATA number, also ARC number or ARC/IATA number. Unique identifier number for travel agencies. * minLength: 1 * maxLength: 8 + * @param string|null $airlineTravelAgencyCode The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros * * @return self */ @@ -1210,7 +1210,7 @@ public function getAirlineTravelAgencyName() /** * Sets airlineTravelAgencyName * - * @param string|null $airlineTravelAgencyName The name of the travel agency. * minLength: 1 * maxLength: 25 + * @param string|null $airlineTravelAgencyName The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataCarRental.php b/src/Adyen/Model/Payments/AdditionalDataCarRental.php index 5e1708390..66376f9ff 100644 --- a/src/Adyen/Model/Payments/AdditionalDataCarRental.php +++ b/src/Adyen/Model/Payments/AdditionalDataCarRental.php @@ -443,7 +443,7 @@ public function getCarRentalCheckOutDate() /** * Sets carRentalCheckOutDate * - * @param string|null $carRentalCheckOutDate Pick-up date. * Date format: `yyyyMMdd` + * @param string|null $carRentalCheckOutDate The pick-up date. * Date format: `yyyyMMdd` * * @return self */ @@ -470,7 +470,7 @@ public function getCarRentalCustomerServiceTollFreeNumber() /** * Sets carRentalCustomerServiceTollFreeNumber * - * @param string|null $carRentalCustomerServiceTollFreeNumber The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 + * @param string|null $carRentalCustomerServiceTollFreeNumber The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -497,7 +497,7 @@ public function getCarRentalDaysRented() /** * Sets carRentalDaysRented * - * @param string|null $carRentalDaysRented Number of days for which the car is being rented. * Format: Numeric * maxLength: 19 + * @param string|null $carRentalDaysRented Number of days for which the car is being rented. * Format: Numeric * maxLength: 2 * Must not be all spaces * * @return self */ @@ -524,7 +524,7 @@ public function getCarRentalFuelCharges() /** * Sets carRentalFuelCharges * - * @param string|null $carRentalFuelCharges Any fuel charges associated with the rental. * Format: Numeric * maxLength: 12 + * @param string|null $carRentalFuelCharges Any fuel charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * * @return self */ @@ -551,7 +551,7 @@ public function getCarRentalInsuranceCharges() /** * Sets carRentalInsuranceCharges * - * @param string|null $carRentalInsuranceCharges Any insurance charges associated with the rental. * Format: Numeric * maxLength: 12 + * @param string|null $carRentalInsuranceCharges Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces * Must not be all zeros * * @return self */ @@ -578,7 +578,7 @@ public function getCarRentalLocationCity() /** * Sets carRentalLocationCity * - * @param string|null $carRentalLocationCity The city from which the car is rented. * Format: Alphanumeric * maxLength: 18 + * @param string|null $carRentalLocationCity The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -605,7 +605,7 @@ public function getCarRentalLocationCountry() /** * Sets carRentalLocationCountry * - * @param string|null $carRentalLocationCountry The country from which the car is rented. * Format: Alphanumeric * maxLength: 2 + * @param string|null $carRentalLocationCountry The country where the car is rented, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 * * @return self */ @@ -632,7 +632,7 @@ public function getCarRentalLocationStateProvince() /** * Sets carRentalLocationStateProvince * - * @param string|null $carRentalLocationStateProvince The state or province from where the car is rented. * Format: Alphanumeric * maxLength: 3 + * @param string|null $carRentalLocationStateProvince The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -659,7 +659,7 @@ public function getCarRentalNoShowIndicator() /** * Sets carRentalNoShowIndicator * - * @param string|null $carRentalNoShowIndicator Indicates if the customer was a \"no-show\" (neither keeps nor cancels their booking). * Y - Customer was a no show. * N - Not applicable. + * @param string|null $carRentalNoShowIndicator Indicates if the customer didn't pick up their rental car. * Y - Customer did not pick up their car * N - Not applicable * * @return self */ @@ -686,7 +686,7 @@ public function getCarRentalOneWayDropOffCharges() /** * Sets carRentalOneWayDropOffCharges * - * @param string|null $carRentalOneWayDropOffCharges Charge associated with not returning a vehicle to the original rental location. + * @param string|null $carRentalOneWayDropOffCharges The charge for not returning a car to the original rental location, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 12 * * @return self */ @@ -713,7 +713,7 @@ public function getCarRentalRate() /** * Sets carRentalRate * - * @param string|null $carRentalRate Daily rental rate. * Format: Alphanumeric * maxLength: 12 + * @param string|null $carRentalRate The daily rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Alphanumeric * maxLength: 12 * * @return self */ @@ -740,7 +740,7 @@ public function getCarRentalRateIndicator() /** * Sets carRentalRateIndicator * - * @param string|null $carRentalRateIndicator Specifies whether the given rate is applied daily or weekly. * D - Daily rate. * W - Weekly rate. + * @param string|null $carRentalRateIndicator Specifies whether the given rate is applied daily or weekly. * D - Daily rate * W - Weekly rate * * @return self */ @@ -767,7 +767,7 @@ public function getCarRentalRentalAgreementNumber() /** * Sets carRentalRentalAgreementNumber * - * @param string|null $carRentalRentalAgreementNumber The rental agreement number associated with this car rental. * Format: Alphanumeric * maxLength: 9 + * @param string|null $carRentalRentalAgreementNumber The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -794,7 +794,7 @@ public function getCarRentalRentalClassId() /** * Sets carRentalRentalClassId * - * @param string|null $carRentalRentalClassId Daily rental rate. * Format: Alphanumeric * maxLength: 12 + * @param string|null $carRentalRentalClassId The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -821,7 +821,7 @@ public function getCarRentalRenterName() /** * Sets carRentalRenterName * - * @param string|null $carRentalRenterName The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 + * @param string|null $carRentalRenterName The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -848,7 +848,7 @@ public function getCarRentalReturnCity() /** * Sets carRentalReturnCity * - * @param string|null $carRentalReturnCity The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 + * @param string|null $carRentalReturnCity The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -875,7 +875,7 @@ public function getCarRentalReturnCountry() /** * Sets carRentalReturnCountry * - * @param string|null $carRentalReturnCountry The country where the car must be returned. * Format: Alphanumeric * maxLength: 2 + * @param string|null $carRentalReturnCountry The country where the car must be returned, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 * * @return self */ @@ -902,7 +902,7 @@ public function getCarRentalReturnDate() /** * Sets carRentalReturnDate * - * @param string|null $carRentalReturnDate The last date to return the car by. * Date format: `yyyyMMdd` + * @param string|null $carRentalReturnDate The last date to return the car by. * Date format: `yyyyMMdd` * maxLength: 8 * * @return self */ @@ -929,7 +929,7 @@ public function getCarRentalReturnLocationId() /** * Sets carRentalReturnLocationId * - * @param string|null $carRentalReturnLocationId Agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 + * @param string|null $carRentalReturnLocationId The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -956,7 +956,7 @@ public function getCarRentalReturnStateProvince() /** * Sets carRentalReturnStateProvince * - * @param string|null $carRentalReturnStateProvince The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 + * @param string|null $carRentalReturnStateProvince The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces * Must not be all zeros * * @return self */ @@ -983,7 +983,7 @@ public function getCarRentalTaxExemptIndicator() /** * Sets carRentalTaxExemptIndicator * - * @param string|null $carRentalTaxExemptIndicator Indicates whether the goods or services were tax-exempt, or tax was not collected. Values: * Y - Goods or services were tax exempt * N - Tax was not collected + * @param string|null $carRentalTaxExemptIndicator Indicates if the goods or services were tax-exempt, or if tax was not paid on them. Values: * Y - Goods or services were tax exempt * N - Tax was not collected * * @return self */ @@ -1010,7 +1010,7 @@ public function getTravelEntertainmentAuthDataDuration() /** * Sets travelEntertainmentAuthDataDuration * - * @param string|null $travelEntertainmentAuthDataDuration Number of nights. This should be included in the auth message. * Format: Numeric * maxLength: 2 + * @param string|null $travelEntertainmentAuthDataDuration Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 2 * * @return self */ @@ -1037,7 +1037,7 @@ public function getTravelEntertainmentAuthDataMarket() /** * Sets travelEntertainmentAuthDataMarket * - * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"A\" for Car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 + * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be 'A' for car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataLevel23.php b/src/Adyen/Model/Payments/AdditionalDataLevel23.php index 3cda5a5b5..545a4f30f 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Payments/AdditionalDataLevel23.php @@ -401,7 +401,7 @@ public function getEnhancedSchemeDataCustomerReference() /** * Sets enhancedSchemeDataCustomerReference * - * @param string|null $enhancedSchemeDataCustomerReference Customer code, if supplied by a customer. Encoding: ASCII. Max length: 25 characters. > Required for Level 2 and Level 3 data. + * @param string|null $enhancedSchemeDataCustomerReference The customer code, if supplied by a customer. Encoding: ASCII Max length: 25 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -428,7 +428,7 @@ public function getEnhancedSchemeDataDestinationCountryCode() /** * Sets enhancedSchemeDataDestinationCountryCode * - * @param string|null $enhancedSchemeDataDestinationCountryCode Destination country code. Encoding: ASCII. Max length: 3 characters. + * @param string|null $enhancedSchemeDataDestinationCountryCode The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. Encoding: ASCII Fixed length: 3 characters * * @return self */ @@ -455,7 +455,7 @@ public function getEnhancedSchemeDataDestinationPostalCode() /** * Sets enhancedSchemeDataDestinationPostalCode * - * @param string|null $enhancedSchemeDataDestinationPostalCode The postal code of a destination address. Encoding: ASCII. Max length: 10 characters. > Required for American Express. + * @param string|null $enhancedSchemeDataDestinationPostalCode The postal code of the destination address. Encoding: ASCII Max length: 10 characters Must not start with a space * * @return self */ @@ -482,7 +482,7 @@ public function getEnhancedSchemeDataDestinationStateProvinceCode() /** * Sets enhancedSchemeDataDestinationStateProvinceCode * - * @param string|null $enhancedSchemeDataDestinationStateProvinceCode Destination state or province code. Encoding: ASCII.Max length: 3 characters. + * @param string|null $enhancedSchemeDataDestinationStateProvinceCode Destination state or province code. Encoding: ASCII Max length: 3 characters Must not start with a space * * @return self */ @@ -509,7 +509,7 @@ public function getEnhancedSchemeDataDutyAmount() /** * Sets enhancedSchemeDataDutyAmount * - * @param string|null $enhancedSchemeDataDutyAmount Duty amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataDutyAmount The duty amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -536,7 +536,7 @@ public function getEnhancedSchemeDataFreightAmount() /** * Sets enhancedSchemeDataFreightAmount * - * @param string|null $enhancedSchemeDataFreightAmount Shipping amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataFreightAmount The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -563,7 +563,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrCommodityCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrCommodityCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode Item commodity code. Encoding: ASCII. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrCommodityCode The [UNSPC commodity code](https://www.unspsc.org/) of the item. Encoding: ASCII Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -590,7 +590,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrDescription() /** * Sets enhancedSchemeDataItemDetailLineItemNrDescription * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription Item description. Encoding: ASCII. Max length: 26 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription A description of the item. Encoding: ASCII Max length: 26 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -617,7 +617,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrDiscountAmount() /** * Sets enhancedSchemeDataItemDetailLineItemNrDiscountAmount * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrDiscountAmount Discount amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrDiscountAmount The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -644,7 +644,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrProductCode() /** * Sets enhancedSchemeDataItemDetailLineItemNrProductCode * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrProductCode Product code. Encoding: ASCII. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrProductCode The product code. Encoding: ASCII. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -671,7 +671,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrQuantity() /** * Sets enhancedSchemeDataItemDetailLineItemNrQuantity * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrQuantity Quantity, specified as an integer value. Value must be greater than 0. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrQuantity The number of items. Must be an integer greater than zero. Encoding: Numeric Max length: 12 characters Must not start with a space or be all spaces * * @return self */ @@ -698,7 +698,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrTotalAmount() /** * Sets enhancedSchemeDataItemDetailLineItemNrTotalAmount * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrTotalAmount Total amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrTotalAmount The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -725,7 +725,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure() /** * Sets enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure Item unit of measurement. Encoding: ASCII. Max length: 3 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure The unit of measurement for an item. Encoding: ASCII Max length: 3 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -752,7 +752,7 @@ public function getEnhancedSchemeDataItemDetailLineItemNrUnitPrice() /** * Sets enhancedSchemeDataItemDetailLineItemNrUnitPrice * - * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitPrice Unit price, specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). Max length: 12 characters. + * @param string|null $enhancedSchemeDataItemDetailLineItemNrUnitPrice The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ @@ -779,7 +779,7 @@ public function getEnhancedSchemeDataOrderDate() /** * Sets enhancedSchemeDataOrderDate * - * @param string|null $enhancedSchemeDataOrderDate Order date. * Format: `ddMMyy` Encoding: ASCII. Max length: 6 characters. + * @param string|null $enhancedSchemeDataOrderDate The order date. * Format: `ddMMyy` Encoding: ASCII Max length: 6 characters * * @return self */ @@ -806,7 +806,7 @@ public function getEnhancedSchemeDataShipFromPostalCode() /** * Sets enhancedSchemeDataShipFromPostalCode * - * @param string|null $enhancedSchemeDataShipFromPostalCode The postal code of a \"ship-from\" address. Encoding: ASCII. Max length: 10 characters. + * @param string|null $enhancedSchemeDataShipFromPostalCode The postal code of the address the item is shipped from. Encoding: ASCII Max length: 10 characters Must not start with a space or be all spaces Must not be all zeros * * @return self */ @@ -833,7 +833,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount Total tax amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. > Required for Level 2 and Level 3 data. + * @param string|null $enhancedSchemeDataTotalTaxAmount The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataLodging.php b/src/Adyen/Model/Payments/AdditionalDataLodging.php index 12402c411..606f5c1af 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLodging.php +++ b/src/Adyen/Model/Payments/AdditionalDataLodging.php @@ -56,7 +56,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => 'string', 'lodgingRoom1NumberOfNights' => 'string', 'lodgingRoom1Rate' => 'string', - 'lodgingRoom1Tax' => 'string', 'lodgingTotalRoomTax' => 'string', 'lodgingTotalTax' => 'string', 'travelEntertainmentAuthDataDuration' => 'string', @@ -83,7 +82,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => null, 'lodgingRoom1NumberOfNights' => null, 'lodgingRoom1Rate' => null, - 'lodgingRoom1Tax' => null, 'lodgingTotalRoomTax' => null, 'lodgingTotalTax' => null, 'travelEntertainmentAuthDataDuration' => null, @@ -108,7 +106,6 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali 'lodgingPropertyPhoneNumber' => false, 'lodgingRoom1NumberOfNights' => false, 'lodgingRoom1Rate' => false, - 'lodgingRoom1Tax' => false, 'lodgingTotalRoomTax' => false, 'lodgingTotalTax' => false, 'travelEntertainmentAuthDataDuration' => false, @@ -213,7 +210,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'lodging.propertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'lodging.room1.numberOfNights', 'lodgingRoom1Rate' => 'lodging.room1.rate', - 'lodgingRoom1Tax' => 'lodging.room1.tax', 'lodgingTotalRoomTax' => 'lodging.totalRoomTax', 'lodgingTotalTax' => 'lodging.totalTax', 'travelEntertainmentAuthDataDuration' => 'travelEntertainmentAuthData.duration', @@ -238,7 +234,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'setLodgingPropertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'setLodgingRoom1NumberOfNights', 'lodgingRoom1Rate' => 'setLodgingRoom1Rate', - 'lodgingRoom1Tax' => 'setLodgingRoom1Tax', 'lodgingTotalRoomTax' => 'setLodgingTotalRoomTax', 'lodgingTotalTax' => 'setLodgingTotalTax', 'travelEntertainmentAuthDataDuration' => 'setTravelEntertainmentAuthDataDuration', @@ -263,7 +258,6 @@ public function isNullableSetToNull(string $property): bool 'lodgingPropertyPhoneNumber' => 'getLodgingPropertyPhoneNumber', 'lodgingRoom1NumberOfNights' => 'getLodgingRoom1NumberOfNights', 'lodgingRoom1Rate' => 'getLodgingRoom1Rate', - 'lodgingRoom1Tax' => 'getLodgingRoom1Tax', 'lodgingTotalRoomTax' => 'getLodgingTotalRoomTax', 'lodgingTotalTax' => 'getLodgingTotalTax', 'travelEntertainmentAuthDataDuration' => 'getTravelEntertainmentAuthDataDuration', @@ -339,7 +333,6 @@ public function __construct(array $data = null) $this->setIfExists('lodgingPropertyPhoneNumber', $data ?? [], null); $this->setIfExists('lodgingRoom1NumberOfNights', $data ?? [], null); $this->setIfExists('lodgingRoom1Rate', $data ?? [], null); - $this->setIfExists('lodgingRoom1Tax', $data ?? [], null); $this->setIfExists('lodgingTotalRoomTax', $data ?? [], null); $this->setIfExists('lodgingTotalTax', $data ?? [], null); $this->setIfExists('travelEntertainmentAuthDataDuration', $data ?? [], null); @@ -455,7 +448,7 @@ public function getLodgingCustomerServiceTollFreeNumber() /** * Sets lodgingCustomerServiceTollFreeNumber * - * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. + * @param string|null $lodgingCustomerServiceTollFreeNumber The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -482,7 +475,7 @@ public function getLodgingFireSafetyActIndicator() /** * Sets lodgingFireSafetyActIndicator * - * @param string|null $lodgingFireSafetyActIndicator Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Values can be: 'Y' or 'N'. * Format: alphabetic. * Max length: 1 character. + * @param string|null $lodgingFireSafetyActIndicator Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Must be 'Y' or 'N'. * Format: alphabetic * Max length: 1 character * * @return self */ @@ -509,7 +502,7 @@ public function getLodgingFolioCashAdvances() /** * Sets lodgingFolioCashAdvances * - * @param string|null $lodgingFolioCashAdvances The folio cash advances. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingFolioCashAdvances The folio cash advances, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * * @return self */ @@ -536,7 +529,7 @@ public function getLodgingFolioNumber() /** * Sets lodgingFolioNumber * - * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Format: alphanumeric. * Max length: 25 characters. + * @param string|null $lodgingFolioNumber The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space * Must not be all zeros * * @return self */ @@ -563,7 +556,7 @@ public function getLodgingFoodBeverageCharges() /** * Sets lodgingFoodBeverageCharges * - * @param string|null $lodgingFoodBeverageCharges The additional charges for food and beverages associated with the booking. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingFoodBeverageCharges Any charges for food and beverages associated with the booking, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * * @return self */ @@ -590,7 +583,7 @@ public function getLodgingNoShowIndicator() /** * Sets lodgingNoShowIndicator * - * @param string|null $lodgingNoShowIndicator Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in. **N**: the customer checked in. + * @param string|null $lodgingNoShowIndicator Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in * **N**: the customer checked in * * @return self */ @@ -617,7 +610,7 @@ public function getLodgingPrepaidExpenses() /** * Sets lodgingPrepaidExpenses * - * @param string|null $lodgingPrepaidExpenses The prepaid expenses for the booking. * Format: numeric. * Max length: 12 characters. + * @param string|null $lodgingPrepaidExpenses The prepaid expenses for the booking. * Format: numeric * Max length: 12 characters * * @return self */ @@ -644,7 +637,7 @@ public function getLodgingPropertyPhoneNumber() /** * Sets lodgingPropertyPhoneNumber * - * @param string|null $lodgingPropertyPhoneNumber Identifies the location of the lodging by its local phone number. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. + * @param string|null $lodgingPropertyPhoneNumber The lodging property location's phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - * * @return self */ @@ -671,7 +664,7 @@ public function getLodgingRoom1NumberOfNights() /** * Sets lodgingRoom1NumberOfNights * - * @param string|null $lodgingRoom1NumberOfNights The total number of nights the room is booked for. * Format: numeric. * Max length: 4 characters. + * @param string|null $lodgingRoom1NumberOfNights The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 2 characters * * @return self */ @@ -698,7 +691,7 @@ public function getLodgingRoom1Rate() /** * Sets lodgingRoom1Rate * - * @param string|null $lodgingRoom1Rate The rate of the room. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingRoom1Rate The rate for the room, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -712,33 +705,6 @@ public function setLodgingRoom1Rate($lodgingRoom1Rate) return $this; } - /** - * Gets lodgingRoom1Tax - * - * @return string|null - */ - public function getLodgingRoom1Tax() - { - return $this->container['lodgingRoom1Tax']; - } - - /** - * Sets lodgingRoom1Tax - * - * @param string|null $lodgingRoom1Tax The total amount of tax to be paid. * Format: numeric. * Max length: 12 chracters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). - * - * @return self - */ - public function setLodgingRoom1Tax($lodgingRoom1Tax) - { - if (is_null($lodgingRoom1Tax)) { - throw new \InvalidArgumentException('non-nullable lodgingRoom1Tax cannot be null'); - } - $this->container['lodgingRoom1Tax'] = $lodgingRoom1Tax; - - return $this; - } - /** * Gets lodgingTotalRoomTax * @@ -752,7 +718,7 @@ public function getLodgingTotalRoomTax() /** * Sets lodgingTotalRoomTax * - * @param string|null $lodgingTotalRoomTax The total room tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingTotalRoomTax The total room tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -779,7 +745,7 @@ public function getLodgingTotalTax() /** * Sets lodgingTotalTax * - * @param string|null $lodgingTotalTax The total tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @param string|null $lodgingTotalTax The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number * * @return self */ @@ -806,7 +772,7 @@ public function getTravelEntertainmentAuthDataDuration() /** * Sets travelEntertainmentAuthDataDuration * - * @param string|null $travelEntertainmentAuthDataDuration The number of nights. This should be included in the auth message. * Format: numeric. * Max length: 2 characters. + * @param string|null $travelEntertainmentAuthDataDuration The number of nights. This should be included in the auth message. * Format: numeric * Max length: 2 characters * * @return self */ @@ -833,7 +799,7 @@ public function getTravelEntertainmentAuthDataMarket() /** * Sets travelEntertainmentAuthDataMarket * - * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"H\" for Hotel. This should be included in the auth message. * Format: alphanumeric. * Max length: 1 character. + * @param string|null $travelEntertainmentAuthDataMarket Indicates what market-specific dataset will be submitted. Must be 'H' for Hotel. This should be included in the auth message. * Format: alphanumeric * Max length: 1 character * * @return self */ diff --git a/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php b/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php index a14d12348..27af74221 100644 --- a/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php +++ b/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php @@ -345,7 +345,7 @@ public function getEnhancedSchemeDataCustomerReference() /** * Sets enhancedSchemeDataCustomerReference * - * @param string|null $enhancedSchemeDataCustomerReference Customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 + * @param string|null $enhancedSchemeDataCustomerReference The customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 * * @return self */ @@ -372,7 +372,7 @@ public function getEnhancedSchemeDataEmployeeName() /** * Sets enhancedSchemeDataEmployeeName * - * @param string|null $enhancedSchemeDataEmployeeName Name or ID associated with the individual working in a temporary capacity. * maxLength: 40 + * @param string|null $enhancedSchemeDataEmployeeName The name or ID of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -399,7 +399,7 @@ public function getEnhancedSchemeDataJobDescription() /** * Sets enhancedSchemeDataJobDescription * - * @param string|null $enhancedSchemeDataJobDescription Description of the job or task of the individual working in a temporary capacity. * maxLength: 40 + * @param string|null $enhancedSchemeDataJobDescription The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -426,7 +426,7 @@ public function getEnhancedSchemeDataRegularHoursRate() /** * Sets enhancedSchemeDataRegularHoursRate * - * @param string|null $enhancedSchemeDataRegularHoursRate Amount paid per regular hours worked, minor units. * maxLength: 7 + * @param string|null $enhancedSchemeDataRegularHoursRate The amount paid for regular hours worked, [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 7 * Must not be empty * Can be all zeros * * @return self */ @@ -453,7 +453,7 @@ public function getEnhancedSchemeDataRegularHoursWorked() /** * Sets enhancedSchemeDataRegularHoursWorked * - * @param string|null $enhancedSchemeDataRegularHoursWorked Amount of time worked during a normal operation for the task or job. * maxLength: 7 + * @param string|null $enhancedSchemeDataRegularHoursWorked The hours worked. * maxLength: 7 * Must not be empty * Can be all zeros * * @return self */ @@ -480,7 +480,7 @@ public function getEnhancedSchemeDataRequestName() /** * Sets enhancedSchemeDataRequestName * - * @param string|null $enhancedSchemeDataRequestName Name of the individual requesting temporary services. * maxLength: 40 + * @param string|null $enhancedSchemeDataRequestName The name of the person requesting temporary services. * maxLength: 40 * Must not be all zeros * Must not be all spaces * * @return self */ @@ -507,7 +507,7 @@ public function getEnhancedSchemeDataTempStartDate() /** * Sets enhancedSchemeDataTempStartDate * - * @param string|null $enhancedSchemeDataTempStartDate Date for the beginning of the pay period. * Format: ddMMyy * maxLength: 6 + * @param string|null $enhancedSchemeDataTempStartDate The billing period start date. * Format: ddMMyy * maxLength: 6 * * @return self */ @@ -534,7 +534,7 @@ public function getEnhancedSchemeDataTempWeekEnding() /** * Sets enhancedSchemeDataTempWeekEnding * - * @param string|null $enhancedSchemeDataTempWeekEnding Date of the end of the billing cycle. * Format: ddMMyy * maxLength: 6 + * @param string|null $enhancedSchemeDataTempWeekEnding The billing period end date. * Format: ddMMyy * maxLength: 6 * * @return self */ @@ -561,7 +561,7 @@ public function getEnhancedSchemeDataTotalTaxAmount() /** * Sets enhancedSchemeDataTotalTaxAmount * - * @param string|null $enhancedSchemeDataTotalTaxAmount Total tax amount, in minor units. For example, 2000 means USD 20.00 * maxLength: 12 + * @param string|null $enhancedSchemeDataTotalTaxAmount The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00 * maxLength: 12 * * @return self */ diff --git a/src/Adyen/Model/Payments/Split.php b/src/Adyen/Model/Payments/Split.php index 7fae9406c..eca4e6073 100644 --- a/src/Adyen/Model/Payments/Split.php +++ b/src/Adyen/Model/Payments/Split.php @@ -244,6 +244,12 @@ public function getModelName() public const TYPE__DEFAULT = 'Default'; public const TYPE_MARKET_PLACE = 'MarketPlace'; public const TYPE_PAYMENT_FEE = 'PaymentFee'; + public const TYPE_PAYMENT_FEE_ACQUIRING = 'PaymentFeeAcquiring'; + public const TYPE_PAYMENT_FEE_ADYEN = 'PaymentFeeAdyen'; + public const TYPE_PAYMENT_FEE_ADYEN_COMMISSION = 'PaymentFeeAdyenCommission'; + public const TYPE_PAYMENT_FEE_ADYEN_MARKUP = 'PaymentFeeAdyenMarkup'; + public const TYPE_PAYMENT_FEE_INTERCHANGE = 'PaymentFeeInterchange'; + public const TYPE_PAYMENT_FEE_SCHEME_FEE = 'PaymentFeeSchemeFee'; public const TYPE_REMAINDER = 'Remainder'; public const TYPE_SURCHARGE = 'Surcharge'; public const TYPE_TIP = 'Tip'; @@ -263,6 +269,12 @@ public function getTypeAllowableValues() self::TYPE__DEFAULT, self::TYPE_MARKET_PLACE, self::TYPE_PAYMENT_FEE, + self::TYPE_PAYMENT_FEE_ACQUIRING, + self::TYPE_PAYMENT_FEE_ADYEN, + self::TYPE_PAYMENT_FEE_ADYEN_COMMISSION, + self::TYPE_PAYMENT_FEE_ADYEN_MARKUP, + self::TYPE_PAYMENT_FEE_INTERCHANGE, + self::TYPE_PAYMENT_FEE_SCHEME_FEE, self::TYPE_REMAINDER, self::TYPE_SURCHARGE, self::TYPE_TIP, diff --git a/src/Adyen/Model/Transfers/Address2.php b/src/Adyen/Model/Transfers/Address2.php index d329b6ed9..030ee8507 100644 --- a/src/Adyen/Model/Transfers/Address2.php +++ b/src/Adyen/Model/Transfers/Address2.php @@ -354,7 +354,7 @@ public function getCountry() /** * Sets country * - * @param string $country The two-character ISO 3166-1 alpha-2 country code. For example, **US**. >If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + * @param string $country The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**. * * @return self */ diff --git a/src/Adyen/Model/Transfers/Transfer.php b/src/Adyen/Model/Transfers/Transfer.php index 0a1d23c6f..df89b1d02 100644 --- a/src/Adyen/Model/Transfers/Transfer.php +++ b/src/Adyen/Model/Transfers/Transfer.php @@ -1097,7 +1097,7 @@ public function getReferenceForBeneficiary() /** * Sets referenceForBeneficiary * - * @param string|null $referenceForBeneficiary A reference that is sent to the recipient. This reference is also sent in all notification webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. + * @param string|null $referenceForBeneficiary A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. * * @return self */ diff --git a/src/Adyen/Model/Transfers/TransferInfo.php b/src/Adyen/Model/Transfers/TransferInfo.php index 619937caf..321000791 100644 --- a/src/Adyen/Model/Transfers/TransferInfo.php +++ b/src/Adyen/Model/Transfers/TransferInfo.php @@ -691,7 +691,7 @@ public function getReferenceForBeneficiary() /** * Sets referenceForBeneficiary * - * @param string|null $referenceForBeneficiary A reference that is sent to the recipient. This reference is also sent in all notification webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. + * @param string|null $referenceForBeneficiary A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. * * @return self */ diff --git a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php index c5fc1c3d8..c4806b7c1 100644 --- a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php +++ b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php @@ -47,9 +47,10 @@ public function __construct(Client $client) * @return object * @throws AdyenException */ - public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null): void + public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null): object { $endpoint = $this->baseURL . "/validateBankAccountIdentification"; - $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); + return ObjectSerializer::deserialize($response, object::class); } } diff --git a/src/Adyen/Service/Checkout/PaymentsApi.php b/src/Adyen/Service/Checkout/PaymentsApi.php index 5d2df6d39..15391dc30 100644 --- a/src/Adyen/Service/Checkout/PaymentsApi.php +++ b/src/Adyen/Service/Checkout/PaymentsApi.php @@ -57,15 +57,15 @@ public function cardDetails(\Adyen\Model\Checkout\CardDetailsRequest $cardDetail /** * Start a transaction for donations * - * @param \Adyen\Model\Checkout\PaymentDonationRequest $paymentDonationRequest + * @param \Adyen\Model\Checkout\CheckoutDonationPaymentRequest $checkoutDonationPaymentRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\DonationResponse * @throws AdyenException */ - public function donations(\Adyen\Model\Checkout\PaymentDonationRequest $paymentDonationRequest, array $requestOptions = null): \Adyen\Model\Checkout\DonationResponse + public function donations(\Adyen\Model\Checkout\CheckoutDonationPaymentRequest $checkoutDonationPaymentRequest, array $requestOptions = null): \Adyen\Model\Checkout\DonationResponse { $endpoint = $this->baseURL . "/donations"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentDonationRequest->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $checkoutDonationPaymentRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\DonationResponse::class); } @@ -87,15 +87,15 @@ public function paymentMethods(\Adyen\Model\Checkout\PaymentMethodsRequest $paym /** * Start a transaction * - * @param \Adyen\Model\Checkout\PaymentRequest $paymentRequest + * @param \Adyen\Model\Checkout\CheckoutPaymentRequest $checkoutPaymentRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\PaymentResponse * @throws AdyenException */ - public function payments(\Adyen\Model\Checkout\PaymentRequest $paymentRequest, array $requestOptions = null): \Adyen\Model\Checkout\PaymentResponse + public function payments(\Adyen\Model\Checkout\CheckoutPaymentRequest $checkoutPaymentRequest, array $requestOptions = null): \Adyen\Model\Checkout\PaymentResponse { $endpoint = $this->baseURL . "/payments"; - $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $paymentRequest->jsonSerialize(), $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('POST'), (array) $checkoutPaymentRequest->jsonSerialize(), $requestOptions); return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\PaymentResponse::class); } diff --git a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php index c420e5055..1d04480ee 100644 --- a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php @@ -47,10 +47,11 @@ public function __construct(Client $client) * @return object * @throws AdyenException */ - public function deleteDocument(string $id, array $requestOptions = null): void + public function deleteDocument(string $id, array $requestOptions = null): object { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/documents/{id}"); - $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + $response = $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + return ObjectSerializer::deserialize($response, object::class); } /**