Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[PlatformsAPIs] Code generation: update services and models #833

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

Open
AdyenAutomationBot wants to merge 2 commits into main
base: main
Choose a base branch
Loading
from sdk-automation/PlatformsAPIs

Conversation

@AdyenAutomationBot
Copy link
Collaborator

@AdyenAutomationBot AdyenAutomationBot commented Oct 22, 2025

OpenAPI spec files or templates have been modified on 22-10-2025 by commit.

Copy link

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 primarily focuses on expanding the capabilities of the Adyen platforms by integrating new features for Strong Customer Authentication (SCA) device management and granular control over balance webhook notifications. It also incorporates various model updates and minor code generation refinements across multiple API domains to ensure consistency and introduce new data points.

Highlights

  • SCA Device Management: Introduced new models and endpoints for managing Strong Customer Authentication (SCA) devices, including beginning, finishing, approving, removing, and listing associations for SCA devices. This adds robust support for device registration and association workflows.
  • Balance Webhook Settings: Added new models and API endpoints for configuring balance webhook settings, allowing users to define conditions for triggering notifications based on balance types (available, balance, pending, reserved) and thresholds (greaterThan, lessThan, etc.).
  • Model Enhancements: Updated several existing models across various APIs (Balance Platform, Legal Entity Management, Transfers) to include new fields, refine descriptions, and improve data validation. Notable changes include adding address lines to BulkAddress, updating account number length for HK local accounts, and introducing a new dataReview error type.
  • API Service Updates: New API services have been generated for managing balance webhook settings, and minor formatting adjustments were applied to existing API service files.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 introduces a number of new models and services, likely from an OpenAPI generator update. The changes are mostly additions of new classes. My review focuses on a recurring issue in the generated code's validation logic. In several model classes, setters for enum-like properties now use error_log instead of throwing an InvalidArgumentException for invalid values. This is a significant regression as it can lead to objects being in an invalid state without halting execution, making bugs harder to find. I've added comments on all occurrences of this issue in the new and modified files with a suggestion to revert to throwing exceptions for better robustness.

Comment on lines +428 to +436
if (!in_array($status, $allowedValues, true)) {
error_log(
sprintf(
"status: unexpected enum value '%s' - Supported values are [%s]",
$status,
implode(', ', $allowedValues)
)
);
}
Copy link

@gemini-code-assist gemini-code-assist bot Oct 22, 2025

Choose a reason for hiding this comment

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

high

Using error_log for invalid enum values is not recommended. It allows the object to be in an invalid state, which can lead to hard-to-debug issues later. It's safer to throw an InvalidArgumentException to fail fast and immediately signal a programming error.

 if (!in_array($status, $allowedValues, true)) {
 throw new \InvalidArgumentException(
 sprintf(
 "Invalid value '%s' for 'status', must be one of '%s'",
 $status,
 implode("', '", $allowedValues)
 )
 );
 }

Comment on lines +486 to +494
if (!in_array($type, $allowedValues, true)) {
error_log(
sprintf(
"type: unexpected enum value '%s' - Supported values are [%s]",
$type,
implode(', ', $allowedValues)
)
);
}
Copy link

@gemini-code-assist gemini-code-assist bot Oct 22, 2025

Choose a reason for hiding this comment

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

high

Using error_log for invalid enum values is not recommended. It allows the object to be in an invalid state, which can lead to hard-to-debug issues later. It's safer to throw an InvalidArgumentException to fail fast and immediately signal a programming error.

 if (!in_array($type, $allowedValues, true)) {
 throw new \InvalidArgumentException(
 sprintf(
 "Invalid value '%s' for 'type', must be one of '%s'",
 $type,
 implode("', '", $allowedValues)
 )
 );
 }

Comment on lines +416 to +424
if (!in_array($status, $allowedValues, true)) {
error_log(
sprintf(
"status: unexpected enum value '%s' - Supported values are [%s]",
$status,
implode(', ', $allowedValues)
)
);
}
Copy link

@gemini-code-assist gemini-code-assist bot Oct 22, 2025

Choose a reason for hiding this comment

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

high

Using error_log for invalid enum values is not recommended. It allows the object to be in an invalid state, which can lead to hard-to-debug issues later. It's safer to throw an InvalidArgumentException to fail fast and immediately signal a programming error.

 if (!in_array($status, $allowedValues, true)) {
 throw new \InvalidArgumentException(
 sprintf(
 "Invalid value '%s' for 'status', must be one of '%s'",
 $status,
 implode("', '", $allowedValues)
 )
 );
 }

Comment on lines +474 to +482
if (!in_array($type, $allowedValues, true)) {
error_log(
sprintf(
"type: unexpected enum value '%s' - Supported values are [%s]",
$type,
implode(', ', $allowedValues)
)
);
}
Copy link

@gemini-code-assist gemini-code-assist bot Oct 22, 2025

Choose a reason for hiding this comment

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

high

Using error_log for invalid enum values is not recommended. It allows the object to be in an invalid state, which can lead to hard-to-debug issues later. It's safer to throw an InvalidArgumentException to fail fast and immediately signal a programming error.

 if (!in_array($type, $allowedValues, true)) {
 throw new \InvalidArgumentException(
 sprintf(
 "Invalid value '%s' for 'type', must be one of '%s'",
 $type,
 implode("', '", $allowedValues)
 )
 );
 }

Comment on lines +373 to +381
if (!in_array($balanceType, $allowedValues, true)) {
error_log(
sprintf(
"balanceType: unexpected enum value '%s' - Supported values are [%s]",
$balanceType,
implode(', ', $allowedValues)
)
);
}
Copy link

@gemini-code-assist gemini-code-assist bot Oct 22, 2025

Choose a reason for hiding this comment

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

high

Using error_log for invalid enum values is not recommended. It allows the object to be in an invalid state, which can lead to hard-to-debug issues later. It's safer to throw an InvalidArgumentException to fail fast and immediately signal a programming error.

 if (!in_array($balanceType, $allowedValues, true)) {
 throw new \InvalidArgumentException(
 sprintf(
 "Invalid value '%s' for 'balanceType', must be one of '%s'",
 $balanceType,
 implode("', '", $allowedValues)
 )
 );
 }

Comment on lines +407 to +415
if (!in_array($conditionType, $allowedValues, true)) {
error_log(
sprintf(
"conditionType: unexpected enum value '%s' - Supported values are [%s]",
$conditionType,
implode(', ', $allowedValues)
)
);
}
Copy link

@gemini-code-assist gemini-code-assist bot Oct 22, 2025

Choose a reason for hiding this comment

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

high

Using error_log for invalid enum values is not recommended. It allows the object to be in an invalid state, which can lead to hard-to-debug issues later. It's safer to throw an InvalidArgumentException to fail fast and immediately signal a programming error.

 if (!in_array($conditionType, $allowedValues, true)) {
 throw new \InvalidArgumentException(
 sprintf(
 "Invalid value '%s' for 'conditionType', must be one of '%s'",
 $conditionType,
 implode("', '", $allowedValues)
 )
 );
 }

Comment on lines +358 to +366
if (!in_array($type, $allowedValues, true)) {
error_log(
sprintf(
"type: unexpected enum value '%s' - Supported values are [%s]",
$type,
implode(', ', $allowedValues)
)
);
}
Copy link

@gemini-code-assist gemini-code-assist bot Oct 22, 2025

Choose a reason for hiding this comment

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

high

Using error_log for invalid enum values is not recommended. It allows the object to be in an invalid state, which can lead to hard-to-debug issues later. It's safer to throw an InvalidArgumentException to fail fast and immediately signal a programming error.

 if (!in_array($type, $allowedValues, true)) {
 throw new \InvalidArgumentException(
 sprintf(
 "Invalid value '%s' for 'type', must be one of '%s'",
 $type,
 implode("', '", $allowedValues)
 )
 );
 }

Comment on lines +352 to +360
if (!in_array($type, $allowedValues, true)) {
error_log(
sprintf(
"type: unexpected enum value '%s' - Supported values are [%s]",
$type,
implode(', ', $allowedValues)
)
);
}
Copy link

@gemini-code-assist gemini-code-assist bot Oct 22, 2025

Choose a reason for hiding this comment

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

high

Using error_log for invalid enum values is not recommended. It allows the object to be in an invalid state, which can lead to hard-to-debug issues later. It's safer to throw an InvalidArgumentException to fail fast and immediately signal a programming error.

 if (!in_array($type, $allowedValues, true)) {
 throw new \InvalidArgumentException(
 sprintf(
 "Invalid value '%s' for 'type', must be one of '%s'",
 $type,
 implode("', '", $allowedValues)
 )
 );
 }

Comment on lines 323 to 331
if (!in_array($result, $allowedValues, true)) {
thrownew \InvalidArgumentException(
error_log(
sprintf(
"Invalid value '%s' for 'result', must be one of '%s'",
"result: unexpected enum value '%s' - Supported values are [%s]",
$result,
implode("', '", $allowedValues)
implode(', ', $allowedValues)
)
);
}
Copy link

@gemini-code-assist gemini-code-assist bot Oct 22, 2025

Choose a reason for hiding this comment

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

high

Using error_log for invalid enum values is not recommended. It allows the object to be in an invalid state, which can lead to hard-to-debug issues later. It's safer to throw an InvalidArgumentException to fail fast and immediately signal a programming error.

 if (!in_array($result, $allowedValues, true)) {
 throw new \InvalidArgumentException(
 sprintf(
 "Invalid value '%s' for 'result', must be one of '%s'",
 $result,
 implode("', '", $allowedValues)
 )
 );
 }

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /