Skip to content

Commit d6c6fdb

Browse files
Merge pull request #95 from square/release/27.1.0.20230119
Generated PR for Release: 27.1.0.20230119
2 parents 53b1e8f + 0e723d3 commit d6c6fdb

File tree

65 files changed

+6898
-18
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

+6898
-18
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: 498 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
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](http-client-configuration.md) | Http Client Configuration instance. |
@@ -19,7 +19,7 @@ The API client can be initialized as follows:
1919
SquareClient client = new SquareClient.Builder()
2020
.httpClientConfig(configBuilder -> configBuilder
2121
.timeout(0))
22-
.squareVersion("2022-12-14")
22+
.squareVersion("2023-01-19")
2323
.accessToken("AccessToken")
2424
.environment(Environment.PRODUCTION)
2525
.customUrl("https://connect.squareup.com")
@@ -45,7 +45,7 @@ public class Program {
4545
SquareClient client = new SquareClient.Builder()
4646
.httpClientConfig(configBuilder -> configBuilder
4747
.timeout(0))
48-
.squareVersion("2022-12-14")
48+
.squareVersion("2023-01-19")
4949
.accessToken("AccessToken")
5050
.build();
5151

@@ -92,6 +92,7 @@ The gateway for the SDK. This class acts as a factory for the Apis and also hold
9292
| `getInvoicesApi()` | Provides access to Invoices controller. | `InvoicesApi` |
9393
| `getLaborApi()` | Provides access to Labor controller. | `LaborApi` |
9494
| `getLocationsApi()` | Provides access to Locations controller. | `LocationsApi` |
95+
| `getLocationCustomAttributesApi()` | Provides access to LocationCustomAttributes controller. | `LocationCustomAttributesApi` |
9596
| `getCheckoutApi()` | Provides access to Checkout controller. | `CheckoutApi` |
9697
| `getTransactionsApi()` | Provides access to Transactions controller. | `TransactionsApi` |
9798
| `getLoyaltyApi()` | Provides access to Loyalty controller. | `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` | String getId() |
1616
| `LocationId` | `String` | Required | The ID of the business location this type of break applies to.<br>**Constraints**: *Minimum Length*: `1` | String getLocationId() |
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` | String getBreakName() |
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` | String getExpectedDuration() |
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` | String getExpectedDuration() |
1919
| `IsPaid` | `boolean` | Required | Whether this break counts towards time worked for compensation<br>purposes. | boolean getIsPaid() |
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. | Integer getVersion() |
2121
| `CreatedAt` | `String` | Optional | A read-only timestamp in RFC 3339 format. | String getCreatedAt() |
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 | Getter |
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}$` | String getKey() |
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 | Getter |
13+
| --- | --- | --- | --- | --- |
14+
| `Values` | [`Map<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. | Map<String, BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest> getValues() |
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 | Getter |
14+
| --- | --- | --- | --- | --- |
15+
| `LocationId` | `String` | Optional | The ID of the location associated with the custom attribute. | String getLocationId() |
16+
| `Errors` | [`List<Error>`](../../doc/models/error.md) | Optional | Errors that occurred while processing the individual LocationCustomAttributeDeleteRequest request | List<Error> getErrors() |
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 | Getter |
14+
| --- | --- | --- | --- | --- |
15+
| `Values` | [`Map<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. | Map<String, BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse> getValues() |
16+
| `Errors` | [`List<Error>`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. | List<Error> getErrors() |
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 | Getter |
15+
| --- | --- | --- | --- | --- |
16+
| `LocationId` | `String` | Required | The ID of the target [location](../../doc/models/location.md).<br>**Constraints**: *Minimum Length*: `1` | String getLocationId() |
17+
| `CustomAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding<br>`CustomAttributeDefinition` object. | CustomAttribute getCustomAttribute() |
18+
| `IdempotencyKey` | `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` | String getIdempotencyKey() |
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 | Getter |
13+
| --- | --- | --- | --- | --- |
14+
| `Values` | [`Map<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. | Map<String, BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest> getValues() |
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)