Skip to content

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

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

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

Conversation

@AdyenAutomationBot
Copy link
Copy Markdown
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 a review from a team as a code owner June 1, 2026 09:45
Copy link
Copy Markdown
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

This pull request introduces the CashOut feature to the Transfers API, adding several new model classes (such as CashOut, CashOutInfo, and CashOutTransfer), a standardized error response model, and a new CashOutApi service to initiate cashouts. Additionally, the CapitalApi service has been renamed to CapitalDeprecatedApi, and some Javadoc descriptions in Transfer and TransferData were updated. Feedback on these changes highlights two key issues: first, renaming CapitalApi to CapitalDeprecatedApi introduces a breaking change for existing integrations, so it is recommended to retain the original class name and mark it as @deprecated instead; second, a null check should be added to CashOutApi.initiateCashout for the required cashOutInfo parameter to prevent a potential NullPointerException.

Comment on lines +73 to +75
public CashOut initiateCashout(CashOutInfo cashOutInfo, RequestOptions requestOptions)
throws ApiException, IOException {
String requestBody = cashOutInfo.toJson();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The cashOutInfo parameter is marked as required, but there is no null check before calling cashOutInfo.toJson(). If a caller passes null, this will throw a NullPointerException. It is safer to validate the input and throw an IllegalArgumentException with a clear error message.

Suggested change
public CashOut initiateCashout(CashOutInfo cashOutInfo, RequestOptions requestOptions)
throws ApiException, IOException {
String requestBody = cashOutInfo.toJson();
public CashOut initiateCashout(CashOutInfo cashOutInfo, RequestOptions requestOptions)
throws ApiException, IOException {
if (cashOutInfo == null) {
throw new IllegalArgumentException("Please provide the cashOutInfo parameter");
}
String requestBody = cashOutInfo.toJson();

import java.util.Map;

public class CapitalApi extends Service {
public class CapitalDeprecatedApi extends Service {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Renaming CapitalApi to CapitalDeprecatedApi introduces a breaking change for existing integrations using this SDK. To preserve backwards compatibility, consider keeping the class name as CapitalApi and marking the entire class as @Deprecated instead of renaming it.

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