BankAccountsApi bankAccountsApi = client.getBankAccountsApi();
BankAccountsApi
Returns a list of BankAccount objects linked to a Square account.
CompletableFuture<ListBankAccountsResponse> listBankAccountsAsync(
final String cursor,
final Integer limit,
final String locationId)
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 setof 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. |
bankAccountsApi.listBankAccountsAsync(null, null, null).thenAccept(result -> {
// TODO success callback handler
}).exceptionally(exception -> {
// TODO failure callback handler
return null;
});
Returns details of a BankAccount identified by V1 bank account ID.
CompletableFuture<GetBankAccountByV1IdResponse> getBankAccountByV1IdAsync(
final String v1BankAccountId)
Parameter | Type | Tags | Description |
---|---|---|---|
v1BankAccountId |
String |
Template, Required | Connect V1 ID of the desired BankAccount . For more information, seeRetrieve a bank account by using an ID issued by V1 Bank Accounts API. |
String v1BankAccountId = "v1_bank_account_id8";
bankAccountsApi.getBankAccountByV1IdAsync(v1BankAccountId).thenAccept(result -> {
// TODO success callback handler
}).exceptionally(exception -> {
// TODO failure callback handler
return null;
});
Returns details of a BankAccount linked to a Square account.
CompletableFuture<GetBankAccountResponse> getBankAccountAsync(
final String bankAccountId)
Parameter | Type | Tags | Description |
---|---|---|---|
bankAccountId |
String |
Template, Required | Square-issued ID of the desired BankAccount . |
String bankAccountId = "bank_account_id0";
bankAccountsApi.getBankAccountAsync(bankAccountId).thenAccept(result -> {
// TODO success callback handler
}).exceptionally(exception -> {
// TODO failure callback handler
return null;
});