Skip to content

Commit 7ffdc7c

Browse files
committed
Add legacy SDK
1 parent 66d38c5 commit 7ffdc7c

File tree

1,256 files changed

+85960
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,256 files changed

+85960
-0
lines changed

legacy/doc/api/apple-pay.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Apple Pay
2+
3+
```python
4+
apple_pay_api = client.apple_pay
5+
```
6+
7+
## Class Name
8+
9+
`ApplePayApi`
10+
11+
12+
# Register Domain
13+
14+
Activates a domain for use with Apple Pay on the Web and Square. A validation
15+
is performed on this domain by Apple to ensure that it is properly set up as
16+
an Apple Pay enabled domain.
17+
18+
This endpoint provides an easy way for platform developers to bulk activate
19+
Apple Pay on the Web with Square for merchants using their platform.
20+
21+
Note: You will need to host a valid domain verification file on your domain to support Apple Pay. The
22+
current version of this file is always available at https://app.squareup.com/digital-wallets/apple-pay/apple-developer-merchantid-domain-association,
23+
and should be hosted at `.well_known/apple-developer-merchantid-domain-association` on your
24+
domain. This file is subject to change; we strongly recommend checking for updates regularly and avoiding
25+
long-lived caches that might not keep in sync with the correct file version.
26+
27+
To learn more about the Web Payments SDK and how to add Apple Pay, see [Take an Apple Pay Payment](https://developer.squareup.com/docs/web-payments/apple-pay).
28+
29+
```python
30+
def register_domain(self,
31+
body)
32+
```
33+
34+
## Parameters
35+
36+
| Parameter | Type | Tags | Description |
37+
| --- | --- | --- | --- |
38+
| `body` | [`Register Domain Request`](../../doc/models/register-domain-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
39+
40+
## Response Type
41+
42+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Register Domain Response`](../../doc/models/register-domain-response.md).
43+
44+
## Example Usage
45+
46+
```python
47+
body = {
48+
'domain_name': 'example.com'
49+
}
50+
51+
result = apple_pay_api.register_domain(body)
52+
53+
if result.is_success():
54+
print(result.body)
55+
elif result.is_error():
56+
print(result.errors)
57+
```
58+

legacy/doc/api/bank-accounts.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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

Comments
 (0)