Skip to content

Latest commit

 

History

History
125 lines (89 loc) · 3.47 KB

bank-accounts.md

File metadata and controls

125 lines (89 loc) · 3.47 KB

Bank Accounts

IBankAccountsApi bankAccountsApi = client.BankAccountsApi;

Class Name

BankAccountsApi

Methods

List Bank Accounts

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

ListBankAccountsAsync(
    string cursor = null,
    int? limit = null,
    string locationId = null)

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 int? 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

Task<Models.ListBankAccountsResponse>

Example Usage

try
{
    ListBankAccountsResponse result = await bankAccountsApi.ListBankAccountsAsync();
}
catch (ApiException e)
{
    // TODO: Handle exception here
    Console.WriteLine(e.Message);
}

Get Bank Account by V1 Id

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

GetBankAccountByV1IdAsync(
    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

Task<Models.GetBankAccountByV1IdResponse>

Example Usage

string v1BankAccountId = "v1_bank_account_id8";
try
{
    GetBankAccountByV1IdResponse result = await bankAccountsApi.GetBankAccountByV1IdAsync(v1BankAccountId);
}
catch (ApiException e)
{
    // TODO: Handle exception here
    Console.WriteLine(e.Message);
}

Get Bank Account

Returns details of a BankAccount linked to a Square account.

GetBankAccountAsync(
    string bankAccountId)

Parameters

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

Response Type

Task<Models.GetBankAccountResponse>

Example Usage

string bankAccountId = "bank_account_id0";
try
{
    GetBankAccountResponse result = await bankAccountsApi.GetBankAccountAsync(bankAccountId);
}
catch (ApiException e)
{
    // TODO: Handle exception here
    Console.WriteLine(e.Message);
}