Skip to content

Latest commit

 

History

History
124 lines (86 loc) · 3.88 KB

bank-accounts.md

File metadata and controls

124 lines (86 loc) · 3.88 KB

Bank Accounts

BankAccountsApi bankAccountsApi = client.getBankAccountsApi();

Class Name

BankAccountsApi

Methods

List Bank Accounts

Returns a list of BankAccount objects linked to a Square account.

CompletableFuture<ListBankAccountsResponse> listBankAccountsAsync(
    final String cursor,
    final Integer limit,
    final String locationId)

Parameters

Parameter Type Tags Description
cursor String Query, Optional The pagination cursor returned by a previous call to this endpoint.
Use it in the next ListBankAccounts request to retrieve the next set
of results.

See the Pagination guide for more information.
limit Integer Query, Optional Upper limit on the number of bank accounts to return in the response.
Currently, 1000 is the largest supported limit. You can specify a limit
of up to 1000 bank accounts. This is also the default limit.
locationId String Query, Optional Location ID. You can specify this optional filter
to retrieve only the linked bank accounts belonging to a specific location.

Response Type

ListBankAccountsResponse

Example Usage

bankAccountsApi.listBankAccountsAsync(null, null, null).thenAccept(result -> {
    // TODO success callback handler
    System.out.println(result);
}).exceptionally(exception -> {
    // TODO failure callback handler
    exception.printStackTrace();
    return null;
});

Get Bank Account by V1 Id

Returns details of a BankAccount identified by V1 bank account ID.

CompletableFuture<GetBankAccountByV1IdResponse> getBankAccountByV1IdAsync(
    final String v1BankAccountId)

Parameters

Parameter Type Tags Description
v1BankAccountId String Template, Required Connect V1 ID of the desired BankAccount. For more information, see
Retrieve a bank account by using an ID issued by V1 Bank Accounts API.

Response Type

GetBankAccountByV1IdResponse

Example Usage

String v1BankAccountId = "v1_bank_account_id8";

bankAccountsApi.getBankAccountByV1IdAsync(v1BankAccountId).thenAccept(result -> {
    // TODO success callback handler
    System.out.println(result);
}).exceptionally(exception -> {
    // TODO failure callback handler
    exception.printStackTrace();
    return null;
});

Get Bank Account

Returns details of a BankAccount linked to a Square account.

CompletableFuture<GetBankAccountResponse> getBankAccountAsync(
    final String bankAccountId)

Parameters

Parameter Type Tags Description
bankAccountId String Template, Required Square-issued ID of the desired BankAccount.

Response Type

GetBankAccountResponse

Example Usage

String bankAccountId = "bank_account_id0";

bankAccountsApi.getBankAccountAsync(bankAccountId).thenAccept(result -> {
    // TODO success callback handler
    System.out.println(result);
}).exceptionally(exception -> {
    // TODO failure callback handler
    exception.printStackTrace();
    return null;
});