getAccounts

suspend fun getAccounts(status: AccountObjects.AccountStatus? = null, type: AccountObjects.AccountType? = null, externalId: String? = null, includeDisabled: Boolean = false, page: Int? = null, perPage: Int? = null): Pair<AccountResponses.ListAccountsResponse?, NetworkingError?>

Retrieves a paginated list of accounts, optionally filtered.

Return

A pair of the AccountResponses.ListAccountsResponse and any NetworkingError.

Parameters

status

Filter by account status.

type

Filter by account type.

externalId

Filter by the merchant-assigned external ID.

includeDisabled

When true, includes disabled accounts in the results.

page

Page number to retrieve.

perPage

Number of results per page.


fun getAccounts(status: AccountObjects.AccountStatus? = null, type: AccountObjects.AccountType? = null, externalId: String? = null, includeDisabled: Boolean = false, page: Int? = null, perPage: Int? = null, completionHandler: (AccountResponses.ListAccountsResponse?, NetworkingError?) -> Unit)

Retrieves a paginated list of accounts, optionally filtered.

Parameters

status

Filter by account status.

type

Filter by account type.

externalId

Filter by the merchant-assigned external ID.

includeDisabled

When true, includes disabled accounts in the results.

page

Page number to retrieve.

perPage

Number of results per page.

completionHandler