Skip to content

Commit e87766a

Browse files
AdyenAutomationBotAdyenAutomationBotgcatanese
authored
[Webhooks] Code generation: update services and models (#812)
* [adyen-sdk-automation] automated changes * style(fmt): code formatted * Add NetworkTokenNotificationRequest and ScoreNotificationRequest --------- Co-authored-by: AdyenAutomationBot <Adyen Automation [email protected]> Co-authored-by: beppe <[email protected]>
1 parent d6d2668 commit e87766a

File tree

106 files changed

+7781
-464
lines changed

Some content is hidden

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

106 files changed

+7781
-464
lines changed

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: 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/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
}

src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.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
* AccountSupportingEntityCapability Class Doc Comment
2323
*
2424
* @package Adyen
25-
* @implements \ArrayAccess<string, mixed>
25+
* @implements ArrayAccess<string, mixed>
2626
*/
2727
class AccountSupportingEntityCapability implements ModelInterface, ArrayAccess, \JsonSerializable
2828
{
@@ -441,11 +441,11 @@ public function setAllowedLevel($allowedLevel)
441441
{
442442
$allowedValues = $this->getAllowedLevelAllowableValues();
443443
if (!in_array($allowedLevel, $allowedValues, true)) {
444-
throw new \InvalidArgumentException(
444+
error_log(
445445
sprintf(
446-
"Invalid value '%s' for 'allowedLevel', must be one of '%s'",
446+
"allowedLevel: unexpected enum value '%s' - Supported values are [%s]",
447447
$allowedLevel,
448-
implode("', '", $allowedValues)
448+
implode(', ', $allowedValues)
449449
)
450450
);
451451
}
@@ -547,11 +547,11 @@ public function setRequestedLevel($requestedLevel)
547547
{
548548
$allowedValues = $this->getRequestedLevelAllowableValues();
549549
if (!in_array($requestedLevel, $allowedValues, true)) {
550-
throw new \InvalidArgumentException(
550+
error_log(
551551
sprintf(
552-
"Invalid value '%s' for 'requestedLevel', must be one of '%s'",
552+
"requestedLevel: unexpected enum value '%s' - Supported values are [%s]",
553553
$requestedLevel,
554-
implode("', '", $allowedValues)
554+
implode(', ', $allowedValues)
555555
)
556556
);
557557
}
@@ -581,11 +581,11 @@ public function setVerificationStatus($verificationStatus)
581581
{
582582
$allowedValues = $this->getVerificationStatusAllowableValues();
583583
if (!in_array($verificationStatus, $allowedValues, true)) {
584-
throw new \InvalidArgumentException(
584+
error_log(
585585
sprintf(
586-
"Invalid value '%s' for 'verificationStatus', must be one of '%s'",
586+
"verificationStatus: unexpected enum value '%s' - Supported values are [%s]",
587587
$verificationStatus,
588-
implode("', '", $allowedValues)
588+
implode(', ', $allowedValues)
589589
)
590590
);
591591
}

0 commit comments

Comments
 (0)