Skip to content

feat: add versioned list endpoints (20260427) for transfers and cross-account transfers - #389

Open
gerfboy wants to merge 1 commit into
masterfrom
greg/versioned-list-transfers-cross-account
Open

feat: add versioned list endpoints (20260427) for transfers and cross-account transfers#389
gerfboy wants to merge 1 commit into
masterfrom
greg/versioned-list-transfers-cross-account

Conversation

@gerfboy

@gerfboy gerfboy commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Adds versioned (v20260427) list endpoints for internal transfers and cross-account transfers, mirroring the existing versioned list support for payments and recurring payments (commit e9274f9c).

Each affected GET list endpoint now routes through DateVersionedResponse: the default version continues to call the existing list() accessor, and version 20260427 calls a new list20260427() accessor. The 20260427 variant reuses the same model (the models already carry recurringTransferId / recurringCrossAccountTransferId); this change affects which records are returned, not the response shape, so no new model or Resources registration is required.

Jira: MC-15714

Public API Additions/Changes

New base-accessor methods (each @GatewayAPI / @API, throwing AccessorMethodNotImplementedException by default):

  • TransferBaseAccessor#list20260427(TransferListOptions)
  • RecurringTransferBaseAccessor#list20260427(RecurringTransferListOptions)
  • CrossAccountTransferBaseAccessor#list20260427()
  • CrossAccountRecurringTransferBaseAccessor#list20260427()

Versioned GET list endpoints (default → list(), version=20260427list20260427()):

  • GET /users/{userId}/transfers
  • GET /users/{userId}/recurring_transfers
  • GET /users/{userId}/cross_account_transfers
  • GET /users/{userId}/cross_account_transfers/recurring_cross_account_transfers

Controllers now accept an injected HttpServletRequest alongside any existing query parameters.

Downstream Consumer Impact

Non-breaking. Existing (default-version) clients are unaffected — they continue to hit the same list() accessor and receive identical responses. Accessor implementations that want the new behavior opt in by overriding list20260427(); until they do, requesting version=20260427 yields AccessorMethodNotImplementedException, consistent with the payments precedent.

How Has This Been Tested?

  • ./gradlew check (JDK 21) — full build, all tests, coverage, and static analysis pass
  • Targeted controller tests — 58/58 pass, including 4 new v20260427 tests (one per endpoint) verifying the versioned accessor is invoked for ...;version=20260427 and the default accessor for the unversioned media type
  • Confirmed the annotation-processed gateway proxies regenerate with list20260427 for all four accessors

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

…-account transfers

Mirrors the payment/recurring-payment 20260427 support (commit e9274f9)
for internal transfers and cross-account transfers.

- Add list20260427() to TransferBaseAccessor, RecurringTransferBaseAccessor,
  CrossAccountTransferBaseAccessor, and CrossAccountRecurringTransferBaseAccessor.
- Version the GET list endpoints in TransfersController,
  RecurringTransfersController, CrossAccountTransfersController, and
  CrossAccountRecurringTransferController via DateVersionedResponse:
  default -> list(), version 20260427 -> list20260427().
- Transfer variants forward the existing TransferListOptions /
  RecurringTransferListOptions to both paths; cross-account variants take
  no options, matching payments.
- Add v20260427 controller tests and update existing list tests for the
  new HttpServletRequest parameter.
@gerfboy
gerfboy force-pushed the greg/versioned-list-transfers-cross-account branch from ebf3be1 to e71c304 Compare September 8, 2026 21:51
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