Skip to content

Commit 69d9191

Browse files
Merge pull request #120 from square/release/25.1.0
Generated PR for Release: 25.1.0
2 parents 7559509 + 4a23477 commit 69d9191

File tree

65 files changed

+2606
-10
lines changed

Some content is hidden

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

65 files changed

+2606
-10
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: 565 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-
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2022-12-14'` |
8+
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2023-01-19'` |
99
| `customUrl` | `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
| `additionalHeaders` | `Readonly<Record<string, string>>` | Additional headers to add to each API call<br>*Default*: `{}` |
@@ -40,7 +40,7 @@ The API client can be initialized as follows:
4040

4141
```ts
4242
const client = new Client({
43-
squareVersion: '2022-12-14',
43+
squareVersion: '2023-01-19',
4444
timeout: 60000,
4545
additionalHeaders: {},
4646
userAgentDetail: '',
@@ -55,7 +55,7 @@ const client = new Client({
5555
import { ApiError, Client } from 'square';
5656

5757
const client = new Client({
58-
squareVersion: '2022-12-14',
58+
squareVersion: '2023-01-19',
5959
timeout: 60000,
6060
additionalHeaders: {},
6161
userAgentDetail: '',
@@ -105,6 +105,7 @@ The gateway for the SDK. This class acts as a factory for the Apis and also hold
105105
| invoices | Gets InvoicesApi |
106106
| labor | Gets LaborApi |
107107
| locations | Gets LocationsApi |
108+
| locationCustomAttributes | Gets LocationCustomAttributesApi |
108109
| checkout | Gets CheckoutApi |
109110
| transactions | Gets TransactionsApi |
110111
| 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 \| undefined` | Optional | The UUID for this object.<br>**Constraints**: *Maximum Length*: `255` |
1616
| `locationId` | `string` | Required | The ID of the business location this type of break applies to.<br>**Constraints**: *Minimum Length*: `1` |
1717
| `breakName` | `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-
| `expectedDuration` | `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+
| `expectedDuration` | `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
| `isPaid` | `boolean` | Required | Whether this break counts towards time worked for compensation<br>purposes. |
2020
| `version` | `number \| undefined` | 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
| `createdAt` | `string \| undefined` | 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+
`BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest`
11+
12+
## Fields
13+
14+
| Name | Type | Tags | Description |
15+
| --- | --- | --- | --- |
16+
| `key` | `string \| undefined` | 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+
`BulkDeleteLocationCustomAttributesRequest`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description |
13+
| --- | --- | --- | --- |
14+
| `values` | [`Record<string, BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest>`](../../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+
`BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse`
10+
11+
## Fields
12+
13+
| Name | Type | Tags | Description |
14+
| --- | --- | --- | --- |
15+
| `locationId` | `string \| undefined` | Optional | The ID of the location associated with the custom attribute. |
16+
| `errors` | [`Error[] \| undefined`](../../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+
`BulkDeleteLocationCustomAttributesResponse`
10+
11+
## Fields
12+
13+
| Name | Type | Tags | Description |
14+
| --- | --- | --- | --- |
15+
| `values` | [`Record<string, BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse>`](../../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` | [`Error[] \| undefined`](../../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+
`BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest`
11+
12+
## Fields
13+
14+
| Name | Type | Tags | Description |
15+
| --- | --- | --- | --- |
16+
| `locationId` | `string` | Required | The ID of the target [location](../../doc/models/location.md).<br>**Constraints**: *Minimum Length*: `1` |
17+
| `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding<br>`CustomAttributeDefinition` object. |
18+
| `idempotencyKey` | `string \| undefined` | 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+
`BulkUpsertLocationCustomAttributesRequest`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description |
13+
| --- | --- | --- | --- |
14+
| `values` | [`Record<string, BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest>`](../../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)