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 May 15, 2024
1 parent e7669f9 commit e33a59c
Show file tree
Hide file tree
Showing 223 changed files with 18,900 additions and 2,624 deletions.
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
41 changes: 0 additions & 41 deletions src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
protected static $openAPITypes = [
'accountNumber' => 'string',
'bsbCode' => 'string',
'formFactor' => 'string',
'type' => 'string'
];

Expand All @@ -60,7 +59,6 @@ class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
protected static $openAPIFormats = [
'accountNumber' => null,
'bsbCode' => null,
'formFactor' => null,
'type' => null
];

Expand All @@ -72,7 +70,6 @@ class AULocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
protected static $openAPINullables = [
'accountNumber' => false,
'bsbCode' => false,
'formFactor' => true,
'type' => false
];

Expand Down Expand Up @@ -164,7 +161,6 @@ public function isNullableSetToNull(string $property): bool
protected static $attributeMap = [
'accountNumber' => 'accountNumber',
'bsbCode' => 'bsbCode',
'formFactor' => 'formFactor',
'type' => 'type'
];

Expand All @@ -176,7 +172,6 @@ public function isNullableSetToNull(string $property): bool
protected static $setters = [
'accountNumber' => 'setAccountNumber',
'bsbCode' => 'setBsbCode',
'formFactor' => 'setFormFactor',
'type' => 'setType'
];

Expand All @@ -188,7 +183,6 @@ public function isNullableSetToNull(string $property): bool
protected static $getters = [
'accountNumber' => 'getAccountNumber',
'bsbCode' => 'getBsbCode',
'formFactor' => 'getFormFactor',
'type' => 'getType'
];

Expand Down Expand Up @@ -263,7 +257,6 @@ public function __construct(array $data = null)
{
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('bsbCode', $data ?? [], null);
$this->setIfExists('formFactor', $data ?? [], null);
$this->setIfExists('type', $data ?? [], null);
}

Expand Down Expand Up @@ -381,40 +374,6 @@ public function setBsbCode($bsbCode)
return $this;
}

/**
* Gets formFactor
*
* @return string|null
*/
public function getFormFactor()
{
return $this->container['formFactor'];
}

/**
* Sets formFactor
*
* @param string|null $formFactor The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**.
*
* @return self
*/
public function setFormFactor($formFactor)
{
if (is_null($formFactor)) {
array_push($this->openAPINullablesSetToNull, 'formFactor');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('formFactor', $nullablesSetToNull);
if ($index !== false) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['formFactor'] = $formFactor;

return $this;
}

/**
* Gets type
*
Expand Down
8 changes: 3 additions & 5 deletions src/Adyen/Model/BalancePlatform/AccountHolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ public function getModelName()

public const STATUS_ACTIVE = 'active';
public const STATUS_CLOSED = 'closed';
public const STATUS_INACTIVE = 'inactive';
public const STATUS_SUSPENDED = 'suspended';

/**
Expand All @@ -302,7 +301,6 @@ public function getStatusAllowableValues()
return [
self::STATUS_ACTIVE,
self::STATUS_CLOSED,
self::STATUS_INACTIVE,
self::STATUS_SUSPENDED,
];
}
Expand Down Expand Up @@ -487,7 +485,7 @@ public function getDescription()
/**
* Sets description
*
* @param string|null $description Your description for the account holder, maximum 300 characters.
* @param string|null $description Your description for the account holder.
*
* @return self
*/
Expand Down Expand Up @@ -649,7 +647,7 @@ public function getReference()
/**
* Sets reference
*
* @param string|null $reference Your reference for the account holder, maximum 150 characters.
* @param string|null $reference Your reference for the account holder.
*
* @return self
*/
Expand All @@ -676,7 +674,7 @@ public function getStatus()
/**
* Sets status
*
* @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.
* @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.
*
* @return self
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Adyen/Model/BalancePlatform/AccountHolderInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ public function getDescription()
/**
* Sets description
*
* @param string|null $description Your description for the account holder, maximum 300 characters.
* @param string|null $description Your description for the account holder.
*
* @return self
*/
Expand Down Expand Up @@ -537,7 +537,7 @@ public function getReference()
/**
* Sets reference
*
* @param string|null $reference Your reference for the account holder, maximum 150 characters.
* @param string|null $reference Your reference for the account holder.
*
* @return self
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ public function getModelName()

public const STATUS_ACTIVE = 'active';
public const STATUS_CLOSED = 'closed';
public const STATUS_INACTIVE = 'inactive';
public const STATUS_SUSPENDED = 'suspended';

/**
Expand All @@ -290,7 +289,6 @@ public function getStatusAllowableValues()
return [
self::STATUS_ACTIVE,
self::STATUS_CLOSED,
self::STATUS_INACTIVE,
self::STATUS_SUSPENDED,
];
}
Expand Down Expand Up @@ -467,7 +465,7 @@ public function getDescription()
/**
* Sets description
*
* @param string|null $description Your description for the account holder, maximum 300 characters.
* @param string|null $description Your description for the account holder.
*
* @return self
*/
Expand Down Expand Up @@ -575,7 +573,7 @@ public function getReference()
/**
* Sets reference
*
* @param string|null $reference Your reference for the account holder, maximum 150 characters.
* @param string|null $reference Your reference for the account holder.
*
* @return self
*/
Expand All @@ -602,7 +600,7 @@ public function getStatus()
/**
* Sets status
*
* @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.
* @param string|null $status The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.
*
* @return self
*/
Expand Down
39 changes: 16 additions & 23 deletions src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
'accountNumber' => 'string',
'bankCode' => 'string',
'branchNumber' => 'string',
'formFactor' => 'string',
'ispb' => 'string',
'type' => 'string'
];

Expand All @@ -62,7 +62,7 @@ class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
'accountNumber' => null,
'bankCode' => null,
'branchNumber' => null,
'formFactor' => null,
'ispb' => null,
'type' => null
];

Expand All @@ -75,7 +75,7 @@ class BRLocalAccountIdentification implements ModelInterface, ArrayAccess, \Json
'accountNumber' => false,
'bankCode' => false,
'branchNumber' => false,
'formFactor' => true,
'ispb' => false,
'type' => false
];

Expand Down Expand Up @@ -168,7 +168,7 @@ public function isNullableSetToNull(string $property): bool
'accountNumber' => 'accountNumber',
'bankCode' => 'bankCode',
'branchNumber' => 'branchNumber',
'formFactor' => 'formFactor',
'ispb' => 'ispb',
'type' => 'type'
];

Expand All @@ -181,7 +181,7 @@ public function isNullableSetToNull(string $property): bool
'accountNumber' => 'setAccountNumber',
'bankCode' => 'setBankCode',
'branchNumber' => 'setBranchNumber',
'formFactor' => 'setFormFactor',
'ispb' => 'setIspb',
'type' => 'setType'
];

Expand All @@ -194,7 +194,7 @@ public function isNullableSetToNull(string $property): bool
'accountNumber' => 'getAccountNumber',
'bankCode' => 'getBankCode',
'branchNumber' => 'getBranchNumber',
'formFactor' => 'getFormFactor',
'ispb' => 'getIspb',
'type' => 'getType'
];

Expand Down Expand Up @@ -270,7 +270,7 @@ public function __construct(array $data = null)
$this->setIfExists('accountNumber', $data ?? [], null);
$this->setIfExists('bankCode', $data ?? [], null);
$this->setIfExists('branchNumber', $data ?? [], null);
$this->setIfExists('formFactor', $data ?? [], null);
$this->setIfExists('ispb', $data ?? [], null);
$this->setIfExists('type', $data ?? [], null);
}

Expand Down Expand Up @@ -419,35 +419,28 @@ public function setBranchNumber($branchNumber)
}

/**
* Gets formFactor
* Gets ispb
*
* @return string|null
*/
public function getFormFactor()
public function getIspb()
{
return $this->container['formFactor'];
return $this->container['ispb'];
}

/**
* Sets formFactor
* Sets ispb
*
* @param string|null $formFactor The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**.
* @param string|null $ispb The 8-digit ISPB, with leading zeros.
*
* @return self
*/
public function setFormFactor($formFactor)
public function setIspb($ispb)
{
if (is_null($formFactor)) {
array_push($this->openAPINullablesSetToNull, 'formFactor');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('formFactor', $nullablesSetToNull);
if ($index !== false) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
if (is_null($ispb)) {
throw new \InvalidArgumentException('non-nullable ispb cannot be null');
}
$this->container['formFactor'] = $formFactor;
$this->container['ispb'] = $ispb;

return $this;
}
Expand Down
Loading

0 comments on commit e33a59c

Please sign in to comment.