Skip to content

[Feature]: Add sortOrder parameter support to GetAllTransfers in Transfers API #461

@jbr0-sc

Description

@jbr0-sc

Feature summary

No response

Problem statement

Hello,

When using the Transfers API via the Go SDK, I need to get a list of transfers sorted in descending order. According to the Adyen API documentation for GET /transfers, this can be done by passing a sortOrder query parameter (e.g., sortOrder=desc).

However, the GetAllTransfersInput builder in the SDK does not seem to have a method to specify this sort parameter. I am currently building my request like this:

service := c.BalancePortalClient.Transfers()
input := service.TransfersApi.GetAllTransfersInput().
    CreatedSince(time.Now().AddDate(0, -6, 0)).
    CreatedUntil(time.Now()).
    Limit(100).
    BalanceAccountId(balanceAccountID).
    Category("bank")

// I would like to do something like this:
// input = input.SortOrder("desc")

Could you please add a SortOrder(string) method to the GetAllTransfersInput builder to allow specifying the sort order for the API call?

Thank you!

Proposed solution

Add SortOrder in TransfersApiGetAllTransfersInput (https://github.com/Adyen/adyen-go-api-library/blob/main/src/transfers/api_transfers.go#L239), including updating GetAllTransfers to use it.

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions