Skip to content

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

Merged
poojah-adyen merged 2 commits into
mainfrom
sdk-automation/transfers
Jul 21, 2026
Merged

[transfers] Code generation: update services and models#1978
poojah-adyen merged 2 commits into
mainfrom
sdk-automation/transfers

Conversation

@AdyenAutomationBot

@AdyenAutomationBot AdyenAutomationBot commented Jun 1, 2026

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.

This PR contains the automated changes for the transfers service, plus follow-up test coverage and a generator hardening fix.
The commit history of this PR reflects the adyen-openapi commits that have been applied.

New Features 💎

New CashOut feature

  • Added CashOutApi service with initiateCashout (POST /btl/v4/cashouts)
  • Added models: CashOut, CashOutInfo, CashOutInfoCounterparty, CashOutTransfer.

Transfer tracing & network reason

  • Added TransferData.networkReason and TransferData.tracing
  • Added TransferEvent.tracingData.
  • Added models: NetworkReason, TransferDataTracing, TransferEventTracingData, UKFpsTracingData,USAchTracingData.

Tests / fixtures

  • Added initiateCashoutTest (asserts response + verifies request URL/body/method) initiateCashoutNullBodyThrowsTest.
  • Extended getTransferTest and get-transfer-success.json to cover networkReason, tracing, and event tracingData.
  • Added defaultErrorResponseEntityTest.
  • Added mock post-cashouts-200.json.

@AdyenAutomationBot
AdyenAutomationBot requested a review from a team as a code owner June 1, 2026 09:45

@gemini-code-assist gemini-code-assist Bot left a comment

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.

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();

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.

Known issue to be addressed in a follow-up PR

Comment thread src/main/java/com/adyen/service/transfers/CapitalDeprecatedApi.java Outdated

@jeandersonbc jeandersonbc left a comment

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.

Bad generation of Capital Service: CapitalDeprecatedApi
Future reviews/generation must take this into consideration.

@jeandersonbc jeandersonbc added the Don't Merge Don't merge yet for whatever reason label Jun 2, 2026
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 2 times, most recently from cf677ba to e2490e1 Compare June 4, 2026 13:32
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 5 times, most recently from 244c2a7 to eeca411 Compare June 19, 2026 10:29
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 5 times, most recently from fd1d47f to 87ef0dd Compare June 24, 2026 08:32
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 3 times, most recently from e5f0ed1 to 3e8f300 Compare July 7, 2026 09:21
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 3 times, most recently from bb3ddde to cd3a64d Compare July 13, 2026 14:23
@gcatanese gcatanese removed the Don't Merge Don't merge yet for whatever reason label Jul 13, 2026
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 7 times, most recently from 4102fc9 to 0908a98 Compare July 20, 2026 14:14
@poojah-adyen poojah-adyen self-assigned this Jul 21, 2026
@poojah-adyen poojah-adyen added the Feature Indicates a new feature addition label Jul 21, 2026
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch from 0908a98 to f99770c Compare July 21, 2026 09:54
@sonarqubecloud

Copy link
Copy Markdown

@poojah-adyen
poojah-adyen added this pull request to the merge queue Jul 21, 2026
Merged via the queue into main with commit 19bc5c2 Jul 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Indicates a new feature addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants