Skip to content

[transfers] Code generation: update services and models#1727

Open
AdyenAutomationBot wants to merge 1 commit intomainfrom
sdk-automation/transfers
Open

[transfers] Code generation: update services and models#1727
AdyenAutomationBot wants to merge 1 commit intomainfrom
sdk-automation/transfers

Conversation

@AdyenAutomationBot
Copy link
Collaborator

This PR contains the automated changes for the transfers service.

The commit history of this PR reflects the adyen-openapi commits that have been applied.

@AdyenAutomationBot AdyenAutomationBot requested review from a team as code owners February 16, 2026 13:06
@gemini-code-assist
Copy link
Contributor

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 delivers an automated update to the transfers service's code generation, primarily focusing on refining existing data models and introducing new ones. The changes enhance the clarity and functionality of counterparty representations and introduce support for interchange-related data and new event statuses, ensuring the API client remains synchronized with the latest OpenAPI specification.

Highlights

  • Model Renaming: The Counterparty model has been renamed to GrantCounterparty to provide more specific context within the transfers service.
  • New Models Introduced: Two new models, GrantInfoCounterparty and InterchangeData, have been added to the transfers service, expanding the data structures available.
  • API Model Updates: Existing models like CapitalGrant and CapitalGrantInfo have been updated to reference the newly renamed GrantCounterparty and the new GrantInfoCounterparty models, respectively.
  • New Status and Event Types: The INTERCHANGEADJUSTED status has been added to several transfer-related enums (Modification, Transfer, TransferData, TransferEvent), and a TRACING type has been added to the TransferEvent enum.
  • Polymorphic Deserialization Support: The TransferEventEventsDataInner class has been updated to correctly deserialize the new InterchangeData model within its polymorphic oneOf schema.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/main/java/com/adyen/model/transfers/CapitalGrant.java
    • Updated the counterparty field's type from Counterparty to GrantCounterparty.
    • Modified the counterparty(), getCounterparty(), and setCounterparty() methods to reflect the new GrantCounterparty type.
  • src/main/java/com/adyen/model/transfers/CapitalGrantInfo.java
    • Updated the counterparty field's type from Counterparty to GrantInfoCounterparty.
    • Modified the counterparty(), getCounterparty(), and setCounterparty() methods to reflect the new GrantInfoCounterparty type.
  • src/main/java/com/adyen/model/transfers/Counterparty.java
    • Renamed the file to GrantCounterparty.java.
    • Renamed the class from Counterparty to GrantCounterparty.
    • Updated all internal references within the file to use GrantCounterparty.
    • Simplified Javadoc comments for the accountHolderId field.
  • src/main/java/com/adyen/model/transfers/GrantInfoCounterparty.java
    • Added a new model class GrantInfoCounterparty.
  • src/main/java/com/adyen/model/transfers/InterchangeData.java
    • Added a new model class InterchangeData.
  • src/main/java/com/adyen/model/transfers/Modification.java
    • Added INTERCHANGEADJUSTED to the StatusEnum.
  • src/main/java/com/adyen/model/transfers/Transfer.java
    • Added INTERCHANGEADJUSTED to the StatusEnum.
  • src/main/java/com/adyen/model/transfers/TransferData.java
    • Added INTERCHANGEADJUSTED to the StatusEnum.
  • src/main/java/com/adyen/model/transfers/TransferEvent.java
    • Added INTERCHANGEADJUSTED to the StatusEnum.
    • Added TRACING to the TypeEnum.
  • src/main/java/com/adyen/model/transfers/TransferEventEventsDataInner.java
    • Modified the deserialize method to include InterchangeData in the oneOf deserialization logic.
    • Added a constructor for InterchangeData.
    • Registered InterchangeData in the schemas map.
    • Updated setActualInstance and getActualInstance methods to support InterchangeData.
    • Added a new getInterchangeData() method.
Activity
  • This pull request was automatically generated by AdyenAutomationBot, indicating an update based on changes in the adyen-openapi specification.
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
Contributor

@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

The pull request updates the transfers service models, introducing new models such as InterchangeData and GrantInfoCounterparty, and renaming Counterparty to GrantCounterparty. It also adds new enum values for status and type across several models. These changes appear to be automated code generation. My review identifies a potential issue in the deserialization logic where a recursive search is used for type identification, which could lead to incorrect results. Additionally, it points out a style guide violation regarding wildcard imports in the newly added files.

Comment on lines +84 to +88
if (tree.findValue("type") != null) {
typeMatch =
Arrays.stream(InterchangeData.TypeEnum.values())
.anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using findValue("type") for discriminator matching is risky because it performs a recursive search through the JSON tree. If the payload contains a nested object with a type field, it might be incorrectly picked up instead of the top-level property. It is safer and more efficient to use tree.get("type") to check the property at the current level.

Suggested change
if (tree.findValue("type") != null) {
typeMatch =
Arrays.stream(InterchangeData.TypeEnum.values())
.anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
}
JsonNode typeNode = tree.get("type");
if (typeNode != null && typeNode.isValueNode()) {
typeMatch = Arrays.stream(InterchangeData.TypeEnum.values())
.anyMatch((t) -> t.getValue().equals(typeNode.asText()));
}

Comment on lines +22 to +23
import java.util.*;
import java.util.Arrays;
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Wildcard imports should be avoided to improve code clarity and prevent naming conflicts, as per the Google Java Style Guide (Section 3.3.1). Additionally, java.util.Arrays is redundantly imported since it is already covered by the wildcard.

Suggested change
import java.util.*;
import java.util.Arrays;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
References
  1. Wildcard imports should be avoided in favor of explicit imports to improve code clarity and avoid potential naming conflicts. This follows the Google Java Style Guide (Section 3.3.1). (link)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant