Skip to content

Commit 2b2dc5f

Browse files
Merge pull request #111 from square/release/26.1.0.20230119
Generated PR for Release: 26.1.0.20230119
2 parents 107dbac + 97d485e commit 2b2dc5f

File tree

39 files changed

+1877
-11
lines changed

39 files changed

+1877
-11
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: 3 additions & 2 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
| `access_token` | `String` | The OAuth 2.0 Access Token to use for API requests. |
1010
| `custom_url` | `String` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
1111
| `environment` | `string` | The API environment. <br> **Default: `production`** |
@@ -24,7 +24,7 @@ The API client can be initialized as follows:
2424

2525
```ruby
2626
client = Square::Client.new(
27-
square_version: '2022-12-14',
27+
square_version: '2023-01-19',
2828
access_token: 'AccessToken',
2929
environment: 'production',
3030
custom_url: 'https://connect.squareup.com',
@@ -97,6 +97,7 @@ The gateway for the SDK. This class acts as a factory for the Apis and also hold
9797
| invoices | Gets InvoicesApi |
9898
| labor | Gets LaborApi |
9999
| locations | Gets LocationsApi |
100+
| location_custom_attributes | Gets LocationCustomAttributesApi |
100101
| checkout | Gets CheckoutApi |
101102
| transactions | Gets TransactionsApi |
102103
| 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` | `TrueClass\|FalseClass` | Required | Whether this break counts towards time worked for compensation<br>purposes. |
2020
| `version` | `Integer` | 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` | [`Hash of Bulk Delete Location Custom Attributes Request Location Custom Attribute Delete Request Hash`](../../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` | [`Array<Error Hash>`](../../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` | [`Hash of Bulk Delete Location Custom Attributes Response Location Custom Attribute Delete Response Hash`](../../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` | [`Array<Error Hash>`](../../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 Hash`](../../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` | [`Hash of Bulk Upsert Location Custom Attributes Request Location Custom Attribute Upsert Request Hash`](../../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)