diff --git a/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php b/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php index 29bde8828..d3f03f31a 100644 --- a/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php +++ b/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php @@ -492,11 +492,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php b/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php index 206b168ab..e81b9afda 100644 --- a/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php +++ b/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php @@ -573,11 +573,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -631,11 +631,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/AccelInfo.php b/src/Adyen/Model/Management/AccelInfo.php index d39caf506..1927355f5 100644 --- a/src/Adyen/Model/Management/AccelInfo.php +++ b/src/Adyen/Model/Management/AccelInfo.php @@ -329,11 +329,11 @@ public function setProcessingType($processingType) { $allowedValues = $this->getProcessingTypeAllowableValues(); if (!in_array($processingType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'processingType', must be one of '%s'", + "processingType: unexpected enum value '%s' - Supported values are [%s]", $processingType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/AdditionalSettings.php b/src/Adyen/Model/Management/AdditionalSettings.php index 872481422..5b00043b7 100644 --- a/src/Adyen/Model/Management/AdditionalSettings.php +++ b/src/Adyen/Model/Management/AdditionalSettings.php @@ -317,7 +317,7 @@ public function getProperties() /** * Sets properties * - * @param array|null $properties Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. + * @param array|null $properties Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `includeCaptureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. * * @return self */ diff --git a/src/Adyen/Model/Management/AdditionalSettingsResponse.php b/src/Adyen/Model/Management/AdditionalSettingsResponse.php index b51d157f8..b5d86bb3e 100644 --- a/src/Adyen/Model/Management/AdditionalSettingsResponse.php +++ b/src/Adyen/Model/Management/AdditionalSettingsResponse.php @@ -348,7 +348,7 @@ public function getProperties() /** * Sets properties * - * @param array|null $properties Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. + * @param array|null $properties Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `includeCaptureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. * * @return self */ diff --git a/src/Adyen/Model/Management/AmexInfo.php b/src/Adyen/Model/Management/AmexInfo.php index 8f9caf890..187cce469 100644 --- a/src/Adyen/Model/Management/AmexInfo.php +++ b/src/Adyen/Model/Management/AmexInfo.php @@ -384,11 +384,11 @@ public function setServiceLevel($serviceLevel) { $allowedValues = $this->getServiceLevelAllowableValues(); if (!in_array($serviceLevel, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'serviceLevel', must be one of '%s'", + "serviceLevel: unexpected enum value '%s' - Supported values are [%s]", $serviceLevel, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/AndroidApp.php b/src/Adyen/Model/Management/AndroidApp.php index ee146162d..efb643349 100644 --- a/src/Adyen/Model/Management/AndroidApp.php +++ b/src/Adyen/Model/Management/AndroidApp.php @@ -531,11 +531,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Connectivity.php b/src/Adyen/Model/Management/Connectivity.php index c72fb3487..c9d904af9 100644 --- a/src/Adyen/Model/Management/Connectivity.php +++ b/src/Adyen/Model/Management/Connectivity.php @@ -324,11 +324,11 @@ public function setSimcardStatus($simcardStatus) { $allowedValues = $this->getSimcardStatusAllowableValues(); if (!in_array($simcardStatus, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'simcardStatus', must be one of '%s'", + "simcardStatus: unexpected enum value '%s' - Supported values are [%s]", $simcardStatus, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php index 8bc0eaa60..d1f5fca7b 100644 --- a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php @@ -635,11 +635,11 @@ public function setCommunicationFormat($communicationFormat) { $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'communicationFormat', must be one of '%s'", + "communicationFormat: unexpected enum value '%s' - Supported values are [%s]", $communicationFormat, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -693,11 +693,11 @@ public function setEncryptionProtocol($encryptionProtocol) { $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'encryptionProtocol', must be one of '%s'", + "encryptionProtocol: unexpected enum value '%s' - Supported values are [%s]", $encryptionProtocol, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -727,11 +727,11 @@ public function setFilterMerchantAccountType($filterMerchantAccountType) { $allowedValues = $this->getFilterMerchantAccountTypeAllowableValues(); if (!in_array($filterMerchantAccountType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'filterMerchantAccountType', must be one of '%s'", + "filterMerchantAccountType: unexpected enum value '%s' - Supported values are [%s]", $filterMerchantAccountType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -785,11 +785,11 @@ public function setNetworkType($networkType) { $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'networkType', must be one of '%s'", + "networkType: unexpected enum value '%s' - Supported values are [%s]", $networkType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php index a29535b04..2ab80a788 100644 --- a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php @@ -590,11 +590,11 @@ public function setCommunicationFormat($communicationFormat) { $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'communicationFormat', must be one of '%s'", + "communicationFormat: unexpected enum value '%s' - Supported values are [%s]", $communicationFormat, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -648,11 +648,11 @@ public function setEncryptionProtocol($encryptionProtocol) { $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'encryptionProtocol', must be one of '%s'", + "encryptionProtocol: unexpected enum value '%s' - Supported values are [%s]", $encryptionProtocol, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -682,11 +682,11 @@ public function setNetworkType($networkType) { $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'networkType', must be one of '%s'", + "networkType: unexpected enum value '%s' - Supported values are [%s]", $networkType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/DinersInfo.php b/src/Adyen/Model/Management/DinersInfo.php index c84e83cfc..4f0ae6765 100644 --- a/src/Adyen/Model/Management/DinersInfo.php +++ b/src/Adyen/Model/Management/DinersInfo.php @@ -389,11 +389,11 @@ public function setServiceLevel($serviceLevel) { $allowedValues = $this->getServiceLevelAllowableValues(); if (!in_array($serviceLevel, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'serviceLevel', must be one of '%s'", + "serviceLevel: unexpected enum value '%s' - Supported values are [%s]", $serviceLevel, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/InstallAndroidAppDetails.php b/src/Adyen/Model/Management/InstallAndroidAppDetails.php index f6524c1a4..2dd112e80 100644 --- a/src/Adyen/Model/Management/InstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidAppDetails.php @@ -346,11 +346,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php index 4ebdbcba9..e35b981ca 100644 --- a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php @@ -346,11 +346,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/JCBInfo.php b/src/Adyen/Model/Management/JCBInfo.php index a46491089..aeeb5d15f 100644 --- a/src/Adyen/Model/Management/JCBInfo.php +++ b/src/Adyen/Model/Management/JCBInfo.php @@ -388,11 +388,11 @@ public function setServiceLevel($serviceLevel) { $allowedValues = $this->getServiceLevelAllowableValues(); if (!in_array($serviceLevel, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'serviceLevel', must be one of '%s'", + "serviceLevel: unexpected enum value '%s' - Supported values are [%s]", $serviceLevel, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/KlarnaInfo.php b/src/Adyen/Model/Management/KlarnaInfo.php index e3c2b097c..20250f531 100644 --- a/src/Adyen/Model/Management/KlarnaInfo.php +++ b/src/Adyen/Model/Management/KlarnaInfo.php @@ -399,11 +399,11 @@ public function setRegion($region) { $allowedValues = $this->getRegionAllowableValues(); if (!in_array($region, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'region', must be one of '%s'", + "region: unexpected enum value '%s' - Supported values are [%s]", $region, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Notification.php b/src/Adyen/Model/Management/Notification.php index 38aaeba32..148e75bc5 100644 --- a/src/Adyen/Model/Management/Notification.php +++ b/src/Adyen/Model/Management/Notification.php @@ -347,11 +347,11 @@ public function setCategory($category) { $allowedValues = $this->getCategoryAllowableValues(); if (!in_array($category, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'category', must be one of '%s'", + "category: unexpected enum value '%s' - Supported values are [%s]", $category, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/NyceInfo.php b/src/Adyen/Model/Management/NyceInfo.php index 156774b11..5e701ac69 100644 --- a/src/Adyen/Model/Management/NyceInfo.php +++ b/src/Adyen/Model/Management/NyceInfo.php @@ -329,11 +329,11 @@ public function setProcessingType($processingType) { $allowedValues = $this->getProcessingTypeAllowableValues(); if (!in_array($processingType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'processingType', must be one of '%s'", + "processingType: unexpected enum value '%s' - Supported values are [%s]", $processingType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/PayAtTable.php b/src/Adyen/Model/Management/PayAtTable.php index 56cfdd044..a909b1fff 100644 --- a/src/Adyen/Model/Management/PayAtTable.php +++ b/src/Adyen/Model/Management/PayAtTable.php @@ -354,11 +354,11 @@ public function setAuthenticationMethod($authenticationMethod) { $allowedValues = $this->getAuthenticationMethodAllowableValues(); if (!in_array($authenticationMethod, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'authenticationMethod', must be one of '%s'", + "authenticationMethod: unexpected enum value '%s' - Supported values are [%s]", $authenticationMethod, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -422,11 +422,11 @@ public function setPaymentInstrument($paymentInstrument) } $allowedValues = $this->getPaymentInstrumentAllowableValues(); if (!is_null($paymentInstrument) && !in_array($paymentInstrument, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'paymentInstrument', must be one of '%s'", + "paymentInstrument: unexpected enum value '%s' - Supported values are [%s]", $paymentInstrument, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/PayByBankPlaidInfo.php b/src/Adyen/Model/Management/PayByBankPlaidInfo.php index c9985ad57..310cc4831 100644 --- a/src/Adyen/Model/Management/PayByBankPlaidInfo.php +++ b/src/Adyen/Model/Management/PayByBankPlaidInfo.php @@ -29,70 +29,49 @@ class PayByBankPlaidInfo implements ModelInterface, ArrayAccess, \JsonSerializab public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'PayByBankPlaidInfo'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ - 'countryCode' => 'string', 'logo' => 'string', - 'merchantCity' => 'string', - 'merchantLegalName' => 'string', - 'merchantShopUrl' => 'string', - 'merchantStateProvince' => 'string', - 'merchantStreetAddress' => 'string', - 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo', - 'zipCode' => 'string' + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ - 'countryCode' => null, 'logo' => null, - 'merchantCity' => null, - 'merchantLegalName' => null, - 'merchantShopUrl' => null, - 'merchantStateProvince' => null, - 'merchantStreetAddress' => null, - 'transactionDescription' => null, - 'zipCode' => null + 'transactionDescription' => null ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static $openAPINullables = [ - 'countryCode' => false, 'logo' => false, - 'merchantCity' => false, - 'merchantLegalName' => false, - 'merchantShopUrl' => false, - 'merchantStateProvince' => false, - 'merchantStreetAddress' => false, - 'transactionDescription' => false, - 'zipCode' => false + 'transactionDescription' => false ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected $openAPINullablesSetToNull = []; /** @@ -174,15 +153,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'countryCode' => 'countryCode', 'logo' => 'logo', - 'merchantCity' => 'merchantCity', - 'merchantLegalName' => 'merchantLegalName', - 'merchantShopUrl' => 'merchantShopUrl', - 'merchantStateProvince' => 'merchantStateProvince', - 'merchantStreetAddress' => 'merchantStreetAddress', - 'transactionDescription' => 'transactionDescription', - 'zipCode' => 'zipCode' + 'transactionDescription' => 'transactionDescription' ]; /** @@ -191,15 +163,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'countryCode' => 'setCountryCode', 'logo' => 'setLogo', - 'merchantCity' => 'setMerchantCity', - 'merchantLegalName' => 'setMerchantLegalName', - 'merchantShopUrl' => 'setMerchantShopUrl', - 'merchantStateProvince' => 'setMerchantStateProvince', - 'merchantStreetAddress' => 'setMerchantStreetAddress', - 'transactionDescription' => 'setTransactionDescription', - 'zipCode' => 'setZipCode' + 'transactionDescription' => 'setTransactionDescription' ]; /** @@ -208,15 +173,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'countryCode' => 'getCountryCode', 'logo' => 'getLogo', - 'merchantCity' => 'getMerchantCity', - 'merchantLegalName' => 'getMerchantLegalName', - 'merchantShopUrl' => 'getMerchantShopUrl', - 'merchantStateProvince' => 'getMerchantStateProvince', - 'merchantStreetAddress' => 'getMerchantStreetAddress', - 'transactionDescription' => 'getTransactionDescription', - 'zipCode' => 'getZipCode' + 'transactionDescription' => 'getTransactionDescription' ]; /** @@ -276,26 +234,19 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('countryCode', $data ?? [], null); $this->setIfExists('logo', $data ?? [], null); - $this->setIfExists('merchantCity', $data ?? [], null); - $this->setIfExists('merchantLegalName', $data ?? [], null); - $this->setIfExists('merchantShopUrl', $data ?? [], null); - $this->setIfExists('merchantStateProvince', $data ?? [], null); - $this->setIfExists('merchantStreetAddress', $data ?? [], null); $this->setIfExists('transactionDescription', $data ?? [], null); - $this->setIfExists('zipCode', $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 - */ + * 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])) { @@ -329,30 +280,6 @@ public function valid() } - /** - * Gets countryCode - * - * @return string|null - */ - public function getCountryCode() - { - return $this->container['countryCode']; - } - - /** - * Sets countryCode - * - * @param string|null $countryCode Country Code. - * - * @return self - */ - public function setCountryCode($countryCode) - { - $this->container['countryCode'] = $countryCode; - - return $this; - } - /** * Gets logo * @@ -377,126 +304,6 @@ public function setLogo($logo) return $this; } - /** - * Gets merchantCity - * - * @return string|null - */ - public function getMerchantCity() - { - return $this->container['merchantCity']; - } - - /** - * Sets merchantCity - * - * @param string|null $merchantCity The city the merchant is doing business in. - * - * @return self - */ - public function setMerchantCity($merchantCity) - { - $this->container['merchantCity'] = $merchantCity; - - return $this; - } - - /** - * Gets merchantLegalName - * - * @return string|null - */ - public function getMerchantLegalName() - { - return $this->container['merchantLegalName']; - } - - /** - * Sets merchantLegalName - * - * @param string|null $merchantLegalName Legal Business Name of the Merchant. - * - * @return self - */ - public function setMerchantLegalName($merchantLegalName) - { - $this->container['merchantLegalName'] = $merchantLegalName; - - return $this; - } - - /** - * Gets merchantShopUrl - * - * @return string|null - */ - public function getMerchantShopUrl() - { - return $this->container['merchantShopUrl']; - } - - /** - * Sets merchantShopUrl - * - * @param string|null $merchantShopUrl Merchant shop url. - * - * @return self - */ - public function setMerchantShopUrl($merchantShopUrl) - { - $this->container['merchantShopUrl'] = $merchantShopUrl; - - return $this; - } - - /** - * Gets merchantStateProvince - * - * @return string|null - */ - public function getMerchantStateProvince() - { - return $this->container['merchantStateProvince']; - } - - /** - * Sets merchantStateProvince - * - * @param string|null $merchantStateProvince The state/province of the merchant. - * - * @return self - */ - public function setMerchantStateProvince($merchantStateProvince) - { - $this->container['merchantStateProvince'] = $merchantStateProvince; - - return $this; - } - - /** - * Gets merchantStreetAddress - * - * @return string|null - */ - public function getMerchantStreetAddress() - { - return $this->container['merchantStreetAddress']; - } - - /** - * Sets merchantStreetAddress - * - * @param string|null $merchantStreetAddress The street address of the merchant. - * - * @return self - */ - public function setMerchantStreetAddress($merchantStreetAddress) - { - $this->container['merchantStreetAddress'] = $merchantStreetAddress; - - return $this; - } - /** * Gets transactionDescription * @@ -520,30 +327,6 @@ public function setTransactionDescription($transactionDescription) return $this; } - - /** - * Gets zipCode - * - * @return string|null - */ - public function getZipCode() - { - return $this->container['zipCode']; - } - - /** - * Sets zipCode - * - * @param string|null $zipCode The zip code of the account. - * - * @return self - */ - public function setZipCode($zipCode) - { - $this->container['zipCode'] = $zipCode; - - return $this; - } /** * Returns true if offset exists. False otherwise. * @@ -620,10 +403,10 @@ public function toArray(): array // Check if the property value is an object and has a toArray() method if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { $array[$propertyName] = $propertyValue->toArray(); - // Check if it's type datetime + // Check if it's type datetime } elseif ($propertyValue instanceof \DateTime) { $array[$propertyName] = $propertyValue->format(DATE_ATOM); - // If it's an array type we should check whether it contains objects and if so call toArray method + // If it's an array type we should check whether it contains objects and if so call toArray method } elseif (is_array($propertyValue)) { $array[$propertyName] = array_map(function ($item) { return $item instanceof ModelInterface ? $item->toArray() : $item; diff --git a/src/Adyen/Model/Management/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index e3e2152a9..f8545822f 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -1840,11 +1840,11 @@ public function setVerificationStatus($verificationStatus) { $allowedValues = $this->getVerificationStatusAllowableValues(); if (!in_array($verificationStatus, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'verificationStatus', must be one of '%s'", + "verificationStatus: unexpected enum value '%s' - Supported values are [%s]", $verificationStatus, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index e2c94078c..e0a1e0c78 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -260,6 +260,7 @@ public function getModelName() public const TYPES_WITH_ERRORS_BANESE_CARD_PREPAID = 'banese_card_prepaid'; public const TYPES_WITH_ERRORS_BCMC = 'bcmc'; public const TYPES_WITH_ERRORS_BLIK = 'blik'; + public const TYPES_WITH_ERRORS_BR_SCHEMES = 'br_schemes'; public const TYPES_WITH_ERRORS_CARTEBANCAIRE = 'cartebancaire'; public const TYPES_WITH_ERRORS_CLEARPAY = 'clearpay'; public const TYPES_WITH_ERRORS_CLICKTOPAY = 'clicktopay'; @@ -398,6 +399,7 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_BANESE_CARD_PREPAID, self::TYPES_WITH_ERRORS_BCMC, self::TYPES_WITH_ERRORS_BLIK, + self::TYPES_WITH_ERRORS_BR_SCHEMES, self::TYPES_WITH_ERRORS_CARTEBANCAIRE, self::TYPES_WITH_ERRORS_CLEARPAY, self::TYPES_WITH_ERRORS_CLICKTOPAY, diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index c2ec6ebbc..c0fcc3b7c 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -528,6 +528,7 @@ public function getModelName() public const TYPE_BANESE_CARD_PREPAID = 'banese_card_prepaid'; public const TYPE_BCMC = 'bcmc'; public const TYPE_BLIK = 'blik'; + public const TYPE_BR_SCHEMES = 'br_schemes'; public const TYPE_CARTEBANCAIRE = 'cartebancaire'; public const TYPE_CLEARPAY = 'clearpay'; public const TYPE_CLICKTOPAY = 'clicktopay'; @@ -680,6 +681,7 @@ public function getTypeAllowableValues() self::TYPE_BANESE_CARD_PREPAID, self::TYPE_BCMC, self::TYPE_BLIK, + self::TYPE_BR_SCHEMES, self::TYPE_CARTEBANCAIRE, self::TYPE_CLEARPAY, self::TYPE_CLICKTOPAY, @@ -1801,11 +1803,11 @@ public function setShopperInteraction($shopperInteraction) { $allowedValues = $this->getShopperInteractionAllowableValues(); if (!in_array($shopperInteraction, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'shopperInteraction', must be one of '%s'", + "shopperInteraction: unexpected enum value '%s' - Supported values are [%s]", $shopperInteraction, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -2003,11 +2005,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/PayoutSettings.php b/src/Adyen/Model/Management/PayoutSettings.php index db4952c52..c327597b2 100644 --- a/src/Adyen/Model/Management/PayoutSettings.php +++ b/src/Adyen/Model/Management/PayoutSettings.php @@ -490,11 +490,11 @@ public function setPriority($priority) { $allowedValues = $this->getPriorityAllowableValues(); if (!in_array($priority, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'priority', must be one of '%s'", + "priority: unexpected enum value '%s' - Supported values are [%s]", $priority, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -548,11 +548,11 @@ public function setVerificationStatus($verificationStatus) { $allowedValues = $this->getVerificationStatusAllowableValues(); if (!in_array($verificationStatus, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'verificationStatus', must be one of '%s'", + "verificationStatus: unexpected enum value '%s' - Supported values are [%s]", $verificationStatus, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/PulseInfo.php b/src/Adyen/Model/Management/PulseInfo.php index 06a526dad..55e3d29b4 100644 --- a/src/Adyen/Model/Management/PulseInfo.php +++ b/src/Adyen/Model/Management/PulseInfo.php @@ -329,11 +329,11 @@ public function setProcessingType($processingType) { $allowedValues = $this->getProcessingTypeAllowableValues(); if (!in_array($processingType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'processingType', must be one of '%s'", + "processingType: unexpected enum value '%s' - Supported values are [%s]", $processingType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Refunds.php b/src/Adyen/Model/Management/Refunds.php index b2961f402..5e6efdea7 100644 --- a/src/Adyen/Model/Management/Refunds.php +++ b/src/Adyen/Model/Management/Refunds.php @@ -41,7 +41,8 @@ class Refunds implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'referenced' => '\Adyen\Model\Management\Referenced' + 'referenced' => '\Adyen\Model\Management\Referenced', + 'unreferenced' => '\Adyen\Model\Management\Unreferenced' ]; /** @@ -52,7 +53,8 @@ class Refunds implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'referenced' => null + 'referenced' => null, + 'unreferenced' => null ]; /** @@ -61,7 +63,8 @@ class Refunds implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'referenced' => false + 'referenced' => false, + 'unreferenced' => false ]; /** @@ -150,7 +153,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'referenced' => 'referenced' + 'referenced' => 'referenced', + 'unreferenced' => 'unreferenced' ]; /** @@ -159,7 +163,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'referenced' => 'setReferenced' + 'referenced' => 'setReferenced', + 'unreferenced' => 'setUnreferenced' ]; /** @@ -168,7 +173,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'referenced' => 'getReferenced' + 'referenced' => 'getReferenced', + 'unreferenced' => 'getUnreferenced' ]; /** @@ -229,6 +235,7 @@ public function getModelName() public function __construct(?array $data = null) { $this->setIfExists('referenced', $data ?? [], null); + $this->setIfExists('unreferenced', $data ?? [], null); } /** @@ -296,6 +303,30 @@ public function setReferenced($referenced) return $this; } + + /** + * Gets unreferenced + * + * @return \Adyen\Model\Management\Unreferenced|null + */ + public function getUnreferenced() + { + return $this->container['unreferenced']; + } + + /** + * Sets unreferenced + * + * @param \Adyen\Model\Management\Unreferenced|null $unreferenced unreferenced + * + * @return self + */ + public function setUnreferenced($unreferenced) + { + $this->container['unreferenced'] = $unreferenced; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/ReleaseUpdateDetails.php b/src/Adyen/Model/Management/ReleaseUpdateDetails.php index 90b0cee3f..918b1fd68 100644 --- a/src/Adyen/Model/Management/ReleaseUpdateDetails.php +++ b/src/Adyen/Model/Management/ReleaseUpdateDetails.php @@ -322,11 +322,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/SplitConfigurationLogic.php b/src/Adyen/Model/Management/SplitConfigurationLogic.php index 1927cb47e..f0b90ccdc 100644 --- a/src/Adyen/Model/Management/SplitConfigurationLogic.php +++ b/src/Adyen/Model/Management/SplitConfigurationLogic.php @@ -735,11 +735,11 @@ public function setAcquiringFees($acquiringFees) { $allowedValues = $this->getAcquiringFeesAllowableValues(); if (!in_array($acquiringFees, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'acquiringFees', must be one of '%s'", + "acquiringFees: unexpected enum value '%s' - Supported values are [%s]", $acquiringFees, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -793,11 +793,11 @@ public function setAdyenCommission($adyenCommission) { $allowedValues = $this->getAdyenCommissionAllowableValues(); if (!in_array($adyenCommission, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenCommission', must be one of '%s'", + "adyenCommission: unexpected enum value '%s' - Supported values are [%s]", $adyenCommission, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -827,11 +827,11 @@ public function setAdyenFees($adyenFees) { $allowedValues = $this->getAdyenFeesAllowableValues(); if (!in_array($adyenFees, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenFees', must be one of '%s'", + "adyenFees: unexpected enum value '%s' - Supported values are [%s]", $adyenFees, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -861,11 +861,11 @@ public function setAdyenMarkup($adyenMarkup) { $allowedValues = $this->getAdyenMarkupAllowableValues(); if (!in_array($adyenMarkup, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenMarkup', must be one of '%s'", + "adyenMarkup: unexpected enum value '%s' - Supported values are [%s]", $adyenMarkup, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -895,11 +895,11 @@ public function setChargeback($chargeback) { $allowedValues = $this->getChargebackAllowableValues(); if (!in_array($chargeback, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'chargeback', must be one of '%s'", + "chargeback: unexpected enum value '%s' - Supported values are [%s]", $chargeback, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -929,11 +929,11 @@ public function setChargebackCostAllocation($chargebackCostAllocation) { $allowedValues = $this->getChargebackCostAllocationAllowableValues(); if (!in_array($chargebackCostAllocation, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'chargebackCostAllocation', must be one of '%s'", + "chargebackCostAllocation: unexpected enum value '%s' - Supported values are [%s]", $chargebackCostAllocation, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -987,11 +987,11 @@ public function setInterchange($interchange) { $allowedValues = $this->getInterchangeAllowableValues(); if (!in_array($interchange, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'interchange', must be one of '%s'", + "interchange: unexpected enum value '%s' - Supported values are [%s]", $interchange, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1021,11 +1021,11 @@ public function setPaymentFee($paymentFee) { $allowedValues = $this->getPaymentFeeAllowableValues(); if (!in_array($paymentFee, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'paymentFee', must be one of '%s'", + "paymentFee: unexpected enum value '%s' - Supported values are [%s]", $paymentFee, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1055,11 +1055,11 @@ public function setRefund($refund) { $allowedValues = $this->getRefundAllowableValues(); if (!in_array($refund, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'refund', must be one of '%s'", + "refund: unexpected enum value '%s' - Supported values are [%s]", $refund, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1089,11 +1089,11 @@ public function setRefundCostAllocation($refundCostAllocation) { $allowedValues = $this->getRefundCostAllocationAllowableValues(); if (!in_array($refundCostAllocation, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'refundCostAllocation', must be one of '%s'", + "refundCostAllocation: unexpected enum value '%s' - Supported values are [%s]", $refundCostAllocation, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1123,11 +1123,11 @@ public function setRemainder($remainder) { $allowedValues = $this->getRemainderAllowableValues(); if (!in_array($remainder, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'remainder', must be one of '%s'", + "remainder: unexpected enum value '%s' - Supported values are [%s]", $remainder, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1157,11 +1157,11 @@ public function setSchemeFee($schemeFee) { $allowedValues = $this->getSchemeFeeAllowableValues(); if (!in_array($schemeFee, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'schemeFee', must be one of '%s'", + "schemeFee: unexpected enum value '%s' - Supported values are [%s]", $schemeFee, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1215,11 +1215,11 @@ public function setSurcharge($surcharge) { $allowedValues = $this->getSurchargeAllowableValues(); if (!in_array($surcharge, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'surcharge', must be one of '%s'", + "surcharge: unexpected enum value '%s' - Supported values are [%s]", $surcharge, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1249,11 +1249,11 @@ public function setTip($tip) { $allowedValues = $this->getTipAllowableValues(); if (!in_array($tip, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'tip', must be one of '%s'", + "tip: unexpected enum value '%s' - Supported values are [%s]", $tip, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/SplitConfigurationRule.php b/src/Adyen/Model/Management/SplitConfigurationRule.php index 35a0cdcab..2d44d4338 100644 --- a/src/Adyen/Model/Management/SplitConfigurationRule.php +++ b/src/Adyen/Model/Management/SplitConfigurationRule.php @@ -29,18 +29,19 @@ class SplitConfigurationRule implements ModelInterface, ArrayAccess, \JsonSerial public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'SplitConfigurationRule'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ + 'cardRegion' => 'string', 'currency' => 'string', 'fundingSource' => 'string', 'paymentMethod' => 'string', @@ -50,13 +51,14 @@ class SplitConfigurationRule implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ + 'cardRegion' => null, 'currency' => null, 'fundingSource' => null, 'paymentMethod' => null, @@ -66,11 +68,12 @@ class SplitConfigurationRule implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static $openAPINullables = [ + 'cardRegion' => false, 'currency' => false, 'fundingSource' => false, 'paymentMethod' => false, @@ -80,10 +83,10 @@ class SplitConfigurationRule implements ModelInterface, ArrayAccess, \JsonSerial ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected $openAPINullablesSetToNull = []; /** @@ -165,6 +168,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'cardRegion' => 'cardRegion', 'currency' => 'currency', 'fundingSource' => 'fundingSource', 'paymentMethod' => 'paymentMethod', @@ -179,6 +183,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'cardRegion' => 'setCardRegion', 'currency' => 'setCurrency', 'fundingSource' => 'setFundingSource', 'paymentMethod' => 'setPaymentMethod', @@ -193,6 +198,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'cardRegion' => 'getCardRegion', 'currency' => 'getCurrency', 'fundingSource' => 'getFundingSource', 'paymentMethod' => 'getPaymentMethod', @@ -242,6 +248,11 @@ public function getModelName() return self::$openAPIModelName; } + public const CARD_REGION_INTERNATIONAL = 'international'; + public const CARD_REGION_INTRA_REGIONAL = 'intraRegional'; + public const CARD_REGION_INTER_REGIONAL = 'interRegional'; + public const CARD_REGION_DOMESTIC = 'domestic'; + public const CARD_REGION_ANY = 'ANY'; public const FUNDING_SOURCE_CHARGED = 'charged'; public const FUNDING_SOURCE_CREDIT = 'credit'; public const FUNDING_SOURCE_DEBIT = 'debit'; @@ -254,6 +265,21 @@ public function getModelName() public const SHOPPER_INTERACTION_POS = 'POS'; public const SHOPPER_INTERACTION_ANY = 'ANY'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCardRegionAllowableValues() + { + return [ + self::CARD_REGION_INTERNATIONAL, + self::CARD_REGION_INTRA_REGIONAL, + self::CARD_REGION_INTER_REGIONAL, + self::CARD_REGION_DOMESTIC, + self::CARD_REGION_ANY, + ]; + } /** * Gets allowable values of the enum * @@ -300,6 +326,7 @@ public function getShopperInteractionAllowableValues() */ public function __construct(?array $data = null) { + $this->setIfExists('cardRegion', $data ?? [], null); $this->setIfExists('currency', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('paymentMethod', $data ?? [], null); @@ -309,14 +336,14 @@ public function __construct(?array $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 - */ + * 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])) { @@ -335,9 +362,21 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getCardRegionAllowableValues(); + if (!is_null($this->container['cardRegion']) && !in_array($this->container['cardRegion'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'cardRegion', must be one of '%s'", + $this->container['cardRegion'], + implode("', '", $allowedValues) + ); + } + if ($this->container['currency'] === null) { $invalidProperties[] = "'currency' can't be null"; } + if ($this->container['fundingSource'] === null) { + $invalidProperties[] = "'fundingSource' can't be null"; + } $allowedValues = $this->getFundingSourceAllowableValues(); if (!is_null($this->container['fundingSource']) && !in_array($this->container['fundingSource'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -380,6 +419,40 @@ public function valid() } + /** + * Gets cardRegion + * + * @return string|null + */ + public function getCardRegion() + { + return $this->container['cardRegion']; + } + + /** + * Sets cardRegion + * + * @param string|null $cardRegion The card region condition that determines whether the [split logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic) applies to the transaction. > This condition is in pilot phase, and not yet available for all platforms. Possible values: * **domestic**: The card issuer and the store where the transaction is processed are registered in the same country. * **international**: The card issuer and the store where the transaction is processed are registered in different countries or regions. Includes all **interRegional** and **intraRegional** transactions. * **interRegional**: The card issuer and the store where the transaction is processed are registered in different regions. * **intraRegional**: The card issuer and the store where the transaction is processed are registered in different countries, but in the same region. * **ANY**: Applies to all transactions, regardless of the processing and issuing country/region. + * + * @return self + */ + public function setCardRegion($cardRegion) + { + $allowedValues = $this->getCardRegionAllowableValues(); + if (!in_array($cardRegion, $allowedValues, true)) { + error_log( + sprintf( + "cardRegion: unexpected enum value '%s' - Supported values are [%s]", + $cardRegion, + implode(', ', $allowedValues) + ) + ); + } + $this->container['cardRegion'] = $cardRegion; + + return $this; + } + /** * Gets currency * @@ -407,7 +480,7 @@ public function setCurrency($currency) /** * Gets fundingSource * - * @return string|null + * @return string */ public function getFundingSource() { @@ -417,7 +490,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string|null $fundingSource The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** + * @param string $fundingSource The funding source of the payment method. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** * * @return self */ @@ -425,11 +498,11 @@ public function setFundingSource($fundingSource) { $allowedValues = $this->getFundingSourceAllowableValues(); if (!in_array($fundingSource, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'fundingSource', must be one of '%s'", + "fundingSource: unexpected enum value '%s' - Supported values are [%s]", $fundingSource, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -499,7 +572,7 @@ public function getShopperInteraction() /** * Sets shopperInteraction * - * @param string $shopperInteraction The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. + * @param string $shopperInteraction The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: online transactions where the cardholder is present. * **ContAuth**: card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: all sales channels. * * @return self */ @@ -507,11 +580,11 @@ public function setShopperInteraction($shopperInteraction) { $allowedValues = $this->getShopperInteractionAllowableValues(); if (!in_array($shopperInteraction, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'shopperInteraction', must be one of '%s'", + "shopperInteraction: unexpected enum value '%s' - Supported values are [%s]", $shopperInteraction, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -619,10 +692,10 @@ public function toArray(): array // Check if the property value is an object and has a toArray() method if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { $array[$propertyName] = $propertyValue->toArray(); - // Check if it's type datetime + // Check if it's type datetime } elseif ($propertyValue instanceof \DateTime) { $array[$propertyName] = $propertyValue->format(DATE_ATOM); - // If it's an array type we should check whether it contains objects and if so call toArray method + // If it's an array type we should check whether it contains objects and if so call toArray method } elseif (is_array($propertyValue)) { $array[$propertyName] = array_map(function ($item) { return $item instanceof ModelInterface ? $item->toArray() : $item; diff --git a/src/Adyen/Model/Management/StarInfo.php b/src/Adyen/Model/Management/StarInfo.php index bbf43eacb..784491826 100644 --- a/src/Adyen/Model/Management/StarInfo.php +++ b/src/Adyen/Model/Management/StarInfo.php @@ -329,11 +329,11 @@ public function setProcessingType($processingType) { $allowedValues = $this->getProcessingTypeAllowableValues(); if (!in_array($processingType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'processingType', must be one of '%s'", + "processingType: unexpected enum value '%s' - Supported values are [%s]", $processingType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Store.php b/src/Adyen/Model/Management/Store.php index c94f3e23c..4f8000e7f 100644 --- a/src/Adyen/Model/Management/Store.php +++ b/src/Adyen/Model/Management/Store.php @@ -667,11 +667,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/TerminalAssignment.php b/src/Adyen/Model/Management/TerminalAssignment.php index a8dc67a66..13ccac446 100644 --- a/src/Adyen/Model/Management/TerminalAssignment.php +++ b/src/Adyen/Model/Management/TerminalAssignment.php @@ -427,11 +427,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/TerminalConnectivityCellular.php b/src/Adyen/Model/Management/TerminalConnectivityCellular.php index 3ec7113c6..b9faac991 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityCellular.php +++ b/src/Adyen/Model/Management/TerminalConnectivityCellular.php @@ -385,11 +385,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/TransactionDescriptionInfo.php b/src/Adyen/Model/Management/TransactionDescriptionInfo.php index a6bc85f8d..783fe7d2c 100644 --- a/src/Adyen/Model/Management/TransactionDescriptionInfo.php +++ b/src/Adyen/Model/Management/TransactionDescriptionInfo.php @@ -350,11 +350,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php index 1216b1efb..ef467f002 100644 --- a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php @@ -346,11 +346,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php index f3bf1c3c4..bb0a4db32 100644 --- a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php @@ -346,11 +346,11 @@ public function setType($type) { $allowedValues = $this->getTypeAllowableValues(); if (!in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", + "type: unexpected enum value '%s' - Supported values are [%s]", $type, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Unreferenced.php b/src/Adyen/Model/Management/Unreferenced.php new file mode 100644 index 000000000..eed8fd899 --- /dev/null +++ b/src/Adyen/Model/Management/Unreferenced.php @@ -0,0 +1,404 @@ + + */ +class Unreferenced implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Unreferenced'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'enableUnreferencedRefunds' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'enableUnreferencedRefunds' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'enableUnreferencedRefunds' => 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 = [ + 'enableUnreferencedRefunds' => 'enableUnreferencedRefunds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'enableUnreferencedRefunds' => 'setEnableUnreferencedRefunds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'enableUnreferencedRefunds' => 'getEnableUnreferencedRefunds' + ]; + + /** + * 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('enableUnreferencedRefunds', $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 enableUnreferencedRefunds + * + * @return bool|null + */ + public function getEnableUnreferencedRefunds() + { + return $this->container['enableUnreferencedRefunds']; + } + + /** + * Sets enableUnreferencedRefunds + * + * @param bool|null $enableUnreferencedRefunds Indicates whether unreferenced refunds are enabled on the terminal. + * + * @return self + */ + public function setEnableUnreferencedRefunds($enableUnreferencedRefunds) + { + $this->container['enableUnreferencedRefunds'] = $enableUnreferencedRefunds; + + 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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php index 156cf3b55..ce313f7b8 100644 --- a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php @@ -610,11 +610,11 @@ public function setCommunicationFormat($communicationFormat) { $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'communicationFormat', must be one of '%s'", + "communicationFormat: unexpected enum value '%s' - Supported values are [%s]", $communicationFormat, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -668,11 +668,11 @@ public function setEncryptionProtocol($encryptionProtocol) { $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'encryptionProtocol', must be one of '%s'", + "encryptionProtocol: unexpected enum value '%s' - Supported values are [%s]", $encryptionProtocol, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -702,11 +702,11 @@ public function setFilterMerchantAccountType($filterMerchantAccountType) { $allowedValues = $this->getFilterMerchantAccountTypeAllowableValues(); if (!in_array($filterMerchantAccountType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'filterMerchantAccountType', must be one of '%s'", + "filterMerchantAccountType: unexpected enum value '%s' - Supported values are [%s]", $filterMerchantAccountType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -760,11 +760,11 @@ public function setNetworkType($networkType) { $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'networkType', must be one of '%s'", + "networkType: unexpected enum value '%s' - Supported values are [%s]", $networkType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php index 25a0e1a52..0eed0278a 100644 --- a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php @@ -571,11 +571,11 @@ public function setCommunicationFormat($communicationFormat) { $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'communicationFormat', must be one of '%s'", + "communicationFormat: unexpected enum value '%s' - Supported values are [%s]", $communicationFormat, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -629,11 +629,11 @@ public function setEncryptionProtocol($encryptionProtocol) { $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'encryptionProtocol', must be one of '%s'", + "encryptionProtocol: unexpected enum value '%s' - Supported values are [%s]", $encryptionProtocol, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -663,11 +663,11 @@ public function setNetworkType($networkType) { $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'networkType', must be one of '%s'", + "networkType: unexpected enum value '%s' - Supported values are [%s]", $networkType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php index 0aad886fd..1bfc59092 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php @@ -735,11 +735,11 @@ public function setAcquiringFees($acquiringFees) { $allowedValues = $this->getAcquiringFeesAllowableValues(); if (!in_array($acquiringFees, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'acquiringFees', must be one of '%s'", + "acquiringFees: unexpected enum value '%s' - Supported values are [%s]", $acquiringFees, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -793,11 +793,11 @@ public function setAdyenCommission($adyenCommission) { $allowedValues = $this->getAdyenCommissionAllowableValues(); if (!in_array($adyenCommission, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenCommission', must be one of '%s'", + "adyenCommission: unexpected enum value '%s' - Supported values are [%s]", $adyenCommission, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -827,11 +827,11 @@ public function setAdyenFees($adyenFees) { $allowedValues = $this->getAdyenFeesAllowableValues(); if (!in_array($adyenFees, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenFees', must be one of '%s'", + "adyenFees: unexpected enum value '%s' - Supported values are [%s]", $adyenFees, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -861,11 +861,11 @@ public function setAdyenMarkup($adyenMarkup) { $allowedValues = $this->getAdyenMarkupAllowableValues(); if (!in_array($adyenMarkup, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'adyenMarkup', must be one of '%s'", + "adyenMarkup: unexpected enum value '%s' - Supported values are [%s]", $adyenMarkup, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -895,11 +895,11 @@ public function setChargeback($chargeback) { $allowedValues = $this->getChargebackAllowableValues(); if (!in_array($chargeback, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'chargeback', must be one of '%s'", + "chargeback: unexpected enum value '%s' - Supported values are [%s]", $chargeback, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -929,11 +929,11 @@ public function setChargebackCostAllocation($chargebackCostAllocation) { $allowedValues = $this->getChargebackCostAllocationAllowableValues(); if (!in_array($chargebackCostAllocation, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'chargebackCostAllocation', must be one of '%s'", + "chargebackCostAllocation: unexpected enum value '%s' - Supported values are [%s]", $chargebackCostAllocation, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -987,11 +987,11 @@ public function setInterchange($interchange) { $allowedValues = $this->getInterchangeAllowableValues(); if (!in_array($interchange, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'interchange', must be one of '%s'", + "interchange: unexpected enum value '%s' - Supported values are [%s]", $interchange, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1021,11 +1021,11 @@ public function setPaymentFee($paymentFee) { $allowedValues = $this->getPaymentFeeAllowableValues(); if (!in_array($paymentFee, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'paymentFee', must be one of '%s'", + "paymentFee: unexpected enum value '%s' - Supported values are [%s]", $paymentFee, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1055,11 +1055,11 @@ public function setRefund($refund) { $allowedValues = $this->getRefundAllowableValues(); if (!in_array($refund, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'refund', must be one of '%s'", + "refund: unexpected enum value '%s' - Supported values are [%s]", $refund, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1089,11 +1089,11 @@ public function setRefundCostAllocation($refundCostAllocation) { $allowedValues = $this->getRefundCostAllocationAllowableValues(); if (!in_array($refundCostAllocation, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'refundCostAllocation', must be one of '%s'", + "refundCostAllocation: unexpected enum value '%s' - Supported values are [%s]", $refundCostAllocation, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1123,11 +1123,11 @@ public function setRemainder($remainder) { $allowedValues = $this->getRemainderAllowableValues(); if (!in_array($remainder, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'remainder', must be one of '%s'", + "remainder: unexpected enum value '%s' - Supported values are [%s]", $remainder, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1157,11 +1157,11 @@ public function setSchemeFee($schemeFee) { $allowedValues = $this->getSchemeFeeAllowableValues(); if (!in_array($schemeFee, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'schemeFee', must be one of '%s'", + "schemeFee: unexpected enum value '%s' - Supported values are [%s]", $schemeFee, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1215,11 +1215,11 @@ public function setSurcharge($surcharge) { $allowedValues = $this->getSurchargeAllowableValues(); if (!in_array($surcharge, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'surcharge', must be one of '%s'", + "surcharge: unexpected enum value '%s' - Supported values are [%s]", $surcharge, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -1249,11 +1249,11 @@ public function setTip($tip) { $allowedValues = $this->getTipAllowableValues(); if (!in_array($tip, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'tip', must be one of '%s'", + "tip: unexpected enum value '%s' - Supported values are [%s]", $tip, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php index 555d87508..293d19948 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php @@ -29,17 +29,17 @@ class UpdateSplitConfigurationRuleRequest implements ModelInterface, ArrayAccess public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'UpdateSplitConfigurationRuleRequest'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'currency' => 'string', 'fundingSource' => 'string', @@ -48,12 +48,12 @@ class UpdateSplitConfigurationRuleRequest implements ModelInterface, ArrayAccess ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ protected static $openAPIFormats = [ 'currency' => null, 'fundingSource' => null, @@ -62,10 +62,10 @@ class UpdateSplitConfigurationRuleRequest implements ModelInterface, ArrayAccess ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ protected static $openAPINullables = [ 'currency' => false, 'fundingSource' => false, @@ -74,10 +74,10 @@ class UpdateSplitConfigurationRuleRequest implements ModelInterface, ArrayAccess ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ protected $openAPINullablesSetToNull = []; /** @@ -253,14 +253,14 @@ public function __construct(?array $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 - */ + * 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])) { @@ -282,6 +282,9 @@ public function listInvalidProperties() if ($this->container['currency'] === null) { $invalidProperties[] = "'currency' can't be null"; } + if ($this->container['fundingSource'] === null) { + $invalidProperties[] = "'fundingSource' can't be null"; + } if ($this->container['paymentMethod'] === null) { $invalidProperties[] = "'paymentMethod' can't be null"; } @@ -330,7 +333,7 @@ public function setCurrency($currency) /** * Gets fundingSource * - * @return string|null + * @return string */ public function getFundingSource() { @@ -340,7 +343,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string|null $fundingSource The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** + * @param string $fundingSource The funding source of the payment method. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** * * @return self */ @@ -388,7 +391,7 @@ public function getShopperInteraction() /** * Sets shopperInteraction * - * @param string $shopperInteraction The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. + * @param string $shopperInteraction The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: online transactions where the cardholder is present. * **ContAuth**: card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: all sales channels. * * @return self */ @@ -474,10 +477,10 @@ public function toArray(): array // Check if the property value is an object and has a toArray() method if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { $array[$propertyName] = $propertyValue->toArray(); - // Check if it's type datetime + // Check if it's type datetime } elseif ($propertyValue instanceof \DateTime) { $array[$propertyName] = $propertyValue->format(DATE_ATOM); - // If it's an array type we should check whether it contains objects and if so call toArray method + // If it's an array type we should check whether it contains objects and if so call toArray method } elseif (is_array($propertyValue)) { $array[$propertyName] = array_map(function ($item) { return $item instanceof ModelInterface ? $item->toArray() : $item; diff --git a/src/Adyen/Model/Management/UpdateStoreRequest.php b/src/Adyen/Model/Management/UpdateStoreRequest.php index 232ee6c0b..adf25b653 100644 --- a/src/Adyen/Model/Management/UpdateStoreRequest.php +++ b/src/Adyen/Model/Management/UpdateStoreRequest.php @@ -512,11 +512,11 @@ public function setStatus($status) { $allowedValues = $this->getStatusAllowableValues(); if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", + "status: unexpected enum value '%s' - Supported values are [%s]", $status, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Model/Management/Webhook.php b/src/Adyen/Model/Management/Webhook.php index 0f7ecb13c..7c3741443 100644 --- a/src/Adyen/Model/Management/Webhook.php +++ b/src/Adyen/Model/Management/Webhook.php @@ -743,11 +743,11 @@ public function setCommunicationFormat($communicationFormat) { $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'communicationFormat', must be one of '%s'", + "communicationFormat: unexpected enum value '%s' - Supported values are [%s]", $communicationFormat, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -801,11 +801,11 @@ public function setEncryptionProtocol($encryptionProtocol) { $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'encryptionProtocol', must be one of '%s'", + "encryptionProtocol: unexpected enum value '%s' - Supported values are [%s]", $encryptionProtocol, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -835,11 +835,11 @@ public function setFilterMerchantAccountType($filterMerchantAccountType) { $allowedValues = $this->getFilterMerchantAccountTypeAllowableValues(); if (!in_array($filterMerchantAccountType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'filterMerchantAccountType', must be one of '%s'", + "filterMerchantAccountType: unexpected enum value '%s' - Supported values are [%s]", $filterMerchantAccountType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } @@ -989,11 +989,11 @@ public function setNetworkType($networkType) { $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { - throw new \InvalidArgumentException( + error_log( sprintf( - "Invalid value '%s' for 'networkType', must be one of '%s'", + "networkType: unexpected enum value '%s' - Supported values are [%s]", $networkType, - implode("', '", $allowedValues) + implode(', ', $allowedValues) ) ); } diff --git a/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php b/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php index c9cd480f8..c8f7d5698 100644 --- a/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php +++ b/src/Adyen/Service/Management/SplitConfigurationMerchantLevelApi.php @@ -57,7 +57,7 @@ public function createRule(string $merchantId, string $splitConfigurationId, \Ad } /** - * Create a split configuration + * Create a split configuration profile * * @param string $merchantId * @param \Adyen\Model\Management\SplitConfiguration $splitConfiguration @@ -73,7 +73,7 @@ public function createSplitConfiguration(string $merchantId, \Adyen\Model\Manage } /** - * Delete a split configuration + * Delete a split configuration profile * * @param string $merchantId * @param string $splitConfigurationId @@ -89,7 +89,7 @@ public function deleteSplitConfiguration(string $merchantId, string $splitConfig } /** - * Delete a split configuration rule + * Delete a rule * * @param string $merchantId * @param string $splitConfigurationId @@ -106,7 +106,7 @@ public function deleteSplitConfigurationRule(string $merchantId, string $splitCo } /** - * Get a split configuration + * Get a split configuration profile * * @param string $merchantId * @param string $splitConfigurationId @@ -122,7 +122,7 @@ public function getSplitConfiguration(string $merchantId, string $splitConfigura } /** - * Get a list of split configurations + * Get a list of split configuration profiles * * @param string $merchantId * @param array|null $requestOptions @@ -137,7 +137,7 @@ public function listSplitConfigurations(string $merchantId, ?array $requestOptio } /** - * Update split conditions + * Update the split conditions * * @param string $merchantId * @param string $splitConfigurationId @@ -155,7 +155,7 @@ public function updateSplitConditions(string $merchantId, string $splitConfigura } /** - * Update split configuration description + * Update the description of the split configuration profile * * @param string $merchantId * @param string $splitConfigurationId