accounts
suspend fun accounts(ticket: Ticket.Accounts, credentials: Credentials, fields: List<AccountField<*>>, filter: AccountFilter? = null, session: Session? = null, recurringConsents: Boolean = false): Response<AccountsResult>
Invoke the accounts service: list accounts (and selected fields) reachable through credentials.
Parameters
ticket
Ticket authorizing the call.
credentials
Bank-side identification.
fields
Fields to populate on each returned account.
filter
Optional account filter (e.g. by IBAN, currency, supported services). Server-side AND/OR/NOT predicates available via the AccountField helpers.
See also
Samples
client.accounts(
accountsTicket,
credentials,
fields = listOf(
AccountField.Iban,
AccountField.Bic,
AccountField.Name,
AccountField.DisplayName,
AccountField.OwnerName,
AccountField.Currency,
),
filter = AccountField.Iban.notEq(null)
.and(AccountField.Type.eq(AccountType.CURRENT)
.or(AccountField.Type.eq(null)))
.and(Account.supports(SupportedService.COLLECT_PAYMENT)),
)Content copied to clipboard