Skip to content

Commit 25ca422

Browse files
authored
Merge pull request #774 from Adyen/checkout-changes-may2025
Genereate Checkout changes: add capturePspReference and businessDayOnly
2 parents de633ff + adc9000 commit 25ca422

File tree

6 files changed

+65
-27
lines changed

6 files changed

+65
-27
lines changed

src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ public function getSubMerchantSubSellerSubSellerNrName()
507507
/**
508508
* Sets subMerchantSubSellerSubSellerNrName
509509
*
510-
* @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
510+
* @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
511511
*
512512
* @return self
513513
*/

src/Adyen/Model/Checkout/ObjectSerializer.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -237,30 +237,6 @@ public static function deserialize($data, $class, $httpHeaders = null)
237237
}
238238
}
239239

240-
if ($class === '\SplFileObject') {
241-
$data = Utils::streamFor($data);
242-
243-
/** @var \Psr\Http\Message\StreamInterface $data */
244-
245-
// determine file name
246-
if (is_array($httpHeaders)
247-
&& array_key_exists('Content-Disposition', $httpHeaders)
248-
&& preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)
249-
) {
250-
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]);
251-
} else {
252-
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
253-
}
254-
255-
$file = fopen($filename, 'w');
256-
while ($chunk = $data->read(200)) {
257-
fwrite($file, $chunk);
258-
}
259-
fclose($file);
260-
261-
return new \SplFileObject($filename, 'r');
262-
}
263-
264240
/** @psalm-suppress ParadoxicalCondition */
265241
if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {
266242
settype($data, $class);

src/Adyen/Model/Checkout/PaymentRefundRequest.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ
4343
protected static $openAPITypes = [
4444
'amount' => '\Adyen\Model\Checkout\Amount',
4545
'applicationInfo' => '\Adyen\Model\Checkout\ApplicationInfo',
46+
'capturePspReference' => 'string',
4647
'lineItems' => '\Adyen\Model\Checkout\LineItem[]',
4748
'merchantAccount' => 'string',
4849
'merchantRefundReason' => 'string',
@@ -61,6 +62,7 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ
6162
protected static $openAPIFormats = [
6263
'amount' => null,
6364
'applicationInfo' => null,
65+
'capturePspReference' => null,
6466
'lineItems' => null,
6567
'merchantAccount' => null,
6668
'merchantRefundReason' => null,
@@ -77,6 +79,7 @@ class PaymentRefundRequest implements ModelInterface, ArrayAccess, \JsonSerializ
7779
protected static $openAPINullables = [
7880
'amount' => false,
7981
'applicationInfo' => false,
82+
'capturePspReference' => false,
8083
'lineItems' => false,
8184
'merchantAccount' => false,
8285
'merchantRefundReason' => true,
@@ -173,6 +176,7 @@ public function isNullableSetToNull(string $property): bool
173176
protected static $attributeMap = [
174177
'amount' => 'amount',
175178
'applicationInfo' => 'applicationInfo',
179+
'capturePspReference' => 'capturePspReference',
176180
'lineItems' => 'lineItems',
177181
'merchantAccount' => 'merchantAccount',
178182
'merchantRefundReason' => 'merchantRefundReason',
@@ -189,6 +193,7 @@ public function isNullableSetToNull(string $property): bool
189193
protected static $setters = [
190194
'amount' => 'setAmount',
191195
'applicationInfo' => 'setApplicationInfo',
196+
'capturePspReference' => 'setCapturePspReference',
192197
'lineItems' => 'setLineItems',
193198
'merchantAccount' => 'setMerchantAccount',
194199
'merchantRefundReason' => 'setMerchantRefundReason',
@@ -205,6 +210,7 @@ public function isNullableSetToNull(string $property): bool
205210
protected static $getters = [
206211
'amount' => 'getAmount',
207212
'applicationInfo' => 'getApplicationInfo',
213+
'capturePspReference' => 'getCapturePspReference',
208214
'lineItems' => 'getLineItems',
209215
'merchantAccount' => 'getMerchantAccount',
210216
'merchantRefundReason' => 'getMerchantRefundReason',
@@ -292,6 +298,7 @@ public function __construct(?array $data = null)
292298
{
293299
$this->setIfExists('amount', $data ?? [], null);
294300
$this->setIfExists('applicationInfo', $data ?? [], null);
301+
$this->setIfExists('capturePspReference', $data ?? [], null);
295302
$this->setIfExists('lineItems', $data ?? [], null);
296303
$this->setIfExists('merchantAccount', $data ?? [], null);
297304
$this->setIfExists('merchantRefundReason', $data ?? [], null);
@@ -405,6 +412,30 @@ public function setApplicationInfo($applicationInfo)
405412
return $this;
406413
}
407414

415+
/**
416+
* Gets capturePspReference
417+
*
418+
* @return string|null
419+
*/
420+
public function getCapturePspReference()
421+
{
422+
return $this->container['capturePspReference'];
423+
}
424+
425+
/**
426+
* Sets capturePspReference
427+
*
428+
* @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.
429+
*
430+
* @return self
431+
*/
432+
public function setCapturePspReference($capturePspReference)
433+
{
434+
$this->container['capturePspReference'] = $capturePspReference;
435+
436+
return $this;
437+
}
438+
408439
/**
409440
* Gets lineItems
410441
*

src/Adyen/Model/Checkout/PixRecurring.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class PixRecurring implements ModelInterface, ArrayAccess, \JsonSerializable
4242
*/
4343
protected static $openAPITypes = [
4444
'billingDate' => 'string',
45+
'businessDayOnly' => 'bool',
4546
'endsAt' => 'string',
4647
'frequency' => 'string',
4748
'minAmount' => '\Adyen\Model\Checkout\Amount',
@@ -61,6 +62,7 @@ class PixRecurring implements ModelInterface, ArrayAccess, \JsonSerializable
6162
*/
6263
protected static $openAPIFormats = [
6364
'billingDate' => null,
65+
'businessDayOnly' => null,
6466
'endsAt' => null,
6567
'frequency' => null,
6668
'minAmount' => null,
@@ -78,6 +80,7 @@ class PixRecurring implements ModelInterface, ArrayAccess, \JsonSerializable
7880
*/
7981
protected static $openAPINullables = [
8082
'billingDate' => false,
83+
'businessDayOnly' => false,
8184
'endsAt' => false,
8285
'frequency' => false,
8386
'minAmount' => false,
@@ -175,6 +178,7 @@ public function isNullableSetToNull(string $property): bool
175178
*/
176179
protected static $attributeMap = [
177180
'billingDate' => 'billingDate',
181+
'businessDayOnly' => 'businessDayOnly',
178182
'endsAt' => 'endsAt',
179183
'frequency' => 'frequency',
180184
'minAmount' => 'minAmount',
@@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool
192196
*/
193197
protected static $setters = [
194198
'billingDate' => 'setBillingDate',
199+
'businessDayOnly' => 'setBusinessDayOnly',
195200
'endsAt' => 'setEndsAt',
196201
'frequency' => 'setFrequency',
197202
'minAmount' => 'setMinAmount',
@@ -209,6 +214,7 @@ public function isNullableSetToNull(string $property): bool
209214
*/
210215
protected static $getters = [
211216
'billingDate' => 'getBillingDate',
217+
'businessDayOnly' => 'getBusinessDayOnly',
212218
'endsAt' => 'getEndsAt',
213219
'frequency' => 'getFrequency',
214220
'minAmount' => 'getMinAmount',
@@ -297,6 +303,7 @@ public function getFrequencyAllowableValues()
297303
public function __construct(?array $data = null)
298304
{
299305
$this->setIfExists('billingDate', $data ?? [], null);
306+
$this->setIfExists('businessDayOnly', $data ?? [], null);
300307
$this->setIfExists('endsAt', $data ?? [], null);
301308
$this->setIfExists('frequency', $data ?? [], null);
302309
$this->setIfExists('minAmount', $data ?? [], null);
@@ -382,6 +389,30 @@ public function setBillingDate($billingDate)
382389
return $this;
383390
}
384391

392+
/**
393+
* Gets businessDayOnly
394+
*
395+
* @return bool|null
396+
*/
397+
public function getBusinessDayOnly()
398+
{
399+
return $this->container['businessDayOnly'];
400+
}
401+
402+
/**
403+
* Sets businessDayOnly
404+
*
405+
* @param bool|null $businessDayOnly Flag used to define whether liquidation can happen only on business days
406+
*
407+
* @return self
408+
*/
409+
public function setBusinessDayOnly($businessDayOnly)
410+
{
411+
$this->container['businessDayOnly'] = $businessDayOnly;
412+
413+
return $this;
414+
}
415+
385416
/**
386417
* Gets endsAt
387418
*

src/Adyen/Model/Checkout/ResponseAdditionalDataCommon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ public function getFraudRiskLevel()
13841384
/**
13851385
* Sets fraudRiskLevel
13861386
*
1387-
* @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 >
1387+
* @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
13881388
*
13891389
* @return self
13901390
*/

src/Adyen/Model/Checkout/SubMerchantInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ public function getName()
469469
/**
470470
* Sets name
471471
*
472-
* @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
472+
* @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
473473
*
474474
* @return self
475475
*/

0 commit comments

Comments
 (0)