Skip to content

Latest commit

 

History

History
122 lines (80 loc) · 3.42 KB

bank-accounts.md

File metadata and controls

122 lines (80 loc) · 3.42 KB

Bank Accounts

bank_accounts_api = client.bank_accounts

Class Name

BankAccountsApi

Methods

List Bank Accounts

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

def list_bank_accounts(self,
                      cursor=None,
                      limit=None,
                      location_id=None)

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.
location_id 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

List Bank Accounts Response

Example Usage

cursor = 'cursor6'
limit = 172
location_id = 'location_id4'

result = bank_accounts_api.list_bank_accounts(cursor, limit, location_id)

if result.is_success():
    print(result.body)
elif result.is_error():
    print(result.errors)

Get Bank Account by V1 Id

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

def get_bank_account_by_v1_id(self,
                             v1_bank_account_id)

Parameters

Parameter Type Tags Description
v1_bank_account_id 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

Get Bank Account by V1 Id Response

Example Usage

v1_bank_account_id = 'v1_bank_account_id8'

result = bank_accounts_api.get_bank_account_by_v1_id(v1_bank_account_id)

if result.is_success():
    print(result.body)
elif result.is_error():
    print(result.errors)

Get Bank Account

Returns details of a BankAccount linked to a Square account.

def get_bank_account(self,
                    bank_account_id)

Parameters

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

Response Type

Get Bank Account Response

Example Usage

bank_account_id = 'bank_account_id0'

result = bank_accounts_api.get_bank_account(bank_account_id)

if result.is_success():
    print(result.body)
elif result.is_error():
    print(result.errors)