-
Notifications
You must be signed in to change notification settings - Fork 113
[Webhooks] Code generation: update services and models #812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3d36fed
to
7a16e72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @AdyenAutomationBot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request updates the generated code for Adyen webhooks, incorporating changes from the latest OpenAPI specification. The primary focus is on enhancing existing models, refining code style, and introducing new models for network token and score-related notifications. Key changes include a shift from throwing exceptions to logging errors for invalid enum values, removal of specific file deserialization logic, and minor documentation improvements, ensuring the webhook integration remains robust and up-to-date with Adyen's API evolution.
Highlights
- Introduction of New Webhook Models: The code generation process has introduced several new models related to Network Token and Score notifications, expanding the webhook capabilities for configuration events. These new models provide more detailed data structures for handling specific types of webhook events.
- Enhanced Error Handling for Enum Values: A significant change in error handling for invalid enum values has been implemented across numerous models. Instead of throwing an
InvalidArgumentException
, the code now logs an error usingerror_log
. This change promotes more graceful error recovery and prevents application crashes due to unexpected enum values, allowing the system to continue processing other data. - Code Style and Formatting Refinements: Minor code style and formatting improvements have been applied throughout the generated files, including adjustments to
foreach
loop syntax and simplification ofif
statements. Additionally, redundant backslashes inuse
statements and@implements
tags have been removed, contributing to cleaner and more consistent code. - Removal of
SplFileObject
Deserialization Logic: The deserialization logic for\SplFileObject
has been removed from theObjectSerializer.php
files inBalanceWebhooks
andConfigurationWebhooks
. This indicates a change in how file objects are expected to be handled or a deprecation of this specific deserialization path within the webhook processing. - Documentation Link Updates: Documentation links within several models have been updated to reflect the latest Adyen documentation structure, ensuring that developers are directed to the most current and accurate information regarding webhook acceptance and API references.
- Updates to Existing Models and Enum Values: The
Card
model has been extended with a newusage
field, and thethreeDSecure
property's docblock has been updated for better clarity. Furthermore, theSweepConfigurationV2
model now includesAPPROVAL_EXPIRED
as a possible reason, enhancing the granularity of sweep event reporting.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request appears to be an automated code generation to update services and models from a new OpenAPI specification. The changes are widespread across many models, introducing new classes and modifying existing ones. My review focuses on three main points: a significant change in error handling, a critical bug in file deserialization, and several coding style violations. The most concerning change is the switch from throwing InvalidArgumentException
to using error_log
for invalid enum values. This can lead to silent failures and is a breaking change in the SDK's behavior. Additionally, the removal of specific logic for SplFileObject
deserialization will break file handling. I've provided detailed comments and suggestions for these issues.
d9003da
to
0716d29
Compare
|
Configuration Webhooks
balancePlatform.networkToken.created
andbalancePlatform.networkToken.updated
to support notifications when Network Tokens are created or updated.ScoreNotification
usage
field to specify how many times the card can be used:singleUse
ormultiUse
.threeDSecure
attribute toCard
OpenAPI spec files or templates have been modified on 14-08-2025 by commit.