Skip to content

Commit 7a16e72

Browse files
[adyen-sdk-automation] automated changes
1 parent f444e75 commit 7a16e72

File tree

111 files changed

+7790
-507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+7790
-507
lines changed

src/Adyen/Model/AcsWebhooks/ObjectSerializer.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8282
}
8383
}
8484
} else {
85-
foreach ($data as $property => $value) {
85+
foreach($data as $property => $value) {
8686
$values[$property] = self::sanitizeForSerialization($value);
8787
}
8888
}
@@ -118,9 +118,7 @@ public static function sanitizeFilename($filename)
118118
*/
119119
public static function sanitizeTimestamp($timestamp)
120120
{
121-
if (!is_string($timestamp)) {
122-
return $timestamp;
123-
}
121+
if (!is_string($timestamp)) return $timestamp;
124122

125123
return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp);
126124
}

src/Adyen/Model/BalanceWebhooks/BalanceAccountBalanceNotificationRequest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
namespace Adyen\Model\BalanceWebhooks;
1717

18-
use \ArrayAccess;
18+
use ArrayAccess;
1919
use Adyen\Model\BalanceWebhooks\ObjectSerializer;
2020

2121
/**
2222
* BalanceAccountBalanceNotificationRequest Class Doc Comment
2323
*
2424
* @package Adyen
25-
* @implements \ArrayAccess<string, mixed>
25+
* @implements ArrayAccess<string, mixed>
2626
*/
2727
class BalanceAccountBalanceNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable
2828
{
@@ -417,11 +417,11 @@ public function setType($type)
417417
{
418418
$allowedValues = $this->getTypeAllowableValues();
419419
if (!in_array($type, $allowedValues, true)) {
420-
throw new \InvalidArgumentException(
420+
error_log(
421421
sprintf(
422-
"Invalid value '%s' for 'type', must be one of '%s'",
422+
"type: unexpected enum value '%s' - Supported values are [%s]",
423423
$type,
424-
implode("', '", $allowedValues)
424+
implode(', ', $allowedValues)
425425
)
426426
);
427427
}

src/Adyen/Model/BalanceWebhooks/BalanceNotificationData.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
namespace Adyen\Model\BalanceWebhooks;
1717

18-
use \ArrayAccess;
18+
use ArrayAccess;
1919
use Adyen\Model\BalanceWebhooks\ObjectSerializer;
2020

2121
/**
2222
* BalanceNotificationData Class Doc Comment
2323
*
2424
* @package Adyen
25-
* @implements \ArrayAccess<string, mixed>
25+
* @implements ArrayAccess<string, mixed>
2626
*/
2727
class BalanceNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable
2828
{
@@ -412,7 +412,7 @@ public function getCreationDate()
412412
/**
413413
* Sets creationDate
414414
*
415-
* @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.
415+
* @param \DateTime|null $creationDate The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**.
416416
*
417417
* @return self
418418
*/
@@ -436,7 +436,7 @@ public function getCurrency()
436436
/**
437437
* Sets currency
438438
*
439-
* @param string $currency TThe three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
439+
* @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
440440
*
441441
* @return self
442442
*/

src/Adyen/Model/BalanceWebhooks/BalancePlatformNotificationResponse.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
namespace Adyen\Model\BalanceWebhooks;
1717

18-
use \ArrayAccess;
18+
use ArrayAccess;
1919
use Adyen\Model\BalanceWebhooks\ObjectSerializer;
2020

2121
/**
2222
* BalancePlatformNotificationResponse Class Doc Comment
2323
*
2424
* @package Adyen
25-
* @implements \ArrayAccess<string, mixed>
25+
* @implements ArrayAccess<string, mixed>
2626
*/
2727
class BalancePlatformNotificationResponse implements ModelInterface, ArrayAccess, \JsonSerializable
2828
{
@@ -286,7 +286,7 @@ public function getNotificationResponse()
286286
/**
287287
* Sets notificationResponse
288288
*
289-
* @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).
289+
* @param string|null $notificationResponse Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).
290290
*
291291
* @return self
292292
*/

src/Adyen/Model/BalanceWebhooks/Balances.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
namespace Adyen\Model\BalanceWebhooks;
1717

18-
use \ArrayAccess;
18+
use ArrayAccess;
1919
use Adyen\Model\BalanceWebhooks\ObjectSerializer;
2020

2121
/**
2222
* Balances Class Doc Comment
2323
*
2424
* @package Adyen
25-
* @implements \ArrayAccess<string, mixed>
25+
* @implements ArrayAccess<string, mixed>
2626
*/
2727
class Balances implements ModelInterface, ArrayAccess, \JsonSerializable
2828
{

src/Adyen/Model/BalanceWebhooks/ObjectSerializer.php

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n
8282
}
8383
}
8484
} else {
85-
foreach ($data as $property => $value) {
85+
foreach($data as $property => $value) {
8686
$values[$property] = self::sanitizeForSerialization($value);
8787
}
8888
}
@@ -118,9 +118,7 @@ public static function sanitizeFilename($filename)
118118
*/
119119
public static function sanitizeTimestamp($timestamp)
120120
{
121-
if (!is_string($timestamp)) {
122-
return $timestamp;
123-
}
121+
if (!is_string($timestamp)) return $timestamp;
124122

125123
return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp);
126124
}
@@ -237,30 +235,6 @@ public static function deserialize($data, $class, $httpHeaders = null)
237235
}
238236
}
239237

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-
264238
/** @psalm-suppress ParadoxicalCondition */
265239
if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {
266240
settype($data, $class);

src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
namespace Adyen\Model\ConfigurationWebhooks;
1717

18-
use \ArrayAccess;
18+
use ArrayAccess;
1919
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;
2020

2121
/**
2222
* AccountHolder Class Doc Comment
2323
*
2424
* @package Adyen
25-
* @implements \ArrayAccess<string, mixed>
25+
* @implements ArrayAccess<string, mixed>
2626
*/
2727
class AccountHolder implements ModelInterface, ArrayAccess, \JsonSerializable
2828
{
@@ -651,11 +651,11 @@ public function setStatus($status)
651651
{
652652
$allowedValues = $this->getStatusAllowableValues();
653653
if (!in_array($status, $allowedValues, true)) {
654-
throw new \InvalidArgumentException(
654+
error_log(
655655
sprintf(
656-
"Invalid value '%s' for 'status', must be one of '%s'",
656+
"status: unexpected enum value '%s' - Supported values are [%s]",
657657
$status,
658-
implode("', '", $allowedValues)
658+
implode(', ', $allowedValues)
659659
)
660660
);
661661
}

src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
namespace Adyen\Model\ConfigurationWebhooks;
1717

18-
use \ArrayAccess;
18+
use ArrayAccess;
1919
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;
2020

2121
/**
2222
* AccountHolderCapability Class Doc Comment
2323
*
2424
* @package Adyen
25-
* @implements \ArrayAccess<string, mixed>
25+
* @implements ArrayAccess<string, mixed>
2626
*/
2727
class AccountHolderCapability implements ModelInterface, ArrayAccess, \JsonSerializable
2828
{
@@ -462,11 +462,11 @@ public function setAllowedLevel($allowedLevel)
462462
{
463463
$allowedValues = $this->getAllowedLevelAllowableValues();
464464
if (!in_array($allowedLevel, $allowedValues, true)) {
465-
throw new \InvalidArgumentException(
465+
error_log(
466466
sprintf(
467-
"Invalid value '%s' for 'allowedLevel', must be one of '%s'",
467+
"allowedLevel: unexpected enum value '%s' - Supported values are [%s]",
468468
$allowedLevel,
469-
implode("', '", $allowedValues)
469+
implode(', ', $allowedValues)
470470
)
471471
);
472472
}
@@ -592,11 +592,11 @@ public function setRequestedLevel($requestedLevel)
592592
{
593593
$allowedValues = $this->getRequestedLevelAllowableValues();
594594
if (!in_array($requestedLevel, $allowedValues, true)) {
595-
throw new \InvalidArgumentException(
595+
error_log(
596596
sprintf(
597-
"Invalid value '%s' for 'requestedLevel', must be one of '%s'",
597+
"requestedLevel: unexpected enum value '%s' - Supported values are [%s]",
598598
$requestedLevel,
599-
implode("', '", $allowedValues)
599+
implode(', ', $allowedValues)
600600
)
601601
);
602602
}
@@ -674,11 +674,11 @@ public function setVerificationStatus($verificationStatus)
674674
{
675675
$allowedValues = $this->getVerificationStatusAllowableValues();
676676
if (!in_array($verificationStatus, $allowedValues, true)) {
677-
throw new \InvalidArgumentException(
677+
error_log(
678678
sprintf(
679-
"Invalid value '%s' for 'verificationStatus', must be one of '%s'",
679+
"verificationStatus: unexpected enum value '%s' - Supported values are [%s]",
680680
$verificationStatus,
681-
implode("', '", $allowedValues)
681+
implode(', ', $allowedValues)
682682
)
683683
);
684684
}

src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
namespace Adyen\Model\ConfigurationWebhooks;
1717

18-
use \ArrayAccess;
18+
use ArrayAccess;
1919
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;
2020

2121
/**
2222
* AccountHolderNotificationData Class Doc Comment
2323
*
2424
* @package Adyen
25-
* @implements \ArrayAccess<string, mixed>
25+
* @implements ArrayAccess<string, mixed>
2626
*/
2727
class AccountHolderNotificationData implements ModelInterface, ArrayAccess, \JsonSerializable
2828
{

src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
namespace Adyen\Model\ConfigurationWebhooks;
1717

18-
use \ArrayAccess;
18+
use ArrayAccess;
1919
use Adyen\Model\ConfigurationWebhooks\ObjectSerializer;
2020

2121
/**
2222
* AccountHolderNotificationRequest Class Doc Comment
2323
*
2424
* @package Adyen
25-
* @implements \ArrayAccess<string, mixed>
25+
* @implements ArrayAccess<string, mixed>
2626
*/
2727
class AccountHolderNotificationRequest implements ModelInterface, ArrayAccess, \JsonSerializable
2828
{
@@ -419,11 +419,11 @@ public function setType($type)
419419
{
420420
$allowedValues = $this->getTypeAllowableValues();
421421
if (!in_array($type, $allowedValues, true)) {
422-
throw new \InvalidArgumentException(
422+
error_log(
423423
sprintf(
424-
"Invalid value '%s' for 'type', must be one of '%s'",
424+
"type: unexpected enum value '%s' - Supported values are [%s]",
425425
$type,
426-
implode("', '", $allowedValues)
426+
implode(', ', $allowedValues)
427427
)
428428
);
429429
}

0 commit comments

Comments
 (0)