Skip to content

Commit 6723288

Browse files
Merge pull request #104 from square/release/25.1.0.20230119
Generated PR for Release: 25.1.0.20230119
2 parents 01844ed + f8bb544 commit 6723288

File tree

38 files changed

+2003
-12
lines changed

38 files changed

+2003
-12
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2022 Square, Inc.
1+
Copyright 2023 Square, Inc.
22
Licensed under the Apache License, Version 2.0 (the "License");
33
you may not use this file except in compliance with the License.
44
You may obtain a copy of the License at

doc/api/location-custom-attributes.md

Lines changed: 477 additions & 0 deletions
Large diffs are not rendered by default.

doc/client.md

Lines changed: 4 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-12-14'` |
8+
| `square_version` | `string` | Square Connect API versions<br>*Default*: `'2023-01-19'` |
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-12-14',
29+
square_version='2023-01-19',
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-12-14',
55+
square_version='2023-01-19',
5656
access_token='AccessToken',)
5757

5858
locations_api = client.locations
@@ -95,6 +95,7 @@ The gateway for the SDK. This class acts as a factory for the Apis and also hold
9595
| invoices | Gets InvoicesApi |
9696
| labor | Gets LaborApi |
9797
| locations | Gets LocationsApi |
98+
| location_custom_attributes | Gets LocationCustomAttributesApi |
9899
| checkout | Gets CheckoutApi |
99100
| transactions | Gets TransactionsApi |
100101
| loyalty | Gets LoyaltyApi |

doc/models/break-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ instances on a `Shift`.
1515
| `id` | `string` | Optional | The UUID for this object.<br>**Constraints**: *Maximum Length*: `255` |
1616
| `location_id` | `string` | Required | The ID of the business location this type of break applies to.<br>**Constraints**: *Minimum Length*: `1` |
1717
| `break_name` | `string` | Required | A human-readable name for this type of break. The name is displayed to<br>employees in Square products.<br>**Constraints**: *Minimum Length*: `1` |
18-
| `expected_duration` | `string` | Required | Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of<br>this break. Precision less than minutes is truncated.<br>**Constraints**: *Minimum Length*: `1` |
18+
| `expected_duration` | `string` | Required | Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of<br>this break. Precision less than minutes is truncated.<br><br>Example for break expected duration of 15 minutes: T15M<br>**Constraints**: *Minimum Length*: `1` |
1919
| `is_paid` | `bool` | Required | Whether this break counts towards time worked for compensation<br>purposes. |
2020
| `version` | `int` | Optional | Used for resolving concurrency issues. The request fails if the version<br>provided does not match the server version at the time of the request. If a value is not<br>provided, Square's servers execute a "blind" write; potentially<br>overwriting another writer's data. |
2121
| `created_at` | `string` | Optional | A read-only timestamp in RFC 3339 format. |
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
# Bulk Delete Location Custom Attributes Request Location Custom Attribute Delete Request
3+
4+
Represents an individual delete request in a [BulkDeleteLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-delete-location-custom-attributes)
5+
request. An individual request contains an optional ID of the associated custom attribute definition
6+
and optional key of the associated custom attribute definition.
7+
8+
## Structure
9+
10+
`Bulk Delete Location Custom Attributes Request Location Custom Attribute Delete Request`
11+
12+
## Fields
13+
14+
| Name | Type | Tags | Description |
15+
| --- | --- | --- | --- |
16+
| `key` | `string` | Optional | The key of the associated custom attribute definition.<br>Represented as a qualified key if the requesting app is not the definition owner.<br>**Constraints**: *Pattern*: `^([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]{1,60}$` |
17+
18+
## Example (as JSON)
19+
20+
```json
21+
{}
22+
```
23+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
# Bulk Delete Location Custom Attributes Request
3+
4+
Represents a [BulkDeleteLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-delete-location-custom-attributes) request.
5+
6+
## Structure
7+
8+
`Bulk Delete Location Custom Attributes Request`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description |
13+
| --- | --- | --- | --- |
14+
| `values` | [`Dict`](../../doc/models/bulk-delete-location-custom-attributes-request-location-custom-attribute-delete-request.md) | Required | The data used to update the `CustomAttribute` objects.<br>The keys must be unique and are used to map to the corresponding response. |
15+
16+
## Example (as JSON)
17+
18+
```json
19+
{
20+
"values": {
21+
"id1": {
22+
"key": "bestseller",
23+
"location_id": "L0TBCBTB7P8RQ"
24+
},
25+
"id2": {
26+
"key": "bestseller",
27+
"location_id": "L9XMD04V3STJX"
28+
},
29+
"id3": {
30+
"key": "phone-number",
31+
"location_id": "L0TBCBTB7P8RQ"
32+
}
33+
}
34+
}
35+
```
36+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
# Bulk Delete Location Custom Attributes Response Location Custom Attribute Delete Response
3+
4+
Represents an individual delete response in a [BulkDeleteLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-delete-location-custom-attributes)
5+
request.
6+
7+
## Structure
8+
9+
`Bulk Delete Location Custom Attributes Response Location Custom Attribute Delete Response`
10+
11+
## Fields
12+
13+
| Name | Type | Tags | Description |
14+
| --- | --- | --- | --- |
15+
| `location_id` | `string` | Optional | The ID of the location associated with the custom attribute. |
16+
| `errors` | [`List of Error`](../../doc/models/error.md) | Optional | Errors that occurred while processing the individual LocationCustomAttributeDeleteRequest request |
17+
18+
## Example (as JSON)
19+
20+
```json
21+
{
22+
"errors": [],
23+
"location_id": "L0TBCBTB7P8RQ"
24+
}
25+
```
26+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
# Bulk Delete Location Custom Attributes Response
3+
4+
Represents a [BulkDeleteLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-delete-location-custom-attributes) response,
5+
which contains a map of responses that each corresponds to an individual delete request.
6+
7+
## Structure
8+
9+
`Bulk Delete Location Custom Attributes Response`
10+
11+
## Fields
12+
13+
| Name | Type | Tags | Description |
14+
| --- | --- | --- | --- |
15+
| `values` | [`Dict`](../../doc/models/bulk-delete-location-custom-attributes-response-location-custom-attribute-delete-response.md) | Required | A map of responses that correspond to individual delete requests. Each response has the<br>same key as the corresponding request. |
16+
| `errors` | [`List of Error`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. |
17+
18+
## Example (as JSON)
19+
20+
```json
21+
{
22+
"values": {
23+
"id1": {
24+
"errors": [],
25+
"location_id": "L0TBCBTB7P8RQ"
26+
},
27+
"id2": {
28+
"errors": [],
29+
"location_id": "L9XMD04V3STJX"
30+
},
31+
"id3": {
32+
"errors": [],
33+
"location_id": "L0TBCBTB7P8RQ"
34+
}
35+
}
36+
}
37+
```
38+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
# Bulk Upsert Location Custom Attributes Request Location Custom Attribute Upsert Request
3+
4+
Represents an individual upsert request in a [BulkUpsertLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-upsert-location-custom-attributes)
5+
request. An individual request contains a location ID, the custom attribute to create or update,
6+
and an optional idempotency key.
7+
8+
## Structure
9+
10+
`Bulk Upsert Location Custom Attributes Request Location Custom Attribute Upsert Request`
11+
12+
## Fields
13+
14+
| Name | Type | Tags | Description |
15+
| --- | --- | --- | --- |
16+
| `location_id` | `string` | Required | The ID of the target [location](../../doc/models/location.md).<br>**Constraints**: *Minimum Length*: `1` |
17+
| `custom_attribute` | [`Custom Attribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding<br>`CustomAttributeDefinition` object. |
18+
| `idempotency_key` | `string` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.<br>For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).<br>**Constraints**: *Maximum Length*: `45` |
19+
20+
## Example (as JSON)
21+
22+
```json
23+
{
24+
"location_id": "location_id4",
25+
"custom_attribute": {
26+
"key": null,
27+
"value": null,
28+
"version": null,
29+
"visibility": null,
30+
"definition": null
31+
},
32+
"idempotency_key": null
33+
}
34+
```
35+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
# Bulk Upsert Location Custom Attributes Request
3+
4+
Represents a [BulkUpsertLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-upsert-location-custom-attributes) request.
5+
6+
## Structure
7+
8+
`Bulk Upsert Location Custom Attributes Request`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description |
13+
| --- | --- | --- | --- |
14+
| `values` | [`Dict`](../../doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md) | Required | A map containing 1 to 25 individual upsert requests. For each request, provide an<br>arbitrary ID that is unique for this `BulkUpsertLocationCustomAttributes` request and the<br>information needed to create or update a custom attribute. |
15+
16+
## Example (as JSON)
17+
18+
```json
19+
{
20+
"values": {
21+
"key0": {
22+
"location_id": "location_id4",
23+
"custom_attribute": {
24+
"key": null,
25+
"value": null,
26+
"version": null,
27+
"visibility": null,
28+
"definition": null
29+
},
30+
"idempotency_key": null
31+
},
32+
"key1": {
33+
"location_id": "location_id5",
34+
"custom_attribute": {
35+
"key": null,
36+
"value": null,
37+
"version": null,
38+
"visibility": null,
39+
"definition": null
40+
},
41+
"idempotency_key": null
42+
},
43+
"key2": {
44+
"location_id": "location_id6",
45+
"custom_attribute": {
46+
"key": null,
47+
"value": null,
48+
"version": null,
49+
"visibility": null,
50+
"definition": null
51+
},
52+
"idempotency_key": null
53+
}
54+
}
55+
}
56+
```
57+

0 commit comments

Comments
 (0)