Skip to content

Conversation

AdyenAutomationBot
Copy link
Collaborator

@AdyenAutomationBot AdyenAutomationBot commented Aug 14, 2025

Configuration Webhooks


  • Added new webhook events balancePlatform.networkToken.created and balancePlatform.networkToken.updated to support notifications when Network Tokens are created or updated.
  • Added new webhook event ScoreNotification
  • Added usagefield to specify how many times the card can be used: singleUse or multiUse.
  • Added threeDSecure attribute to Card

OpenAPI spec files or templates have been modified on 14-08-2025 by commit.

@AdyenAutomationBot AdyenAutomationBot requested a review from a team as a code owner August 14, 2025 23:05
Copy link

@gemini-code-assist gemini-code-assist bot left a 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 using error_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 of if statements. Additionally, redundant backslashes in use 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 the ObjectSerializer.php files in BalanceWebhooks and ConfigurationWebhooks. 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 new usage field, and the threeDSecure property's docblock has been updated for better clarity. Furthermore, the SweepConfigurationV2 model now includes APPROVAL_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

  1. 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.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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.

@gcatanese gcatanese force-pushed the sdk-automation/Webhooks branch from d9003da to 0716d29 Compare August 15, 2025 07:42
Copy link

@gcatanese gcatanese merged commit e87766a into main Aug 15, 2025
10 checks passed
@gcatanese gcatanese deleted the sdk-automation/Webhooks branch August 15, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants