Skip to content

Commit 124b782

Browse files
author
autobot
committed
Generated PR for Release: 25.0.0.20221214
1 parent 5690b40 commit 124b782

36 files changed

+262
-380
lines changed

doc/api/o-auth.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ o_auth_api = client.o_auth
1313
* [Renew Token](../../doc/api/o-auth.md#renew-token)
1414
* [Revoke Token](../../doc/api/o-auth.md#revoke-token)
1515
* [Obtain Token](../../doc/api/o-auth.md#obtain-token)
16+
* [Retrieve Token Status](../../doc/api/o-auth.md#retrieve-token-status)
1617

1718

1819
# Renew Token
@@ -186,3 +187,51 @@ elif result.is_error():
186187
print(result.errors)
187188
```
188189

190+
191+
# Retrieve Token Status
192+
193+
Returns information about an [OAuth access token](https://developer.squareup.com/docs/build-basics/access-tokens#get-an-oauth-access-token) or an application’s [personal access token](https://developer.squareup.com/docs/build-basics/access-tokens#get-a-personal-access-token).
194+
195+
Add the access token to the Authorization header of the request.
196+
197+
__Important:__ The `Authorization` header you provide to this endpoint must have the following format:
198+
199+
```
200+
Authorization: Bearer ACCESS_TOKEN
201+
```
202+
203+
where `ACCESS_TOKEN` is a
204+
[valid production authorization credential](https://developer.squareup.com/docs/build-basics/access-tokens).
205+
206+
If the access token is expired or not a valid access token, the endpoint returns an `UNAUTHORIZED` error.
207+
208+
:information_source: **Note** This endpoint does not require authentication.
209+
210+
```python
211+
def retrieve_token_status(self,
212+
authorization)
213+
```
214+
215+
## Parameters
216+
217+
| Parameter | Type | Tags | Description |
218+
| --- | --- | --- | --- |
219+
| `authorization` | `string` | Header, Required | Client APPLICATION_SECRET |
220+
221+
## Response Type
222+
223+
[`Retrieve Token Status Response`](../../doc/models/retrieve-token-status-response.md)
224+
225+
## Example Usage
226+
227+
```python
228+
authorization = 'Client CLIENT_SECRET'
229+
230+
result = o_auth_api.retrieve_token_status(authorization)
231+
232+
if result.is_success():
233+
print(result.body)
234+
elif result.is_error():
235+
print(result.errors)
236+
```
237+

doc/api/order-custom-attributes.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ def create_order_custom_attribute_definition(self,
9191
```python
9292
body = {}
9393
body['custom_attribute_definition'] = {}
94+
body['custom_attribute_definition']['key'] = 'cover-count'
95+
body['custom_attribute_definition']['name'] = 'Cover count'
96+
body['custom_attribute_definition']['description'] = 'The number of people seated at a table'
97+
body['custom_attribute_definition']['visibility'] = 'VISIBILITY_READ_WRITE_VALUES'
98+
body['idempotency_key'] = 'IDEMPOTENCY_KEY'
9499

95100
result = order_custom_attributes_api.create_order_custom_attribute_definition(body)
96101

@@ -204,11 +209,10 @@ def update_order_custom_attribute_definition(self,
204209
key = 'key0'
205210
body = {}
206211
body['custom_attribute_definition'] = {}
207-
body['custom_attribute_definition']['key'] = 'wayne-test-15'
208-
body['custom_attribute_definition']['name'] = 'wayne-test-15'
209-
body['custom_attribute_definition']['description'] = 'updated'
210-
body['custom_attribute_definition']['visibility'] = 'VISIBILITY_READ_WRITE_VALUES'
211-
body['custom_attribute_definition']['version'] = 2
212+
body['custom_attribute_definition']['key'] = 'cover-count'
213+
body['custom_attribute_definition']['visibility'] = 'VISIBILITY_READ_ONLY'
214+
body['custom_attribute_definition']['version'] = 1
215+
body['idempotency_key'] = 'IDEMPOTENCY_KEY'
212216

213217
result = order_custom_attributes_api.update_order_custom_attribute_definition(key, body)
214218

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` | `string` | Square Connect API versions<br>*Default*: `'2022-11-16'` |
8+
| `square_version` | `string` | Square Connect API versions<br>*Default*: `'2022-12-14'` |
99
| `custom_url` | `string` | 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 |
@@ -26,7 +26,7 @@ The API client can be initialized as follows:
2626
from square.client import Client
2727

2828
client = Client(
29-
square_version='2022-11-16',
29+
square_version='2022-12-14',
3030
access_token='AccessToken',
3131
environment='production',
3232
custom_url = 'https://connect.squareup.com',)
@@ -52,7 +52,7 @@ import jsonpickle
5252
from square.client import Client
5353

5454
client = Client(
55-
square_version='2022-11-16',
55+
square_version='2022-12-14',
5656
access_token='AccessToken',)
5757

5858
locations_api = client.locations

doc/models/bulk-delete-order-custom-attributes-request.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,13 @@ Represents a bulk delete request for one or more order custom attributes.
1818
```json
1919
{
2020
"values": {
21-
"entry-1": {
22-
"key": "wayne-test-15",
23-
"order_id": "VilxhxZHuWEqDC6GQNgiLNshRMYZY"
21+
"cover-count": {
22+
"key": "cover-count",
23+
"order_id": "7BbXGEIWNldxAzrtGf9GPVZTwZ4F"
2424
},
25-
"entry-2": {
26-
"key": "wayne-test-13",
27-
"order_id": "XNWR6zjcEXWQy6kbsIsQRTxS0wOZY"
28-
},
29-
"entry-3": {
30-
"key": "ca-key5",
31-
"order_id": "9QC9RohBVxfsaSOtYjY7KhmjqrLZY"
25+
"table-number": {
26+
"key": "table-number",
27+
"order_id": "7BbXGEIWNldxAzrtGf9GPVZTwZ4F"
3228
}
3329
}
3430
}

doc/models/bulk-delete-order-custom-attributes-response.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ Represents a response from deleting one or more order custom attributes.
1919
```json
2020
{
2121
"values": {
22-
"entry-1": {},
23-
"entry-2": {},
24-
"entry-3": {}
22+
"cover-count": {},
23+
"table-number": {}
2524
}
2625
}
2726
```

doc/models/create-order-custom-attribute-definition-request.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ Represents a create request for an order custom attribute definition.
1919
```json
2020
{
2121
"custom_attribute_definition": {
22-
"key": null,
22+
"description": "The number of people seated at a table",
23+
"key": "cover-count",
24+
"name": "Cover count",
2325
"schema": null,
24-
"name": null,
25-
"description": null,
26-
"visibility": null,
27-
"version": null
26+
"visibility": "VISIBILITY_READ_WRITE_VALUES"
2827
},
29-
"idempotency_key": null
28+
"idempotency_key": "IDEMPOTENCY_KEY"
3029
}
3130
```
3231

doc/models/create-order-custom-attribute-definition-response.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ Represents a response from creating an order custom attribute definition.
1919
```json
2020
{
2121
"custom_attribute_definition": {
22-
"created_at": "2022-11-10T18:04:57.039Z",
23-
"description": "wayne test",
24-
"key": "wayne-test-16",
25-
"name": "wayne-test",
22+
"created_at": "2022-10-06T16:53:23.141Z",
23+
"description": "The number of people seated at a table",
24+
"key": "cover-count",
25+
"name": "Cover count",
2626
"schema": null,
27-
"updated_at": "2022-11-10T18:04:57.039Z",
27+
"updated_at": "2022-10-06T16:53:23.141Z",
2828
"version": 1,
2929
"visibility": "VISIBILITY_READ_WRITE_VALUES"
3030
}

doc/models/customer-filter.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
# Customer Filter
33

4-
Represents a set of `CustomerQuery` filters used to limit the set of
5-
customers returned by the [SearchCustomers](../../doc/api/customers.md#search-customers) endpoint.
4+
Represents the filtering criteria in a [search query](../../doc/models/customer-query.md) that defines how to filter
5+
customer profiles returned in [SearchCustomers](../../doc/api/customers.md#search-customers) results.
66

77
## Structure
88

@@ -20,6 +20,7 @@ customers returned by the [SearchCustomers](../../doc/api/customers.md#search-cu
2020
| `reference_id` | [`Customer Text Filter`](../../doc/models/customer-text-filter.md) | Optional | A filter to select customers based on exact or fuzzy matching of<br>customer attributes against a specified query. Depending on the customer attributes,<br>the filter can be case-sensitive. This filter can be exact or fuzzy, but it cannot be both. |
2121
| `group_ids` | [`Filter Value`](../../doc/models/filter-value.md) | Optional | A filter to select resources based on an exact field value. For any given<br>value, the value can only be in one property. Depending on the field, either<br>all properties can be set or only a subset will be available.<br><br>Refer to the documentation of the field. |
2222
| `custom_attribute` | [`Customer Custom Attribute Filters`](../../doc/models/customer-custom-attribute-filters.md) | Optional | The custom attribute filters in a set of [customer filters](../../doc/models/customer-filter.md) used in a search query. Use this filter<br>to search based on [custom attributes](../../doc/models/custom-attribute.md) that are assigned to customer profiles. For more information, see<br>[Search by custom attribute](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#search-by-custom-attribute). |
23+
| `segment_ids` | [`Filter Value`](../../doc/models/filter-value.md) | Optional | A filter to select resources based on an exact field value. For any given<br>value, the value can only be in one property. Depending on the field, either<br>all properties can be set or only a subset will be available.<br><br>Refer to the documentation of the field. |
2324

2425
## Example (as JSON)
2526

@@ -32,7 +33,8 @@ customers returned by the [SearchCustomers](../../doc/api/customers.md#search-cu
3233
"phone_number": null,
3334
"reference_id": null,
3435
"group_ids": null,
35-
"custom_attribute": null
36+
"custom_attribute": null,
37+
"segment_ids": null
3638
}
3739
```
3840

doc/models/customer-query.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11

22
# Customer Query
33

4-
Represents a query (including filtering criteria, sorting criteria, or both) used to search
5-
for customer profiles.
4+
Represents filtering and sorting criteria for a [SearchCustomers](../../doc/api/customers.md#search-customers) request.
65

76
## Structure
87

@@ -12,8 +11,8 @@ for customer profiles.
1211

1312
| Name | Type | Tags | Description |
1413
| --- | --- | --- | --- |
15-
| `filter` | [`Customer Filter`](../../doc/models/customer-filter.md) | Optional | Represents a set of `CustomerQuery` filters used to limit the set of<br>customers returned by the [SearchCustomers](../../doc/api/customers.md#search-customers) endpoint. |
16-
| `sort` | [`Customer Sort`](../../doc/models/customer-sort.md) | Optional | Specifies how searched customers profiles are sorted, including the sort key and sort order. |
14+
| `filter` | [`Customer Filter`](../../doc/models/customer-filter.md) | Optional | Represents the filtering criteria in a [search query](../../doc/models/customer-query.md) that defines how to filter<br>customer profiles returned in [SearchCustomers](../../doc/api/customers.md#search-customers) results. |
15+
| `sort` | [`Customer Sort`](../../doc/models/customer-sort.md) | Optional | Represents the sorting criteria in a [search query](../../doc/models/customer-query.md) that defines how to sort<br>customer profiles returned in [SearchCustomers](../../doc/api/customers.md#search-customers) results. |
1716

1817
## Example (as JSON)
1918

doc/models/customer-sort.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
# Customer Sort
33

4-
Specifies how searched customers profiles are sorted, including the sort key and sort order.
4+
Represents the sorting criteria in a [search query](../../doc/models/customer-query.md) that defines how to sort
5+
customer profiles returned in [SearchCustomers](../../doc/api/customers.md#search-customers) results.
56

67
## Structure
78

0 commit comments

Comments
 (0)