bank_accounts_api = client.bank_accounts
BankAccountsApi
Returns a list of BankAccount objects linked to a Square account.
def list_bank_accounts(cursor: nil,
limit: nil,
location_id: nil)
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. |
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. |
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
.
result = bank_accounts_api.list_bank_accounts
if result.success?
puts result.data
elsif result.error?
warn result.errors
end
Returns details of a BankAccount identified by V1 bank account ID.
def get_bank_account_by_v1_id(v1_bank_account_id:)
Parameter | Type | Tags | Description |
---|---|---|---|
v1_bank_account_id |
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. |
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
.
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
Returns details of a BankAccount linked to a Square account.
def get_bank_account(bank_account_id:)
Parameter | Type | Tags | Description |
---|---|---|---|
bank_account_id |
String |
Template, Required | Square-issued ID of the desired BankAccount . |
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
.
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