Repository navigation
[configurationwebhooks] Code generation: update services and models - #920
AdyenAutomationBot wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces several new PHP model classes for Configuration Webhooks, specifically handling top-up configurations and events. A review comment identifies an issue in WebhookTopUpTrigger.php where the optional schedule property can be null, but the setSchedule method validates it against enum values without a null check, potentially causing false-positive error logs. A code suggestion is provided to add a null check before validation.
| if (!in_array($schedule, $allowedValues, true)) { | ||
| error_log( | ||
| sprintf( | ||
| "schedule: unexpected enum value '%s' - Supported values are [%s]", | ||
| $schedule, | ||
| implode(', ', $allowedValues) | ||
| ) | ||
| ); | ||
| } |
There was a problem hiding this comment.
The schedule property is optional, meaning it can be null. However, the setSchedule method does not check if the value is null before validating it against the allowed enum values. This will trigger a false-positive error_log warning when null is passed to clear or initialize the field. Adding a null check prevents these unnecessary log warnings.
if (!is_null($schedule) && !in_array($schedule, $allowedValues, true)) {
error_log(
sprintf(
"schedule: unexpected enum value '%s' - Supported values are [%s]",
$schedule,
implode(', ', $allowedValues)
)
);
}2909dd5 to
d4a3b1a
Compare
a2283b1 to
ccadb66
Compare
0f20e97 to
ed92624
Compare
35ac5f4 to
5f72993
Compare
eb91037 to
283b08b
Compare
3bcfd34 to
8f87a6b
Compare
b8eec1a to
4bf91b1
Compare
a29d559 to
6a81021
Compare
6a81021 to
ac8589b
Compare
|



This PR contains the automated changes for the
configurationwebhooksservice.Adyen/adyen-openapi@45520ee
The commit history of this PR reflects the
adyen-openapicommits that have been applied.