From 9399dc0f9051c487c94bcdbffa74ed2387639d15 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Mon, 27 Nov 2023 10:45:41 +0000 Subject: [PATCH] [create-pull-request] automated change --- .../BalancePlatform/AddressRequirement.php | 29 + .../BalancePlatform/RestServiceError.php | 6 +- ...ONObject.php => SameAmountRestriction.php} | 77 +- ...th.php => SameCounterpartyRestriction.php} | 77 +- .../TransactionRuleRestrictions.php | 68 ++ .../Model/BalancePlatform/TransferRoute.php | 2 + src/Adyen/Model/Checkout/ApplePayDetails.php | 2 + src/Adyen/Model/Checkout/CardDetails.php | 2 + .../Model/Checkout/CheckoutAwaitAction.php | 2 +- .../CheckoutDelegatedAuthenticationAction.php | 2 +- .../Model/Checkout/CheckoutQrCodeAction.php | 2 +- .../Model/Checkout/CheckoutSDKAction.php | 2 +- .../Model/Checkout/CheckoutThreeDS2Action.php | 2 +- .../Model/Checkout/CheckoutVoucherAction.php | 2 +- .../Checkout/CreateCheckoutSessionRequest.php | 34 + .../CreateCheckoutSessionResponse.php | 80 +- src/Adyen/Model/Checkout/GooglePayDetails.php | 2 + .../Model/Checkout/MasterpassDetails.php | 2 + .../Model/Checkout/PayWithGoogleDetails.php | 2 + .../Model/Checkout/PaymentDetailsRequest.php | 2 +- src/Adyen/Model/Checkout/PaymentMethod.php | 2 + .../Model/Checkout/PaymentResponseAction.php | 2 +- src/Adyen/Model/Checkout/RecurringDetail.php | 2 + .../ResponseAdditionalDataDomesticError.php | 418 +++++++++ .../Model/Checkout/SamsungPayDetails.php | 2 + src/Adyen/Model/Checkout/Split.php | 2 +- .../Model/Checkout/VisaCheckoutDetails.php | 2 + .../ConfigurationWebhooks/AccountHolder.php | 46 +- .../ConfigurationWebhooks/BalanceAccount.php | 2 +- .../PlatformPaymentConfiguration.php | 4 +- .../SweepConfigurationV2.php | 6 + .../VerificationDeadline.php | 577 ++++++++++++ .../LegalEntityManagement/LegalEntity.php | 34 + .../LegalEntityManagement/LegalEntityInfo.php | 46 +- .../LegalEntityInfoRequiredType.php | 46 +- .../UnincorporatedPartnership.php | 828 ++++++++++++++++++ .../ResponseAdditionalDataDomesticError.php | 418 +++++++++ 37 files changed, 2738 insertions(+), 96 deletions(-) rename src/Adyen/Model/BalancePlatform/{JSONObject.php => SameAmountRestriction.php} (83%) rename src/Adyen/Model/BalancePlatform/{JSONPath.php => SameCounterpartyRestriction.php} (82%) create mode 100644 src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php create mode 100644 src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php create mode 100644 src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php create mode 100644 src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php diff --git a/src/Adyen/Model/BalancePlatform/AddressRequirement.php b/src/Adyen/Model/BalancePlatform/AddressRequirement.php index adcbb63b0..041a7a9b6 100644 --- a/src/Adyen/Model/BalancePlatform/AddressRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AddressRequirement.php @@ -227,8 +227,28 @@ public function getModelName() return self::$openAPIModelName; } + public const REQUIRED_ADDRESS_FIELDS_CITY = 'city'; + public const REQUIRED_ADDRESS_FIELDS_COUNTRY = 'country'; + public const REQUIRED_ADDRESS_FIELDS_LINE1 = 'line1'; + public const REQUIRED_ADDRESS_FIELDS_POSTAL_CODE = 'postalCode'; + public const REQUIRED_ADDRESS_FIELDS_STATE_OR_PROVINCE = 'stateOrProvince'; public const TYPE_ADDRESS_REQUIREMENT = 'addressRequirement'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRequiredAddressFieldsAllowableValues() + { + return [ + self::REQUIRED_ADDRESS_FIELDS_CITY, + self::REQUIRED_ADDRESS_FIELDS_COUNTRY, + self::REQUIRED_ADDRESS_FIELDS_LINE1, + self::REQUIRED_ADDRESS_FIELDS_POSTAL_CODE, + self::REQUIRED_ADDRESS_FIELDS_STATE_OR_PROVINCE, + ]; + } /** * Gets allowable values of the enum * @@ -363,6 +383,15 @@ public function setRequiredAddressFields($requiredAddressFields) if (is_null($requiredAddressFields)) { throw new \InvalidArgumentException('non-nullable requiredAddressFields cannot be null'); } + $allowedValues = $this->getRequiredAddressFieldsAllowableValues(); + if (array_diff($requiredAddressFields, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'requiredAddressFields', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } $this->container['requiredAddressFields'] = $requiredAddressFields; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RestServiceError.php b/src/Adyen/Model/BalancePlatform/RestServiceError.php index 5e3f1e1bc..cef78e4f9 100644 --- a/src/Adyen/Model/BalancePlatform/RestServiceError.php +++ b/src/Adyen/Model/BalancePlatform/RestServiceError.php @@ -49,7 +49,7 @@ class RestServiceError implements ModelInterface, ArrayAccess, \JsonSerializable 'instance' => 'string', 'invalidFields' => '\Adyen\Model\BalancePlatform\InvalidField[]', 'requestId' => 'string', - 'response' => '\Adyen\Model\BalancePlatform\JSONObject', + 'response' => 'object', 'status' => 'int', 'title' => 'string', 'type' => 'string' @@ -485,7 +485,7 @@ public function setRequestId($requestId) /** * Gets response * - * @return \Adyen\Model\BalancePlatform\JSONObject|null + * @return object|null */ public function getResponse() { @@ -495,7 +495,7 @@ public function getResponse() /** * Sets response * - * @param \Adyen\Model\BalancePlatform\JSONObject|null $response response + * @param object|null $response response * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/JSONObject.php b/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php similarity index 83% rename from src/Adyen/Model/BalancePlatform/JSONObject.php rename to src/Adyen/Model/BalancePlatform/SameAmountRestriction.php index 637c78bea..a69e037b9 100644 --- a/src/Adyen/Model/BalancePlatform/JSONObject.php +++ b/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php @@ -19,7 +19,7 @@ use Adyen\Model\BalancePlatform\ObjectSerializer; /** - * JSONObject Class Doc Comment + * SameAmountRestriction Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable +class SameAmountRestriction implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'JSONObject'; + protected static $openAPIModelName = 'SameAmountRestriction'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,8 +44,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'paths' => '\Adyen\Model\BalancePlatform\JSONPath[]', - 'rootPath' => '\Adyen\Model\BalancePlatform\JSONPath' + 'operation' => 'string', + 'value' => 'bool' ]; /** @@ -56,8 +56,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'paths' => null, - 'rootPath' => null + 'operation' => null, + 'value' => null ]; /** @@ -66,8 +66,8 @@ class JSONObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'paths' => false, - 'rootPath' => false + 'operation' => false, + 'value' => false ]; /** @@ -156,8 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'paths' => 'paths', - 'rootPath' => 'rootPath' + 'operation' => 'operation', + 'value' => 'value' ]; /** @@ -166,8 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'paths' => 'setPaths', - 'rootPath' => 'setRootPath' + 'operation' => 'setOperation', + 'value' => 'setValue' ]; /** @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'paths' => 'getPaths', - 'rootPath' => 'getRootPath' + 'operation' => 'getOperation', + 'value' => 'getValue' ]; /** @@ -237,8 +237,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('paths', $data ?? [], null); - $this->setIfExists('rootPath', $data ?? [], null); + $this->setIfExists('operation', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -268,6 +268,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['operation'] === null) { + $invalidProperties[] = "'operation' can't be null"; + } return $invalidProperties; } @@ -284,55 +287,55 @@ public function valid() /** - * Gets paths + * Gets operation * - * @return \Adyen\Model\BalancePlatform\JSONPath[]|null + * @return string */ - public function getPaths() + public function getOperation() { - return $this->container['paths']; + return $this->container['operation']; } /** - * Sets paths + * Sets operation * - * @param \Adyen\Model\BalancePlatform\JSONPath[]|null $paths paths + * @param string $operation Defines how the condition must be evaluated. * * @return self */ - public function setPaths($paths) + public function setOperation($operation) { - if (is_null($paths)) { - throw new \InvalidArgumentException('non-nullable paths cannot be null'); + if (is_null($operation)) { + throw new \InvalidArgumentException('non-nullable operation cannot be null'); } - $this->container['paths'] = $paths; + $this->container['operation'] = $operation; return $this; } /** - * Gets rootPath + * Gets value * - * @return \Adyen\Model\BalancePlatform\JSONPath|null + * @return bool|null */ - public function getRootPath() + public function getValue() { - return $this->container['rootPath']; + return $this->container['value']; } /** - * Sets rootPath + * Sets value * - * @param \Adyen\Model\BalancePlatform\JSONPath|null $rootPath rootPath + * @param bool|null $value value * * @return self */ - public function setRootPath($rootPath) + public function setValue($value) { - if (is_null($rootPath)) { - throw new \InvalidArgumentException('non-nullable rootPath cannot be null'); + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['rootPath'] = $rootPath; + $this->container['value'] = $value; return $this; } diff --git a/src/Adyen/Model/BalancePlatform/JSONPath.php b/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php similarity index 82% rename from src/Adyen/Model/BalancePlatform/JSONPath.php rename to src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php index 18ec13322..8f0d5adc1 100644 --- a/src/Adyen/Model/BalancePlatform/JSONPath.php +++ b/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php @@ -19,7 +19,7 @@ use Adyen\Model\BalancePlatform\ObjectSerializer; /** - * JSONPath Class Doc Comment + * SameCounterpartyRestriction Class Doc Comment * * @category Class * @package Adyen @@ -27,7 +27,7 @@ * @link https://openapi-generator.tech * @implements \ArrayAccess */ -class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable +class SameCounterpartyRestriction implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -36,7 +36,7 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'JSONPath'; + protected static $openAPIModelName = 'SameCounterpartyRestriction'; /** * Array of property to type mappings. Used for (de)serialization @@ -44,7 +44,8 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'content' => 'string[]' + 'operation' => 'string', + 'value' => 'bool' ]; /** @@ -55,7 +56,8 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'content' => null + 'operation' => null, + 'value' => null ]; /** @@ -64,7 +66,8 @@ class JSONPath implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'content' => false + 'operation' => false, + 'value' => false ]; /** @@ -153,7 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'content' => 'content' + 'operation' => 'operation', + 'value' => 'value' ]; /** @@ -162,7 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'content' => 'setContent' + 'operation' => 'setOperation', + 'value' => 'setValue' ]; /** @@ -171,7 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'content' => 'getContent' + 'operation' => 'getOperation', + 'value' => 'getValue' ]; /** @@ -231,7 +237,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('operation', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); } /** @@ -261,6 +268,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['operation'] === null) { + $invalidProperties[] = "'operation' can't be null"; + } return $invalidProperties; } @@ -277,28 +287,55 @@ public function valid() /** - * Gets content + * Gets operation + * + * @return string + */ + public function getOperation() + { + return $this->container['operation']; + } + + /** + * Sets operation + * + * @param string $operation Defines how the condition must be evaluated. + * + * @return self + */ + public function setOperation($operation) + { + if (is_null($operation)) { + throw new \InvalidArgumentException('non-nullable operation cannot be null'); + } + $this->container['operation'] = $operation; + + return $this; + } + + /** + * Gets value * - * @return string[]|null + * @return bool|null */ - public function getContent() + public function getValue() { - return $this->container['content']; + return $this->container['value']; } /** - * Sets content + * Sets value * - * @param string[]|null $content content + * @param bool|null $value value * * @return self */ - public function setContent($content) + public function setValue($value) { - if (is_null($content)) { - throw new \InvalidArgumentException('non-nullable content cannot be null'); + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['content'] = $content; + $this->container['value'] = $value; return $this; } diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php index 04a403188..e4c005f8a 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php @@ -57,6 +57,8 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS 'merchantNames' => '\Adyen\Model\BalancePlatform\MerchantNamesRestriction', 'merchants' => '\Adyen\Model\BalancePlatform\MerchantsRestriction', 'processingTypes' => '\Adyen\Model\BalancePlatform\ProcessingTypesRestriction', + 'sameAmountRestriction' => '\Adyen\Model\BalancePlatform\SameAmountRestriction', + 'sameCounterpartyRestriction' => '\Adyen\Model\BalancePlatform\SameCounterpartyRestriction', 'timeOfDay' => '\Adyen\Model\BalancePlatform\TimeOfDayRestriction', 'totalAmount' => '\Adyen\Model\BalancePlatform\TotalAmountRestriction' ]; @@ -82,6 +84,8 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS 'merchantNames' => null, 'merchants' => null, 'processingTypes' => null, + 'sameAmountRestriction' => null, + 'sameCounterpartyRestriction' => null, 'timeOfDay' => null, 'totalAmount' => null ]; @@ -105,6 +109,8 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS 'merchantNames' => false, 'merchants' => false, 'processingTypes' => false, + 'sameAmountRestriction' => false, + 'sameCounterpartyRestriction' => false, 'timeOfDay' => false, 'totalAmount' => false ]; @@ -208,6 +214,8 @@ public function isNullableSetToNull(string $property): bool 'merchantNames' => 'merchantNames', 'merchants' => 'merchants', 'processingTypes' => 'processingTypes', + 'sameAmountRestriction' => 'sameAmountRestriction', + 'sameCounterpartyRestriction' => 'sameCounterpartyRestriction', 'timeOfDay' => 'timeOfDay', 'totalAmount' => 'totalAmount' ]; @@ -231,6 +239,8 @@ public function isNullableSetToNull(string $property): bool 'merchantNames' => 'setMerchantNames', 'merchants' => 'setMerchants', 'processingTypes' => 'setProcessingTypes', + 'sameAmountRestriction' => 'setSameAmountRestriction', + 'sameCounterpartyRestriction' => 'setSameCounterpartyRestriction', 'timeOfDay' => 'setTimeOfDay', 'totalAmount' => 'setTotalAmount' ]; @@ -254,6 +264,8 @@ public function isNullableSetToNull(string $property): bool 'merchantNames' => 'getMerchantNames', 'merchants' => 'getMerchants', 'processingTypes' => 'getProcessingTypes', + 'sameAmountRestriction' => 'getSameAmountRestriction', + 'sameCounterpartyRestriction' => 'getSameCounterpartyRestriction', 'timeOfDay' => 'getTimeOfDay', 'totalAmount' => 'getTotalAmount' ]; @@ -328,6 +340,8 @@ public function __construct(array $data = null) $this->setIfExists('merchantNames', $data ?? [], null); $this->setIfExists('merchants', $data ?? [], null); $this->setIfExists('processingTypes', $data ?? [], null); + $this->setIfExists('sameAmountRestriction', $data ?? [], null); + $this->setIfExists('sameCounterpartyRestriction', $data ?? [], null); $this->setIfExists('timeOfDay', $data ?? [], null); $this->setIfExists('totalAmount', $data ?? [], null); } @@ -725,6 +739,60 @@ public function setProcessingTypes($processingTypes) return $this; } + /** + * Gets sameAmountRestriction + * + * @return \Adyen\Model\BalancePlatform\SameAmountRestriction|null + */ + public function getSameAmountRestriction() + { + return $this->container['sameAmountRestriction']; + } + + /** + * Sets sameAmountRestriction + * + * @param \Adyen\Model\BalancePlatform\SameAmountRestriction|null $sameAmountRestriction sameAmountRestriction + * + * @return self + */ + public function setSameAmountRestriction($sameAmountRestriction) + { + if (is_null($sameAmountRestriction)) { + throw new \InvalidArgumentException('non-nullable sameAmountRestriction cannot be null'); + } + $this->container['sameAmountRestriction'] = $sameAmountRestriction; + + return $this; + } + + /** + * Gets sameCounterpartyRestriction + * + * @return \Adyen\Model\BalancePlatform\SameCounterpartyRestriction|null + */ + public function getSameCounterpartyRestriction() + { + return $this->container['sameCounterpartyRestriction']; + } + + /** + * Sets sameCounterpartyRestriction + * + * @param \Adyen\Model\BalancePlatform\SameCounterpartyRestriction|null $sameCounterpartyRestriction sameCounterpartyRestriction + * + * @return self + */ + public function setSameCounterpartyRestriction($sameCounterpartyRestriction) + { + if (is_null($sameCounterpartyRestriction)) { + throw new \InvalidArgumentException('non-nullable sameCounterpartyRestriction cannot be null'); + } + $this->container['sameCounterpartyRestriction'] = $sameCounterpartyRestriction; + + return $this; + } + /** * Gets timeOfDay * diff --git a/src/Adyen/Model/BalancePlatform/TransferRoute.php b/src/Adyen/Model/BalancePlatform/TransferRoute.php index e72c147ca..f7ac9b9df 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRoute.php +++ b/src/Adyen/Model/BalancePlatform/TransferRoute.php @@ -246,6 +246,7 @@ public function getModelName() public const CATEGORY_ISSUED_CARD = 'issuedCard'; public const CATEGORY_MIGRATION = 'migration'; public const CATEGORY_PLATFORM_PAYMENT = 'platformPayment'; + public const CATEGORY_TOP_UP = 'topUp'; public const CATEGORY_UPGRADE = 'upgrade'; public const PRIORITY_CROSS_BORDER = 'crossBorder'; public const PRIORITY_FAST = 'fast'; @@ -269,6 +270,7 @@ public function getCategoryAllowableValues() self::CATEGORY_ISSUED_CARD, self::CATEGORY_MIGRATION, self::CATEGORY_PLATFORM_PAYMENT, + self::CATEGORY_TOP_UP, self::CATEGORY_UPGRADE, ]; } diff --git a/src/Adyen/Model/Checkout/ApplePayDetails.php b/src/Adyen/Model/Checkout/ApplePayDetails.php index b62c260e8..9cf96a163 100644 --- a/src/Adyen/Model/Checkout/ApplePayDetails.php +++ b/src/Adyen/Model/Checkout/ApplePayDetails.php @@ -245,6 +245,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_APPLEPAY = 'applepay'; @@ -256,6 +257,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 1e7aa6471..2ec7a7274 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -323,6 +323,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_SCHEME = 'scheme'; public const TYPE_NETWORK_TOKEN = 'networkToken'; @@ -336,6 +337,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/CheckoutAwaitAction.php b/src/Adyen/Model/Checkout/CheckoutAwaitAction.php index 4d8cfc797..5a1afd4a5 100644 --- a/src/Adyen/Model/Checkout/CheckoutAwaitAction.php +++ b/src/Adyen/Model/Checkout/CheckoutAwaitAction.php @@ -334,7 +334,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php b/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php index afc7a1811..38b7dbf34 100644 --- a/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php +++ b/src/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.php @@ -375,7 +375,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php b/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php index 07c685eff..1d1daf3b7 100644 --- a/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php +++ b/src/Adyen/Model/Checkout/CheckoutQrCodeAction.php @@ -375,7 +375,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutSDKAction.php b/src/Adyen/Model/Checkout/CheckoutSDKAction.php index a5a135fdd..5516c3425 100644 --- a/src/Adyen/Model/Checkout/CheckoutSDKAction.php +++ b/src/Adyen/Model/Checkout/CheckoutSDKAction.php @@ -343,7 +343,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php b/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php index d60c2f61a..fd842145e 100644 --- a/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php +++ b/src/Adyen/Model/Checkout/CheckoutThreeDS2Action.php @@ -382,7 +382,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CheckoutVoucherAction.php b/src/Adyen/Model/Checkout/CheckoutVoucherAction.php index f34d4cb2f..474c89f38 100644 --- a/src/Adyen/Model/Checkout/CheckoutVoucherAction.php +++ b/src/Adyen/Model/Checkout/CheckoutVoucherAction.php @@ -777,7 +777,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index a73229cce..019ecab87 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -99,6 +99,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'storePaymentMethod' => 'bool', 'storePaymentMethodMode' => 'string', 'telephoneNumber' => 'string', + 'themeId' => 'string', 'threeDSAuthenticationOnly' => 'bool', 'trustedShopper' => 'bool' ]; @@ -166,6 +167,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'storePaymentMethod' => null, 'storePaymentMethodMode' => null, 'telephoneNumber' => null, + 'themeId' => null, 'threeDSAuthenticationOnly' => null, 'trustedShopper' => null ]; @@ -231,6 +233,7 @@ class CreateCheckoutSessionRequest implements ModelInterface, ArrayAccess, \Json 'storePaymentMethod' => false, 'storePaymentMethodMode' => false, 'telephoneNumber' => false, + 'themeId' => false, 'threeDSAuthenticationOnly' => false, 'trustedShopper' => false ]; @@ -376,6 +379,7 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'storePaymentMethod', 'storePaymentMethodMode' => 'storePaymentMethodMode', 'telephoneNumber' => 'telephoneNumber', + 'themeId' => 'themeId', 'threeDSAuthenticationOnly' => 'threeDSAuthenticationOnly', 'trustedShopper' => 'trustedShopper' ]; @@ -441,6 +445,7 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'setStorePaymentMethod', 'storePaymentMethodMode' => 'setStorePaymentMethodMode', 'telephoneNumber' => 'setTelephoneNumber', + 'themeId' => 'setThemeId', 'threeDSAuthenticationOnly' => 'setThreeDSAuthenticationOnly', 'trustedShopper' => 'setTrustedShopper' ]; @@ -506,6 +511,7 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'getStorePaymentMethod', 'storePaymentMethodMode' => 'getStorePaymentMethodMode', 'telephoneNumber' => 'getTelephoneNumber', + 'themeId' => 'getThemeId', 'threeDSAuthenticationOnly' => 'getThreeDSAuthenticationOnly', 'trustedShopper' => 'getTrustedShopper' ]; @@ -702,6 +708,7 @@ public function __construct(array $data = null) $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('storePaymentMethodMode', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('themeId', $data ?? [], null); $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); $this->setIfExists('trustedShopper', $data ?? [], null); } @@ -2338,6 +2345,33 @@ public function setTelephoneNumber($telephoneNumber) return $this; } + /** + * Gets themeId + * + * @return string|null + */ + public function getThemeId() + { + return $this->container['themeId']; + } + + /** + * Sets themeId + * + * @param string|null $themeId Sets a custom theme for the Adyen-hosted payment page. The value can be any of the **Theme ID** values from your Customer Area. + * + * @return self + */ + public function setThemeId($themeId) + { + if (is_null($themeId)) { + throw new \InvalidArgumentException('non-nullable themeId cannot be null'); + } + $this->container['themeId'] = $themeId; + + return $this; + } + /** * Gets threeDSAuthenticationOnly * diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 40ca186b9..654c205d3 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -101,8 +101,10 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'storePaymentMethod' => 'bool', 'storePaymentMethodMode' => 'string', 'telephoneNumber' => 'string', + 'themeId' => 'string', 'threeDSAuthenticationOnly' => 'bool', - 'trustedShopper' => 'bool' + 'trustedShopper' => 'bool', + 'url' => 'string' ]; /** @@ -170,8 +172,10 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'storePaymentMethod' => null, 'storePaymentMethodMode' => null, 'telephoneNumber' => null, + 'themeId' => null, 'threeDSAuthenticationOnly' => null, - 'trustedShopper' => null + 'trustedShopper' => null, + 'url' => null ]; /** @@ -237,8 +241,10 @@ class CreateCheckoutSessionResponse implements ModelInterface, ArrayAccess, \Jso 'storePaymentMethod' => false, 'storePaymentMethodMode' => false, 'telephoneNumber' => false, + 'themeId' => false, 'threeDSAuthenticationOnly' => false, - 'trustedShopper' => false + 'trustedShopper' => false, + 'url' => false ]; /** @@ -384,8 +390,10 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'storePaymentMethod', 'storePaymentMethodMode' => 'storePaymentMethodMode', 'telephoneNumber' => 'telephoneNumber', + 'themeId' => 'themeId', 'threeDSAuthenticationOnly' => 'threeDSAuthenticationOnly', - 'trustedShopper' => 'trustedShopper' + 'trustedShopper' => 'trustedShopper', + 'url' => 'url' ]; /** @@ -451,8 +459,10 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'setStorePaymentMethod', 'storePaymentMethodMode' => 'setStorePaymentMethodMode', 'telephoneNumber' => 'setTelephoneNumber', + 'themeId' => 'setThemeId', 'threeDSAuthenticationOnly' => 'setThreeDSAuthenticationOnly', - 'trustedShopper' => 'setTrustedShopper' + 'trustedShopper' => 'setTrustedShopper', + 'url' => 'setUrl' ]; /** @@ -518,8 +528,10 @@ public function isNullableSetToNull(string $property): bool 'storePaymentMethod' => 'getStorePaymentMethod', 'storePaymentMethodMode' => 'getStorePaymentMethodMode', 'telephoneNumber' => 'getTelephoneNumber', + 'themeId' => 'getThemeId', 'threeDSAuthenticationOnly' => 'getThreeDSAuthenticationOnly', - 'trustedShopper' => 'getTrustedShopper' + 'trustedShopper' => 'getTrustedShopper', + 'url' => 'getUrl' ]; /** @@ -716,8 +728,10 @@ public function __construct(array $data = null) $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('storePaymentMethodMode', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); + $this->setIfExists('themeId', $data ?? [], null); $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); $this->setIfExists('trustedShopper', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); } /** @@ -2412,6 +2426,33 @@ public function setTelephoneNumber($telephoneNumber) return $this; } + /** + * Gets themeId + * + * @return string|null + */ + public function getThemeId() + { + return $this->container['themeId']; + } + + /** + * Sets themeId + * + * @param string|null $themeId Sets a custom theme for the Adyen-hosted payment page. The value can be any of the **Theme ID** values from your Customer Area. + * + * @return self + */ + public function setThemeId($themeId) + { + if (is_null($themeId)) { + throw new \InvalidArgumentException('non-nullable themeId cannot be null'); + } + $this->container['themeId'] = $themeId; + + return $this; + } + /** * Gets threeDSAuthenticationOnly * @@ -2467,6 +2508,33 @@ public function setTrustedShopper($trustedShopper) return $this; } + + /** + * Gets url + * + * @return string|null + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string|null $url The URL for the Hosted Checkout page. Redirect the shopper to this URL so they can make the payment. + * + * @return self + */ + public function setUrl($url) + { + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); + } + $this->container['url'] = $url; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Checkout/GooglePayDetails.php b/src/Adyen/Model/Checkout/GooglePayDetails.php index e188ebac4..1d99626dd 100644 --- a/src/Adyen/Model/Checkout/GooglePayDetails.php +++ b/src/Adyen/Model/Checkout/GooglePayDetails.php @@ -245,6 +245,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_GOOGLEPAY = 'googlepay'; @@ -256,6 +257,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/MasterpassDetails.php b/src/Adyen/Model/Checkout/MasterpassDetails.php index efbf4f14f..40bfbcfef 100644 --- a/src/Adyen/Model/Checkout/MasterpassDetails.php +++ b/src/Adyen/Model/Checkout/MasterpassDetails.php @@ -233,6 +233,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_MASTERPASS = 'masterpass'; @@ -244,6 +245,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php index 1e3f04c4b..9b8bcf98b 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php @@ -245,6 +245,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_PAYWITHGOOGLE = 'paywithgoogle'; @@ -256,6 +257,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/PaymentDetailsRequest.php b/src/Adyen/Model/Checkout/PaymentDetailsRequest.php index c4482c532..e06b80e40 100644 --- a/src/Adyen/Model/Checkout/PaymentDetailsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentDetailsRequest.php @@ -367,7 +367,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData The `paymentData` value from the `/payments` response. Required if the `/payments` response returns this value. + * @param string|null $paymentData Encoded payment data. For [authorizing a payment after using 3D Secure 2 Authentication-only](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only/#authorise-the-payment-with-adyen): If you received `resultCode`: **AuthenticationNotRequired** in the `/payments` response, use the `threeDSPaymentData` from the same response. If you received `resultCode`: **AuthenticationFinished** in the `/payments` response, use the `action.paymentData` from the same response. * * @return self */ diff --git a/src/Adyen/Model/Checkout/PaymentMethod.php b/src/Adyen/Model/Checkout/PaymentMethod.php index 1c5ce54b1..8383fc671 100644 --- a/src/Adyen/Model/Checkout/PaymentMethod.php +++ b/src/Adyen/Model/Checkout/PaymentMethod.php @@ -263,6 +263,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; /** @@ -273,6 +274,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/PaymentResponseAction.php b/src/Adyen/Model/Checkout/PaymentResponseAction.php index 2c1838a5e..b525811d0 100644 --- a/src/Adyen/Model/Checkout/PaymentResponseAction.php +++ b/src/Adyen/Model/Checkout/PaymentResponseAction.php @@ -489,7 +489,7 @@ public function getPaymentData() /** * Sets paymentData * - * @param string|null $paymentData A value that must be submitted to the `/payments/details` endpoint to verify this payment. + * @param string|null $paymentData Encoded payment data. * * @return self */ diff --git a/src/Adyen/Model/Checkout/RecurringDetail.php b/src/Adyen/Model/Checkout/RecurringDetail.php index f8c9fe0f9..b70fa2cb1 100644 --- a/src/Adyen/Model/Checkout/RecurringDetail.php +++ b/src/Adyen/Model/Checkout/RecurringDetail.php @@ -275,6 +275,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; /** @@ -285,6 +286,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php new file mode 100644 index 000000000..fbb874a20 --- /dev/null +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.php @@ -0,0 +1,418 @@ + + */ +class ResponseAdditionalDataDomesticError implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataDomesticError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'domesticRefusalReasonRaw' => 'string', + 'domesticShopperAdvice' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'domesticRefusalReasonRaw' => null, + 'domesticShopperAdvice' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'domesticRefusalReasonRaw' => false, + 'domesticShopperAdvice' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domesticRefusalReasonRaw' => 'domesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'domesticShopperAdvice' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domesticRefusalReasonRaw' => 'setDomesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'setDomesticShopperAdvice' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domesticRefusalReasonRaw' => 'getDomesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'getDomesticShopperAdvice' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('domesticRefusalReasonRaw', $data ?? [], null); + $this->setIfExists('domesticShopperAdvice', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domesticRefusalReasonRaw + * + * @return string|null + */ + public function getDomesticRefusalReasonRaw() + { + return $this->container['domesticRefusalReasonRaw']; + } + + /** + * Sets domesticRefusalReasonRaw + * + * @param string|null $domesticRefusalReasonRaw The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. + * + * @return self + */ + public function setDomesticRefusalReasonRaw($domesticRefusalReasonRaw) + { + if (is_null($domesticRefusalReasonRaw)) { + throw new \InvalidArgumentException('non-nullable domesticRefusalReasonRaw cannot be null'); + } + $this->container['domesticRefusalReasonRaw'] = $domesticRefusalReasonRaw; + + return $this; + } + + /** + * Gets domesticShopperAdvice + * + * @return string|null + */ + public function getDomesticShopperAdvice() + { + return $this->container['domesticShopperAdvice']; + } + + /** + * Sets domesticShopperAdvice + * + * @param string|null $domesticShopperAdvice The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. + * + * @return self + */ + public function setDomesticShopperAdvice($domesticShopperAdvice) + { + if (is_null($domesticShopperAdvice)) { + throw new \InvalidArgumentException('non-nullable domesticShopperAdvice cannot be null'); + } + $this->container['domesticShopperAdvice'] = $domesticShopperAdvice; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/SamsungPayDetails.php b/src/Adyen/Model/Checkout/SamsungPayDetails.php index 5d761deec..7e6a0f0e0 100644 --- a/src/Adyen/Model/Checkout/SamsungPayDetails.php +++ b/src/Adyen/Model/Checkout/SamsungPayDetails.php @@ -245,6 +245,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_SAMSUNGPAY = 'samsungpay'; @@ -256,6 +257,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/Checkout/Split.php b/src/Adyen/Model/Checkout/Split.php index 2e27eda1a..55cb16b5f 100644 --- a/src/Adyen/Model/Checkout/Split.php +++ b/src/Adyen/Model/Checkout/Split.php @@ -438,7 +438,7 @@ public function getReference() /** * Sets reference * - * @param string|null $reference Your reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. + * @param string|null $reference Your unique reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. * * @return self */ diff --git a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php index 574346c67..408f48499 100644 --- a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php +++ b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php @@ -233,6 +233,7 @@ public function getModelName() return self::$openAPIModelName; } + public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; public const TYPE_VISACHECKOUT = 'visacheckout'; @@ -244,6 +245,7 @@ public function getModelName() public function getFundingSourceAllowableValues() { return [ + self::FUNDING_SOURCE_CREDIT, self::FUNDING_SOURCE_DEBIT, ]; } diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php index 5519af897..7934b2d1e 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php @@ -55,7 +55,8 @@ class AccountHolder implements ModelInterface, ArrayAccess, \JsonSerializable 'primaryBalanceAccount' => 'string', 'reference' => 'string', 'status' => 'string', - 'timeZone' => 'string' + 'timeZone' => 'string', + 'verificationDeadlines' => '\Adyen\Model\ConfigurationWebhooks\VerificationDeadline[]' ]; /** @@ -77,7 +78,8 @@ class AccountHolder implements ModelInterface, ArrayAccess, \JsonSerializable 'primaryBalanceAccount' => null, 'reference' => null, 'status' => null, - 'timeZone' => null + 'timeZone' => null, + 'verificationDeadlines' => null ]; /** @@ -97,7 +99,8 @@ class AccountHolder implements ModelInterface, ArrayAccess, \JsonSerializable 'primaryBalanceAccount' => false, 'reference' => false, 'status' => false, - 'timeZone' => false + 'timeZone' => false, + 'verificationDeadlines' => false ]; /** @@ -197,7 +200,8 @@ public function isNullableSetToNull(string $property): bool 'primaryBalanceAccount' => 'primaryBalanceAccount', 'reference' => 'reference', 'status' => 'status', - 'timeZone' => 'timeZone' + 'timeZone' => 'timeZone', + 'verificationDeadlines' => 'verificationDeadlines' ]; /** @@ -217,7 +221,8 @@ public function isNullableSetToNull(string $property): bool 'primaryBalanceAccount' => 'setPrimaryBalanceAccount', 'reference' => 'setReference', 'status' => 'setStatus', - 'timeZone' => 'setTimeZone' + 'timeZone' => 'setTimeZone', + 'verificationDeadlines' => 'setVerificationDeadlines' ]; /** @@ -237,7 +242,8 @@ public function isNullableSetToNull(string $property): bool 'primaryBalanceAccount' => 'getPrimaryBalanceAccount', 'reference' => 'getReference', 'status' => 'getStatus', - 'timeZone' => 'getTimeZone' + 'timeZone' => 'getTimeZone', + 'verificationDeadlines' => 'getVerificationDeadlines' ]; /** @@ -327,6 +333,7 @@ public function __construct(array $data = null) $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('timeZone', $data ?? [], null); + $this->setIfExists('verificationDeadlines', $data ?? [], null); } /** @@ -719,6 +726,33 @@ public function setTimeZone($timeZone) return $this; } + + /** + * Gets verificationDeadlines + * + * @return \Adyen\Model\ConfigurationWebhooks\VerificationDeadline[]|null + */ + public function getVerificationDeadlines() + { + return $this->container['verificationDeadlines']; + } + + /** + * Sets verificationDeadlines + * + * @param \Adyen\Model\ConfigurationWebhooks\VerificationDeadline[]|null $verificationDeadlines List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. + * + * @return self + */ + public function setVerificationDeadlines($verificationDeadlines) + { + if (is_null($verificationDeadlines)) { + throw new \InvalidArgumentException('non-nullable verificationDeadlines cannot be null'); + } + $this->container['verificationDeadlines'] = $verificationDeadlines; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php index b20fa504e..bac903d22 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php @@ -453,7 +453,7 @@ public function getDefaultCurrencyCode() /** * Sets defaultCurrencyCode * - * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. + * @param string|null $defaultCurrencyCode The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php b/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php index 095bf5377..af80da79b 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php @@ -296,7 +296,7 @@ public function getSalesDayClosingTime() /** * Sets salesDayClosingTime * - * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + * @param string|null $salesDayClosingTime Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. * * @return self */ @@ -323,7 +323,7 @@ public function getSettlementDelayDays() /** * Sets settlementDelayDays * - * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/pass-through-settlement). Default value: **null**. + * @param int|null $settlementDelayDays Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/settle-funds/pass-through-settlement). Default value: **null**. * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php index d9a2be248..29af80cc9 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php @@ -277,16 +277,19 @@ public function getModelName() public const REASON_AMOUNT_LIMIT_EXCEEDED = 'amountLimitExceeded'; public const REASON_APPROVED = 'approved'; + public const REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE = 'balanceAccountTemporarilyBlockedByTransactionRule'; public const REASON_COUNTERPARTY_ACCOUNT_BLOCKED = 'counterpartyAccountBlocked'; public const REASON_COUNTERPARTY_ACCOUNT_CLOSED = 'counterpartyAccountClosed'; public const REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND = 'counterpartyAccountNotFound'; public const REASON_COUNTERPARTY_ADDRESS_REQUIRED = 'counterpartyAddressRequired'; public const REASON_COUNTERPARTY_BANK_TIMED_OUT = 'counterpartyBankTimedOut'; public const REASON_COUNTERPARTY_BANK_UNAVAILABLE = 'counterpartyBankUnavailable'; + public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; public const REASON_REFUSED_BY_COUNTERPARTY_BANK = 'refusedByCounterpartyBank'; public const REASON_ROUTE_NOT_FOUND = 'routeNotFound'; + public const REASON_SCA_FAILED = 'scaFailed'; public const REASON_UNKNOWN = 'unknown'; public const STATUS_ACTIVE = 'active'; public const STATUS_INACTIVE = 'inactive'; @@ -303,16 +306,19 @@ public function getReasonAllowableValues() return [ self::REASON_AMOUNT_LIMIT_EXCEEDED, self::REASON_APPROVED, + self::REASON_BALANCE_ACCOUNT_TEMPORARILY_BLOCKED_BY_TRANSACTION_RULE, self::REASON_COUNTERPARTY_ACCOUNT_BLOCKED, self::REASON_COUNTERPARTY_ACCOUNT_CLOSED, self::REASON_COUNTERPARTY_ACCOUNT_NOT_FOUND, self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, self::REASON_REFUSED_BY_COUNTERPARTY_BANK, self::REASON_ROUTE_NOT_FOUND, + self::REASON_SCA_FAILED, self::REASON_UNKNOWN, ]; } diff --git a/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php b/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php new file mode 100644 index 000000000..9aae5e9ca --- /dev/null +++ b/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php @@ -0,0 +1,577 @@ + + */ +class VerificationDeadline implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'VerificationDeadline'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'capabilities' => 'string[]', + 'entityIds' => 'string[]', + 'expiresAt' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'capabilities' => null, + 'entityIds' => null, + 'expiresAt' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'capabilities' => false, + 'entityIds' => false, + 'expiresAt' => 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 = [ + 'capabilities' => 'capabilities', + 'entityIds' => 'entityIds', + 'expiresAt' => 'expiresAt' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'capabilities' => 'setCapabilities', + 'entityIds' => 'setEntityIds', + 'expiresAt' => 'setExpiresAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'capabilities' => 'getCapabilities', + 'entityIds' => 'getEntityIds', + 'expiresAt' => 'getExpiresAt' + ]; + + /** + * 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 CAPABILITIES_ACCEPT_EXTERNAL_FUNDING = 'acceptExternalFunding'; + public const CAPABILITIES_ACCEPT_PSP_FUNDING = 'acceptPspFunding'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES = 'acceptTransactionInRestrictedCountries'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES_COMMERCIAL = 'acceptTransactionInRestrictedCountriesCommercial'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES_CONSUMER = 'acceptTransactionInRestrictedCountriesConsumer'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES = 'acceptTransactionInRestrictedIndustries'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES_COMMERCIAL = 'acceptTransactionInRestrictedIndustriesCommercial'; + public const CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES_CONSUMER = 'acceptTransactionInRestrictedIndustriesConsumer'; + public const CAPABILITIES_ACQUIRING = 'acquiring'; + public const CAPABILITIES_ATM_WITHDRAWAL = 'atmWithdrawal'; + public const CAPABILITIES_ATM_WITHDRAWAL_COMMERCIAL = 'atmWithdrawalCommercial'; + public const CAPABILITIES_ATM_WITHDRAWAL_CONSUMER = 'atmWithdrawalConsumer'; + public const CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES = 'atmWithdrawalInRestrictedCountries'; + public const CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES_COMMERCIAL = 'atmWithdrawalInRestrictedCountriesCommercial'; + public const CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES_CONSUMER = 'atmWithdrawalInRestrictedCountriesConsumer'; + public const CAPABILITIES_AUTHORISED_PAYMENT_INSTRUMENT_USER = 'authorisedPaymentInstrumentUser'; + public const CAPABILITIES_GET_GRANT_OFFERS = 'getGrantOffers'; + public const CAPABILITIES_ISSUE_BANK_ACCOUNT = 'issueBankAccount'; + public const CAPABILITIES_ISSUE_CARD = 'issueCard'; + public const CAPABILITIES_ISSUE_CARD_COMMERCIAL = 'issueCardCommercial'; + public const CAPABILITIES_ISSUE_CARD_CONSUMER = 'issueCardConsumer'; + public const CAPABILITIES_LOCAL_ACCEPTANCE = 'localAcceptance'; + public const CAPABILITIES_PAYOUT = 'payout'; + public const CAPABILITIES_PAYOUT_TO_TRANSFER_INSTRUMENT = 'payoutToTransferInstrument'; + public const CAPABILITIES_PROCESSING = 'processing'; + public const CAPABILITIES_RECEIVE_FROM_BALANCE_ACCOUNT = 'receiveFromBalanceAccount'; + public const CAPABILITIES_RECEIVE_FROM_PLATFORM_PAYMENTS = 'receiveFromPlatformPayments'; + public const CAPABILITIES_RECEIVE_FROM_THIRD_PARTY = 'receiveFromThirdParty'; + public const CAPABILITIES_RECEIVE_FROM_TRANSFER_INSTRUMENT = 'receiveFromTransferInstrument'; + public const CAPABILITIES_RECEIVE_GRANTS = 'receiveGrants'; + public const CAPABILITIES_RECEIVE_PAYMENTS = 'receivePayments'; + public const CAPABILITIES_SEND_TO_BALANCE_ACCOUNT = 'sendToBalanceAccount'; + public const CAPABILITIES_SEND_TO_THIRD_PARTY = 'sendToThirdParty'; + public const CAPABILITIES_SEND_TO_TRANSFER_INSTRUMENT = 'sendToTransferInstrument'; + public const CAPABILITIES_THIRD_PARTY_FUNDING = 'thirdPartyFunding'; + public const CAPABILITIES_USE_CARD = 'useCard'; + public const CAPABILITIES_USE_CARD_COMMERCIAL = 'useCardCommercial'; + public const CAPABILITIES_USE_CARD_CONSUMER = 'useCardConsumer'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES = 'useCardInRestrictedCountries'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES_COMMERCIAL = 'useCardInRestrictedCountriesCommercial'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES_CONSUMER = 'useCardInRestrictedCountriesConsumer'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES = 'useCardInRestrictedIndustries'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES_COMMERCIAL = 'useCardInRestrictedIndustriesCommercial'; + public const CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES_CONSUMER = 'useCardInRestrictedIndustriesConsumer'; + public const CAPABILITIES_WITHDRAW_FROM_ATM = 'withdrawFromAtm'; + public const CAPABILITIES_WITHDRAW_FROM_ATM_COMMERCIAL = 'withdrawFromAtmCommercial'; + public const CAPABILITIES_WITHDRAW_FROM_ATM_CONSUMER = 'withdrawFromAtmConsumer'; + public const CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES = 'withdrawFromAtmInRestrictedCountries'; + public const CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_COMMERCIAL = 'withdrawFromAtmInRestrictedCountriesCommercial'; + public const CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_CONSUMER = 'withdrawFromAtmInRestrictedCountriesConsumer'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCapabilitiesAllowableValues() + { + return [ + self::CAPABILITIES_ACCEPT_EXTERNAL_FUNDING, + self::CAPABILITIES_ACCEPT_PSP_FUNDING, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES_COMMERCIAL, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_COUNTRIES_CONSUMER, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES_COMMERCIAL, + self::CAPABILITIES_ACCEPT_TRANSACTION_IN_RESTRICTED_INDUSTRIES_CONSUMER, + self::CAPABILITIES_ACQUIRING, + self::CAPABILITIES_ATM_WITHDRAWAL, + self::CAPABILITIES_ATM_WITHDRAWAL_COMMERCIAL, + self::CAPABILITIES_ATM_WITHDRAWAL_CONSUMER, + self::CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES, + self::CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES_COMMERCIAL, + self::CAPABILITIES_ATM_WITHDRAWAL_IN_RESTRICTED_COUNTRIES_CONSUMER, + self::CAPABILITIES_AUTHORISED_PAYMENT_INSTRUMENT_USER, + self::CAPABILITIES_GET_GRANT_OFFERS, + self::CAPABILITIES_ISSUE_BANK_ACCOUNT, + self::CAPABILITIES_ISSUE_CARD, + self::CAPABILITIES_ISSUE_CARD_COMMERCIAL, + self::CAPABILITIES_ISSUE_CARD_CONSUMER, + self::CAPABILITIES_LOCAL_ACCEPTANCE, + self::CAPABILITIES_PAYOUT, + self::CAPABILITIES_PAYOUT_TO_TRANSFER_INSTRUMENT, + self::CAPABILITIES_PROCESSING, + self::CAPABILITIES_RECEIVE_FROM_BALANCE_ACCOUNT, + self::CAPABILITIES_RECEIVE_FROM_PLATFORM_PAYMENTS, + self::CAPABILITIES_RECEIVE_FROM_THIRD_PARTY, + self::CAPABILITIES_RECEIVE_FROM_TRANSFER_INSTRUMENT, + self::CAPABILITIES_RECEIVE_GRANTS, + self::CAPABILITIES_RECEIVE_PAYMENTS, + self::CAPABILITIES_SEND_TO_BALANCE_ACCOUNT, + self::CAPABILITIES_SEND_TO_THIRD_PARTY, + self::CAPABILITIES_SEND_TO_TRANSFER_INSTRUMENT, + self::CAPABILITIES_THIRD_PARTY_FUNDING, + self::CAPABILITIES_USE_CARD, + self::CAPABILITIES_USE_CARD_COMMERCIAL, + self::CAPABILITIES_USE_CARD_CONSUMER, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES_COMMERCIAL, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_COUNTRIES_CONSUMER, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES_COMMERCIAL, + self::CAPABILITIES_USE_CARD_IN_RESTRICTED_INDUSTRIES_CONSUMER, + self::CAPABILITIES_WITHDRAW_FROM_ATM, + self::CAPABILITIES_WITHDRAW_FROM_ATM_COMMERCIAL, + self::CAPABILITIES_WITHDRAW_FROM_ATM_CONSUMER, + self::CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES, + self::CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_COMMERCIAL, + self::CAPABILITIES_WITHDRAW_FROM_ATM_IN_RESTRICTED_COUNTRIES_CONSUMER, + ]; + } + /** + * 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('capabilities', $data ?? [], null); + $this->setIfExists('entityIds', $data ?? [], null); + $this->setIfExists('expiresAt', $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['capabilities'] === null) { + $invalidProperties[] = "'capabilities' can't be null"; + } + if ($this->container['expiresAt'] === null) { + $invalidProperties[] = "'expiresAt' 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 capabilities + * + * @return string[] + */ + public function getCapabilities() + { + return $this->container['capabilities']; + } + + /** + * Sets capabilities + * + * @param string[] $capabilities The names of the capabilities to be disallowed. + * + * @return self + */ + public function setCapabilities($capabilities) + { + if (is_null($capabilities)) { + throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); + } + $allowedValues = $this->getCapabilitiesAllowableValues(); + if (array_diff($capabilities, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'capabilities', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['capabilities'] = $capabilities; + + return $this; + } + + /** + * Gets entityIds + * + * @return string[]|null + */ + public function getEntityIds() + { + return $this->container['entityIds']; + } + + /** + * Sets entityIds + * + * @param string[]|null $entityIds The unique identifiers of the bank account(s) that the deadline applies to + * + * @return self + */ + public function setEntityIds($entityIds) + { + if (is_null($entityIds)) { + throw new \InvalidArgumentException('non-nullable entityIds cannot be null'); + } + $this->container['entityIds'] = $entityIds; + + return $this; + } + + /** + * Gets expiresAt + * + * @return \DateTime + */ + public function getExpiresAt() + { + return $this->container['expiresAt']; + } + + /** + * Sets expiresAt + * + * @param \DateTime $expiresAt The date that verification is due by before capabilities are disallowed. + * + * @return self + */ + public function setExpiresAt($expiresAt) + { + if (is_null($expiresAt)) { + throw new \InvalidArgumentException('non-nullable expiresAt cannot be null'); + } + $this->container['expiresAt'] = $expiresAt; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index b7bdf5833..910c517b6 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -57,6 +57,7 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'transferInstruments' => '\Adyen\Model\LegalEntityManagement\TransferInstrumentReference[]', 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', 'type' => 'string', + 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership', 'verificationDeadlines' => '\Adyen\Model\LegalEntityManagement\VerificationDeadline[]' ]; @@ -81,6 +82,7 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'transferInstruments' => null, 'trust' => null, 'type' => null, + 'unincorporatedPartnership' => null, 'verificationDeadlines' => null ]; @@ -103,6 +105,7 @@ class LegalEntity implements ModelInterface, ArrayAccess, \JsonSerializable 'transferInstruments' => false, 'trust' => false, 'type' => false, + 'unincorporatedPartnership' => false, 'verificationDeadlines' => false ]; @@ -205,6 +208,7 @@ public function isNullableSetToNull(string $property): bool 'transferInstruments' => 'transferInstruments', 'trust' => 'trust', 'type' => 'type', + 'unincorporatedPartnership' => 'unincorporatedPartnership', 'verificationDeadlines' => 'verificationDeadlines' ]; @@ -227,6 +231,7 @@ public function isNullableSetToNull(string $property): bool 'transferInstruments' => 'setTransferInstruments', 'trust' => 'setTrust', 'type' => 'setType', + 'unincorporatedPartnership' => 'setUnincorporatedPartnership', 'verificationDeadlines' => 'setVerificationDeadlines' ]; @@ -249,6 +254,7 @@ public function isNullableSetToNull(string $property): bool 'transferInstruments' => 'getTransferInstruments', 'trust' => 'getTrust', 'type' => 'getType', + 'unincorporatedPartnership' => 'getUnincorporatedPartnership', 'verificationDeadlines' => 'getVerificationDeadlines' ]; @@ -342,6 +348,7 @@ public function __construct(array $data = null) $this->setIfExists('transferInstruments', $data ?? [], null); $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('unincorporatedPartnership', $data ?? [], null); $this->setIfExists('verificationDeadlines', $data ?? [], null); } @@ -762,6 +769,33 @@ public function setType($type) return $this; } + /** + * Gets unincorporatedPartnership + * + * @return \Adyen\Model\LegalEntityManagement\UnincorporatedPartnership|null + */ + public function getUnincorporatedPartnership() + { + return $this->container['unincorporatedPartnership']; + } + + /** + * Sets unincorporatedPartnership + * + * @param \Adyen\Model\LegalEntityManagement\UnincorporatedPartnership|null $unincorporatedPartnership unincorporatedPartnership + * + * @return self + */ + public function setUnincorporatedPartnership($unincorporatedPartnership) + { + if (is_null($unincorporatedPartnership)) { + throw new \InvalidArgumentException('non-nullable unincorporatedPartnership cannot be null'); + } + $this->container['unincorporatedPartnership'] = $unincorporatedPartnership; + + return $this; + } + /** * Gets verificationDeadlines * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php index 1bc7809ec..53a1ab342 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php @@ -51,7 +51,8 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => 'string', 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', - 'type' => 'string' + 'type' => 'string', + 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership' ]; /** @@ -69,7 +70,8 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => null, 'soleProprietorship' => null, 'trust' => null, - 'type' => null + 'type' => null, + 'unincorporatedPartnership' => null ]; /** @@ -85,7 +87,8 @@ class LegalEntityInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'reference' => false, 'soleProprietorship' => false, 'trust' => false, - 'type' => false + 'type' => false, + 'unincorporatedPartnership' => false ]; /** @@ -181,7 +184,8 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'reference', 'soleProprietorship' => 'soleProprietorship', 'trust' => 'trust', - 'type' => 'type' + 'type' => 'type', + 'unincorporatedPartnership' => 'unincorporatedPartnership' ]; /** @@ -197,7 +201,8 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'setReference', 'soleProprietorship' => 'setSoleProprietorship', 'trust' => 'setTrust', - 'type' => 'setType' + 'type' => 'setType', + 'unincorporatedPartnership' => 'setUnincorporatedPartnership' ]; /** @@ -213,7 +218,8 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'getReference', 'soleProprietorship' => 'getSoleProprietorship', 'trust' => 'getTrust', - 'type' => 'getType' + 'type' => 'getType', + 'unincorporatedPartnership' => 'getUnincorporatedPartnership' ]; /** @@ -301,6 +307,7 @@ public function __construct(array $data = null) $this->setIfExists('soleProprietorship', $data ?? [], null); $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('unincorporatedPartnership', $data ?? [], null); } /** @@ -579,6 +586,33 @@ public function setType($type) return $this; } + + /** + * Gets unincorporatedPartnership + * + * @return \Adyen\Model\LegalEntityManagement\UnincorporatedPartnership|null + */ + public function getUnincorporatedPartnership() + { + return $this->container['unincorporatedPartnership']; + } + + /** + * Sets unincorporatedPartnership + * + * @param \Adyen\Model\LegalEntityManagement\UnincorporatedPartnership|null $unincorporatedPartnership unincorporatedPartnership + * + * @return self + */ + public function setUnincorporatedPartnership($unincorporatedPartnership) + { + if (is_null($unincorporatedPartnership)) { + throw new \InvalidArgumentException('non-nullable unincorporatedPartnership cannot be null'); + } + $this->container['unincorporatedPartnership'] = $unincorporatedPartnership; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php index e8a75b4a8..88bb7e77d 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php @@ -51,7 +51,8 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'reference' => 'string', 'soleProprietorship' => '\Adyen\Model\LegalEntityManagement\SoleProprietorship', 'trust' => '\Adyen\Model\LegalEntityManagement\Trust', - 'type' => 'string' + 'type' => 'string', + 'unincorporatedPartnership' => '\Adyen\Model\LegalEntityManagement\UnincorporatedPartnership' ]; /** @@ -69,7 +70,8 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'reference' => null, 'soleProprietorship' => null, 'trust' => null, - 'type' => null + 'type' => null, + 'unincorporatedPartnership' => null ]; /** @@ -85,7 +87,8 @@ class LegalEntityInfoRequiredType implements ModelInterface, ArrayAccess, \JsonS 'reference' => false, 'soleProprietorship' => false, 'trust' => false, - 'type' => false + 'type' => false, + 'unincorporatedPartnership' => false ]; /** @@ -181,7 +184,8 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'reference', 'soleProprietorship' => 'soleProprietorship', 'trust' => 'trust', - 'type' => 'type' + 'type' => 'type', + 'unincorporatedPartnership' => 'unincorporatedPartnership' ]; /** @@ -197,7 +201,8 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'setReference', 'soleProprietorship' => 'setSoleProprietorship', 'trust' => 'setTrust', - 'type' => 'setType' + 'type' => 'setType', + 'unincorporatedPartnership' => 'setUnincorporatedPartnership' ]; /** @@ -213,7 +218,8 @@ public function isNullableSetToNull(string $property): bool 'reference' => 'getReference', 'soleProprietorship' => 'getSoleProprietorship', 'trust' => 'getTrust', - 'type' => 'getType' + 'type' => 'getType', + 'unincorporatedPartnership' => 'getUnincorporatedPartnership' ]; /** @@ -301,6 +307,7 @@ public function __construct(array $data = null) $this->setIfExists('soleProprietorship', $data ?? [], null); $this->setIfExists('trust', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('unincorporatedPartnership', $data ?? [], null); } /** @@ -582,6 +589,33 @@ public function setType($type) return $this; } + + /** + * Gets unincorporatedPartnership + * + * @return \Adyen\Model\LegalEntityManagement\UnincorporatedPartnership|null + */ + public function getUnincorporatedPartnership() + { + return $this->container['unincorporatedPartnership']; + } + + /** + * Sets unincorporatedPartnership + * + * @param \Adyen\Model\LegalEntityManagement\UnincorporatedPartnership|null $unincorporatedPartnership unincorporatedPartnership + * + * @return self + */ + public function setUnincorporatedPartnership($unincorporatedPartnership) + { + if (is_null($unincorporatedPartnership)) { + throw new \InvalidArgumentException('non-nullable unincorporatedPartnership cannot be null'); + } + $this->container['unincorporatedPartnership'] = $unincorporatedPartnership; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php b/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php new file mode 100644 index 000000000..ddbd6c8ce --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.php @@ -0,0 +1,828 @@ + + */ +class UnincorporatedPartnership implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'UnincorporatedPartnership'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'countryOfGoverningLaw' => 'string', + 'dateOfIncorporation' => 'string', + 'doingBusinessAs' => 'string', + 'name' => 'string', + 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', + 'registeredAddress' => '\Adyen\Model\LegalEntityManagement\Address', + 'registrationNumber' => 'string', + 'taxInformation' => '\Adyen\Model\LegalEntityManagement\TaxInformation[]', + 'type' => 'string', + 'vatAbsenceReason' => 'string', + 'vatNumber' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'countryOfGoverningLaw' => null, + 'dateOfIncorporation' => null, + 'doingBusinessAs' => null, + 'name' => null, + 'principalPlaceOfBusiness' => null, + 'registeredAddress' => null, + 'registrationNumber' => null, + 'taxInformation' => null, + 'type' => null, + 'vatAbsenceReason' => null, + 'vatNumber' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'countryOfGoverningLaw' => false, + 'dateOfIncorporation' => false, + 'doingBusinessAs' => false, + 'name' => false, + 'principalPlaceOfBusiness' => false, + 'registeredAddress' => false, + 'registrationNumber' => false, + 'taxInformation' => false, + 'type' => false, + 'vatAbsenceReason' => false, + 'vatNumber' => 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 = [ + 'countryOfGoverningLaw' => 'countryOfGoverningLaw', + 'dateOfIncorporation' => 'dateOfIncorporation', + 'doingBusinessAs' => 'doingBusinessAs', + 'name' => 'name', + 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', + 'registeredAddress' => 'registeredAddress', + 'registrationNumber' => 'registrationNumber', + 'taxInformation' => 'taxInformation', + 'type' => 'type', + 'vatAbsenceReason' => 'vatAbsenceReason', + 'vatNumber' => 'vatNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', + 'dateOfIncorporation' => 'setDateOfIncorporation', + 'doingBusinessAs' => 'setDoingBusinessAs', + 'name' => 'setName', + 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', + 'registeredAddress' => 'setRegisteredAddress', + 'registrationNumber' => 'setRegistrationNumber', + 'taxInformation' => 'setTaxInformation', + 'type' => 'setType', + 'vatAbsenceReason' => 'setVatAbsenceReason', + 'vatNumber' => 'setVatNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', + 'dateOfIncorporation' => 'getDateOfIncorporation', + 'doingBusinessAs' => 'getDoingBusinessAs', + 'name' => 'getName', + 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', + 'registeredAddress' => 'getRegisteredAddress', + 'registrationNumber' => 'getRegistrationNumber', + 'taxInformation' => 'getTaxInformation', + 'type' => 'getType', + 'vatAbsenceReason' => 'getVatAbsenceReason', + 'vatNumber' => 'getVatNumber' + ]; + + /** + * 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_LIMITED_PARTNERSHIP = 'limitedPartnership'; + public const TYPE_GENERAL_PARTNERSHIP = 'generalPartnership'; + public const TYPE_FAMILY_PARTNERSHIP = 'familyPartnership'; + public const TYPE_COMMERCIAL_PARTNERSHIP = 'commercialPartnership'; + public const TYPE_PUBLIC_PARTNERSHIP = 'publicPartnership'; + public const TYPE_OTHER_PARTNERSHIP = 'otherPartnership'; + public const TYPE_GBR = 'gbr'; + public const TYPE_GMBH = 'gmbh'; + public const TYPE_KGAA = 'kgaa'; + public const TYPE_CV = 'cv'; + public const TYPE_VOF = 'vof'; + public const TYPE_MAATSCHAP = 'maatschap'; + public const TYPE_PRIVATE_FUND_LIMITED_PARTNERSHIP = 'privateFundLimitedPartnership'; + public const TYPE_BUSINESS_TRUST_ENTITY = 'businessTrustEntity'; + public const TYPE_BUSINESS_PARTNERSHIP = 'businessPartnership'; + public const VAT_ABSENCE_REASON_INDUSTRY_EXEMPTION = 'industryExemption'; + public const VAT_ABSENCE_REASON_BELOW_TAX_THRESHOLD = 'belowTaxThreshold'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_LIMITED_PARTNERSHIP, + self::TYPE_GENERAL_PARTNERSHIP, + self::TYPE_FAMILY_PARTNERSHIP, + self::TYPE_COMMERCIAL_PARTNERSHIP, + self::TYPE_PUBLIC_PARTNERSHIP, + self::TYPE_OTHER_PARTNERSHIP, + self::TYPE_GBR, + self::TYPE_GMBH, + self::TYPE_KGAA, + self::TYPE_CV, + self::TYPE_VOF, + self::TYPE_MAATSCHAP, + self::TYPE_PRIVATE_FUND_LIMITED_PARTNERSHIP, + self::TYPE_BUSINESS_TRUST_ENTITY, + self::TYPE_BUSINESS_PARTNERSHIP, + ]; + } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getVatAbsenceReasonAllowableValues() + { + return [ + self::VAT_ABSENCE_REASON_INDUSTRY_EXEMPTION, + self::VAT_ABSENCE_REASON_BELOW_TAX_THRESHOLD, + ]; + } + /** + * 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('countryOfGoverningLaw', $data ?? [], null); + $this->setIfExists('dateOfIncorporation', $data ?? [], null); + $this->setIfExists('doingBusinessAs', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); + $this->setIfExists('registeredAddress', $data ?? [], null); + $this->setIfExists('registrationNumber', $data ?? [], null); + $this->setIfExists('taxInformation', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('vatAbsenceReason', $data ?? [], null); + $this->setIfExists('vatNumber', $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['countryOfGoverningLaw'] === null) { + $invalidProperties[] = "'countryOfGoverningLaw' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['registeredAddress'] === null) { + $invalidProperties[] = "'registeredAddress' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getVatAbsenceReasonAllowableValues(); + if (!is_null($this->container['vatAbsenceReason']) && !in_array($this->container['vatAbsenceReason'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'vatAbsenceReason', must be one of '%s'", + $this->container['vatAbsenceReason'], + 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 countryOfGoverningLaw + * + * @return string + */ + public function getCountryOfGoverningLaw() + { + return $this->container['countryOfGoverningLaw']; + } + + /** + * Sets countryOfGoverningLaw + * + * @param string $countryOfGoverningLaw The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. + * + * @return self + */ + public function setCountryOfGoverningLaw($countryOfGoverningLaw) + { + if (is_null($countryOfGoverningLaw)) { + throw new \InvalidArgumentException('non-nullable countryOfGoverningLaw cannot be null'); + } + $this->container['countryOfGoverningLaw'] = $countryOfGoverningLaw; + + return $this; + } + + /** + * Gets dateOfIncorporation + * + * @return string|null + */ + public function getDateOfIncorporation() + { + return $this->container['dateOfIncorporation']; + } + + /** + * Sets dateOfIncorporation + * + * @param string|null $dateOfIncorporation The date when the legal arrangement was incorporated in YYYY-MM-DD format. + * + * @return self + */ + public function setDateOfIncorporation($dateOfIncorporation) + { + if (is_null($dateOfIncorporation)) { + throw new \InvalidArgumentException('non-nullable dateOfIncorporation cannot be null'); + } + $this->container['dateOfIncorporation'] = $dateOfIncorporation; + + return $this; + } + + /** + * Gets doingBusinessAs + * + * @return string|null + */ + public function getDoingBusinessAs() + { + return $this->container['doingBusinessAs']; + } + + /** + * Sets doingBusinessAs + * + * @param string|null $doingBusinessAs The registered name, if different from the `name`. + * + * @return self + */ + public function setDoingBusinessAs($doingBusinessAs) + { + if (is_null($doingBusinessAs)) { + throw new \InvalidArgumentException('non-nullable doingBusinessAs cannot be null'); + } + $this->container['doingBusinessAs'] = $doingBusinessAs; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The legal name. + * + * @return self + */ + public function setName($name) + { + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets principalPlaceOfBusiness + * + * @return \Adyen\Model\LegalEntityManagement\Address|null + */ + public function getPrincipalPlaceOfBusiness() + { + return $this->container['principalPlaceOfBusiness']; + } + + /** + * Sets principalPlaceOfBusiness + * + * @param \Adyen\Model\LegalEntityManagement\Address|null $principalPlaceOfBusiness principalPlaceOfBusiness + * + * @return self + */ + public function setPrincipalPlaceOfBusiness($principalPlaceOfBusiness) + { + if (is_null($principalPlaceOfBusiness)) { + throw new \InvalidArgumentException('non-nullable principalPlaceOfBusiness cannot be null'); + } + $this->container['principalPlaceOfBusiness'] = $principalPlaceOfBusiness; + + return $this; + } + + /** + * Gets registeredAddress + * + * @return \Adyen\Model\LegalEntityManagement\Address + */ + public function getRegisteredAddress() + { + return $this->container['registeredAddress']; + } + + /** + * Sets registeredAddress + * + * @param \Adyen\Model\LegalEntityManagement\Address $registeredAddress registeredAddress + * + * @return self + */ + public function setRegisteredAddress($registeredAddress) + { + if (is_null($registeredAddress)) { + throw new \InvalidArgumentException('non-nullable registeredAddress cannot be null'); + } + $this->container['registeredAddress'] = $registeredAddress; + + return $this; + } + + /** + * Gets registrationNumber + * + * @return string|null + */ + public function getRegistrationNumber() + { + return $this->container['registrationNumber']; + } + + /** + * Sets registrationNumber + * + * @param string|null $registrationNumber The registration number. + * + * @return self + */ + public function setRegistrationNumber($registrationNumber) + { + if (is_null($registrationNumber)) { + throw new \InvalidArgumentException('non-nullable registrationNumber cannot be null'); + } + $this->container['registrationNumber'] = $registrationNumber; + + return $this; + } + + /** + * Gets taxInformation + * + * @return \Adyen\Model\LegalEntityManagement\TaxInformation[]|null + */ + public function getTaxInformation() + { + return $this->container['taxInformation']; + } + + /** + * Sets taxInformation + * + * @param \Adyen\Model\LegalEntityManagement\TaxInformation[]|null $taxInformation The tax information of the entity. + * + * @return self + */ + public function setTaxInformation($taxInformation) + { + if (is_null($taxInformation)) { + throw new \InvalidArgumentException('non-nullable taxInformation cannot be null'); + } + $this->container['taxInformation'] = $taxInformation; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of Partnership. Possible values: **limitedPartnership**, **generalPartnership**, **familyPartnership**, **commercialPartnership**, **publicPartnership**, **otherPartnership**, **gbr**, **kgaa**, **cv**, **vof**, **maatschap**, **privateFundLimitedPartnership**, **businessTrustEntity**, or **businessPartnership**. + * + * @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; + } + + /** + * Gets vatAbsenceReason + * + * @return string|null + */ + public function getVatAbsenceReason() + { + return $this->container['vatAbsenceReason']; + } + + /** + * Sets vatAbsenceReason + * + * @param string|null $vatAbsenceReason The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. + * + * @return self + */ + public function setVatAbsenceReason($vatAbsenceReason) + { + if (is_null($vatAbsenceReason)) { + throw new \InvalidArgumentException('non-nullable vatAbsenceReason cannot be null'); + } + $allowedValues = $this->getVatAbsenceReasonAllowableValues(); + if (!in_array($vatAbsenceReason, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'vatAbsenceReason', must be one of '%s'", + $vatAbsenceReason, + implode("', '", $allowedValues) + ) + ); + } + $this->container['vatAbsenceReason'] = $vatAbsenceReason; + + return $this; + } + + /** + * Gets vatNumber + * + * @return string|null + */ + public function getVatNumber() + { + return $this->container['vatNumber']; + } + + /** + * Sets vatNumber + * + * @param string|null $vatNumber The VAT number. + * + * @return self + */ + public function setVatNumber($vatNumber) + { + if (is_null($vatNumber)) { + throw new \InvalidArgumentException('non-nullable vatNumber cannot be null'); + } + $this->container['vatNumber'] = $vatNumber; + + 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/Payout/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php new file mode 100644 index 000000000..4f7fdfbd7 --- /dev/null +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php @@ -0,0 +1,418 @@ + + */ +class ResponseAdditionalDataDomesticError implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ResponseAdditionalDataDomesticError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'domesticRefusalReasonRaw' => 'string', + 'domesticShopperAdvice' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'domesticRefusalReasonRaw' => null, + 'domesticShopperAdvice' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'domesticRefusalReasonRaw' => false, + 'domesticShopperAdvice' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domesticRefusalReasonRaw' => 'domesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'domesticShopperAdvice' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domesticRefusalReasonRaw' => 'setDomesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'setDomesticShopperAdvice' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domesticRefusalReasonRaw' => 'getDomesticRefusalReasonRaw', + 'domesticShopperAdvice' => 'getDomesticShopperAdvice' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('domesticRefusalReasonRaw', $data ?? [], null); + $this->setIfExists('domesticShopperAdvice', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domesticRefusalReasonRaw + * + * @return string|null + */ + public function getDomesticRefusalReasonRaw() + { + return $this->container['domesticRefusalReasonRaw']; + } + + /** + * Sets domesticRefusalReasonRaw + * + * @param string|null $domesticRefusalReasonRaw The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. + * + * @return self + */ + public function setDomesticRefusalReasonRaw($domesticRefusalReasonRaw) + { + if (is_null($domesticRefusalReasonRaw)) { + throw new \InvalidArgumentException('non-nullable domesticRefusalReasonRaw cannot be null'); + } + $this->container['domesticRefusalReasonRaw'] = $domesticRefusalReasonRaw; + + return $this; + } + + /** + * Gets domesticShopperAdvice + * + * @return string|null + */ + public function getDomesticShopperAdvice() + { + return $this->container['domesticShopperAdvice']; + } + + /** + * Sets domesticShopperAdvice + * + * @param string|null $domesticShopperAdvice The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. + * + * @return self + */ + public function setDomesticShopperAdvice($domesticShopperAdvice) + { + if (is_null($domesticShopperAdvice)) { + throw new \InvalidArgumentException('non-nullable domesticShopperAdvice cannot be null'); + } + $this->container['domesticShopperAdvice'] = $domesticShopperAdvice; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +}