diff --git a/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php b/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php index f65103eb..c1dfe2cd 100644 --- a/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php +++ b/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php @@ -245,6 +245,7 @@ public function getModelName() return self::$openAPIModelName; } + public const CHALLENGE_CANCEL__00 = '00'; public const CHALLENGE_CANCEL__01 = '01'; public const CHALLENGE_CANCEL__02 = '02'; public const CHALLENGE_CANCEL__03 = '03'; @@ -252,6 +253,7 @@ public function getModelName() public const CHALLENGE_CANCEL__05 = '05'; public const CHALLENGE_CANCEL__06 = '06'; public const CHALLENGE_CANCEL__07 = '07'; + public const CHALLENGE_CANCEL__08 = '08'; public const FLOW_OTP_SMS = 'OTP_SMS'; public const FLOW_OOB = 'OOB'; @@ -263,6 +265,7 @@ public function getModelName() public function getChallengeCancelAllowableValues() { return [ + self::CHALLENGE_CANCEL__00, self::CHALLENGE_CANCEL__01, self::CHALLENGE_CANCEL__02, self::CHALLENGE_CANCEL__03, @@ -270,6 +273,7 @@ public function getChallengeCancelAllowableValues() self::CHALLENGE_CANCEL__05, self::CHALLENGE_CANCEL__06, self::CHALLENGE_CANCEL__07, + self::CHALLENGE_CANCEL__08, ]; } /** @@ -386,7 +390,7 @@ public function getChallengeCancel() /** * Sets challengeCancel * - * @param string|null $challengeCancel Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). + * @param string|null $challengeCancel Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK. * * @return self */ diff --git a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php index 755ed1ce..e1442134 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 b5ae3313..2ed0eb3a 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/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index 67e88b5f..ada0db0b 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 */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php index 141ec623..fa9af7e8 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/BinLookup/CostEstimateResponse.php b/src/Adyen/Model/BinLookup/CostEstimateResponse.php index a658d059..6b93f7ad 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateResponse.php +++ b/src/Adyen/Model/BinLookup/CostEstimateResponse.php @@ -47,8 +47,7 @@ class CostEstimateResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'cardBin' => '\Adyen\Model\BinLookup\CardBin', 'costEstimateAmount' => '\Adyen\Model\BinLookup\Amount', 'costEstimateReference' => 'string', - 'resultCode' => 'string', - 'surchargeType' => 'string' + 'resultCode' => 'string' ]; /** @@ -62,8 +61,7 @@ class CostEstimateResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'cardBin' => null, 'costEstimateAmount' => null, 'costEstimateReference' => null, - 'resultCode' => null, - 'surchargeType' => null + 'resultCode' => null ]; /** @@ -75,8 +73,7 @@ class CostEstimateResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'cardBin' => false, 'costEstimateAmount' => false, 'costEstimateReference' => false, - 'resultCode' => false, - 'surchargeType' => false + 'resultCode' => false ]; /** @@ -168,8 +165,7 @@ public function isNullableSetToNull(string $property): bool 'cardBin' => 'cardBin', 'costEstimateAmount' => 'costEstimateAmount', 'costEstimateReference' => 'costEstimateReference', - 'resultCode' => 'resultCode', - 'surchargeType' => 'surchargeType' + 'resultCode' => 'resultCode' ]; /** @@ -181,8 +177,7 @@ public function isNullableSetToNull(string $property): bool 'cardBin' => 'setCardBin', 'costEstimateAmount' => 'setCostEstimateAmount', 'costEstimateReference' => 'setCostEstimateReference', - 'resultCode' => 'setResultCode', - 'surchargeType' => 'setSurchargeType' + 'resultCode' => 'setResultCode' ]; /** @@ -194,8 +189,7 @@ public function isNullableSetToNull(string $property): bool 'cardBin' => 'getCardBin', 'costEstimateAmount' => 'getCostEstimateAmount', 'costEstimateReference' => 'getCostEstimateReference', - 'resultCode' => 'getResultCode', - 'surchargeType' => 'getSurchargeType' + 'resultCode' => 'getResultCode' ]; /** @@ -259,7 +253,6 @@ public function __construct(array $data = null) $this->setIfExists('costEstimateAmount', $data ?? [], null); $this->setIfExists('costEstimateReference', $data ?? [], null); $this->setIfExists('resultCode', $data ?? [], null); - $this->setIfExists('surchargeType', $data ?? [], null); } /** @@ -399,30 +392,6 @@ public function setResultCode($resultCode) return $this; } - - /** - * Gets surchargeType - * - * @return string|null - */ - public function getSurchargeType() - { - return $this->container['surchargeType']; - } - - /** - * Sets surchargeType - * - * @param string|null $surchargeType Indicates the way the charges can be passed on to the cardholder. The following values are possible: * `ZERO` - the charges are not allowed to pass on * `PASSTHROUGH` - the charges can be passed on * `UNLIMITED` - there is no limit on how much surcharge is passed on - * - * @return self - */ - public function setSurchargeType($surchargeType) - { - $this->container['surchargeType'] = $surchargeType; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 4bdfceed..09437b7d 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/CardDetails.php b/src/Adyen/Model/Checkout/CardDetails.php index 26f122e7..35bd3eef 100644 --- a/src/Adyen/Model/Checkout/CardDetails.php +++ b/src/Adyen/Model/Checkout/CardDetails.php @@ -55,6 +55,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', + 'fastlaneData' => 'string', 'fundingSource' => 'string', 'holderName' => 'string', 'networkPaymentReference' => 'string', @@ -89,6 +90,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, + 'fastlaneData' => null, 'fundingSource' => null, 'holderName' => null, 'networkPaymentReference' => null, @@ -121,6 +123,7 @@ class CardDetails implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, + 'fastlaneData' => false, 'fundingSource' => false, 'holderName' => false, 'networkPaymentReference' => false, @@ -233,6 +236,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', + 'fastlaneData' => 'fastlaneData', 'fundingSource' => 'fundingSource', 'holderName' => 'holderName', 'networkPaymentReference' => 'networkPaymentReference', @@ -265,6 +269,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', + 'fastlaneData' => 'setFastlaneData', 'fundingSource' => 'setFundingSource', 'holderName' => 'setHolderName', 'networkPaymentReference' => 'setNetworkPaymentReference', @@ -297,6 +302,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', + 'fastlaneData' => 'getFastlaneData', 'fundingSource' => 'getFundingSource', 'holderName' => 'getHolderName', 'networkPaymentReference' => 'getNetworkPaymentReference', @@ -416,6 +422,7 @@ public function __construct(array $data = null) $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('fastlaneData', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('networkPaymentReference', $data ?? [], null); @@ -757,6 +764,30 @@ public function setExpiryYear($expiryYear) return $this; } + /** + * Gets fastlaneData + * + * @return string|null + */ + public function getFastlaneData() + { + return $this->container['fastlaneData']; + } + + /** + * Sets fastlaneData + * + * @param string|null $fastlaneData The encoded fastlane data blob + * + * @return self + */ + public function setFastlaneData($fastlaneData) + { + $this->container['fastlaneData'] = $fastlaneData; + + return $this; + } + /** * Gets fundingSource * diff --git a/src/Adyen/Model/Checkout/CardDonations.php b/src/Adyen/Model/Checkout/CardDonations.php index 5c54e830..44d29d7b 100644 --- a/src/Adyen/Model/Checkout/CardDonations.php +++ b/src/Adyen/Model/Checkout/CardDonations.php @@ -55,6 +55,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', + 'fastlaneData' => 'string', 'fundingSource' => 'string', 'holderName' => 'string', 'networkPaymentReference' => 'string', @@ -89,6 +90,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, + 'fastlaneData' => null, 'fundingSource' => null, 'holderName' => null, 'networkPaymentReference' => null, @@ -121,6 +123,7 @@ class CardDonations implements ModelInterface, ArrayAccess, \JsonSerializable 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, + 'fastlaneData' => false, 'fundingSource' => false, 'holderName' => false, 'networkPaymentReference' => false, @@ -233,6 +236,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', + 'fastlaneData' => 'fastlaneData', 'fundingSource' => 'fundingSource', 'holderName' => 'holderName', 'networkPaymentReference' => 'networkPaymentReference', @@ -265,6 +269,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', + 'fastlaneData' => 'setFastlaneData', 'fundingSource' => 'setFundingSource', 'holderName' => 'setHolderName', 'networkPaymentReference' => 'setNetworkPaymentReference', @@ -297,6 +302,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', + 'fastlaneData' => 'getFastlaneData', 'fundingSource' => 'getFundingSource', 'holderName' => 'getHolderName', 'networkPaymentReference' => 'getNetworkPaymentReference', @@ -416,6 +422,7 @@ public function __construct(array $data = null) $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('fastlaneData', $data ?? [], null); $this->setIfExists('fundingSource', $data ?? [], null); $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('networkPaymentReference', $data ?? [], null); @@ -757,6 +764,30 @@ public function setExpiryYear($expiryYear) return $this; } + /** + * Gets fastlaneData + * + * @return string|null + */ + public function getFastlaneData() + { + return $this->container['fastlaneData']; + } + + /** + * Sets fastlaneData + * + * @param string|null $fastlaneData The encoded fastlane data blob + * + * @return self + */ + public function setFastlaneData($fastlaneData) + { + $this->container['fastlaneData'] = $fastlaneData; + + return $this; + } + /** * Gets fundingSource * diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 4e546521..959fbbe9 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -77,6 +77,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', + 'fastlaneData' => 'string', 'networkPaymentReference' => 'string', 'number' => 'string', 'shopperNotificationReference' => 'string', @@ -159,6 +160,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, + 'fastlaneData' => null, 'networkPaymentReference' => null, 'number' => null, 'shopperNotificationReference' => null, @@ -239,6 +241,7 @@ class CheckoutPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, + 'fastlaneData' => false, 'networkPaymentReference' => false, 'number' => false, 'shopperNotificationReference' => false, @@ -399,6 +402,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', + 'fastlaneData' => 'fastlaneData', 'networkPaymentReference' => 'networkPaymentReference', 'number' => 'number', 'shopperNotificationReference' => 'shopperNotificationReference', @@ -479,6 +483,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', + 'fastlaneData' => 'setFastlaneData', 'networkPaymentReference' => 'setNetworkPaymentReference', 'number' => 'setNumber', 'shopperNotificationReference' => 'setShopperNotificationReference', @@ -559,6 +564,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', + 'fastlaneData' => 'getFastlaneData', 'networkPaymentReference' => 'getNetworkPaymentReference', 'number' => 'getNumber', 'shopperNotificationReference' => 'getShopperNotificationReference', @@ -689,6 +695,7 @@ public function __construct(array $data = null) $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('fastlaneData', $data ?? [], null); $this->setIfExists('networkPaymentReference', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); $this->setIfExists('shopperNotificationReference', $data ?? [], null); @@ -773,6 +780,9 @@ public function listInvalidProperties() if ($this->container['issuer'] === null) { $invalidProperties[] = "'issuer' can't be null"; } + if ($this->container['fastlaneData'] === null) { + $invalidProperties[] = "'fastlaneData' can't be null"; + } if ($this->container['firstName'] === null) { $invalidProperties[] = "'firstName' can't be null"; } @@ -1602,6 +1612,30 @@ public function setExpiryYear($expiryYear) return $this; } + /** + * Gets fastlaneData + * + * @return string + */ + public function getFastlaneData() + { + return $this->container['fastlaneData']; + } + + /** + * Sets fastlaneData + * + * @param string $fastlaneData The encoded fastlane data blob + * + * @return self + */ + public function setFastlaneData($fastlaneData) + { + $this->container['fastlaneData'] = $fastlaneData; + + return $this; + } + /** * Gets networkPaymentReference * @@ -1999,7 +2033,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -2023,7 +2057,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/DonationPaymentMethod.php b/src/Adyen/Model/Checkout/DonationPaymentMethod.php index 690744aa..9347e838 100644 --- a/src/Adyen/Model/Checkout/DonationPaymentMethod.php +++ b/src/Adyen/Model/Checkout/DonationPaymentMethod.php @@ -61,6 +61,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => 'string', 'expiryMonth' => 'string', 'expiryYear' => 'string', + 'fastlaneData' => 'string', 'holderName' => 'string', 'networkPaymentReference' => 'string', 'number' => 'string', @@ -99,6 +100,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => null, 'expiryMonth' => null, 'expiryYear' => null, + 'fastlaneData' => null, 'holderName' => null, 'networkPaymentReference' => null, 'number' => null, @@ -135,6 +137,7 @@ class DonationPaymentMethod implements ModelInterface, ArrayAccess, \JsonSeriali 'encryptedSecurityCode' => false, 'expiryMonth' => false, 'expiryYear' => false, + 'fastlaneData' => false, 'holderName' => false, 'networkPaymentReference' => false, 'number' => false, @@ -251,6 +254,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'encryptedSecurityCode', 'expiryMonth' => 'expiryMonth', 'expiryYear' => 'expiryYear', + 'fastlaneData' => 'fastlaneData', 'holderName' => 'holderName', 'networkPaymentReference' => 'networkPaymentReference', 'number' => 'number', @@ -287,6 +291,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'setEncryptedSecurityCode', 'expiryMonth' => 'setExpiryMonth', 'expiryYear' => 'setExpiryYear', + 'fastlaneData' => 'setFastlaneData', 'holderName' => 'setHolderName', 'networkPaymentReference' => 'setNetworkPaymentReference', 'number' => 'setNumber', @@ -323,6 +328,7 @@ public function isNullableSetToNull(string $property): bool 'encryptedSecurityCode' => 'getEncryptedSecurityCode', 'expiryMonth' => 'getExpiryMonth', 'expiryYear' => 'getExpiryYear', + 'fastlaneData' => 'getFastlaneData', 'holderName' => 'getHolderName', 'networkPaymentReference' => 'getNetworkPaymentReference', 'number' => 'getNumber', @@ -409,6 +415,7 @@ public function __construct(array $data = null) $this->setIfExists('encryptedSecurityCode', $data ?? [], null); $this->setIfExists('expiryMonth', $data ?? [], null); $this->setIfExists('expiryYear', $data ?? [], null); + $this->setIfExists('fastlaneData', $data ?? [], null); $this->setIfExists('holderName', $data ?? [], null); $this->setIfExists('networkPaymentReference', $data ?? [], null); $this->setIfExists('number', $data ?? [], null); @@ -861,6 +868,30 @@ public function setExpiryYear($expiryYear) return $this; } + /** + * Gets fastlaneData + * + * @return string|null + */ + public function getFastlaneData() + { + return $this->container['fastlaneData']; + } + + /** + * Sets fastlaneData + * + * @param string|null $fastlaneData The encoded fastlane data blob + * + * @return self + */ + public function setFastlaneData($fastlaneData) + { + $this->container['fastlaneData'] = $fastlaneData; + + return $this; + } + /** * Gets holderName * diff --git a/src/Adyen/Model/Checkout/FastlaneDetails.php b/src/Adyen/Model/Checkout/FastlaneDetails.php new file mode 100644 index 00000000..95a3271d --- /dev/null +++ b/src/Adyen/Model/Checkout/FastlaneDetails.php @@ -0,0 +1,570 @@ + + */ +class FastlaneDetails implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FastlaneDetails'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutAttemptId' => 'string', + 'fastlaneData' => 'string', + 'recurringDetailReference' => 'string', + 'storedPaymentMethodId' => 'string', + 'type' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutAttemptId' => null, + 'fastlaneData' => null, + 'recurringDetailReference' => null, + 'storedPaymentMethodId' => null, + 'type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutAttemptId' => false, + 'fastlaneData' => false, + 'recurringDetailReference' => false, + 'storedPaymentMethodId' => false, + 'type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkoutAttemptId' => 'checkoutAttemptId', + 'fastlaneData' => 'fastlaneData', + 'recurringDetailReference' => 'recurringDetailReference', + 'storedPaymentMethodId' => 'storedPaymentMethodId', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutAttemptId' => 'setCheckoutAttemptId', + 'fastlaneData' => 'setFastlaneData', + 'recurringDetailReference' => 'setRecurringDetailReference', + 'storedPaymentMethodId' => 'setStoredPaymentMethodId', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutAttemptId' => 'getCheckoutAttemptId', + 'fastlaneData' => 'getFastlaneData', + 'recurringDetailReference' => 'getRecurringDetailReference', + 'storedPaymentMethodId' => 'getStoredPaymentMethodId', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_FASTLANE = 'fastlane'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_FASTLANE, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('checkoutAttemptId', $data ?? [], null); + $this->setIfExists('fastlaneData', $data ?? [], null); + $this->setIfExists('recurringDetailReference', $data ?? [], null); + $this->setIfExists('storedPaymentMethodId', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fastlaneData'] === null) { + $invalidProperties[] = "'fastlaneData' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets checkoutAttemptId + * + * @return string|null + */ + public function getCheckoutAttemptId() + { + return $this->container['checkoutAttemptId']; + } + + /** + * Sets checkoutAttemptId + * + * @param string|null $checkoutAttemptId The checkout attempt identifier. + * + * @return self + */ + public function setCheckoutAttemptId($checkoutAttemptId) + { + $this->container['checkoutAttemptId'] = $checkoutAttemptId; + + return $this; + } + + /** + * Gets fastlaneData + * + * @return string + */ + public function getFastlaneData() + { + return $this->container['fastlaneData']; + } + + /** + * Sets fastlaneData + * + * @param string $fastlaneData The encoded fastlane data blob + * + * @return self + */ + public function setFastlaneData($fastlaneData) + { + $this->container['fastlaneData'] = $fastlaneData; + + return $this; + } + + /** + * Gets recurringDetailReference + * + * @return string|null + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + public function getRecurringDetailReference() + { + return $this->container['recurringDetailReference']; + } + + /** + * Sets recurringDetailReference + * + * @param string|null $recurringDetailReference This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + * @deprecated since Adyen Checkout API v49. "Use `storedPaymentMethodId` instead." + */ + public function setRecurringDetailReference($recurringDetailReference) + { + $this->container['recurringDetailReference'] = $recurringDetailReference; + + return $this; + } + + /** + * Gets storedPaymentMethodId + * + * @return string|null + */ + public function getStoredPaymentMethodId() + { + return $this->container['storedPaymentMethodId']; + } + + /** + * Sets storedPaymentMethodId + * + * @param string|null $storedPaymentMethodId This is the `recurringDetailReference` returned in the response when you created the token. + * + * @return self + */ + public function setStoredPaymentMethodId($storedPaymentMethodId) + { + $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type **fastlane** + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index dc73d3c3..becc716f 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -361,7 +361,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -385,7 +385,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 2b682c18..628f63ad 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/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index a47f75bc..76b60fbf 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -415,7 +415,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index 77bba385..478ff891 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 */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php index 6629bee4..2d912cd5 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/DataProtection/ObjectSerializer.php b/src/Adyen/Model/DataProtection/ObjectSerializer.php index 1b86733a..fe849181 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/DisputeWebhooks/ObjectSerializer.php b/src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php index 40a36f74..a431ce10 100644 --- a/src/Adyen/Model/DisputeWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/DisputeWebhooks/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 5ef9f66a..d363f9e2 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/Attachment.php b/src/Adyen/Model/LegalEntityManagement/Attachment.php index 8a8db33d..f16ea2d1 100644 --- a/src/Adyen/Model/LegalEntityManagement/Attachment.php +++ b/src/Adyen/Model/LegalEntityManagement/Attachment.php @@ -335,7 +335,7 @@ public function setContent($content) * Gets contentType * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getContentType() { @@ -348,7 +348,7 @@ public function getContentType() * @param string|null $contentType The file format. Possible values: **application/pdf**, **image/jpg**, **image/jpeg**, **image/png**. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setContentType($contentType) { @@ -361,7 +361,7 @@ public function setContentType($contentType) * Gets filename * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getFilename() { @@ -374,7 +374,7 @@ public function getFilename() * @param string|null $filename The name of the file including the file extension. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setFilename($filename) { diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php index 66471833..607f10c1 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php @@ -332,7 +332,7 @@ public function setAccountIdentification($accountIdentification) * Gets accountType * * @return string|null - * @deprecated since Legal Entity Management API v2. + * @deprecated since Legal Entity Management API v2. */ public function getAccountType() { @@ -345,7 +345,7 @@ public function getAccountType() * @param string|null $accountType The type of bank account. * * @return self - * @deprecated since Legal Entity Management API v2. + * @deprecated since Legal Entity Management API v2. */ public function setAccountType($accountType) { diff --git a/src/Adyen/Model/LegalEntityManagement/Document.php b/src/Adyen/Model/LegalEntityManagement/Document.php index 46d18998..5b845357 100644 --- a/src/Adyen/Model/LegalEntityManagement/Document.php +++ b/src/Adyen/Model/LegalEntityManagement/Document.php @@ -523,7 +523,7 @@ public function setDescription($description) * Gets expiryDate * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getExpiryDate() { @@ -536,7 +536,7 @@ public function getExpiryDate() * @param string|null $expiryDate The expiry date of the document, in YYYY-MM-DD format. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setExpiryDate($expiryDate) { @@ -597,7 +597,7 @@ public function setId($id) * Gets issuerCountry * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getIssuerCountry() { @@ -610,7 +610,7 @@ public function getIssuerCountry() * @param string|null $issuerCountry The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setIssuerCountry($issuerCountry) { @@ -623,7 +623,7 @@ public function setIssuerCountry($issuerCountry) * Gets issuerState * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getIssuerState() { @@ -636,7 +636,7 @@ public function getIssuerState() * @param string|null $issuerState The state or province where the document was issued (AU only). * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setIssuerState($issuerState) { diff --git a/src/Adyen/Model/LegalEntityManagement/FinancialReport.php b/src/Adyen/Model/LegalEntityManagement/FinancialReport.php new file mode 100644 index 00000000..2e478671 --- /dev/null +++ b/src/Adyen/Model/LegalEntityManagement/FinancialReport.php @@ -0,0 +1,562 @@ + + */ +class FinancialReport implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'FinancialReport'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'annualTurnover' => 'string', + 'balanceSheetTotal' => 'string', + 'currencyOfFinancialData' => 'string', + 'dateOfFinancialData' => 'string', + 'employeeCount' => 'string', + 'netAssets' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'annualTurnover' => null, + 'balanceSheetTotal' => null, + 'currencyOfFinancialData' => null, + 'dateOfFinancialData' => null, + 'employeeCount' => null, + 'netAssets' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'annualTurnover' => false, + 'balanceSheetTotal' => false, + 'currencyOfFinancialData' => false, + 'dateOfFinancialData' => false, + 'employeeCount' => false, + 'netAssets' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'annualTurnover' => 'annualTurnover', + 'balanceSheetTotal' => 'balanceSheetTotal', + 'currencyOfFinancialData' => 'currencyOfFinancialData', + 'dateOfFinancialData' => 'dateOfFinancialData', + 'employeeCount' => 'employeeCount', + 'netAssets' => 'netAssets' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'annualTurnover' => 'setAnnualTurnover', + 'balanceSheetTotal' => 'setBalanceSheetTotal', + 'currencyOfFinancialData' => 'setCurrencyOfFinancialData', + 'dateOfFinancialData' => 'setDateOfFinancialData', + 'employeeCount' => 'setEmployeeCount', + 'netAssets' => 'setNetAssets' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'annualTurnover' => 'getAnnualTurnover', + 'balanceSheetTotal' => 'getBalanceSheetTotal', + 'currencyOfFinancialData' => 'getCurrencyOfFinancialData', + 'dateOfFinancialData' => 'getDateOfFinancialData', + 'employeeCount' => 'getEmployeeCount', + 'netAssets' => 'getNetAssets' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('annualTurnover', $data ?? [], null); + $this->setIfExists('balanceSheetTotal', $data ?? [], null); + $this->setIfExists('currencyOfFinancialData', $data ?? [], null); + $this->setIfExists('dateOfFinancialData', $data ?? [], null); + $this->setIfExists('employeeCount', $data ?? [], null); + $this->setIfExists('netAssets', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets annualTurnover + * + * @return string|null + */ + public function getAnnualTurnover() + { + return $this->container['annualTurnover']; + } + + /** + * Sets annualTurnover + * + * @param string|null $annualTurnover The annual turnover of the business. + * + * @return self + */ + public function setAnnualTurnover($annualTurnover) + { + $this->container['annualTurnover'] = $annualTurnover; + + return $this; + } + + /** + * Gets balanceSheetTotal + * + * @return string|null + */ + public function getBalanceSheetTotal() + { + return $this->container['balanceSheetTotal']; + } + + /** + * Sets balanceSheetTotal + * + * @param string|null $balanceSheetTotal The balance sheet total of the business. + * + * @return self + */ + public function setBalanceSheetTotal($balanceSheetTotal) + { + $this->container['balanceSheetTotal'] = $balanceSheetTotal; + + return $this; + } + + /** + * Gets currencyOfFinancialData + * + * @return string|null + */ + public function getCurrencyOfFinancialData() + { + return $this->container['currencyOfFinancialData']; + } + + /** + * Sets currencyOfFinancialData + * + * @param string|null $currencyOfFinancialData The currency used for the net assets and balance sheet total. + * + * @return self + */ + public function setCurrencyOfFinancialData($currencyOfFinancialData) + { + $this->container['currencyOfFinancialData'] = $currencyOfFinancialData; + + return $this; + } + + /** + * Gets dateOfFinancialData + * + * @return string|null + */ + public function getDateOfFinancialData() + { + return $this->container['dateOfFinancialData']; + } + + /** + * Sets dateOfFinancialData + * + * @param string|null $dateOfFinancialData The date the financial data were provided, in YYYY-MM-DD format. + * + * @return self + */ + public function setDateOfFinancialData($dateOfFinancialData) + { + $this->container['dateOfFinancialData'] = $dateOfFinancialData; + + return $this; + } + + /** + * Gets employeeCount + * + * @return string|null + */ + public function getEmployeeCount() + { + return $this->container['employeeCount']; + } + + /** + * Sets employeeCount + * + * @param string|null $employeeCount The number of employees of the business. + * + * @return self + */ + public function setEmployeeCount($employeeCount) + { + $this->container['employeeCount'] = $employeeCount; + + return $this; + } + + /** + * Gets netAssets + * + * @return string|null + */ + public function getNetAssets() + { + return $this->container['netAssets']; + } + + /** + * Sets netAssets + * + * @param string|null $netAssets The net assets of the business. + * + * @return self + */ + public function setNetAssets($netAssets) + { + $this->container['netAssets'] = $netAssets; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index 4993dc18..8798087c 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -400,7 +400,7 @@ public function setExpiryDate($expiryDate) * Gets issuerCountry * * @return string|null - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function getIssuerCountry() { @@ -413,7 +413,7 @@ public function getIssuerCountry() * @param string|null $issuerCountry The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**. * * @return self - * @deprecated since Legal Entity Management API v1. + * @deprecated since Legal Entity Management API v1. */ public function setIssuerCountry($issuerCountry) { diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php index 90db63d9..a5482780 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php @@ -49,6 +49,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => 'string', 'legalEntityId' => 'string', 'name' => 'string', + 'nominee' => 'bool', 'relationship' => 'string', 'settlorExemptionReason' => 'string[]', 'type' => 'string' @@ -67,6 +68,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => null, 'legalEntityId' => null, 'name' => null, + 'nominee' => null, 'relationship' => null, 'settlorExemptionReason' => null, 'type' => null @@ -83,6 +85,7 @@ class LegalEntityAssociation implements ModelInterface, ArrayAccess, \JsonSerial 'jobTitle' => false, 'legalEntityId' => false, 'name' => false, + 'nominee' => false, 'relationship' => false, 'settlorExemptionReason' => false, 'type' => false @@ -179,6 +182,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'jobTitle', 'legalEntityId' => 'legalEntityId', 'name' => 'name', + 'nominee' => 'nominee', 'relationship' => 'relationship', 'settlorExemptionReason' => 'settlorExemptionReason', 'type' => 'type' @@ -195,6 +199,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'setJobTitle', 'legalEntityId' => 'setLegalEntityId', 'name' => 'setName', + 'nominee' => 'setNominee', 'relationship' => 'setRelationship', 'settlorExemptionReason' => 'setSettlorExemptionReason', 'type' => 'setType' @@ -211,6 +216,7 @@ public function isNullableSetToNull(string $property): bool 'jobTitle' => 'getJobTitle', 'legalEntityId' => 'getLegalEntityId', 'name' => 'getName', + 'nominee' => 'getNominee', 'relationship' => 'getRelationship', 'settlorExemptionReason' => 'getSettlorExemptionReason', 'type' => 'getType' @@ -324,6 +330,7 @@ public function __construct(array $data = null) $this->setIfExists('jobTitle', $data ?? [], null); $this->setIfExists('legalEntityId', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('nominee', $data ?? [], null); $this->setIfExists('relationship', $data ?? [], null); $this->setIfExists('settlorExemptionReason', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); @@ -506,6 +513,30 @@ public function setName($name) return $this; } + /** + * Gets nominee + * + * @return bool|null + */ + public function getNominee() + { + return $this->container['nominee']; + } + + /** + * Sets nominee + * + * @param bool|null $nominee Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand. + * + * @return self + */ + public function setNominee($nominee) + { + $this->container['nominee'] = $nominee; + + return $this; + } + /** * Gets relationship * diff --git a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php index d25ad19d..66642b91 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/Organization.php b/src/Adyen/Model/LegalEntityManagement/Organization.php index 8d7b9590..fd32d9ae 100644 --- a/src/Adyen/Model/LegalEntityManagement/Organization.php +++ b/src/Adyen/Model/LegalEntityManagement/Organization.php @@ -49,6 +49,7 @@ class Organization implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => 'string', 'doingBusinessAs' => 'string', 'email' => 'string', + 'financialReports' => '\Adyen\Model\LegalEntityManagement\FinancialReport[]', 'legalName' => 'string', 'phone' => '\Adyen\Model\LegalEntityManagement\PhoneNumber', 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', @@ -76,6 +77,7 @@ class Organization implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => null, 'doingBusinessAs' => null, 'email' => null, + 'financialReports' => null, 'legalName' => null, 'phone' => null, 'principalPlaceOfBusiness' => null, @@ -101,6 +103,7 @@ class Organization implements ModelInterface, ArrayAccess, \JsonSerializable 'description' => false, 'doingBusinessAs' => false, 'email' => false, + 'financialReports' => false, 'legalName' => false, 'phone' => false, 'principalPlaceOfBusiness' => false, @@ -206,6 +209,7 @@ public function isNullableSetToNull(string $property): bool 'description' => 'description', 'doingBusinessAs' => 'doingBusinessAs', 'email' => 'email', + 'financialReports' => 'financialReports', 'legalName' => 'legalName', 'phone' => 'phone', 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', @@ -231,6 +235,7 @@ public function isNullableSetToNull(string $property): bool 'description' => 'setDescription', 'doingBusinessAs' => 'setDoingBusinessAs', 'email' => 'setEmail', + 'financialReports' => 'setFinancialReports', 'legalName' => 'setLegalName', 'phone' => 'setPhone', 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', @@ -256,6 +261,7 @@ public function isNullableSetToNull(string $property): bool 'description' => 'getDescription', 'doingBusinessAs' => 'getDoingBusinessAs', 'email' => 'getEmail', + 'financialReports' => 'getFinancialReports', 'legalName' => 'getLegalName', 'phone' => 'getPhone', 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', @@ -368,6 +374,7 @@ public function __construct(array $data = null) $this->setIfExists('description', $data ?? [], null); $this->setIfExists('doingBusinessAs', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('financialReports', $data ?? [], null); $this->setIfExists('legalName', $data ?? [], null); $this->setIfExists('phone', $data ?? [], null); $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); @@ -568,6 +575,30 @@ public function setEmail($email) return $this; } + /** + * Gets financialReports + * + * @return \Adyen\Model\LegalEntityManagement\FinancialReport[]|null + */ + public function getFinancialReports() + { + return $this->container['financialReports']; + } + + /** + * Sets financialReports + * + * @param \Adyen\Model\LegalEntityManagement\FinancialReport[]|null $financialReports The financial report information of the organization. + * + * @return self + */ + public function setFinancialReports($financialReports) + { + $this->container['financialReports'] = $financialReports; + + return $this; + } + /** * Gets legalName * diff --git a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php index 9ec848f9..e810c983 100644 --- a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php +++ b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php @@ -47,6 +47,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'countryOfGoverningLaw' => 'string', 'dateOfIncorporation' => 'string', 'doingBusinessAs' => 'string', + 'financialReports' => '\Adyen\Model\LegalEntityManagement\FinancialReport[]', 'name' => 'string', 'principalPlaceOfBusiness' => '\Adyen\Model\LegalEntityManagement\Address', 'registeredAddress' => '\Adyen\Model\LegalEntityManagement\Address', @@ -68,6 +69,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'countryOfGoverningLaw' => null, 'dateOfIncorporation' => null, 'doingBusinessAs' => null, + 'financialReports' => null, 'name' => null, 'principalPlaceOfBusiness' => null, 'registeredAddress' => null, @@ -87,6 +89,7 @@ class SoleProprietorship implements ModelInterface, ArrayAccess, \JsonSerializab 'countryOfGoverningLaw' => false, 'dateOfIncorporation' => false, 'doingBusinessAs' => false, + 'financialReports' => false, 'name' => false, 'principalPlaceOfBusiness' => false, 'registeredAddress' => false, @@ -186,6 +189,7 @@ public function isNullableSetToNull(string $property): bool 'countryOfGoverningLaw' => 'countryOfGoverningLaw', 'dateOfIncorporation' => 'dateOfIncorporation', 'doingBusinessAs' => 'doingBusinessAs', + 'financialReports' => 'financialReports', 'name' => 'name', 'principalPlaceOfBusiness' => 'principalPlaceOfBusiness', 'registeredAddress' => 'registeredAddress', @@ -205,6 +209,7 @@ public function isNullableSetToNull(string $property): bool 'countryOfGoverningLaw' => 'setCountryOfGoverningLaw', 'dateOfIncorporation' => 'setDateOfIncorporation', 'doingBusinessAs' => 'setDoingBusinessAs', + 'financialReports' => 'setFinancialReports', 'name' => 'setName', 'principalPlaceOfBusiness' => 'setPrincipalPlaceOfBusiness', 'registeredAddress' => 'setRegisteredAddress', @@ -224,6 +229,7 @@ public function isNullableSetToNull(string $property): bool 'countryOfGoverningLaw' => 'getCountryOfGoverningLaw', 'dateOfIncorporation' => 'getDateOfIncorporation', 'doingBusinessAs' => 'getDoingBusinessAs', + 'financialReports' => 'getFinancialReports', 'name' => 'getName', 'principalPlaceOfBusiness' => 'getPrincipalPlaceOfBusiness', 'registeredAddress' => 'getRegisteredAddress', @@ -308,6 +314,7 @@ public function __construct(array $data = null) $this->setIfExists('countryOfGoverningLaw', $data ?? [], null); $this->setIfExists('dateOfIncorporation', $data ?? [], null); $this->setIfExists('doingBusinessAs', $data ?? [], null); + $this->setIfExists('financialReports', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('principalPlaceOfBusiness', $data ?? [], null); $this->setIfExists('registeredAddress', $data ?? [], null); @@ -450,6 +457,30 @@ public function setDoingBusinessAs($doingBusinessAs) return $this; } + /** + * Gets financialReports + * + * @return \Adyen\Model\LegalEntityManagement\FinancialReport[]|null + */ + public function getFinancialReports() + { + return $this->container['financialReports']; + } + + /** + * Sets financialReports + * + * @param \Adyen\Model\LegalEntityManagement\FinancialReport[]|null $financialReports The information from the financial report of the sole proprietorship. + * + * @return self + */ + public function setFinancialReports($financialReports) + { + $this->container['financialReports'] = $financialReports; + + return $this; + } + /** * Gets name * diff --git a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php index 201e411c..40bdd323 100644 --- a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php +++ b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php @@ -332,7 +332,7 @@ public function getAcquiringBusinessLineId() /** * Sets acquiringBusinessLineId * - * @param string|null $acquiringBusinessLineId The unique identifier of the business line that will be the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. + * @param string|null $acquiringBusinessLineId The unique identifier of the business line that is the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. * * @return self * @deprecated since Legal Entity Management API v3. "This field will be removed in v4." diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index cc5272bf..2ff0b7ef 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/ManagementWebhooks/ObjectSerializer.php b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php index 9c73e94b..a3626e45 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/NegativeBalanceWarningWebhooks/ObjectSerializer.php b/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php index 4d0e7887..a7a46550 100644 --- a/src/Adyen/Model/NegativeBalanceWarningWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/NegativeBalanceWarningWebhooks/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 8032f208..b6a5027e 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/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index 4e217461..ae7a870c 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/PaymentsApp/ObjectSerializer.php b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php index b900dc2b..56c51256 100644 --- a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php +++ b/src/Adyen/Model/PaymentsApp/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/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index ad1c991a..0d50f436 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/PosMobile/ObjectSerializer.php b/src/Adyen/Model/PosMobile/ObjectSerializer.php index ae87baef..ba0e91ce 100644 --- a/src/Adyen/Model/PosMobile/ObjectSerializer.php +++ b/src/Adyen/Model/PosMobile/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 7adbf8e5..3b2a857b 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 97f67038..a8a265ce 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 ed3372fb..93497545 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 6592bf84..9ccc6758 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/ObjectSerializer.php b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php index 01b25bf2..d05b2690 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/TransferReview.php b/src/Adyen/Model/TransferWebhooks/TransferReview.php index 0a5e192b..a655c0ed 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferReview.php +++ b/src/Adyen/Model/TransferWebhooks/TransferReview.php @@ -44,9 +44,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'numberOfApprovalsCompleted' => 'int', - 'numberOfApprovalsRequired' => 'int', - 'scaOnApproval' => 'string' + 'numberOfApprovalsRequired' => 'int' ]; /** @@ -57,9 +55,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'numberOfApprovalsCompleted' => 'int32', - 'numberOfApprovalsRequired' => 'int32', - 'scaOnApproval' => null + 'numberOfApprovalsRequired' => 'int32' ]; /** @@ -68,9 +64,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'numberOfApprovalsCompleted' => true, - 'numberOfApprovalsRequired' => true, - 'scaOnApproval' => false + 'numberOfApprovalsRequired' => true ]; /** @@ -159,9 +153,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'numberOfApprovalsCompleted' => 'numberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'numberOfApprovalsRequired', - 'scaOnApproval' => 'scaOnApproval' + 'numberOfApprovalsRequired' => 'numberOfApprovalsRequired' ]; /** @@ -170,9 +162,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'numberOfApprovalsCompleted' => 'setNumberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'setNumberOfApprovalsRequired', - 'scaOnApproval' => 'setScaOnApproval' + 'numberOfApprovalsRequired' => 'setNumberOfApprovalsRequired' ]; /** @@ -181,9 +171,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'numberOfApprovalsCompleted' => 'getNumberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'getNumberOfApprovalsRequired', - 'scaOnApproval' => 'getScaOnApproval' + 'numberOfApprovalsRequired' => 'getNumberOfApprovalsRequired' ]; /** @@ -227,23 +215,7 @@ public function getModelName() return self::$openAPIModelName; } - public const SCA_ON_APPROVAL_COMPLETED = 'completed'; - public const SCA_ON_APPROVAL_NOT_APPLICABLE = 'notApplicable'; - public const SCA_ON_APPROVAL_REQUIRED = 'required'; - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getScaOnApprovalAllowableValues() - { - return [ - self::SCA_ON_APPROVAL_COMPLETED, - self::SCA_ON_APPROVAL_NOT_APPLICABLE, - self::SCA_ON_APPROVAL_REQUIRED, - ]; - } /** * Associative array for storing property values * @@ -259,9 +231,7 @@ public function getScaOnApprovalAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('numberOfApprovalsCompleted', $data ?? [], null); $this->setIfExists('numberOfApprovalsRequired', $data ?? [], null); - $this->setIfExists('scaOnApproval', $data ?? [], null); } /** @@ -291,15 +261,6 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getScaOnApprovalAllowableValues(); - if (!is_null($this->container['scaOnApproval']) && !in_array($this->container['scaOnApproval'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'scaOnApproval', must be one of '%s'", - $this->container['scaOnApproval'], - implode("', '", $allowedValues) - ); - } - return $invalidProperties; } @@ -315,30 +276,6 @@ public function valid() } - /** - * Gets numberOfApprovalsCompleted - * - * @return int|null - */ - public function getNumberOfApprovalsCompleted() - { - return $this->container['numberOfApprovalsCompleted']; - } - - /** - * Sets numberOfApprovalsCompleted - * - * @param int|null $numberOfApprovalsCompleted Shows the number of approvals completed for the transfer. - * - * @return self - */ - public function setNumberOfApprovalsCompleted($numberOfApprovalsCompleted) - { - $this->container['numberOfApprovalsCompleted'] = $numberOfApprovalsCompleted; - - return $this; - } - /** * Gets numberOfApprovalsRequired * @@ -362,40 +299,6 @@ public function setNumberOfApprovalsRequired($numberOfApprovalsRequired) return $this; } - - /** - * Gets scaOnApproval - * - * @return string|null - */ - public function getScaOnApproval() - { - return $this->container['scaOnApproval']; - } - - /** - * Sets scaOnApproval - * - * @param string|null $scaOnApproval Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - * - * @return self - */ - public function setScaOnApproval($scaOnApproval) - { - $allowedValues = $this->getScaOnApprovalAllowableValues(); - if (!in_array($scaOnApproval, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'scaOnApproval', must be one of '%s'", - $scaOnApproval, - implode("', '", $allowedValues) - ) - ); - } - $this->container['scaOnApproval'] = $scaOnApproval; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Transfers/ObjectSerializer.php b/src/Adyen/Model/Transfers/ObjectSerializer.php index b9cbe36b..349b367b 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/TransferReview.php b/src/Adyen/Model/Transfers/TransferReview.php index 15bc6bfe..f07fed4b 100644 --- a/src/Adyen/Model/Transfers/TransferReview.php +++ b/src/Adyen/Model/Transfers/TransferReview.php @@ -44,9 +44,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'numberOfApprovalsCompleted' => 'int', - 'numberOfApprovalsRequired' => 'int', - 'scaOnApproval' => 'string' + 'numberOfApprovalsRequired' => 'int' ]; /** @@ -57,9 +55,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'numberOfApprovalsCompleted' => 'int32', - 'numberOfApprovalsRequired' => 'int32', - 'scaOnApproval' => null + 'numberOfApprovalsRequired' => 'int32' ]; /** @@ -68,9 +64,7 @@ class TransferReview implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'numberOfApprovalsCompleted' => true, - 'numberOfApprovalsRequired' => true, - 'scaOnApproval' => false + 'numberOfApprovalsRequired' => true ]; /** @@ -159,9 +153,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'numberOfApprovalsCompleted' => 'numberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'numberOfApprovalsRequired', - 'scaOnApproval' => 'scaOnApproval' + 'numberOfApprovalsRequired' => 'numberOfApprovalsRequired' ]; /** @@ -170,9 +162,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'numberOfApprovalsCompleted' => 'setNumberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'setNumberOfApprovalsRequired', - 'scaOnApproval' => 'setScaOnApproval' + 'numberOfApprovalsRequired' => 'setNumberOfApprovalsRequired' ]; /** @@ -181,9 +171,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'numberOfApprovalsCompleted' => 'getNumberOfApprovalsCompleted', - 'numberOfApprovalsRequired' => 'getNumberOfApprovalsRequired', - 'scaOnApproval' => 'getScaOnApproval' + 'numberOfApprovalsRequired' => 'getNumberOfApprovalsRequired' ]; /** @@ -227,23 +215,7 @@ public function getModelName() return self::$openAPIModelName; } - public const SCA_ON_APPROVAL_COMPLETED = 'completed'; - public const SCA_ON_APPROVAL_NOT_APPLICABLE = 'notApplicable'; - public const SCA_ON_APPROVAL_REQUIRED = 'required'; - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getScaOnApprovalAllowableValues() - { - return [ - self::SCA_ON_APPROVAL_COMPLETED, - self::SCA_ON_APPROVAL_NOT_APPLICABLE, - self::SCA_ON_APPROVAL_REQUIRED, - ]; - } /** * Associative array for storing property values * @@ -259,9 +231,7 @@ public function getScaOnApprovalAllowableValues() */ public function __construct(array $data = null) { - $this->setIfExists('numberOfApprovalsCompleted', $data ?? [], null); $this->setIfExists('numberOfApprovalsRequired', $data ?? [], null); - $this->setIfExists('scaOnApproval', $data ?? [], null); } /** @@ -291,15 +261,6 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getScaOnApprovalAllowableValues(); - if (!is_null($this->container['scaOnApproval']) && !in_array($this->container['scaOnApproval'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'scaOnApproval', must be one of '%s'", - $this->container['scaOnApproval'], - implode("', '", $allowedValues) - ); - } - return $invalidProperties; } @@ -315,30 +276,6 @@ public function valid() } - /** - * Gets numberOfApprovalsCompleted - * - * @return int|null - */ - public function getNumberOfApprovalsCompleted() - { - return $this->container['numberOfApprovalsCompleted']; - } - - /** - * Sets numberOfApprovalsCompleted - * - * @param int|null $numberOfApprovalsCompleted Shows the number of approvals completed for the transfer. - * - * @return self - */ - public function setNumberOfApprovalsCompleted($numberOfApprovalsCompleted) - { - $this->container['numberOfApprovalsCompleted'] = $numberOfApprovalsCompleted; - - return $this; - } - /** * Gets numberOfApprovalsRequired * @@ -362,40 +299,6 @@ public function setNumberOfApprovalsRequired($numberOfApprovalsRequired) return $this; } - - /** - * Gets scaOnApproval - * - * @return string|null - */ - public function getScaOnApproval() - { - return $this->container['scaOnApproval']; - } - - /** - * Sets scaOnApproval - * - * @param string|null $scaOnApproval Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **completed**, **notApplicable**. - * - * @return self - */ - public function setScaOnApproval($scaOnApproval) - { - $allowedValues = $this->getScaOnApprovalAllowableValues(); - if (!in_array($scaOnApproval, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'scaOnApproval', must be one of '%s'", - $scaOnApproval, - implode("', '", $allowedValues) - ) - ); - } - $this->container['scaOnApproval'] = $scaOnApproval; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index 7592a128..6bb797d7 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 c6114356..99bc3b6b 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/ManageSCADevicesApi.php b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php index df3b7a28..50ba91f1 100644 --- a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php +++ b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php @@ -60,13 +60,14 @@ public function completeRegistrationOfScaDevice(string $id, \Adyen\Model\Balance * * @param string $id * @param array|null $requestOptions ['queryParams' => ['paymentInstrumentId'=> string]] - + * @throws AdyenException */ public function deleteRegistrationOfScaDevice(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/registeredDevices/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php index ad86f120..2e704599 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 233c0918..72b257fd 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/Checkout/UtilityApi.php b/src/Adyen/Service/Checkout/UtilityApi.php index ff2192d2..a762185b 100644 --- a/src/Adyen/Service/Checkout/UtilityApi.php +++ b/src/Adyen/Service/Checkout/UtilityApi.php @@ -57,7 +57,7 @@ public function getApplePaySession(\Adyen\Model\Checkout\ApplePaySessionRequest /** * Create originKey values for domains * - * @deprecated since Adyen Checkout API v67. + * @deprecated since Adyen Checkout API v67. * @param \Adyen\Model\Checkout\UtilityRequest $utilityRequest * @param array|null $requestOptions * @return \Adyen\Model\Checkout\UtilityResponse diff --git a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php index f94b39ed..2551bbc5 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 d834bf55..9a6ea175 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/TaxEDeliveryConsentApi.php b/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php index b61d2b23..714550af 100644 --- a/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentApi.php @@ -60,12 +60,13 @@ public function checkStatusOfConsentForElectronicDeliveryOfTaxForms(string $id, * @param string $id * @param \Adyen\Model\LegalEntityManagement\SetTaxElectronicDeliveryConsentRequest $setTaxElectronicDeliveryConsentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function setConsentStatusForElectronicDeliveryOfTaxForms(string $id, \Adyen\Model\LegalEntityManagement\SetTaxElectronicDeliveryConsentRequest $setTaxElectronicDeliveryConsentRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/setTaxElectronicDeliveryConsent"); $this->requestHttp($endpoint, strtolower('POST'), (array) $setTaxElectronicDeliveryConsentRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php index 70c2e076..3bf8aeaa 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 c2557d39..60813025 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 1b40d271..ec0d042a 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 54005b35..65cdadc5 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 f8b7cc0b..4f955b8b 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 efff80b6..499e7895 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 8a7c5e73..8b6d78c7 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 cfe85a38..6caa292a 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 968e9c61..7113c9c3 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); + } /** diff --git a/src/Adyen/Service/Transfers/CapitalApi.php b/src/Adyen/Service/Transfers/CapitalApi.php index ecb1614f..967dc7f7 100644 --- a/src/Adyen/Service/Transfers/CapitalApi.php +++ b/src/Adyen/Service/Transfers/CapitalApi.php @@ -42,6 +42,7 @@ public function __construct(Client $client) /** * Get a capital account * + * @deprecated since Transfers API v4. "Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants) instead." * @param array|null $requestOptions ['queryParams' => ['counterpartyAccountHolderId'=> string]] * @return \Adyen\Model\Transfers\CapitalGrants * @throws AdyenException @@ -56,6 +57,7 @@ public function getCapitalAccount(array $requestOptions = null): \Adyen\Model\Tr /** * Get grant reference details * + * @deprecated since Transfers API v4. "Use the `/grants/{grantId}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants/(grantId)) instead." * @param string $id * @param array|null $requestOptions * @return \Adyen\Model\Transfers\CapitalGrant @@ -71,6 +73,7 @@ public function getGrantReferenceDetails(string $id, array $requestOptions = nul /** * Request a grant payout * + * @deprecated since Transfers API v4. "Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/post/grants) instead." * @param \Adyen\Model\Transfers\CapitalGrantInfo $capitalGrantInfo * @param array|null $requestOptions * @return \Adyen\Model\Transfers\CapitalGrant diff --git a/src/Adyen/Service/Transfers/TransfersApi.php b/src/Adyen/Service/Transfers/TransfersApi.php index 869e9d60..7b62cec3 100644 --- a/src/Adyen/Service/Transfers/TransfersApi.php +++ b/src/Adyen/Service/Transfers/TransfersApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param \Adyen\Model\Transfers\ApproveTransfersRequest $approveTransfersRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function approveInitiatedTransfers(\Adyen\Model\Transfers\ApproveTransfersRequest $approveTransfersRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/transfers/approve"; $this->requestHttp($endpoint, strtolower('POST'), (array) $approveTransfersRequest->jsonSerialize(), $requestOptions); + } /** @@ -58,13 +59,14 @@ public function approveInitiatedTransfers(\Adyen\Model\Transfers\ApproveTransfer * * @param \Adyen\Model\Transfers\CancelTransfersRequest $cancelTransfersRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function cancelInitiatedTransfers(\Adyen\Model\Transfers\CancelTransfersRequest $cancelTransfersRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/transfers/cancel"; $this->requestHttp($endpoint, strtolower('POST'), (array) $cancelTransfersRequest->jsonSerialize(), $requestOptions); + } /**