Skip to content

Commit 51550e5

Browse files
authored
Handling unknown enum values (#807)
* Update Mustache template * Generate LEM API * Generate Classic Payments API * Generate Checkout API * Code format * Generate Transfers API * Generate BalancePlatform API
1 parent d7ce9b2 commit 51550e5

File tree

300 files changed

+1407
-1407
lines changed

Some content is hidden

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

300 files changed

+1407
-1407
lines changed

src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,11 @@ public function setType($type)
386386
{
387387
$allowedValues = $this->getTypeAllowableValues();
388388
if (!in_array($type, $allowedValues, true)) {
389-
throw new \InvalidArgumentException(
389+
error_log(
390390
sprintf(
391-
"Invalid value '%s' for 'type', must be one of '%s'",
391+
"type: unexpected enum value '%s' - Supported values are [%s]",
392392
$type,
393-
implode("', '", $allowedValues)
393+
implode(', ', $allowedValues)
394394
)
395395
);
396396
}

src/Adyen/Model/BalancePlatform/AccountHolder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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/BalancePlatform/AccountHolderCapability.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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/BalancePlatform/AccountHolderUpdateRequest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,11 +583,11 @@ public function setStatus($status)
583583
{
584584
$allowedValues = $this->getStatusAllowableValues();
585585
if (!in_array($status, $allowedValues, true)) {
586-
throw new \InvalidArgumentException(
586+
error_log(
587587
sprintf(
588-
"Invalid value '%s' for 'status', must be one of '%s'",
588+
"status: unexpected enum value '%s' - Supported values are [%s]",
589589
$status,
590-
implode("', '", $allowedValues)
590+
implode(', ', $allowedValues)
591591
)
592592
);
593593
}

src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,11 @@ public function setType($type)
352352
{
353353
$allowedValues = $this->getTypeAllowableValues();
354354
if (!in_array($type, $allowedValues, true)) {
355-
throw new \InvalidArgumentException(
355+
error_log(
356356
sprintf(
357-
"Invalid value '%s' for 'type', must be one of '%s'",
357+
"type: unexpected enum value '%s' - Supported values are [%s]",
358358
$type,
359-
implode("', '", $allowedValues)
359+
implode(', ', $allowedValues)
360360
)
361361
);
362362
}

src/Adyen/Model/BalancePlatform/AdditionalBankIdentificationRequirement.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,11 @@ public function setAdditionalBankIdentificationType($additionalBankIdentificatio
359359
{
360360
$allowedValues = $this->getAdditionalBankIdentificationTypeAllowableValues();
361361
if (!in_array($additionalBankIdentificationType, $allowedValues, true)) {
362-
throw new \InvalidArgumentException(
362+
error_log(
363363
sprintf(
364-
"Invalid value '%s' for 'additionalBankIdentificationType', must be one of '%s'",
364+
"additionalBankIdentificationType: unexpected enum value '%s' - Supported values are [%s]",
365365
$additionalBankIdentificationType,
366-
implode("', '", $allowedValues)
366+
implode(', ', $allowedValues)
367367
)
368368
);
369369
}
@@ -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/BalancePlatform/AddressRequirement.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,11 +409,11 @@ public function setType($type)
409409
{
410410
$allowedValues = $this->getTypeAllowableValues();
411411
if (!in_array($type, $allowedValues, true)) {
412-
throw new \InvalidArgumentException(
412+
error_log(
413413
sprintf(
414-
"Invalid value '%s' for 'type', must be one of '%s'",
414+
"type: unexpected enum value '%s' - Supported values are [%s]",
415415
$type,
416-
implode("', '", $allowedValues)
416+
implode(', ', $allowedValues)
417417
)
418418
);
419419
}

src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,11 @@ public function setType($type)
411411
{
412412
$allowedValues = $this->getTypeAllowableValues();
413413
if (!in_array($type, $allowedValues, true)) {
414-
throw new \InvalidArgumentException(
414+
error_log(
415415
sprintf(
416-
"Invalid value '%s' for 'type', must be one of '%s'",
416+
"type: unexpected enum value '%s' - Supported values are [%s]",
417417
$type,
418-
implode("', '", $allowedValues)
418+
implode(', ', $allowedValues)
419419
)
420420
);
421421
}

src/Adyen/Model/BalancePlatform/AmountNonZeroDecimalsRequirement.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,11 @@ public function setType($type)
349349
{
350350
$allowedValues = $this->getTypeAllowableValues();
351351
if (!in_array($type, $allowedValues, true)) {
352-
throw new \InvalidArgumentException(
352+
error_log(
353353
sprintf(
354-
"Invalid value '%s' for 'type', must be one of '%s'",
354+
"type: unexpected enum value '%s' - Supported values are [%s]",
355355
$type,
356-
implode("', '", $allowedValues)
356+
implode(', ', $allowedValues)
357357
)
358358
);
359359
}

0 commit comments

Comments
 (0)