Skip to content

Latest commit

 

History

History
121 lines (80 loc) · 3.79 KB

bank-accounts.md

File metadata and controls

121 lines (80 loc) · 3.79 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 str 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 str Query, Optional Location ID. You can specify this optional filter
to retrieve only the linked bank accounts belonging to a specific location.

Response Type

This method returns a ApiResponse instance. The body property of this instance returns the response data which is of type List Bank Accounts Response.

Example Usage

result = bank_accounts_api.list_bank_accounts()
print(result)

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 str 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

This method returns a ApiResponse instance. The body property of this instance returns the response data which is of 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)
print(result)

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 str Template, Required Square-issued ID of the desired BankAccount.

Response Type

This method returns a ApiResponse instance. The body property of this instance returns the response data which is of type Get Bank Account Response.

Example Usage

bank_account_id = 'bank_account_id0'

result = bank_accounts_api.get_bank_account(bank_account_id)
print(result)

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