Skip to content

Commit 4adb3d2

Browse files
Merge pull request #49 from square/release/7.0.0.20201118
Generated PR for Release: 7.0.0.20201118
2 parents 768d0cd + 69bd930 commit 4adb3d2

160 files changed

Lines changed: 2335 additions & 355 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Change Log
22

3+
## Version 7.0.0.20201118 (2020-11-18T00:00)
4+
## New API releases
5+
6+
* **Bookings API** (beta). This API enables you, as an application developer, to create applications to set up and manage bookings for appointments of fixed duration in which selected staff members of a Square seller provide specified services in supported locations for particular customers.
7+
* For an overview, see [Manage Bookings for Square Sellers](https://developer.squareup.com/docs/bookings-api/what-it-is).
8+
* For technical reference, see [Bookings API](https://developer.squareup.com/reference/square_2020-11-18/bookings-api).
9+
10+
## Existing API updates
11+
12+
* **Payments API:**
13+
* [Payment.](https://developer.squareup.com/reference/square_2020-11-18/objects/Payment) The object now includes the `risk_evaluation` field to identify the Square-assigned risk level associated with the payment. Sellers can use this information to provide the goods and services or refund the payment.
14+
15+
## New SDK release
16+
* **New Square Node.js SDK (beta)**
17+
18+
The new [Square Node.js SDK](https://github.com/square/square-nodejs-sdk) is available in beta and will eventually replace the deprecated Connect Node.js SDK. For migration information, see the [Connect SDK README.](https://github.com/square/connect-nodejs-sdk/blob/master/README.md) The following topics are updated to use the new SDK:
19+
* [Walkthrough: Integrate Square Payments in a Website](https://developer.squareup.com/docs/payment-form/payment-form-walkthrough)
20+
* [Verify the Buyer When Using a Nonce for an Online Payment](https://developer.squareup.com/docs/payment-form/cookbook/verify-buyer-on-card-charge)
21+
* [Create a Gift Card Payment Endpoint](https://developer.squareup.com/docs/payment-form/gift-cards/part-2)
22+
23+
24+
## Documentation Updates
25+
26+
* The **Testing** topics are moved from the end of the table of contents to the top, in the **Home** section under [Testing your App](https://developer.squareup.com/docs/testing-your-app).
27+
* [Pay for orders.]](https://developer.squareup.com/docs/orders-api/pay-for-order) Topic revised to add clarity when to use Payments API and Orders API to pay for an order. The [Orders Integration]](https://developer.squareup.com/docs/payments-api/take-payments?preview=true#orders-integration) topic in Payments API simplified accordingly.
28+
29+
330
## Version 6.5.0.20201028 (2020-10-28T00:00)
431

532
## Existing API updates
@@ -23,7 +50,7 @@
2350

2451
* **Locations API:**
2552
* [Location](https://developer.squareup.com/reference/square_2020-10-28/objects/Location) object. Has a new read-only field,[full_format_logo_url](https://developer.squareup.com/reference/square_2020-10-28/objects/Location#definition__property-full_format_logo_url), which provides URL of a full-format logo image for the location.
26-
* [Webhooks.](https://developer.squareup.com/docs/webhooks-api/subscribe-to-events#locations) The Locations API now supports notifications for when a location is created and when a location is updated.
53+
* [Webhooks](https://developer.squareup.com/docs/webhooks-api/subscribe-to-events#locations) The Locations API now supports notifications for when a location is created and when a location is updated.
2754

2855
* **Orders API:**
2956
* [RetrieveOrder](https://developer.squareup.com/reference/square_2020-10-28/orders-api/retrieve-order), new endpoint. For more information, see the [Retrieve Orders](https://developer.squareup.com/docs/orders-api/manage-orders#retrieve-orders) overview.
@@ -212,7 +239,7 @@ Bug fixes:
212239
* For technical reference, see [Customer Segments]( https://developer.squareup.com/reference/square/customer-segments-api).
213240

214241

215-
* **New webhooks.** v2 Webhooks (beta) now supports webhooks for the following APIs:
242+
* **New webhooks** v2 Webhooks (beta) now supports webhooks for the following APIs:
216243
* Orders API. `order.created`, `order.updated`, and `order.fulfillment.updated`
217244
* Terminal API. `terminal.checkout.created` and `terminal.checkout.updated`
218245
* Devices API. `device.code.paired`
@@ -250,8 +277,8 @@ Bug fixes:
250277

251278
## Version 5.1.0.20200325 (2020-03-25)
252279
## Existing API updates
253-
* **[Payments API](https://developer.squareup.com/reference/square/payments-api).** In support of the existing [Delayed capture](payments-api/take-payments) for payments, the following fields are added to the [Payment](https://developer.squareup.com/reference/square/objects/Payment) type:
254-
* `delay_duration`. In a [CreatePayment](https://developer.squareup.com/reference/square/payments-api/create-payment) request, you can set `autocomplete` to false to get payment approval but not charge the payment source. You can now add this field to specify a time period to complete (or cancel) the payment. For more information, see [Delay capture](payments-api/take-payments).
280+
* **[Payments API](https://developer.squareup.com/reference/square/payments-api).** In support of the existing [Delayed capture]](https://developer.squareup.com/docs/payments-api/take-payments) for payments, the following fields are added to the [Payment](https://developer.squareup.com/reference/square/objects/Payment) type:
281+
* `delay_duration`. In a [CreatePayment](https://developer.squareup.com/reference/square/payments-api/create-payment) request, you can set `autocomplete` to false to get payment approval but not charge the payment source. You can now add this field to specify a time period to complete (or cancel) the payment. For more information, see [Delay capture]](https://developer.squareup.com/docs/payments-api/take-payments).
255282
* `delay_action`. Defines the action that Square takes on the payment when the `delay_duration` elapses. In this release, the API supports only the cancel payment action.
256283
* `delayed_until`. Provides the date and time on Square servers when Square applies `delay_action` on the payment.
257284

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ pip install -r test-requirements.txt
6969
### Loyalty
7070
* [Loyalty]
7171

72+
### Bookings
73+
* [Bookings]
74+
7275
### Business
7376
* [Merchants]
7477
* [Locations]
@@ -373,6 +376,7 @@ You can also use the Square API to create applications or services that work wit
373376
[Inventory]: doc/api/inventory.md
374377
[Labor]: doc/api/labor.md
375378
[Loyalty]: doc/api/loyalty.md
379+
[Bookings]: doc/api/bookings.md
376380
[Locations]: doc/api/locations.md
377381
[Merchants]: doc/api/merchants.md
378382
[Orders]: doc/api/orders.md

doc/api/apple-pay.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This endpoint provides an easy way for platform developers to bulk activate
1919
Web Apple Pay with Square for merchants using their platform.
2020

2121
To learn more about Apple Pay on Web see the Apple Pay section in the
22-
[Square Payment Form Walkthrough](https://developer.squareup.com/docs/docs/payment-form/payment-form-walkthrough).
22+
[Square Payment Form Walkthrough](https://developer.squareup.com/docs/payment-form/payment-form-walkthrough).
2323

2424
```python
2525
def register_domain(self,

doc/api/bank-accounts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def list_bank_accounts(self,
3030

3131
| Parameter | Type | Tags | Description |
3232
| --- | --- | --- | --- |
33-
| `cursor` | `string` | 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/docs/working-with-apis/pagination) guide for more information. |
33+
| `cursor` | `string` | 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. |
3434
| `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. |
3535
| `location_id` | `string` | Query, Optional | Location ID. You can specify this optional filter<br>to retrieve only the linked bank accounts belonging to a specific location. |
3636

@@ -67,7 +67,7 @@ def get_bank_account_by_v1_id(self,
6767

6868
| Parameter | Type | Tags | Description |
6969
| --- | --- | --- | --- |
70-
| `v1_bank_account_id` | `string` | 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/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-v1-bank-accounts-api). |
70+
| `v1_bank_account_id` | `string` | 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). |
7171

7272
## Response Type
7373

doc/api/bookings.md

Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
1+
# Bookings
2+
3+
```python
4+
bookings_api = client.bookings
5+
```
6+
7+
## Class Name
8+
9+
`BookingsApi`
10+
11+
## Methods
12+
13+
* [Create Booking](/doc/api/bookings.md#create-booking)
14+
* [Search Availability](/doc/api/bookings.md#search-availability)
15+
* [Retrieve Business Booking Profile](/doc/api/bookings.md#retrieve-business-booking-profile)
16+
* [List Team Member Booking Profiles](/doc/api/bookings.md#list-team-member-booking-profiles)
17+
* [Retrieve Team Member Booking Profile](/doc/api/bookings.md#retrieve-team-member-booking-profile)
18+
* [Retrieve Booking](/doc/api/bookings.md#retrieve-booking)
19+
* [Update Booking](/doc/api/bookings.md#update-booking)
20+
21+
22+
# Create Booking
23+
24+
Creates a booking.
25+
26+
```python
27+
def create_booking(self,
28+
body)
29+
```
30+
31+
## Parameters
32+
33+
| Parameter | Type | Tags | Description |
34+
| --- | --- | --- | --- |
35+
| `body` | [`Create Booking Request`](/doc/models/create-booking-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
36+
37+
## Response Type
38+
39+
[`Create Booking Response`](/doc/models/create-booking-response.md)
40+
41+
## Example Usage
42+
43+
```python
44+
body = {}
45+
body['idempotency_key'] = 'idempotency_key2'
46+
body['booking'] = {}
47+
body['booking']['id'] = 'id8'
48+
body['booking']['version'] = 148
49+
body['booking']['status'] = 'ACCEPTED'
50+
body['booking']['created_at'] = 'created_at6'
51+
body['booking']['updated_at'] = 'updated_at4'
52+
53+
result = bookings_api.create_booking(body)
54+
55+
if result.is_success():
56+
print(result.body)
57+
elif result.is_error():
58+
print(result.errors)
59+
```
60+
61+
62+
# Search Availability
63+
64+
Searches for availabilities for booking.
65+
66+
```python
67+
def search_availability(self,
68+
body)
69+
```
70+
71+
## Parameters
72+
73+
| Parameter | Type | Tags | Description |
74+
| --- | --- | --- | --- |
75+
| `body` | [`Search Availability Request`](/doc/models/search-availability-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
76+
77+
## Response Type
78+
79+
[`Search Availability Response`](/doc/models/search-availability-response.md)
80+
81+
## Example Usage
82+
83+
```python
84+
body = {}
85+
body['query'] = {}
86+
body['query']['filter'] = {}
87+
body['query']['filter']['start_at_range'] = {}
88+
body['query']['filter']['start_at_range']['start_at'] = 'start_at8'
89+
body['query']['filter']['start_at_range']['end_at'] = 'end_at4'
90+
body['query']['filter']['location_id'] = 'location_id6'
91+
body['query']['filter']['segment_filters'] = []
92+
93+
body['query']['filter']['segment_filters'].append({})
94+
body['query']['filter']['segment_filters'][0]['service_variation_id'] = 'service_variation_id8'
95+
body['query']['filter']['segment_filters'][0]['team_member_id_filter'] = {}
96+
body['query']['filter']['segment_filters'][0]['team_member_id_filter']['all'] = ['all7']
97+
body['query']['filter']['segment_filters'][0]['team_member_id_filter']['any'] = ['any0', 'any1']
98+
body['query']['filter']['segment_filters'][0]['team_member_id_filter']['none'] = ['none5']
99+
100+
body['query']['filter']['segment_filters'].append({})
101+
body['query']['filter']['segment_filters'][1]['service_variation_id'] = 'service_variation_id7'
102+
body['query']['filter']['segment_filters'][1]['team_member_id_filter'] = {}
103+
body['query']['filter']['segment_filters'][1]['team_member_id_filter']['all'] = ['all6', 'all7', 'all8']
104+
body['query']['filter']['segment_filters'][1]['team_member_id_filter']['any'] = ['any1', 'any2', 'any3']
105+
body['query']['filter']['segment_filters'][1]['team_member_id_filter']['none'] = ['none6', 'none7']
106+
107+
body['query']['filter']['booking_id'] = 'booking_id6'
108+
109+
result = bookings_api.search_availability(body)
110+
111+
if result.is_success():
112+
print(result.body)
113+
elif result.is_error():
114+
print(result.errors)
115+
```
116+
117+
118+
# Retrieve Business Booking Profile
119+
120+
Retrieves a seller's booking profile.
121+
122+
```python
123+
def retrieve_business_booking_profile(self)
124+
```
125+
126+
## Response Type
127+
128+
[`Retrieve Business Booking Profile Response`](/doc/models/retrieve-business-booking-profile-response.md)
129+
130+
## Example Usage
131+
132+
```python
133+
result = bookings_api.retrieve_business_booking_profile()
134+
135+
if result.is_success():
136+
print(result.body)
137+
elif result.is_error():
138+
print(result.errors)
139+
```
140+
141+
142+
# List Team Member Booking Profiles
143+
144+
Lists booking profiles for team members.
145+
146+
```python
147+
def list_team_member_booking_profiles(self,
148+
bookable_only=False,
149+
limit=None,
150+
cursor=None,
151+
location_id=None)
152+
```
153+
154+
## Parameters
155+
156+
| Parameter | Type | Tags | Description |
157+
| --- | --- | --- | --- |
158+
| `bookable_only` | `bool` | Query, Optional | Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`). |
159+
| `limit` | `int` | Query, Optional | The maximum number of results to return. |
160+
| `cursor` | `string` | Query, Optional | The cursor for paginating through the results. |
161+
| `location_id` | `string` | Query, Optional | Indicates whether to include only team members enabled at the given location in the returned result. |
162+
163+
## Response Type
164+
165+
[`List Team Member Booking Profiles Response`](/doc/models/list-team-member-booking-profiles-response.md)
166+
167+
## Example Usage
168+
169+
```python
170+
bookable_only = False
171+
limit = 172
172+
cursor = 'cursor6'
173+
location_id = 'location_id4'
174+
175+
result = bookings_api.list_team_member_booking_profiles(bookable_only, limit, cursor, location_id)
176+
177+
if result.is_success():
178+
print(result.body)
179+
elif result.is_error():
180+
print(result.errors)
181+
```
182+
183+
184+
# Retrieve Team Member Booking Profile
185+
186+
Retrieves a team member's booking profile.
187+
188+
```python
189+
def retrieve_team_member_booking_profile(self,
190+
team_member_id)
191+
```
192+
193+
## Parameters
194+
195+
| Parameter | Type | Tags | Description |
196+
| --- | --- | --- | --- |
197+
| `team_member_id` | `string` | Template, Required | The ID of the team member to retrieve. |
198+
199+
## Response Type
200+
201+
[`Retrieve Team Member Booking Profile Response`](/doc/models/retrieve-team-member-booking-profile-response.md)
202+
203+
## Example Usage
204+
205+
```python
206+
team_member_id = 'team_member_id0'
207+
208+
result = bookings_api.retrieve_team_member_booking_profile(team_member_id)
209+
210+
if result.is_success():
211+
print(result.body)
212+
elif result.is_error():
213+
print(result.errors)
214+
```
215+
216+
217+
# Retrieve Booking
218+
219+
Retrieves a booking.
220+
221+
```python
222+
def retrieve_booking(self,
223+
booking_id)
224+
```
225+
226+
## Parameters
227+
228+
| Parameter | Type | Tags | Description |
229+
| --- | --- | --- | --- |
230+
| `booking_id` | `string` | Template, Required | The ID of the [Booking](#type-booking) object representing the to-be-retrieved booking. |
231+
232+
## Response Type
233+
234+
[`Retrieve Booking Response`](/doc/models/retrieve-booking-response.md)
235+
236+
## Example Usage
237+
238+
```python
239+
booking_id = 'booking_id4'
240+
241+
result = bookings_api.retrieve_booking(booking_id)
242+
243+
if result.is_success():
244+
print(result.body)
245+
elif result.is_error():
246+
print(result.errors)
247+
```
248+
249+
250+
# Update Booking
251+
252+
Updates a booking.
253+
254+
```python
255+
def update_booking(self,
256+
booking_id,
257+
body)
258+
```
259+
260+
## Parameters
261+
262+
| Parameter | Type | Tags | Description |
263+
| --- | --- | --- | --- |
264+
| `booking_id` | `string` | Template, Required | The ID of the [Booking](#type-booking) object representing the to-be-updated booking. |
265+
| `body` | [`Update Booking Request`](/doc/models/update-booking-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
266+
267+
## Response Type
268+
269+
[`Update Booking Response`](/doc/models/update-booking-response.md)
270+
271+
## Example Usage
272+
273+
```python
274+
booking_id = 'booking_id4'
275+
body = {}
276+
body['idempotency_key'] = 'idempotency_key2'
277+
body['booking'] = {}
278+
body['booking']['id'] = 'id8'
279+
body['booking']['version'] = 148
280+
body['booking']['status'] = 'ACCEPTED'
281+
body['booking']['created_at'] = 'created_at6'
282+
body['booking']['updated_at'] = 'updated_at4'
283+
284+
result = bookings_api.update_booking(booking_id, body)
285+
286+
if result.is_success():
287+
print(result.body)
288+
elif result.is_error():
289+
print(result.errors)
290+
```
291+

0 commit comments

Comments
 (0)