diff --git a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php index 755ed1ce8..e14421342 100644 --- a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalanceControl/ObjectSerializer.php b/src/Adyen/Model/BalanceControl/ObjectSerializer.php index b5ae3313d..2ed0eb3a0 100644 --- a/src/Adyen/Model/BalanceControl/ObjectSerializer.php +++ b/src/Adyen/Model/BalanceControl/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php index 9123f65ee..de254aeda 100644 --- a/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'auLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/AddressRequirement.php b/src/Adyen/Model/BalancePlatform/AddressRequirement.php index 069c6da72..511ad184a 100644 --- a/src/Adyen/Model/BalancePlatform/AddressRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AddressRequirement.php @@ -277,7 +277,7 @@ public function __construct(array $data = null) { $this->setIfExists('description', $data ?? [], null); $this->setIfExists('requiredAddressFields', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'addressRequirement'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php b/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php index 612ac11f2..ae3eb2dfe 100644 --- a/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('description', $data ?? [], null); $this->setIfExists('max', $data ?? [], null); $this->setIfExists('min', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'amountMinMaxRequirement'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php index d54e1bf11..a6410cdef 100644 --- a/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'brLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php index 460bf20ee..f84236d92 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php @@ -317,10 +317,10 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php index 172990854..0c35fdb15 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php @@ -301,7 +301,7 @@ public function __construct(array $data = null) { $this->setIfExists('bankAccountIdentificationTypes', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'bankAccountIdentificationTypeRequirement'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php index f36d0988e..c8e33356a 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php @@ -317,10 +317,10 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); diff --git a/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php index 4a1dd2bd1..3d3d82bb2 100644 --- a/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php @@ -282,10 +282,10 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'caLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php index bfead0b4d..4d17aa6f3 100644 --- a/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'czLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index fd3f781cc..4fffa9e80 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php +++ b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -385,7 +385,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -412,7 +412,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -448,7 +448,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php index 2357b2876..b61e85d80 100644 --- a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php @@ -416,7 +416,7 @@ public function __construct(array $data = null) $this->setIfExists('sweepAmount', $data ?? [], null); $this->setIfExists('targetAmount', $data ?? [], null); $this->setIfExists('triggerAmount', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'push'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php index 8ffb03ff3..55740b489 100644 --- a/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php index 600242241..82413e8f6 100644 --- a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'hkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php index cdf593038..ea6dc622b 100644 --- a/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'huLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php b/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php index aa08e52ce..718844b18 100644 --- a/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'iban'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php index 9532fc4d9..a09a59f74 100644 --- a/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'noLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php index 0bfebfff6..c6257e670 100644 --- a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'nzLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php index 349326300..676fbc851 100644 --- a/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'numberAndBic'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php index 141ec623e..fa9af7e82 100644 --- a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php +++ b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php index 607311dc3..c5525acb2 100644 --- a/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'plLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php index 1bbc6d26c..c5c27128a 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentBankAccount.php @@ -256,9 +256,9 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); } diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php index e97bf5511..df3724cef 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php @@ -285,7 +285,7 @@ public function __construct(array $data = null) $this->setIfExists('issuingCountryCode', $data ?? [], null); $this->setIfExists('onlyForCrossBalancePlatform', $data ?? [], null); $this->setIfExists('paymentInstrumentType', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paymentInstrumentRequirement'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php index da9c3f722..136e9226b 100644 --- a/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'seLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php index 74a9914cc..e17a9a792 100644 --- a/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'sgLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php index 0a860af04..b0f0ddc18 100644 --- a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php @@ -423,7 +423,7 @@ public function __construct(array $data = null) $this->setIfExists('sweepAmount', $data ?? [], null); $this->setIfExists('targetAmount', $data ?? [], null); $this->setIfExists('triggerAmount', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'push'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php index df4d6e3c4..5d9242920 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequirements.php @@ -281,7 +281,7 @@ public function __construct(array $data = null) { $this->setIfExists('description', $data ?? [], null); $this->setIfExists('requiredAddressFields', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paymentInstrumentRequirement'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('max', $data ?? [], null); $this->setIfExists('min', $data ?? [], null); $this->setIfExists('bankAccountIdentificationTypes', $data ?? [], null); diff --git a/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php index 11a815ca1..744972ae8 100644 --- a/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('sortCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ukLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php index 16abfbe15..2dd1c304e 100644 --- a/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php @@ -276,9 +276,9 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php index e403b7087..be12417ce 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php @@ -423,7 +423,7 @@ public function __construct(array $data = null) $this->setIfExists('sweepAmount', $data ?? [], null); $this->setIfExists('targetAmount', $data ?? [], null); $this->setIfExists('triggerAmount', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'push'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 4bdfceeda..09437b7d8 100644 --- a/src/Adyen/Model/BinLookup/ObjectSerializer.php +++ b/src/Adyen/Model/BinLookup/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/AchDetails.php b/src/Adyen/Model/Checkout/AchDetails.php index 4557c901d..6c2188185 100644 --- a/src/Adyen/Model/Checkout/AchDetails.php +++ b/src/Adyen/Model/Checkout/AchDetails.php @@ -332,7 +332,7 @@ public function __construct(array $data = null) $this->setIfExists('ownerName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ach'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/AfterpayDetails.php b/src/Adyen/Model/Checkout/AfterpayDetails.php index be27ce340..9f52e0fa6 100644 --- a/src/Adyen/Model/Checkout/AfterpayDetails.php +++ b/src/Adyen/Model/Checkout/AfterpayDetails.php @@ -291,7 +291,7 @@ public function __construct(array $data = null) $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'afterpay_default'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/AmazonPayDetails.php b/src/Adyen/Model/Checkout/AmazonPayDetails.php index f79fa037a..a472b41b5 100644 --- a/src/Adyen/Model/Checkout/AmazonPayDetails.php +++ b/src/Adyen/Model/Checkout/AmazonPayDetails.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('amazonPayToken', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('checkoutSessionId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'amazonpay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/AndroidPayDetails.php b/src/Adyen/Model/Checkout/AndroidPayDetails.php index 98fef1a2b..7d12eeb89 100644 --- a/src/Adyen/Model/Checkout/AndroidPayDetails.php +++ b/src/Adyen/Model/Checkout/AndroidPayDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'androidpay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/ApplePayDetails.php b/src/Adyen/Model/Checkout/ApplePayDetails.php index 0a390ecc6..c824d6a61 100644 --- a/src/Adyen/Model/Checkout/ApplePayDetails.php +++ b/src/Adyen/Model/Checkout/ApplePayDetails.php @@ -292,7 +292,7 @@ public function __construct(array $data = null) $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'applepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/ApplePayDonations.php b/src/Adyen/Model/Checkout/ApplePayDonations.php index dc3a76a37..852d32e4e 100644 --- a/src/Adyen/Model/Checkout/ApplePayDonations.php +++ b/src/Adyen/Model/Checkout/ApplePayDonations.php @@ -292,7 +292,7 @@ public function __construct(array $data = null) $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'applepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/AuthenticationData.php b/src/Adyen/Model/Checkout/AuthenticationData.php index 470fc04fd..0fd4f769d 100644 --- a/src/Adyen/Model/Checkout/AuthenticationData.php +++ b/src/Adyen/Model/Checkout/AuthenticationData.php @@ -258,7 +258,7 @@ public function getAttemptAuthenticationAllowableValues() public function __construct(array $data = null) { $this->setIfExists('attemptAuthentication', $data ?? [], null); - $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('authenticationOnly', $data ?? [], null); $this->setIfExists('threeDSRequestData', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php index b41f808ed..fb75f9c41 100644 --- a/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/BacsDirectDebitDetails.php @@ -285,7 +285,7 @@ public function __construct(array $data = null) $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'directdebit_GB'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/BalanceCheckRequest.php b/src/Adyen/Model/Checkout/BalanceCheckRequest.php index 01f8f6d3d..5ffe31355 100644 --- a/src/Adyen/Model/Checkout/BalanceCheckRequest.php +++ b/src/Adyen/Model/Checkout/BalanceCheckRequest.php @@ -564,7 +564,7 @@ public function __construct(array $data = null) $this->setIfExists('store', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('totalsGroup', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/BrowserInfo.php b/src/Adyen/Model/Checkout/BrowserInfo.php index bf69ebe29..f1af627f0 100644 --- a/src/Adyen/Model/Checkout/BrowserInfo.php +++ b/src/Adyen/Model/Checkout/BrowserInfo.php @@ -282,7 +282,7 @@ public function __construct(array $data = null) $this->setIfExists('acceptHeader', $data ?? [], null); $this->setIfExists('colorDepth', $data ?? [], null); $this->setIfExists('javaEnabled', $data ?? [], null); - $this->setIfExists('javaScriptEnabled', $data ?? [], true); + $this->setIfExists('javaScriptEnabled', $data ?? [], null); $this->setIfExists('language', $data ?? [], null); $this->setIfExists('screenHeight', $data ?? [], null); $this->setIfExists('screenWidth', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 20aa29cc2..a5d5b8384 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -391,7 +391,7 @@ public function __construct(array $data = null) $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'scheme'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/CardDonations.php b/src/Adyen/Model/Checkout/CardDonations.php index 38b7f4c2d..56e236e97 100644 --- a/src/Adyen/Model/Checkout/CardDonations.php +++ b/src/Adyen/Model/Checkout/CardDonations.php @@ -391,7 +391,7 @@ public function __construct(array $data = null) $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('threeDS2SdkVersion', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'scheme'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/CellulantDetails.php b/src/Adyen/Model/Checkout/CellulantDetails.php index 790177290..83334ef51 100644 --- a/src/Adyen/Model/Checkout/CellulantDetails.php +++ b/src/Adyen/Model/Checkout/CellulantDetails.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'cellulant'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 50f094c68..e24d9fb63 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -552,7 +552,7 @@ public function __construct(array $data = null) $this->setIfExists('ownerName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'zip'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('billingAddress', $data ?? [], null); $this->setIfExists('deliveryAddress', $data ?? [], null); $this->setIfExists('personalDetails', $data ?? [], null); @@ -1651,7 +1651,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -1678,7 +1678,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php index d9fe77891..d98a67c3d 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionRequest.php @@ -688,7 +688,7 @@ public function __construct(array $data = null) $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('merchantOrderReference', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); - $this->setIfExists('mode', $data ?? [], 'embedded'); + $this->setIfExists('mode', $data ?? [], null); $this->setIfExists('mpiData', $data ?? [], null); $this->setIfExists('platformChargebackLogic', $data ?? [], null); $this->setIfExists('recurringExpiry', $data ?? [], null); @@ -709,14 +709,14 @@ public function __construct(array $data = null) $this->setIfExists('showInstallmentAmount', $data ?? [], null); $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); - $this->setIfExists('splitCardFundingSources', $data ?? [], false); + $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('store', $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('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php index 611a2f7b2..9f24a67a4 100644 --- a/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php +++ b/src/Adyen/Model/Checkout/CreateCheckoutSessionResponse.php @@ -707,7 +707,7 @@ public function __construct(array $data = null) $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('merchantOrderReference', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); - $this->setIfExists('mode', $data ?? [], 'embedded'); + $this->setIfExists('mode', $data ?? [], null); $this->setIfExists('mpiData', $data ?? [], null); $this->setIfExists('platformChargebackLogic', $data ?? [], null); $this->setIfExists('recurringExpiry', $data ?? [], null); @@ -729,14 +729,14 @@ public function __construct(array $data = null) $this->setIfExists('showInstallmentAmount', $data ?? [], null); $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); - $this->setIfExists('splitCardFundingSources', $data ?? [], false); + $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('store', $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('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php b/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php index c0be6578a..ef65cbd0d 100644 --- a/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php +++ b/src/Adyen/Model/Checkout/DetailsRequestAuthenticationData.php @@ -231,7 +231,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('authenticationOnly', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/DeviceRenderOptions.php b/src/Adyen/Model/Checkout/DeviceRenderOptions.php index 1e8146f0b..b3a868a14 100644 --- a/src/Adyen/Model/Checkout/DeviceRenderOptions.php +++ b/src/Adyen/Model/Checkout/DeviceRenderOptions.php @@ -273,7 +273,7 @@ public function getSdkUiTypeAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('sdkInterface', $data ?? [], 'both'); + $this->setIfExists('sdkInterface', $data ?? [], null); $this->setIfExists('sdkUiType', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index e15723075..d0dfa3d7f 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -368,7 +368,7 @@ public function __construct(array $data = null) $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paywithgoogle'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('brand', $data ?? [], null); $this->setIfExists('cupsecureplusSmscode', $data ?? [], null); $this->setIfExists('cvc', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/DonationPaymentRequest.php b/src/Adyen/Model/Checkout/DonationPaymentRequest.php index 4a24b2f8d..f705b2bd2 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentRequest.php +++ b/src/Adyen/Model/Checkout/DonationPaymentRequest.php @@ -561,7 +561,7 @@ public function __construct(array $data = null) $this->setIfExists('socialSecurityNumber', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/DotpayDetails.php b/src/Adyen/Model/Checkout/DotpayDetails.php index e9164300b..4f06d239f 100644 --- a/src/Adyen/Model/Checkout/DotpayDetails.php +++ b/src/Adyen/Model/Checkout/DotpayDetails.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dotpay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/GiropayDetails.php b/src/Adyen/Model/Checkout/GiropayDetails.php index 6a369f01a..00a6543a5 100644 --- a/src/Adyen/Model/Checkout/GiropayDetails.php +++ b/src/Adyen/Model/Checkout/GiropayDetails.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'giropay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/GooglePayDetails.php b/src/Adyen/Model/Checkout/GooglePayDetails.php index c913b5cf4..541a70b1c 100644 --- a/src/Adyen/Model/Checkout/GooglePayDetails.php +++ b/src/Adyen/Model/Checkout/GooglePayDetails.php @@ -299,7 +299,7 @@ public function __construct(array $data = null) $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'googlepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/GooglePayDonations.php b/src/Adyen/Model/Checkout/GooglePayDonations.php index 4e0d7c851..9c4effa39 100644 --- a/src/Adyen/Model/Checkout/GooglePayDonations.php +++ b/src/Adyen/Model/Checkout/GooglePayDonations.php @@ -299,7 +299,7 @@ public function __construct(array $data = null) $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'googlepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/IdealDetails.php b/src/Adyen/Model/Checkout/IdealDetails.php index 0b35c439d..2e4e906f9 100644 --- a/src/Adyen/Model/Checkout/IdealDetails.php +++ b/src/Adyen/Model/Checkout/IdealDetails.php @@ -271,7 +271,7 @@ public function __construct(array $data = null) $this->setIfExists('issuer', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ideal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/IdealDonations.php b/src/Adyen/Model/Checkout/IdealDonations.php index 48658444c..208f4360c 100644 --- a/src/Adyen/Model/Checkout/IdealDonations.php +++ b/src/Adyen/Model/Checkout/IdealDonations.php @@ -271,7 +271,7 @@ public function __construct(array $data = null) $this->setIfExists('issuer', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ideal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/KlarnaDetails.php b/src/Adyen/Model/Checkout/KlarnaDetails.php index 81dc81d46..ee23617db 100644 --- a/src/Adyen/Model/Checkout/KlarnaDetails.php +++ b/src/Adyen/Model/Checkout/KlarnaDetails.php @@ -304,7 +304,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'klarna'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/MasterpassDetails.php b/src/Adyen/Model/Checkout/MasterpassDetails.php index 02e2cd876..2e9709355 100644 --- a/src/Adyen/Model/Checkout/MasterpassDetails.php +++ b/src/Adyen/Model/Checkout/MasterpassDetails.php @@ -278,7 +278,7 @@ public function __construct(array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('masterpassTransactionId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'masterpass'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index a2cb74f0f..4c62a22e6 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('shopperEmail', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'mbway'); + $this->setIfExists('type', $data ?? [], null); } /** @@ -364,7 +364,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -391,7 +391,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/MobilePayDetails.php b/src/Adyen/Model/Checkout/MobilePayDetails.php index f17a736c8..de4f9ae12 100644 --- a/src/Adyen/Model/Checkout/MobilePayDetails.php +++ b/src/Adyen/Model/Checkout/MobilePayDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'mobilepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 2b682c18f..628f63adc 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php index 0d4e5c822..c7cb7c02c 100644 --- a/src/Adyen/Model/Checkout/OpenInvoiceDetails.php +++ b/src/Adyen/Model/Checkout/OpenInvoiceDetails.php @@ -289,7 +289,7 @@ public function __construct(array $data = null) $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'openinvoice'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/PayPalDetails.php b/src/Adyen/Model/Checkout/PayPalDetails.php index f8de39edc..5837e901e 100644 --- a/src/Adyen/Model/Checkout/PayPalDetails.php +++ b/src/Adyen/Model/Checkout/PayPalDetails.php @@ -313,7 +313,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('subtype', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paypal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/PayUUpiDetails.php b/src/Adyen/Model/Checkout/PayUUpiDetails.php index 1fbf215af..497cceaf9 100644 --- a/src/Adyen/Model/Checkout/PayUUpiDetails.php +++ b/src/Adyen/Model/Checkout/PayUUpiDetails.php @@ -277,7 +277,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'payu_IN_upi'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('virtualPaymentAddress', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php index 9417cc0cf..fe3e5c4ff 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDetails.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDetails.php @@ -292,7 +292,7 @@ public function __construct(array $data = null) $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paywithgoogle'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/PayWithGoogleDonations.php b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php index 69f2df4e0..8b7c85f2c 100644 --- a/src/Adyen/Model/Checkout/PayWithGoogleDonations.php +++ b/src/Adyen/Model/Checkout/PayWithGoogleDonations.php @@ -292,7 +292,7 @@ public function __construct(array $data = null) $this->setIfExists('googlePayToken', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'paywithgoogle'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/PaymentLinkRequest.php b/src/Adyen/Model/Checkout/PaymentLinkRequest.php index d60de2330..4b2850a71 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkRequest.php +++ b/src/Adyen/Model/Checkout/PaymentLinkRequest.php @@ -535,9 +535,9 @@ public function __construct(array $data = null) $this->setIfExists('shopperName', $data ?? [], null); $this->setIfExists('shopperReference', $data ?? [], null); $this->setIfExists('shopperStatement', $data ?? [], null); - $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], true); + $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); - $this->setIfExists('splitCardFundingSources', $data ?? [], false); + $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); $this->setIfExists('storePaymentMethodMode', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/PaymentLinkResponse.php b/src/Adyen/Model/Checkout/PaymentLinkResponse.php index 249c5a074..d4e072a27 100644 --- a/src/Adyen/Model/Checkout/PaymentLinkResponse.php +++ b/src/Adyen/Model/Checkout/PaymentLinkResponse.php @@ -580,9 +580,9 @@ public function __construct(array $data = null) $this->setIfExists('shopperName', $data ?? [], null); $this->setIfExists('shopperReference', $data ?? [], null); $this->setIfExists('shopperStatement', $data ?? [], null); - $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], true); + $this->setIfExists('showRemovePaymentMethodButton', $data ?? [], null); $this->setIfExists('socialSecurityNumber', $data ?? [], null); - $this->setIfExists('splitCardFundingSources', $data ?? [], false); + $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('splits', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/PaymentMethodIssuer.php b/src/Adyen/Model/Checkout/PaymentMethodIssuer.php index 276c3ccde..3936fbaac 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodIssuer.php +++ b/src/Adyen/Model/Checkout/PaymentMethodIssuer.php @@ -243,7 +243,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('disabled', $data ?? [], false); + $this->setIfExists('disabled', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php index 16894706d..20f47872e 100644 --- a/src/Adyen/Model/Checkout/PaymentMethodsRequest.php +++ b/src/Adyen/Model/Checkout/PaymentMethodsRequest.php @@ -323,7 +323,7 @@ public function __construct(array $data = null) $this->setIfExists('order', $data ?? [], null); $this->setIfExists('shopperLocale', $data ?? [], null); $this->setIfExists('shopperReference', $data ?? [], null); - $this->setIfExists('splitCardFundingSources', $data ?? [], false); + $this->setIfExists('splitCardFundingSources', $data ?? [], null); $this->setIfExists('store', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/PaymentRequest.php b/src/Adyen/Model/Checkout/PaymentRequest.php index 333505083..6115e0a8e 100644 --- a/src/Adyen/Model/Checkout/PaymentRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRequest.php @@ -772,7 +772,7 @@ public function __construct(array $data = null) $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/PaymentSetupRequest.php b/src/Adyen/Model/Checkout/PaymentSetupRequest.php index 5e6c0651f..8583c1e16 100644 --- a/src/Adyen/Model/Checkout/PaymentSetupRequest.php +++ b/src/Adyen/Model/Checkout/PaymentSetupRequest.php @@ -662,7 +662,7 @@ public function __construct(array $data = null) $this->setIfExists('store', $data ?? [], null); $this->setIfExists('storePaymentMethod', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('token', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/RatepayDetails.php b/src/Adyen/Model/Checkout/RatepayDetails.php index 3a8b555dc..1386846df 100644 --- a/src/Adyen/Model/Checkout/RatepayDetails.php +++ b/src/Adyen/Model/Checkout/RatepayDetails.php @@ -287,7 +287,7 @@ public function __construct(array $data = null) $this->setIfExists('personalDetails', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ratepay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/SamsungPayDetails.php b/src/Adyen/Model/Checkout/SamsungPayDetails.php index cdf52312e..0c094a34a 100644 --- a/src/Adyen/Model/Checkout/SamsungPayDetails.php +++ b/src/Adyen/Model/Checkout/SamsungPayDetails.php @@ -292,7 +292,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('samsungPayToken', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'samsungpay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php index 53c8fd73f..7f8f02d7e 100644 --- a/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php +++ b/src/Adyen/Model/Checkout/SepaDirectDebitDetails.php @@ -280,7 +280,7 @@ public function __construct(array $data = null) $this->setIfExists('ownerName', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'sepadirectdebit'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php index 358fe278b..a33c140ba 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestData.php @@ -574,7 +574,7 @@ public function __construct(array $data = null) $this->setIfExists('acquirerBIN', $data ?? [], null); $this->setIfExists('acquirerMerchantID', $data ?? [], null); $this->setIfExists('addrMatch', $data ?? [], null); - $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('authenticationOnly', $data ?? [], null); $this->setIfExists('challengeIndicator', $data ?? [], null); $this->setIfExists('deviceChannel', $data ?? [], null); $this->setIfExists('deviceRenderOptions', $data ?? [], null); @@ -592,7 +592,7 @@ public function __construct(array $data = null) $this->setIfExists('sdkAppID', $data ?? [], null); $this->setIfExists('sdkEncData', $data ?? [], null); $this->setIfExists('sdkEphemPubKey', $data ?? [], null); - $this->setIfExists('sdkMaxTimeout', $data ?? [], 60); + $this->setIfExists('sdkMaxTimeout', $data ?? [], null); $this->setIfExists('sdkReferenceNumber', $data ?? [], null); $this->setIfExists('sdkTransID', $data ?? [], null); $this->setIfExists('sdkVersion', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php index 9227c8ff7..6b7e2f910 100644 --- a/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php +++ b/src/Adyen/Model/Checkout/ThreeDS2RequestFields.php @@ -556,7 +556,7 @@ public function __construct(array $data = null) $this->setIfExists('acquirerBIN', $data ?? [], null); $this->setIfExists('acquirerMerchantID', $data ?? [], null); $this->setIfExists('addrMatch', $data ?? [], null); - $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('authenticationOnly', $data ?? [], null); $this->setIfExists('challengeIndicator', $data ?? [], null); $this->setIfExists('deviceRenderOptions', $data ?? [], null); $this->setIfExists('homePhone', $data ?? [], null); @@ -572,7 +572,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringFrequency', $data ?? [], null); $this->setIfExists('sdkAppID', $data ?? [], null); $this->setIfExists('sdkEphemPubKey', $data ?? [], null); - $this->setIfExists('sdkMaxTimeout', $data ?? [], 60); + $this->setIfExists('sdkMaxTimeout', $data ?? [], null); $this->setIfExists('sdkReferenceNumber', $data ?? [], null); $this->setIfExists('sdkTransID', $data ?? [], null); $this->setIfExists('threeDSCompInd', $data ?? [], null); diff --git a/src/Adyen/Model/Checkout/UpiCollectDetails.php b/src/Adyen/Model/Checkout/UpiCollectDetails.php index 5f048c8d7..f08fbe296 100644 --- a/src/Adyen/Model/Checkout/UpiCollectDetails.php +++ b/src/Adyen/Model/Checkout/UpiCollectDetails.php @@ -284,7 +284,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'upi_collect'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('virtualPaymentAddress', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/UpiIntentDetails.php b/src/Adyen/Model/Checkout/UpiIntentDetails.php index 3c1b198b5..581194e81 100644 --- a/src/Adyen/Model/Checkout/UpiIntentDetails.php +++ b/src/Adyen/Model/Checkout/UpiIntentDetails.php @@ -271,7 +271,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'upi_intent'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index ac49dfcd8..cf50272f0 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -271,7 +271,7 @@ public function __construct(array $data = null) $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'vipps'); + $this->setIfExists('type', $data ?? [], null); } /** @@ -424,7 +424,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php index 098465adf..cb794ea8a 100644 --- a/src/Adyen/Model/Checkout/VisaCheckoutDetails.php +++ b/src/Adyen/Model/Checkout/VisaCheckoutDetails.php @@ -277,7 +277,7 @@ public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'visacheckout'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('visaCheckoutCallId', $data ?? [], null); } diff --git a/src/Adyen/Model/Checkout/WeChatPayDetails.php b/src/Adyen/Model/Checkout/WeChatPayDetails.php index 7d23fece0..9acbd8a03 100644 --- a/src/Adyen/Model/Checkout/WeChatPayDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayDetails.php @@ -252,7 +252,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('checkoutAttemptId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'wechatpay'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php index 1ae26ab9a..da7eb46cf 100644 --- a/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php +++ b/src/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('appId', $data ?? [], null); $this->setIfExists('checkoutAttemptId', $data ?? [], null); $this->setIfExists('openid', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'wechatpayMiniProgram'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Checkout/ZipDetails.php b/src/Adyen/Model/Checkout/ZipDetails.php index 25bd9c0b4..bb98e95ed 100644 --- a/src/Adyen/Model/Checkout/ZipDetails.php +++ b/src/Adyen/Model/Checkout/ZipDetails.php @@ -273,7 +273,7 @@ public function __construct(array $data = null) $this->setIfExists('clickAndCollect', $data ?? [], null); $this->setIfExists('recurringDetailReference', $data ?? [], null); $this->setIfExists('storedPaymentMethodId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'zip'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index 6c852042d..760b44de7 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -385,7 +385,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -412,7 +412,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -448,7 +448,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php b/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php index b3f705dd9..e042d075e 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php +++ b/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'iban'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php index a94c73762..9e8e21d0d 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php index 3d8a3dce6..d648d8fce 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentBankAccount.php @@ -256,9 +256,9 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); } diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php index 33917f8e5..63499f5e8 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php @@ -371,7 +371,7 @@ public function __construct(array $data = null) $this->setIfExists('sweepAmount', $data ?? [], null); $this->setIfExists('targetAmount', $data ?? [], null); $this->setIfExists('triggerAmount', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'push'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php b/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php index 231b1246f..9a4af774a 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php +++ b/src/Adyen/Model/ConfigurationWebhooks/USLocalAccountIdentification.php @@ -276,9 +276,9 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/DataProtection/ObjectSerializer.php b/src/Adyen/Model/DataProtection/ObjectSerializer.php index 1b86733ae..fe8491817 100644 --- a/src/Adyen/Model/DataProtection/ObjectSerializer.php +++ b/src/Adyen/Model/DataProtection/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Disputes/ObjectSerializer.php b/src/Adyen/Model/Disputes/ObjectSerializer.php index 5ef9f66af..d363f9e2a 100644 --- a/src/Adyen/Model/Disputes/ObjectSerializer.php +++ b/src/Adyen/Model/Disputes/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php index 5fef23b76..e194c1878 100644 --- a/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'auLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php index bf43d76e3..920877be4 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php @@ -311,8 +311,8 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); diff --git a/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php index 47e87773d..02cd58953 100644 --- a/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php @@ -282,10 +282,10 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'caLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php index c2a258ae5..c21d3687c 100644 --- a/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'czLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php index a0f4f18a9..46d3dc8f2 100644 --- a/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php index f8495e9f4..9e31f1ade 100644 --- a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'hkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php index f73557bd0..72ed39f5b 100644 --- a/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'huLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php index e587937e1..2f16170ea 100644 --- a/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'iban'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php index a75f052a7..28a6281cd 100644 --- a/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'noLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php index 4753cd0dd..049146da9 100644 --- a/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'nzLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php index ce9519143..e1782360f 100644 --- a/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'numberAndBic'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php index d25ad19d7..66642b915 100644 --- a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php +++ b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php index 3871a6b94..a750b1a18 100644 --- a/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'plLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php index 0b3c8079c..e80a7ca90 100644 --- a/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'seLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php index 6e5e53def..9a1375a9f 100644 --- a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'sgLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php index a7af9a848..72f26d9bf 100644 --- a/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('sortCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ukLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php index 239cd5ad9..e1f100e15 100644 --- a/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php @@ -276,9 +276,9 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Management/InstallAndroidAppDetails.php b/src/Adyen/Model/Management/InstallAndroidAppDetails.php index d1095a557..1cb12dfef 100644 --- a/src/Adyen/Model/Management/InstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidAppDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('appId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'InstallAndroidApp'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php index da8673226..4b6aa1cfc 100644 --- a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('certificateId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'InstallAndroidCertificate'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index cc5272bf9..2ff0b7ef6 100644 --- a/src/Adyen/Model/Management/ObjectSerializer.php +++ b/src/Adyen/Model/Management/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Management/ReleaseUpdateDetails.php b/src/Adyen/Model/Management/ReleaseUpdateDetails.php index 2d4b7574e..a6820dfb1 100644 --- a/src/Adyen/Model/Management/ReleaseUpdateDetails.php +++ b/src/Adyen/Model/Management/ReleaseUpdateDetails.php @@ -249,7 +249,7 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('type', $data ?? [], 'ReleaseUpdate'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('updateAtFirstMaintenanceCall', $data ?? [], null); } diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php b/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php index 936dcdba9..8a8abbdf1 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php @@ -250,7 +250,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('appId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'UninstallAndroidCertificate'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('certificateId', $data ?? [], null); $this->setIfExists('updateAtFirstMaintenanceCall', $data ?? [], null); } diff --git a/src/Adyen/Model/Management/TransactionDescriptionInfo.php b/src/Adyen/Model/Management/TransactionDescriptionInfo.php index d33f2e53b..544a58f21 100644 --- a/src/Adyen/Model/Management/TransactionDescriptionInfo.php +++ b/src/Adyen/Model/Management/TransactionDescriptionInfo.php @@ -254,7 +254,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('doingBusinessAsName', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dynamic'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php index e7c943959..54bdd7865 100644 --- a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('appId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'UninstallAndroidApp'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php index 3675c6f45..814758942 100644 --- a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('certificateId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'UninstallAndroidCertificate'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php index 9c73e94b9..a3626e45d 100644 --- a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php index 8032f208b..b6a5027ee 100644 --- a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php +++ b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payments/BrowserInfo.php b/src/Adyen/Model/Payments/BrowserInfo.php index a8dbfac39..668e474f1 100644 --- a/src/Adyen/Model/Payments/BrowserInfo.php +++ b/src/Adyen/Model/Payments/BrowserInfo.php @@ -282,7 +282,7 @@ public function __construct(array $data = null) $this->setIfExists('acceptHeader', $data ?? [], null); $this->setIfExists('colorDepth', $data ?? [], null); $this->setIfExists('javaEnabled', $data ?? [], null); - $this->setIfExists('javaScriptEnabled', $data ?? [], true); + $this->setIfExists('javaScriptEnabled', $data ?? [], null); $this->setIfExists('language', $data ?? [], null); $this->setIfExists('screenHeight', $data ?? [], null); $this->setIfExists('screenWidth', $data ?? [], null); diff --git a/src/Adyen/Model/Payments/DeviceRenderOptions.php b/src/Adyen/Model/Payments/DeviceRenderOptions.php index e064ceeaf..d599b0a1e 100644 --- a/src/Adyen/Model/Payments/DeviceRenderOptions.php +++ b/src/Adyen/Model/Payments/DeviceRenderOptions.php @@ -273,7 +273,7 @@ public function getSdkUiTypeAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('sdkInterface', $data ?? [], 'both'); + $this->setIfExists('sdkInterface', $data ?? [], null); $this->setIfExists('sdkUiType', $data ?? [], null); } diff --git a/src/Adyen/Model/Payments/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index 4e217461d..ae7a870cb 100644 --- a/src/Adyen/Model/Payments/ObjectSerializer.php +++ b/src/Adyen/Model/Payments/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payments/PaymentRequest.php b/src/Adyen/Model/Payments/PaymentRequest.php index fec990ada..2867e7054 100644 --- a/src/Adyen/Model/Payments/PaymentRequest.php +++ b/src/Adyen/Model/Payments/PaymentRequest.php @@ -655,7 +655,7 @@ public function __construct(array $data = null) $this->setIfExists('store', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('totalsGroup', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Payments/PaymentRequest3d.php b/src/Adyen/Model/Payments/PaymentRequest3d.php index 54d09679c..ad0bfd4b6 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3d.php +++ b/src/Adyen/Model/Payments/PaymentRequest3d.php @@ -571,7 +571,7 @@ public function __construct(array $data = null) $this->setIfExists('store', $data ?? [], null); $this->setIfExists('telephoneNumber', $data ?? [], null); $this->setIfExists('threeDS2RequestData', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('totalsGroup', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Payments/PaymentRequest3ds2.php b/src/Adyen/Model/Payments/PaymentRequest3ds2.php index 8824acaa9..bafef4bf3 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3ds2.php +++ b/src/Adyen/Model/Payments/PaymentRequest3ds2.php @@ -571,7 +571,7 @@ public function __construct(array $data = null) $this->setIfExists('threeDS2RequestData', $data ?? [], null); $this->setIfExists('threeDS2Result', $data ?? [], null); $this->setIfExists('threeDS2Token', $data ?? [], null); - $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], false); + $this->setIfExists('threeDSAuthenticationOnly', $data ?? [], null); $this->setIfExists('totalsGroup', $data ?? [], null); $this->setIfExists('trustedShopper', $data ?? [], null); } diff --git a/src/Adyen/Model/Payments/ThreeDS2RequestData.php b/src/Adyen/Model/Payments/ThreeDS2RequestData.php index 9add4f703..010245f7a 100644 --- a/src/Adyen/Model/Payments/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Payments/ThreeDS2RequestData.php @@ -574,7 +574,7 @@ public function __construct(array $data = null) $this->setIfExists('acquirerBIN', $data ?? [], null); $this->setIfExists('acquirerMerchantID', $data ?? [], null); $this->setIfExists('addrMatch', $data ?? [], null); - $this->setIfExists('authenticationOnly', $data ?? [], false); + $this->setIfExists('authenticationOnly', $data ?? [], null); $this->setIfExists('challengeIndicator', $data ?? [], null); $this->setIfExists('deviceChannel', $data ?? [], null); $this->setIfExists('deviceRenderOptions', $data ?? [], null); @@ -592,7 +592,7 @@ public function __construct(array $data = null) $this->setIfExists('sdkAppID', $data ?? [], null); $this->setIfExists('sdkEncData', $data ?? [], null); $this->setIfExists('sdkEphemPubKey', $data ?? [], null); - $this->setIfExists('sdkMaxTimeout', $data ?? [], 60); + $this->setIfExists('sdkMaxTimeout', $data ?? [], null); $this->setIfExists('sdkReferenceNumber', $data ?? [], null); $this->setIfExists('sdkTransID', $data ?? [], null); $this->setIfExists('sdkVersion', $data ?? [], null); diff --git a/src/Adyen/Model/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index ad1c991ab..0d50f4363 100644 --- a/src/Adyen/Model/Payout/ObjectSerializer.php +++ b/src/Adyen/Model/Payout/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Recurring/ObjectSerializer.php b/src/Adyen/Model/Recurring/ObjectSerializer.php index 7adbf8e59..3b2a857bf 100644 --- a/src/Adyen/Model/Recurring/ObjectSerializer.php +++ b/src/Adyen/Model/Recurring/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php index 97f670389..a8a265ce9 100644 --- a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/StoredValue/ObjectSerializer.php b/src/Adyen/Model/StoredValue/ObjectSerializer.php index ed3372fb3..934975452 100644 --- a/src/Adyen/Model/StoredValue/ObjectSerializer.php +++ b/src/Adyen/Model/StoredValue/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php index 6592bf84d..9ccc67586 100644 --- a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php index 89a951cec..0a526a14e 100644 --- a/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'auLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php index 1b3ddfbdd..592f24e5e 100644 --- a/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'brLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php index 263fcaf08..d255f3a3c 100644 --- a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php @@ -317,10 +317,10 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); diff --git a/src/Adyen/Model/TransferWebhooks/BankCategoryData.php b/src/Adyen/Model/TransferWebhooks/BankCategoryData.php index d952af333..e5d420475 100644 --- a/src/Adyen/Model/TransferWebhooks/BankCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/BankCategoryData.php @@ -272,7 +272,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('priority', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'bank'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php index fff6b723c..c0fa683cf 100644 --- a/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php @@ -282,10 +282,10 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'caLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php index dddab895f..8196e08aa 100644 --- a/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'czLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php index 57e033e58..1339a0f8a 100644 --- a/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php index 888d837e7..d1920bdfa 100644 --- a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'hkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php index 3807bdd29..6c3e7afd0 100644 --- a/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'huLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php index e7fab4fbf..b39bc3413 100644 --- a/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'iban'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php b/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php index ecf1c0943..4101a0f43 100644 --- a/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('modificationMerchantReference', $data ?? [], null); $this->setIfExists('modificationPspReference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'internal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/IssuedCard.php b/src/Adyen/Model/TransferWebhooks/IssuedCard.php index 60090d2af..e1a1b7cd1 100644 --- a/src/Adyen/Model/TransferWebhooks/IssuedCard.php +++ b/src/Adyen/Model/TransferWebhooks/IssuedCard.php @@ -341,7 +341,7 @@ public function __construct(array $data = null) $this->setIfExists('relayedAuthorisationData', $data ?? [], null); $this->setIfExists('schemeTraceId', $data ?? [], null); $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'issuedCard'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('validationFacts', $data ?? [], null); } diff --git a/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php index 1bad403bf..a6cbc63c4 100644 --- a/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'noLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php index f3a47e94b..ad924ca5f 100644 --- a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'nzLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php index b3ab1a0cd..9acddff57 100644 --- a/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'numberAndBic'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php index 01b25bf23..d05b26906 100644 --- a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php index 1ee6f2bb7..9d927ab33 100644 --- a/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'plLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/PartyIdentification.php b/src/Adyen/Model/TransferWebhooks/PartyIdentification.php index 55dbe2a61..0732aca7c 100644 --- a/src/Adyen/Model/TransferWebhooks/PartyIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/PartyIdentification.php @@ -289,7 +289,7 @@ public function __construct(array $data = null) $this->setIfExists('fullName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'unknown'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/PlatformPayment.php b/src/Adyen/Model/TransferWebhooks/PlatformPayment.php index 31bf21fa1..40b2e9aab 100644 --- a/src/Adyen/Model/TransferWebhooks/PlatformPayment.php +++ b/src/Adyen/Model/TransferWebhooks/PlatformPayment.php @@ -314,7 +314,7 @@ public function __construct(array $data = null) $this->setIfExists('paymentMerchantReference', $data ?? [], null); $this->setIfExists('platformPaymentType', $data ?? [], null); $this->setIfExists('pspPaymentReference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'platformPayment'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php index 48fc1b814..200f72c76 100644 --- a/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'seLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php index 486dc6e64..394d058c6 100644 --- a/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'sgLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php index 56119b81e..a9f77929e 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php @@ -310,7 +310,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('priority', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'platformPayment'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('modificationMerchantReference', $data ?? [], null); $this->setIfExists('modificationPspReference', $data ?? [], null); $this->setIfExists('authorisationType', $data ?? [], null); diff --git a/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php index 9e1776c99..1c726c80b 100644 --- a/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('sortCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ukLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php index 1ec71c3f3..1da7dc070 100644 --- a/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php @@ -276,9 +276,9 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/AULocalAccountIdentification.php b/src/Adyen/Model/Transfers/AULocalAccountIdentification.php index 1901e209e..17443b310 100644 --- a/src/Adyen/Model/Transfers/AULocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/AULocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'auLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php b/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php index d29b31f15..5fde276f4 100644 --- a/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'brLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php index 97edbf1f2..c50f83a9d 100644 --- a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php @@ -317,10 +317,10 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bsbCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); $this->setIfExists('branchNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); diff --git a/src/Adyen/Model/Transfers/BankCategoryData.php b/src/Adyen/Model/Transfers/BankCategoryData.php index fc0929a90..3a60bb8e8 100644 --- a/src/Adyen/Model/Transfers/BankCategoryData.php +++ b/src/Adyen/Model/Transfers/BankCategoryData.php @@ -272,7 +272,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('priority', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'bank'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/CALocalAccountIdentification.php b/src/Adyen/Model/Transfers/CALocalAccountIdentification.php index 5e939e144..967de83cc 100644 --- a/src/Adyen/Model/Transfers/CALocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/CALocalAccountIdentification.php @@ -282,10 +282,10 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('institutionNumber', $data ?? [], null); $this->setIfExists('transitNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'caLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php index c5e52c35f..4e8d744ac 100644 --- a/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'czLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php index bf06c781b..1d864688a 100644 --- a/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bankCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'dkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php index 428854511..661a76fda 100644 --- a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'hkLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/HULocalAccountIdentification.php b/src/Adyen/Model/Transfers/HULocalAccountIdentification.php index c3b357222..5fea3c9a2 100644 --- a/src/Adyen/Model/Transfers/HULocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HULocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'huLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/IbanAccountIdentification.php b/src/Adyen/Model/Transfers/IbanAccountIdentification.php index bb4ca9f90..74b1f654c 100644 --- a/src/Adyen/Model/Transfers/IbanAccountIdentification.php +++ b/src/Adyen/Model/Transfers/IbanAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('iban', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'iban'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/InternalCategoryData.php b/src/Adyen/Model/Transfers/InternalCategoryData.php index c0f6bd6dc..ab31ce17c 100644 --- a/src/Adyen/Model/Transfers/InternalCategoryData.php +++ b/src/Adyen/Model/Transfers/InternalCategoryData.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('modificationMerchantReference', $data ?? [], null); $this->setIfExists('modificationPspReference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'internal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/IssuedCard.php b/src/Adyen/Model/Transfers/IssuedCard.php index 6fb8747df..f1b1e5490 100644 --- a/src/Adyen/Model/Transfers/IssuedCard.php +++ b/src/Adyen/Model/Transfers/IssuedCard.php @@ -341,7 +341,7 @@ public function __construct(array $data = null) $this->setIfExists('relayedAuthorisationData', $data ?? [], null); $this->setIfExists('schemeTraceId', $data ?? [], null); $this->setIfExists('schemeUniqueTransactionId', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'issuedCard'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('validationFacts', $data ?? [], null); } diff --git a/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php index 0e98b008a..3100e6e92 100644 --- a/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'noLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php index c58c71a56..598259945 100644 --- a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'nzLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php b/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php index 838ca66e1..d0b6347a6 100644 --- a/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php @@ -264,7 +264,7 @@ public function __construct(array $data = null) $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('additionalBankIdentification', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'numberAndBic'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/ObjectSerializer.php b/src/Adyen/Model/Transfers/ObjectSerializer.php index b9cbe36bf..349b367b3 100644 --- a/src/Adyen/Model/Transfers/ObjectSerializer.php +++ b/src/Adyen/Model/Transfers/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php b/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php index b021cd4f0..9151369e9 100644 --- a/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php @@ -250,7 +250,7 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'plLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/PartyIdentification.php b/src/Adyen/Model/Transfers/PartyIdentification.php index c98e9e0b1..7b9eb5c0f 100644 --- a/src/Adyen/Model/Transfers/PartyIdentification.php +++ b/src/Adyen/Model/Transfers/PartyIdentification.php @@ -289,7 +289,7 @@ public function __construct(array $data = null) $this->setIfExists('fullName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'unknown'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/PlatformPayment.php b/src/Adyen/Model/Transfers/PlatformPayment.php index 98fb4eb36..ff5371ead 100644 --- a/src/Adyen/Model/Transfers/PlatformPayment.php +++ b/src/Adyen/Model/Transfers/PlatformPayment.php @@ -314,7 +314,7 @@ public function __construct(array $data = null) $this->setIfExists('paymentMerchantReference', $data ?? [], null); $this->setIfExists('platformPaymentType', $data ?? [], null); $this->setIfExists('pspPaymentReference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'platformPayment'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/SELocalAccountIdentification.php b/src/Adyen/Model/Transfers/SELocalAccountIdentification.php index 725ce9f94..c64230077 100644 --- a/src/Adyen/Model/Transfers/SELocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/SELocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('clearingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'seLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php b/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php index f977fb557..dbbcb2eba 100644 --- a/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('bic', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'sgLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/TransferCategoryData.php b/src/Adyen/Model/Transfers/TransferCategoryData.php index b4e3025d4..02aa45793 100644 --- a/src/Adyen/Model/Transfers/TransferCategoryData.php +++ b/src/Adyen/Model/Transfers/TransferCategoryData.php @@ -310,7 +310,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('priority', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'platformPayment'); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('modificationMerchantReference', $data ?? [], null); $this->setIfExists('modificationPspReference', $data ?? [], null); $this->setIfExists('authorisationType', $data ?? [], null); diff --git a/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php index f2e41ce36..8de0363f1 100644 --- a/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php @@ -257,7 +257,7 @@ public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); $this->setIfExists('sortCode', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'ukLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/USLocalAccountIdentification.php b/src/Adyen/Model/Transfers/USLocalAccountIdentification.php index 477399633..daf294700 100644 --- a/src/Adyen/Model/Transfers/USLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/USLocalAccountIdentification.php @@ -276,9 +276,9 @@ public function getTypeAllowableValues() public function __construct(array $data = null) { $this->setIfExists('accountNumber', $data ?? [], null); - $this->setIfExists('accountType', $data ?? [], 'checking'); + $this->setIfExists('accountType', $data ?? [], null); $this->setIfExists('routingNumber', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'usLocal'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php index e9f5f976c..4abe664ed 100644 --- a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php +++ b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php @@ -289,7 +289,7 @@ public function __construct(array $data = null) $this->setIfExists('fullName', $data ?? [], null); $this->setIfExists('lastName', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); - $this->setIfExists('type', $data ?? [], 'unknown'); + $this->setIfExists('type', $data ?? [], null); } /** diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index 5acf9f0ad..cf5cbe309 100644 --- a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php @@ -76,13 +76,14 @@ public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatfo * @param string $balanceAccountId * @param string $sweepId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteSweep(string $balanceAccountId, string $sweepId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php index c61143563..99bc3b6bd 100644 --- a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php +++ b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php @@ -44,12 +44,13 @@ public function __construct(Client $client) * * @param \Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/validateBankAccountIdentification"; $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php index ad86f1206..2e704599b 100644 --- a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php +++ b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php @@ -60,12 +60,13 @@ public function getNetworkToken(string $networkTokenId, array $requestOptions = * @param string $networkTokenId * @param \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function updateNetworkToken(string $networkTokenId, \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{networkTokenId}'], [$networkTokenId], "/networkTokens/{networkTokenId}"); $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateNetworkTokenRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 36f89ce4b..0486c983d 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $storedPaymentMethodId * @param array|null $requestOptions ['queryParams' => ['shopperReference'=> string, 'merchantAccount'=> string]] - + * @throws AdyenException */ public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php index f94b39ed9..2551bbc54 100644 --- a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php +++ b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php @@ -59,13 +59,14 @@ public function createBusinessLine(\Adyen\Model\LegalEntityManagement\BusinessLi * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteBusinessLine(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/businessLines/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php index f8cc76da8..ef76b3ad3 100644 --- a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteDocument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/documents/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php index 70c2e0769..3bf8aeaa4 100644 --- a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php @@ -59,13 +59,14 @@ public function createTransferInstrument(\Adyen\Model\LegalEntityManagement\Tran * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteTransferInstrument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/transferInstruments/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php index 7f0684078..2be1d91c0 100644 --- a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php @@ -63,13 +63,14 @@ public function createAllowedOrigin(string $companyId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $companyId, string $apiCredentialId, string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}', '{originId}'], [$companyId, $apiCredentialId, $originId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php index 8c6b933d2..02afdeebe 100644 --- a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php @@ -63,13 +63,14 @@ public function createAllowedOrigin(string $merchantId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $merchantId, string $apiCredentialId, string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}', '{originId}'], [$merchantId, $apiCredentialId, $originId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/MyAPICredentialApi.php b/src/Adyen/Service/Management/MyAPICredentialApi.php index 54005b35b..65cdadc59 100644 --- a/src/Adyen/Service/Management/MyAPICredentialApi.php +++ b/src/Adyen/Service/Management/MyAPICredentialApi.php @@ -116,12 +116,13 @@ public function getApiCredentialDetails(array $requestOptions = null): \Adyen\Mo * * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeAllowedOrigin(string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } } diff --git a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php index f8b7cc0b0..4f955b8ba 100644 --- a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php @@ -46,13 +46,14 @@ public function __construct(Client $client) * @param string $paymentMethodId * @param \Adyen\Model\Management\ApplePayInfo $applePayInfo * @param array|null $requestOptions - + * @throws AdyenException */ public function addApplePayDomain(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\ApplePayInfo $applePayInfo, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"); $this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php index efff80b67..499e78957 100644 --- a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php @@ -61,13 +61,14 @@ public function addPayoutSetting(string $merchantId, \Adyen\Model\Management\Pay * @param string $merchantId * @param string $payoutSettingsId * @param array|null $requestOptions - + * @throws AdyenException */ public function deletePayoutSetting(string $merchantId, string $payoutSettingsId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php index 8a7c5e731..8b6d78c7f 100644 --- a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php @@ -59,12 +59,13 @@ public function listTerminals(array $requestOptions = null): \Adyen\Model\Manage * @param string $terminalId * @param \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function reassignTerminal(string $terminalId, \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{terminalId}'], [$terminalId], "/terminals/{terminalId}/reassign"); $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalReassignmentRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php index cfe85a383..6caa292a6 100644 --- a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php @@ -92,13 +92,14 @@ public function listAllWebhooks(string $companyId, array $requestOptions = null) * @param string $companyId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $companyId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php index 968e9c614..7113c9c39 100644 --- a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php @@ -92,13 +92,14 @@ public function listAllWebhooks(string $merchantId, array $requestOptions = null * @param string $merchantId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $merchantId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /**