Skip to content

Conversation

AdyenAutomationBot
Copy link
Collaborator

@AdyenAutomationBot AdyenAutomationBot commented Aug 5, 2025

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

Management API

  • Add support for AlipayPlus and MaestroUsa payment methods: see PaymentMethod and PaymentMethodSetupInfo classes
  • In PaymentMethodResponse, PaymentMethodSetupInfo and UpdatePaymentMethodInfo several TypesWithErrorsEnum enums have been added (alipay_plus, avancard, cooper, etc..
  • In Store, StoreCreationRequest, UpdateStoreRequest and StoreCreationWithMerchantCodeRequest add attribute subMerchantData

@AdyenAutomationBot AdyenAutomationBot force-pushed the sdk-automation/ManagementAPIs branch from f02d7ee to 2113c99 Compare August 5, 2025 16:32
@AdyenAutomationBot AdyenAutomationBot requested a review from a team as a code owner August 5, 2025 16:32
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 is an automated update to the Management APIs client library, synchronizing it with the latest OpenAPI specification. The changes primarily introduce support for new payment methods and sub-merchant data, alongside minor code generation refinements and API contract clarifications.

Highlights

  • New Payment Method Support: Added the AlipayPlusInfo model and integrated it into the PaymentMethod and PaymentMethodSetupInfo models, enabling support for Alipay Plus.
  • Expanded Payment Method Types: Introduced numerous new payment method type constants across PaymentMethodResponse and PaymentMethodSetupInfo (e.g., AVANCARD, COOPER, GREEN_CARD, LE_CARD, MAESTRO_USA, MAXIFROTA, MEGALEVE, NUTRICASH, PERSONAL_CARD, SENFF, UP_BRAZIL, VEGAS_CARD, VERO_CARD), reflecting an expanded range of supported payment options.
  • Sub-Merchant Data Integration: Introduced a new SubMerchantData model and integrated it into Store and related request/update models, allowing for the association of sub-merchant details (email, ID, MCC, name) with stores.
  • API Contract Clarification: Updated the Key model's passphrase documentation to provide explicit security requirements for the secure passphrase.
  • Code Generation Refinements: Applied minor formatting adjustments and removed SplFileObject deserialization logic in ObjectSerializer classes across both Balance Control and Management API models.
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

  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 updates models and services based on OpenAPI spec changes. The changes mostly involve adding new models like AlipayPlusInfo and SubMerchantData, and new properties and payment method types to existing models.

I've found a few issues:

  • A critical issue in src/Adyen/Model/Management/ObjectSerializer.php where deserialization for SplFileObject might be broken.
  • Several style violations against PSR-12 in ObjectSerializer.php files, such as incorrect spacing for foreach and use of single-line ifs without braces.
  • Minor style issues like unnecessary whitespace and poorly formatted PHPDoc comments in various files.

The review comments reference PSR-12 where applicable.

}

/** @psalm-suppress ParadoxicalCondition */
if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The removal of the \SplFileObject deserialization logic has introduced a bug. The class \SplFileObject is still present in this in_array check, which will cause settype($data, '\SplFileObject') to be called. The settype function does not support class names and will not work as expected, likely causing a runtime error.

If \SplFileObject is no longer supported for deserialization, it should also be removed from this in_array check. If it is still supported, the deserialization logic should be restored.

if (in_array($class, ['\DateTime', 'array', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {

* @param string $originId
* @param array|null $requestOptions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The blank line in the PHPDoc is unnecessary1. Please remove it to improve code cleanliness. Similar issues are present in other updated service files.

Style Guide References

Footnotes

  1. Avoid unnecessary blank lines in PHPDoc. (link)

* @param string $originId
* @param array|null $requestOptions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The blank line in the PHPDoc is unnecessary1. Please remove it to improve code cleanliness. Similar issues are present in other updated service files.

Style Guide References

Footnotes

  1. Avoid unnecessary blank lines in PHPDoc. (link)

}
} else {
foreach ($data as $property => $value) {
foreach($data as $property => $value) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change violates the PSR-12 coding standard, which requires a space after control structure keywords1. Please add a space between foreach and the opening parenthesis.

foreach ($data as $property => $value) {

Style Guide References

Footnotes

  1. There MUST be one space after the control structure keyword. (link)

if (!is_string($timestamp)) {
return $timestamp;
}
if (!is_string($timestamp)) return $timestamp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change to a single-line if statement is against PSR-12 recommendations, which state that the body of each structure MUST be enclosed in braces1. This improves readability and reduces the likelihood of introducing errors when adding new lines. Please revert to using braces.

if (!is_string($timestamp)) {
            return $timestamp;
        }

Style Guide References

Footnotes

  1. The body of each structure MUST be enclosed by braces. This standardizes how the structures look, and reduces the likelihood of introducing errors as new lines get added. (link)

{
$endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains");
$this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is trailing whitespace at the end of the method1. Please remove it to improve code cleanliness. Similar issues are present in other updated service files.

Style Guide References

Footnotes

  1. Avoid trailing spaces at the end of lines. (link)

{
$endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}");
$this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is trailing whitespace at the end of the method1. Please remove it to improve code cleanliness. Similar issues are present in other updated service files.

Style Guide References

Footnotes

  1. Avoid trailing spaces at the end of lines. (link)

{
$endpoint = $this->baseURL . str_replace(['{terminalId}'], [$terminalId], "/terminals/{terminalId}/reassign");
$this->requestHttp($endpoint, strtolower('POST'), (array) $terminalReassignmentRequest->jsonSerialize(), $requestOptions);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is trailing whitespace at the end of the method1. Please remove it to improve code cleanliness. Similar issues are present in other updated service files.

Style Guide References

Footnotes

  1. Avoid trailing spaces at the end of lines. (link)

{
$endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}");
$this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is trailing whitespace at the end of the method1. Please remove it to improve code cleanliness. Similar issues are present in other updated service files.

Style Guide References

Footnotes

  1. Avoid trailing spaces at the end of lines. (link)

{
$endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}");
$this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is trailing whitespace at the end of the method1. Please remove it to improve code cleanliness. Similar issues are present in other updated service files.

Style Guide References

Footnotes

  1. Avoid trailing spaces at the end of lines. (link)

@AdyenAutomationBot AdyenAutomationBot force-pushed the sdk-automation/ManagementAPIs branch from 9112bf2 to a6332f7 Compare August 6, 2025 07:40
gcatanese
gcatanese previously approved these changes Aug 6, 2025
Copy link

sonarqubecloud bot commented Aug 6, 2025

@gcatanese gcatanese self-requested a review August 6, 2025 13:33
@gcatanese gcatanese merged commit 5eeb6e4 into main Aug 6, 2025
10 checks passed
@gcatanese gcatanese deleted the sdk-automation/ManagementAPIs branch August 6, 2025 13:33
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