diff --git a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php index b3bee1376..984d6d6a1 100644 --- a/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php +++ b/src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php @@ -507,7 +507,7 @@ public function getSubMerchantSubSellerSubSellerNrName() /** * Sets subMerchantSubSellerSubSellerNrName * - * @param string|null $subMerchantSubSellerSubSellerNrName Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters + * @param string|null $subMerchantSubSellerSubSellerNrName Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters * * @return self */ diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 1367ffe1b..c9a8102b9 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -237,30 +237,6 @@ public static function deserialize($data, $class, $httpHeaders = null) } } - if ($class === '\SplFileObject') { - $data = Utils::streamFor($data); - - /** @var \Psr\Http\Message\StreamInterface $data */ - - // determine file name - if (is_array($httpHeaders) - && array_key_exists('Content-Disposition', $httpHeaders) - && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) - ) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); - } else { - $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); - } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); - } - fclose($file); - - return new \SplFileObject($filename, 'r'); - } - /** @psalm-suppress ParadoxicalCondition */ if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); diff --git a/src/Adyen/Model/Checkout/PaymentRefundRequest.php b/src/Adyen/Model/Checkout/PaymentRefundRequest.php index a927964da..e4e9cd240 100644 --- a/src/Adyen/Model/Checkout/PaymentRefundRequest.php +++ b/src/Adyen/Model/Checkout/PaymentRefundRequest.php @@ -43,6 +43,7 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ protected static $openAPITypes = [ 'amount' => '\Adyen\Model\Checkout\Amount', 'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo', + 'capturePspReference' => 'string', 'lineItems' => '\Adyen\Model\Checkout\LineItem[]', 'merchantAccount' => 'string', 'merchantRefundReason' => 'string', @@ -61,6 +62,7 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ protected static $openAPIFormats = [ 'amount' => null, 'applicationInfo' => null, + 'capturePspReference' => null, 'lineItems' => null, 'merchantAccount' => null, 'merchantRefundReason' => null, @@ -77,6 +79,7 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ protected static $openAPINullables = [ 'amount' => false, 'applicationInfo' => false, + 'capturePspReference' => false, 'lineItems' => false, 'merchantAccount' => false, 'merchantRefundReason' => true, @@ -173,6 +176,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'amount' => 'amount', 'applicationInfo' => 'applicationInfo', + 'capturePspReference' => 'capturePspReference', 'lineItems' => 'lineItems', 'merchantAccount' => 'merchantAccount', 'merchantRefundReason' => 'merchantRefundReason', @@ -189,6 +193,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'amount' => 'setAmount', 'applicationInfo' => 'setApplicationInfo', + 'capturePspReference' => 'setCapturePspReference', 'lineItems' => 'setLineItems', 'merchantAccount' => 'setMerchantAccount', 'merchantRefundReason' => 'setMerchantRefundReason', @@ -205,6 +210,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'amount' => 'getAmount', 'applicationInfo' => 'getApplicationInfo', + 'capturePspReference' => 'getCapturePspReference', 'lineItems' => 'getLineItems', 'merchantAccount' => 'getMerchantAccount', 'merchantRefundReason' => 'getMerchantRefundReason', @@ -292,6 +298,7 @@ public function __construct(?array $data = null) { $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('applicationInfo', $data ?? [], null); + $this->setIfExists('capturePspReference', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); $this->setIfExists('merchantAccount', $data ?? [], null); $this->setIfExists('merchantRefundReason', $data ?? [], null); @@ -405,6 +412,30 @@ public function setApplicationInfo($applicationInfo) return $this; } + /** + * Gets capturePspReference + * + * @return string|null + */ + public function getCapturePspReference() + { + return $this->container['capturePspReference']; + } + + /** + * Sets capturePspReference + * + * @param string|null $capturePspReference This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund. + * + * @return self + */ + public function setCapturePspReference($capturePspReference) + { + $this->container['capturePspReference'] = $capturePspReference; + + return $this; + } + /** * Gets lineItems * diff --git a/src/Adyen/Model/Checkout/PixRecurring.php b/src/Adyen/Model/Checkout/PixRecurring.php index ad97cf0ba..240c356b0 100644 --- a/src/Adyen/Model/Checkout/PixRecurring.php +++ b/src/Adyen/Model/Checkout/PixRecurring.php @@ -42,6 +42,7 @@ class PixRecurring implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'billingDate' => 'string', + 'businessDayOnly' => 'bool', 'endsAt' => 'string', 'frequency' => 'string', 'minAmount' => '\Adyen\Model\Checkout\Amount', @@ -61,6 +62,7 @@ class PixRecurring implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'billingDate' => null, + 'businessDayOnly' => null, 'endsAt' => null, 'frequency' => null, 'minAmount' => null, @@ -78,6 +80,7 @@ class PixRecurring implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPINullables = [ 'billingDate' => false, + 'businessDayOnly' => false, 'endsAt' => false, 'frequency' => false, 'minAmount' => false, @@ -175,6 +178,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'billingDate' => 'billingDate', + 'businessDayOnly' => 'businessDayOnly', 'endsAt' => 'endsAt', 'frequency' => 'frequency', 'minAmount' => 'minAmount', @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'billingDate' => 'setBillingDate', + 'businessDayOnly' => 'setBusinessDayOnly', 'endsAt' => 'setEndsAt', 'frequency' => 'setFrequency', 'minAmount' => 'setMinAmount', @@ -209,6 +214,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'billingDate' => 'getBillingDate', + 'businessDayOnly' => 'getBusinessDayOnly', 'endsAt' => 'getEndsAt', 'frequency' => 'getFrequency', 'minAmount' => 'getMinAmount', @@ -297,6 +303,7 @@ public function getFrequencyAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('billingDate', $data ?? [], null); + $this->setIfExists('businessDayOnly', $data ?? [], null); $this->setIfExists('endsAt', $data ?? [], null); $this->setIfExists('frequency', $data ?? [], null); $this->setIfExists('minAmount', $data ?? [], null); @@ -382,6 +389,30 @@ public function setBillingDate($billingDate) return $this; } + /** + * Gets businessDayOnly + * + * @return bool|null + */ + public function getBusinessDayOnly() + { + return $this->container['businessDayOnly']; + } + + /** + * Sets businessDayOnly + * + * @param bool|null $businessDayOnly Flag used to define whether liquidation can happen only on business days + * + * @return self + */ + public function setBusinessDayOnly($businessDayOnly) + { + $this->container['businessDayOnly'] = $businessDayOnly; + + return $this; + } + /** * Gets endsAt * diff --git a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php index e83a310a7..d1c36b1a2 100644 --- a/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php @@ -1384,7 +1384,7 @@ public function getFraudRiskLevel() /** * Sets fraudRiskLevel * - * @param string|null $fraudRiskLevel The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh > + * @param string|null $fraudRiskLevel The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh * * @return self */ diff --git a/src/Adyen/Model/Checkout/SubMerchantInfo.php b/src/Adyen/Model/Checkout/SubMerchantInfo.php index 30eea24fe..b23462269 100644 --- a/src/Adyen/Model/Checkout/SubMerchantInfo.php +++ b/src/Adyen/Model/Checkout/SubMerchantInfo.php @@ -469,7 +469,7 @@ public function getName() /** * Sets name * - * @param string|null $name Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters + * @param string|null $name Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters * * @return self */