|
| 1 | +# Bank Accounts |
| 2 | + |
| 3 | +```python |
| 4 | +bank_accounts_api = client.bank_accounts |
| 5 | +``` |
| 6 | + |
| 7 | +## Class Name |
| 8 | + |
| 9 | +`BankAccountsApi` |
| 10 | + |
| 11 | +## Methods |
| 12 | + |
| 13 | +* [List Bank Accounts](../../doc/api/bank-accounts.md#list-bank-accounts) |
| 14 | +* [Get Bank Account by V1 Id](../../doc/api/bank-accounts.md#get-bank-account-by-v1-id) |
| 15 | +* [Get Bank Account](../../doc/api/bank-accounts.md#get-bank-account) |
| 16 | + |
| 17 | + |
| 18 | +# List Bank Accounts |
| 19 | + |
| 20 | +Returns a list of [BankAccount](../../doc/models/bank-account.md) objects linked to a Square account. |
| 21 | + |
| 22 | +```python |
| 23 | +def list_bank_accounts(self, |
| 24 | + cursor=None, |
| 25 | + limit=None, |
| 26 | + location_id=None) |
| 27 | +``` |
| 28 | + |
| 29 | +## Parameters |
| 30 | + |
| 31 | +| Parameter | Type | Tags | Description | |
| 32 | +| --- | --- | --- | --- | |
| 33 | +| `cursor` | `str` | Query, Optional | The pagination cursor returned by a previous call to this endpoint.<br>Use it in the next `ListBankAccounts` request to retrieve the next set<br>of results.<br><br>See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. | |
| 34 | +| `limit` | `int` | Query, Optional | Upper limit on the number of bank accounts to return in the response.<br>Currently, 1000 is the largest supported limit. You can specify a limit<br>of up to 1000 bank accounts. This is also the default limit. | |
| 35 | +| `location_id` | `str` | Query, Optional | Location ID. You can specify this optional filter<br>to retrieve only the linked bank accounts belonging to a specific location. | |
| 36 | + |
| 37 | +## Response Type |
| 38 | + |
| 39 | +This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`List Bank Accounts Response`](../../doc/models/list-bank-accounts-response.md). |
| 40 | + |
| 41 | +## Example Usage |
| 42 | + |
| 43 | +```python |
| 44 | +result = bank_accounts_api.list_bank_accounts() |
| 45 | + |
| 46 | +if result.is_success(): |
| 47 | + print(result.body) |
| 48 | +elif result.is_error(): |
| 49 | + print(result.errors) |
| 50 | +``` |
| 51 | + |
| 52 | + |
| 53 | +# Get Bank Account by V1 Id |
| 54 | + |
| 55 | +Returns details of a [BankAccount](../../doc/models/bank-account.md) identified by V1 bank account ID. |
| 56 | + |
| 57 | +```python |
| 58 | +def get_bank_account_by_v1_id(self, |
| 59 | + v1_bank_account_id) |
| 60 | +``` |
| 61 | + |
| 62 | +## Parameters |
| 63 | + |
| 64 | +| Parameter | Type | Tags | Description | |
| 65 | +| --- | --- | --- | --- | |
| 66 | +| `v1_bank_account_id` | `str` | Template, Required | Connect V1 ID of the desired `BankAccount`. For more information, see<br>[Retrieve a bank account by using an ID issued by V1 Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-v1-bank-accounts-api). | |
| 67 | + |
| 68 | +## Response Type |
| 69 | + |
| 70 | +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`](../../doc/models/get-bank-account-by-v1-id-response.md). |
| 71 | + |
| 72 | +## Example Usage |
| 73 | + |
| 74 | +```python |
| 75 | +v1_bank_account_id = 'v1_bank_account_id8' |
| 76 | + |
| 77 | +result = bank_accounts_api.get_bank_account_by_v1_id(v1_bank_account_id) |
| 78 | + |
| 79 | +if result.is_success(): |
| 80 | + print(result.body) |
| 81 | +elif result.is_error(): |
| 82 | + print(result.errors) |
| 83 | +``` |
| 84 | + |
| 85 | + |
| 86 | +# Get Bank Account |
| 87 | + |
| 88 | +Returns details of a [BankAccount](../../doc/models/bank-account.md) |
| 89 | +linked to a Square account. |
| 90 | + |
| 91 | +```python |
| 92 | +def get_bank_account(self, |
| 93 | + bank_account_id) |
| 94 | +``` |
| 95 | + |
| 96 | +## Parameters |
| 97 | + |
| 98 | +| Parameter | Type | Tags | Description | |
| 99 | +| --- | --- | --- | --- | |
| 100 | +| `bank_account_id` | `str` | Template, Required | Square-issued ID of the desired `BankAccount`. | |
| 101 | + |
| 102 | +## Response Type |
| 103 | + |
| 104 | +This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Get Bank Account Response`](../../doc/models/get-bank-account-response.md). |
| 105 | + |
| 106 | +## Example Usage |
| 107 | + |
| 108 | +```python |
| 109 | +bank_account_id = 'bank_account_id0' |
| 110 | + |
| 111 | +result = bank_accounts_api.get_bank_account(bank_account_id) |
| 112 | + |
| 113 | +if result.is_success(): |
| 114 | + print(result.body) |
| 115 | +elif result.is_error(): |
| 116 | + print(result.errors) |
| 117 | +``` |
| 118 | + |
0 commit comments