Skip to content

Commit 1724c9f

Browse files
authored
Merge pull request #122 from square/release/32.0.0.20231018
Generated PR for Release: 32.0.0.20231018
2 parents 89cf1a4 + d4d10a2 commit 1724c9f

40 files changed

+1020
-119
lines changed

doc/api/bookings.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ bookings_api = client.bookings
1515
* [Search Availability](../../doc/api/bookings.md#search-availability)
1616
* [Bulk Retrieve Bookings](../../doc/api/bookings.md#bulk-retrieve-bookings)
1717
* [Retrieve Business Booking Profile](../../doc/api/bookings.md#retrieve-business-booking-profile)
18+
* [List Location Booking Profiles](../../doc/api/bookings.md#list-location-booking-profiles)
19+
* [Retrieve Location Booking Profile](../../doc/api/bookings.md#retrieve-location-booking-profile)
1820
* [List Team Member Booking Profiles](../../doc/api/bookings.md#list-team-member-booking-profiles)
1921
* [Bulk Retrieve Team Member Booking Profiles](../../doc/api/bookings.md#bulk-retrieve-team-member-booking-profiles)
2022
* [Retrieve Team Member Booking Profile](../../doc/api/bookings.md#retrieve-team-member-booking-profile)
@@ -231,6 +233,74 @@ elif result.is_error():
231233
```
232234

233235

236+
# List Location Booking Profiles
237+
238+
Lists location booking profiles of a seller.
239+
240+
```python
241+
def list_location_booking_profiles(self,
242+
limit=None,
243+
cursor=None)
244+
```
245+
246+
## Parameters
247+
248+
| Parameter | Type | Tags | Description |
249+
| --- | --- | --- | --- |
250+
| `limit` | `int` | Query, Optional | The maximum number of results to return in a paged response. |
251+
| `cursor` | `str` | Query, Optional | The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results. |
252+
253+
## Response Type
254+
255+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`List Location Booking Profiles Response`](../../doc/models/list-location-booking-profiles-response.md).
256+
257+
## Example Usage
258+
259+
```python
260+
result = bookings_api.list_location_booking_profiles()
261+
print(result)
262+
263+
if result.is_success():
264+
print(result.body)
265+
elif result.is_error():
266+
print(result.errors)
267+
```
268+
269+
270+
# Retrieve Location Booking Profile
271+
272+
Retrieves a seller's location booking profile.
273+
274+
```python
275+
def retrieve_location_booking_profile(self,
276+
location_id)
277+
```
278+
279+
## Parameters
280+
281+
| Parameter | Type | Tags | Description |
282+
| --- | --- | --- | --- |
283+
| `location_id` | `str` | Template, Required | The ID of the location to retrieve the booking profile. |
284+
285+
## Response Type
286+
287+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Retrieve Location Booking Profile Response`](../../doc/models/retrieve-location-booking-profile-response.md).
288+
289+
## Example Usage
290+
291+
```python
292+
location_id = 'location_id4'
293+
294+
result = bookings_api.retrieve_location_booking_profile(location_id)
295+
print(result)
296+
297+
if result.is_success():
298+
print(result.body)
299+
elif result.is_error():
300+
print(result.errors)
301+
```
302+
303+
234304
# List Team Member Booking Profiles
235305

236306
Lists booking profiles for team members.

doc/api/employees.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ employees_api = client.employees
1818

1919
**This endpoint is deprecated.**
2020

21-
ListEmployees
22-
2321
```python
2422
def list_employees(self,
2523
location_id=None,
@@ -58,8 +56,6 @@ elif result.is_error():
5856

5957
**This endpoint is deprecated.**
6058

61-
RetrieveEmployee
62-
6359
```python
6460
def retrieve_employee(self,
6561
id)

doc/api/subscriptions.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ subscriptions_api = client.subscriptions
1111
## Methods
1212

1313
* [Create Subscription](../../doc/api/subscriptions.md#create-subscription)
14+
* [Bulk Swap Plan](../../doc/api/subscriptions.md#bulk-swap-plan)
1415
* [Search Subscriptions](../../doc/api/subscriptions.md#search-subscriptions)
1516
* [Retrieve Subscription](../../doc/api/subscriptions.md#retrieve-subscription)
1617
* [Update Subscription](../../doc/api/subscriptions.md#update-subscription)
1718
* [Delete Subscription Action](../../doc/api/subscriptions.md#delete-subscription-action)
19+
* [Change Billing Anchor Date](../../doc/api/subscriptions.md#change-billing-anchor-date)
1820
* [Cancel Subscription](../../doc/api/subscriptions.md#cancel-subscription)
1921
* [List Subscription Events](../../doc/api/subscriptions.md#list-subscription-events)
2022
* [Pause Subscription](../../doc/api/subscriptions.md#pause-subscription)
@@ -80,6 +82,45 @@ elif result.is_error():
8082
```
8183

8284

85+
# Bulk Swap Plan
86+
87+
Schedules a plan variation change for all active subscriptions under a given plan
88+
variation. For more information, see [Swap Subscription Plan Variations](https://developer.squareup.com/docs/subscriptions-api/swap-plan-variations).
89+
90+
```python
91+
def bulk_swap_plan(self,
92+
body)
93+
```
94+
95+
## Parameters
96+
97+
| Parameter | Type | Tags | Description |
98+
| --- | --- | --- | --- |
99+
| `body` | [`Bulk Swap Plan Request`](../../doc/models/bulk-swap-plan-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
100+
101+
## Response Type
102+
103+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Bulk Swap Plan Response`](../../doc/models/bulk-swap-plan-response.md).
104+
105+
## Example Usage
106+
107+
```python
108+
body = {
109+
'new_plan_variation_id': 'FQ7CDXXWSLUJRPM3GFJSJGZ7',
110+
'old_plan_variation_id': '6JHXF3B2CW3YKHDV4XEM674H',
111+
'location_id': 'S8GWD5R9QB376'
112+
}
113+
114+
result = subscriptions_api.bulk_swap_plan(body)
115+
print(result)
116+
117+
if result.is_success():
118+
print(result.body)
119+
elif result.is_error():
120+
print(result.errors)
121+
```
122+
123+
83124
# Search Subscriptions
84125

85126
Searches for subscriptions.
@@ -265,6 +306,50 @@ elif result.is_error():
265306
```
266307

267308

309+
# Change Billing Anchor Date
310+
311+
Changes the [billing anchor date](https://developer.squareup.com/docs/subscriptions-api/subscription-billing#billing-dates)
312+
for a subscription.
313+
314+
```python
315+
def change_billing_anchor_date(self,
316+
subscription_id,
317+
body)
318+
```
319+
320+
## Parameters
321+
322+
| Parameter | Type | Tags | Description |
323+
| --- | --- | --- | --- |
324+
| `subscription_id` | `str` | Template, Required | The ID of the subscription to update the billing anchor date. |
325+
| `body` | [`Change Billing Anchor Date Request`](../../doc/models/change-billing-anchor-date-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
326+
327+
## Response Type
328+
329+
This method returns a `ApiResponse` instance. The `body` property of this instance returns the response data which is of type [`Change Billing Anchor Date Response`](../../doc/models/change-billing-anchor-date-response.md).
330+
331+
## Example Usage
332+
333+
```python
334+
subscription_id = 'subscription_id0'
335+
336+
body = {
337+
'monthly_billing_anchor_date': 1
338+
}
339+
340+
result = subscriptions_api.change_billing_anchor_date(
341+
subscription_id,
342+
body
343+
)
344+
print(result)
345+
346+
if result.is_success():
347+
print(result.body)
348+
elif result.is_error():
349+
print(result.errors)
350+
```
351+
352+
268353
# Cancel Subscription
269354

270355
Schedules a `CANCEL` action to cancel an active subscription. This

doc/client.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:
55

66
| Parameter | Type | Description |
77
| --- | --- | --- |
8-
| `square_version` | `str` | Square Connect API versions<br>*Default*: `'2023-09-25'` |
8+
| `square_version` | `str` | Square Connect API versions<br>*Default*: `'2023-10-18'` |
99
| `custom_url` | `str` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
1010
| `environment` | `string` | The API environment. <br> **Default: `production`** |
1111
| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests |
@@ -25,7 +25,7 @@ The API client can be initialized as follows:
2525
```python
2626
from square.client import Client
2727
client = Client(
28-
square_version='2023-09-25',
28+
square_version='2023-10-18',
2929
access_token='AccessToken'
3030
)
3131
```
@@ -48,7 +48,7 @@ API calls return an `ApiResponse` object that includes the following fields:
4848
```python
4949
from square.client import Client
5050
client = Client(
51-
square_version='2023-09-25',
51+
square_version='2023-10-18',
5252
access_token='AccessToken'
5353
)
5454

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
# Bulk Swap Plan Request
3+
4+
Defines input parameters in a call to the
5+
[BulkSwapPlan](../../doc/api/subscriptions.md#bulk-swap-plan) endpoint.
6+
7+
## Structure
8+
9+
`Bulk Swap Plan Request`
10+
11+
## Fields
12+
13+
| Name | Type | Tags | Description |
14+
| --- | --- | --- | --- |
15+
| `new_plan_variation_id` | `str` | Required | The ID of the new subscription plan variation.<br><br>This field is required.<br>**Constraints**: *Minimum Length*: `1` |
16+
| `old_plan_variation_id` | `str` | Required | The ID of the plan variation whose subscriptions should be swapped. Active subscriptions<br>using this plan variation will be subscribed to the new plan variation on their next billing<br>day.<br>**Constraints**: *Minimum Length*: `1` |
17+
| `location_id` | `str` | Required | The ID of the location to associate with the swapped subscriptions.<br>**Constraints**: *Minimum Length*: `1` |
18+
19+
## Example (as JSON)
20+
21+
```json
22+
{
23+
"location_id": "S8GWD5R9QB376",
24+
"new_plan_variation_id": "FQ7CDXXWSLUJRPM3GFJSJGZ7",
25+
"old_plan_variation_id": "6JHXF3B2CW3YKHDV4XEM674H"
26+
}
27+
```
28+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
# Bulk Swap Plan Response
3+
4+
Defines output parameters in a response of the
5+
[BulkSwapPlan](../../doc/api/subscriptions.md#bulk-swap-plan) endpoint.
6+
7+
## Structure
8+
9+
`Bulk Swap Plan Response`
10+
11+
## Fields
12+
13+
| Name | Type | Tags | Description |
14+
| --- | --- | --- | --- |
15+
| `errors` | [`List Error`](../../doc/models/error.md) | Optional | Errors encountered during the request. |
16+
| `affected_subscriptions` | `int` | Optional | The number of affected subscriptions. |
17+
18+
## Example (as JSON)
19+
20+
```json
21+
{
22+
"affected_subscriptions": 12,
23+
"errors": [
24+
{
25+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
26+
"code": "MAP_KEY_LENGTH_TOO_LONG",
27+
"detail": "detail6",
28+
"field": "field4"
29+
},
30+
{
31+
"category": "MERCHANT_SUBSCRIPTION_ERROR",
32+
"code": "MAP_KEY_LENGTH_TOO_LONG",
33+
"detail": "detail6",
34+
"field": "field4"
35+
}
36+
]
37+
}
38+
```
39+

doc/models/business-booking-profile.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
# Business Booking Profile
33

4+
A seller's business booking profile, including booking policy, appointment settings, etc.
5+
46
## Structure
57

68
`Business Booking Profile`

doc/models/cancel-subscription-response.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ Defines output parameters in a response from the
6464
"actions": [
6565
{
6666
"id": "id8",
67-
"type": "CANCEL",
67+
"type": "RESUME",
6868
"effective_date": "effective_date8",
69+
"monthly_billing_anchor_date": 186,
6970
"phases": [
7071
{
7172
"uid": "uid0",
@@ -85,13 +86,13 @@ Defines output parameters in a response from the
8586
"order_template_id": "order_template_id2",
8687
"plan_phase_uid": "plan_phase_uid6"
8788
}
88-
],
89-
"new_plan_variation_id": "new_plan_variation_id8"
89+
]
9090
},
9191
{
9292
"id": "id8",
93-
"type": "CANCEL",
93+
"type": "RESUME",
9494
"effective_date": "effective_date8",
95+
"monthly_billing_anchor_date": 186,
9596
"phases": [
9697
{
9798
"uid": "uid0",
@@ -111,13 +112,13 @@ Defines output parameters in a response from the
111112
"order_template_id": "order_template_id2",
112113
"plan_phase_uid": "plan_phase_uid6"
113114
}
114-
],
115-
"new_plan_variation_id": "new_plan_variation_id8"
115+
]
116116
},
117117
{
118118
"id": "id8",
119-
"type": "CANCEL",
119+
"type": "RESUME",
120120
"effective_date": "effective_date8",
121+
"monthly_billing_anchor_date": 186,
121122
"phases": [
122123
{
123124
"uid": "uid0",
@@ -137,8 +138,7 @@ Defines output parameters in a response from the
137138
"order_template_id": "order_template_id2",
138139
"plan_phase_uid": "plan_phase_uid6"
139140
}
140-
],
141-
"new_plan_variation_id": "new_plan_variation_id8"
141+
]
142142
}
143143
]
144144
}

doc/models/catalog-query-text.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The query filter to return the search result whose searchable attribute values c
1111

1212
| Name | Type | Tags | Description |
1313
| --- | --- | --- | --- |
14-
| `keywords` | `List[str]` | Required | A list of 1, 2, or 3 search keywords. Keywords with fewer than 3 characters are ignored. |
14+
| `keywords` | `List[str]` | Required | A list of 1, 2, or 3 search keywords. Keywords with fewer than 3 alphanumeric characters are ignored. |
1515

1616
## Example (as JSON)
1717

0 commit comments

Comments
 (0)