Skip to content

Commit

Permalink
[reformat][adyen-sdk-automation] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
AdyenAutomationBot committed Feb 5, 2025
1 parent 7fe2146 commit 17f7997
Show file tree
Hide file tree
Showing 61 changed files with 843 additions and 411 deletions.
6 changes: 5 additions & 1 deletion src/Adyen/Model/AcsWebhooks/ChallengeInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,15 @@ 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';
public const CHALLENGE_CANCEL__04 = '04';
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';

Expand All @@ -263,13 +265,15 @@ public function getModelName()
public function getChallengeCancelAllowableValues()
{
return [
self::CHALLENGE_CANCEL__00,
self::CHALLENGE_CANCEL__01,
self::CHALLENGE_CANCEL__02,
self::CHALLENGE_CANCEL__03,
self::CHALLENGE_CANCEL__04,
self::CHALLENGE_CANCEL__05,
self::CHALLENGE_CANCEL__06,
self::CHALLENGE_CANCEL__07,
self::CHALLENGE_CANCEL__08,
];
}
/**
Expand Down Expand Up @@ -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
*/
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/AcsWebhooks/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
) {
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/BalanceControl/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
) {
Expand Down
8 changes: 4 additions & 4 deletions src/Adyen/Model/BalancePlatform/CapabilitySettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function getAmountPerIndustry()
/**
* Sets amountPerIndustry
*
* @param array<string,\Adyen\Model\BalancePlatform\Amount>|null $amountPerIndustry
* @param array<string,\Adyen\Model\BalancePlatform\Amount>|null $amountPerIndustry
*
* @return self
*/
Expand All @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers()
/**
* Sets authorizedCardUsers
*
* @param bool|null $authorizedCardUsers
* @param bool|null $authorizedCardUsers
*
* @return self
*/
Expand All @@ -406,7 +406,7 @@ public function getFundingSource()
/**
* Sets fundingSource
*
* @param string[]|null $fundingSource
* @param string[]|null $fundingSource
*
* @return self
*/
Expand Down Expand Up @@ -439,7 +439,7 @@ public function getInterval()
/**
* Sets interval
*
* @param string|null $interval
* @param string|null $interval
*
* @return self
*/
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/BalancePlatform/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
) {
Expand Down
43 changes: 6 additions & 37 deletions src/Adyen/Model/BinLookup/CostEstimateResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
];

/**
Expand All @@ -62,8 +61,7 @@ class CostEstimateResponse implements ModelInterface, ArrayAccess, \JsonSerializ
'cardBin' => null,
'costEstimateAmount' => null,
'costEstimateReference' => null,
'resultCode' => null,
'surchargeType' => null
'resultCode' => null
];

/**
Expand All @@ -75,8 +73,7 @@ class CostEstimateResponse implements ModelInterface, ArrayAccess, \JsonSerializ
'cardBin' => false,
'costEstimateAmount' => false,
'costEstimateReference' => false,
'resultCode' => false,
'surchargeType' => false
'resultCode' => false
];

/**
Expand Down Expand Up @@ -168,8 +165,7 @@ public function isNullableSetToNull(string $property): bool
'cardBin' => 'cardBin',
'costEstimateAmount' => 'costEstimateAmount',
'costEstimateReference' => 'costEstimateReference',
'resultCode' => 'resultCode',
'surchargeType' => 'surchargeType'
'resultCode' => 'resultCode'
];

/**
Expand All @@ -181,8 +177,7 @@ public function isNullableSetToNull(string $property): bool
'cardBin' => 'setCardBin',
'costEstimateAmount' => 'setCostEstimateAmount',
'costEstimateReference' => 'setCostEstimateReference',
'resultCode' => 'setResultCode',
'surchargeType' => 'setSurchargeType'
'resultCode' => 'setResultCode'
];

/**
Expand All @@ -194,8 +189,7 @@ public function isNullableSetToNull(string $property): bool
'cardBin' => 'getCardBin',
'costEstimateAmount' => 'getCostEstimateAmount',
'costEstimateReference' => 'getCostEstimateReference',
'resultCode' => 'getResultCode',
'surchargeType' => 'getSurchargeType'
'resultCode' => 'getResultCode'
];

/**
Expand Down Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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.
*
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/BinLookup/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
) {
Expand Down
4 changes: 2 additions & 2 deletions src/Adyen/Model/Checkout/CheckoutPaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,7 @@ public function getShopperEmail()
/**
* Sets shopperEmail
*
* @param string $shopperEmail
* @param string $shopperEmail
*
* @return self
*/
Expand All @@ -2023,7 +2023,7 @@ public function getTelephoneNumber()
/**
* Sets telephoneNumber
*
* @param string $telephoneNumber
* @param string $telephoneNumber
*
* @return self
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Adyen/Model/Checkout/MbwayDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public function getShopperEmail()
/**
* Sets shopperEmail
*
* @param string $shopperEmail
* @param string $shopperEmail
*
* @return self
*/
Expand All @@ -385,7 +385,7 @@ public function getTelephoneNumber()
/**
* Sets telephoneNumber
*
* @param string $telephoneNumber
* @param string $telephoneNumber
*
* @return self
*/
Expand Down
9 changes: 4 additions & 5 deletions src/Adyen/Model/Checkout/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
) {
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Checkout/VippsDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public function getTelephoneNumber()
/**
* Sets telephoneNumber
*
* @param string $telephoneNumber
* @param string $telephoneNumber
*
* @return self
*/
Expand Down
Loading

0 comments on commit 17f7997

Please sign in to comment.