-
Notifications
You must be signed in to change notification settings - Fork 116
[PaymentsAPIs] Code generation: update services and models #796
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
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 PHP client library for Adyen's Payments APIs. The changes primarily involve synchronizing the codebase with the latest OpenAPI specification, introducing new payment action handling capabilities, and adjusting data model constraints.
Highlights
- New Payment Action Model: A new PaymentDetailsResponseAction model has been introduced to handle various payment actions, such as 3D Secure redirects.
- PaymentDetailsResponse Update: The PaymentDetailsResponse model has been updated to include the new action property, enabling the API to return specific actions required for payment completion.
- Increased Fare Basis Code Length: The maximum length for fareBasisCode in airline-related models has been extended from 6 to 15 characters, accommodating longer fare basis codes.
- Enhanced Description and Validation: Descriptions and validation rules for enhancedSchemeDataItemDetailLineItemNrDescription have been refined for clarity and stricter data integrity.
- Code Style and Formatting Updates: Numerous minor code style and formatting adjustments have been applied across various ObjectSerializer.php files and other models, likely due to updates in the code generation tool.
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 or fill out our survey to provide feedback.
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 based on an updated OpenAPI specification. While the functional changes seem correct, I've identified several violations of the PSR-12 coding standard. These include issues with control structure formatting, such as missing spaces and braces, as well as stylistic issues like trailing whitespace and incorrect use of use statements. I've also found a minor issue with duplicated text in a PHPDoc comment. I've provided specific suggestions for these issues. It would be beneficial to address these in the code generator to improve code quality and consistency in future updates.
| } | ||
| } else { | ||
| foreach ($data as $property => $value) { | ||
| foreach($data as $property => $value) { |
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.
| if (!is_string($timestamp)) { | ||
| return $timestamp; | ||
| } | ||
| if (!is_string($timestamp)) return $timestamp; |
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.
| * Sets enhancedSchemeDataItemDetailLineItemNrDescription | ||
| * | ||
| * @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros. | ||
| * @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros. |
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.
The constraint * Must not be blank. is duplicated in the PHPDoc. Please remove one of them to improve clarity.
* @param string|null $enhancedSchemeDataItemDetailLineItemNrDescription A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not start with a space or be all spaces. * Must not be all zeros.| * Sets shopperEmail | ||
| * | ||
| * @param string $shopperEmail | ||
| * @param string $shopperEmail |
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.
| namespace Adyen\Model\Checkout; | ||
|
|
||
| use Adyen\Model\Checkout\ObjectSerializer; |
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.
|
|
||
| namespace Adyen\Model\Checkout; | ||
|
|
||
| use \ArrayAccess; |
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.
| { | ||
| $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); | ||
| $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); | ||
|
|
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.
src/Adyen/Service/RecurringApi.php
Outdated
| * Create new permits linked to a recurring contract. | ||
| * | ||
| * @deprecated since Adyen Recurring API v68. | ||
| * @deprecated since Adyen Recurring API v68. |
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.
|



OpenAPI spec files or templates have been modified on 07-08-2025 by commit.
Checkout API
actionattribute (PaymentDetailsResponseAction) inPaymentDetailsResponse