Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/AdditionalDataSubMerchant.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
24 changes: 0 additions & 24 deletions src/Adyen/Model/Checkout/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
31 changes: 31 additions & 0 deletions src/Adyen/Model/Checkout/PaymentRefundRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
*
Expand Down
31 changes: 31 additions & 0 deletions src/Adyen/Model/Checkout/PixRecurring.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -61,6 +62,7 @@ class PixRecurring implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPIFormats = [
'billingDate' => null,
'businessDayOnly' => null,
'endsAt' => null,
'frequency' => null,
'minAmount' => null,
Expand All @@ -78,6 +80,7 @@ class PixRecurring implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPINullables = [
'billingDate' => false,
'businessDayOnly' => false,
'endsAt' => false,
'frequency' => false,
'minAmount' => false,
Expand Down Expand Up @@ -175,6 +178,7 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $attributeMap = [
'billingDate' => 'billingDate',
'businessDayOnly' => 'businessDayOnly',
'endsAt' => 'endsAt',
'frequency' => 'frequency',
'minAmount' => 'minAmount',
Expand All @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $setters = [
'billingDate' => 'setBillingDate',
'businessDayOnly' => 'setBusinessDayOnly',
'endsAt' => 'setEndsAt',
'frequency' => 'setFrequency',
'minAmount' => 'setMinAmount',
Expand All @@ -209,6 +214,7 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $getters = [
'billingDate' => 'getBillingDate',
'businessDayOnly' => 'getBusinessDayOnly',
'endsAt' => 'getEndsAt',
'frequency' => 'getFrequency',
'minAmount' => 'getMinAmount',
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/SubMerchantInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down