Skip to content

Latest commit

 

History

History
120 lines (77 loc) · 3.68 KB

bank-accounts.md

File metadata and controls

120 lines (77 loc) · 3.68 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(cursor: nil,
                       limit: nil,
                       location_id: nil)

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

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

Example Usage

result = bank_accounts_api.list_bank_accounts

if result.success?
  puts result.data
elsif result.error?
  warn result.errors
end

Get Bank Account by V1 Id

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

def get_bank_account_by_v1_id(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

This method returns a \ApiResponse instance. The data property in this instance returns the response data which is of type Get Bank Account by V1 Id Response Hash.

Example Usage

v1_bank_account_id = 'v1_bank_account_id8'


result = bank_accounts_api.get_bank_account_by_v1_id(v1_bank_account_id: v1_bank_account_id)

if result.success?
  puts result.data
elsif result.error?
  warn result.errors
end

Get Bank Account

Returns details of a BankAccount linked to a Square account.

def get_bank_account(bank_account_id:)

Parameters

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

Response Type

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

Example Usage

bank_account_id = 'bank_account_id0'


result = bank_accounts_api.get_bank_account(bank_account_id: bank_account_id)

if result.success?
  puts result.data
elsif result.error?
  warn result.errors
end