Skip to content

Commit d353015

Browse files
author
autobot
committed
Generated PR for Release: 27.0.0.20221214
1 parent 97fcf76 commit d353015

File tree

48 files changed

+848
-1239
lines changed

Some content is hidden

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

48 files changed

+848
-1239
lines changed

doc/api/o-auth.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ OAuthApi oAuthApi = client.getOAuthApi();
1212

1313
* [Renew Token](../../doc/api/o-auth.md#renew-token)
1414
* [Revoke Token](../../doc/api/o-auth.md#revoke-token)
15-
* [Obtain Token](../../doc/api/o-auth.md#obtain-token)
15+
* [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
@@ -191,3 +192,51 @@ oAuthApi.obtainTokenAsync(body).thenAccept(result -> {
191192
});
192193
```
193194

195+
196+
# Retrieve Token Status
197+
198+
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).
199+
200+
Add the access token to the Authorization header of the request.
201+
202+
__Important:__ The `Authorization` header you provide to this endpoint must have the following format:
203+
204+
```
205+
Authorization: Bearer ACCESS_TOKEN
206+
```
207+
208+
where `ACCESS_TOKEN` is a
209+
[valid production authorization credential](https://developer.squareup.com/docs/build-basics/access-tokens).
210+
211+
If the access token is expired or not a valid access token, the endpoint returns an `UNAUTHORIZED` error.
212+
213+
:information_source: **Note** This endpoint does not require authentication.
214+
215+
```java
216+
CompletableFuture<RetrieveTokenStatusResponse> retrieveTokenStatusAsync(
217+
final String authorization)
218+
```
219+
220+
## Parameters
221+
222+
| Parameter | Type | Tags | Description |
223+
| --- | --- | --- | --- |
224+
| `authorization` | `String` | Header, Required | Client APPLICATION_SECRET |
225+
226+
## Response Type
227+
228+
[`RetrieveTokenStatusResponse`](../../doc/models/retrieve-token-status-response.md)
229+
230+
## Example Usage
231+
232+
```java
233+
String authorization = "Client CLIENT_SECRET";
234+
235+
oAuthApi.retrieveTokenStatusAsync(authorization).thenAccept(result -> {
236+
// TODO success callback handler
237+
}).exceptionally(exception -> {
238+
// TODO failure callback handler
239+
return null;
240+
});
241+
```
242+

doc/api/order-custom-attributes.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,15 @@ CompletableFuture<CreateOrderCustomAttributeDefinitionResponse> createOrderCusto
9090

9191
```java
9292
CustomAttributeDefinition customAttributeDefinition = new CustomAttributeDefinition.Builder()
93+
.key("cover-count")
94+
.name("Cover count")
95+
.description("The number of people seated at a table")
96+
.visibility("VISIBILITY_READ_WRITE_VALUES")
9397
.build();
9498

9599
CreateOrderCustomAttributeDefinitionRequest body = new CreateOrderCustomAttributeDefinitionRequest.Builder(
96100
customAttributeDefinition)
101+
.idempotencyKey("IDEMPOTENCY_KEY")
97102
.build();
98103

99104
orderCustomAttributesApi.createOrderCustomAttributeDefinitionAsync(body).thenAccept(result -> {
@@ -207,15 +212,14 @@ CompletableFuture<UpdateOrderCustomAttributeDefinitionResponse> updateOrderCusto
207212
```java
208213
String key = "key0";
209214
CustomAttributeDefinition customAttributeDefinition = new CustomAttributeDefinition.Builder()
210-
.key("wayne-test-15")
211-
.name("wayne-test-15")
212-
.description("updated")
213-
.visibility("VISIBILITY_READ_WRITE_VALUES")
214-
.version(2)
215+
.key("cover-count")
216+
.visibility("VISIBILITY_READ_ONLY")
217+
.version(1)
215218
.build();
216219

217220
UpdateOrderCustomAttributeDefinitionRequest body = new UpdateOrderCustomAttributeDefinitionRequest.Builder(
218221
customAttributeDefinition)
222+
.idempotencyKey("IDEMPOTENCY_KEY")
219223
.build();
220224

221225
orderCustomAttributesApi.updateOrderCustomAttributeDefinitionAsync(key, body).thenAccept(result -> {
@@ -265,7 +269,6 @@ CompletableFuture<BulkDeleteOrderCustomAttributesResponse> bulkDeleteOrderCustom
265269
Map<String, BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute> values = new LinkedHashMap<>();
266270
values.put("", values0);
267271
values.put("", values1);
268-
values.put("", values2);
269272

270273
BulkDeleteOrderCustomAttributesRequest body = new BulkDeleteOrderCustomAttributesRequest.Builder(
271274
values)

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-
| `squareVersion` | `String` | Square Connect API versions<br>*Default*: `"2022-11-16"` |
8+
| `squareVersion` | `String` | Square Connect API versions<br>*Default*: `"2022-12-14"` |
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-11-16")
22+
.squareVersion("2022-12-14")
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-11-16")
48+
.squareVersion("2022-12-14")
4949
.accessToken("AccessToken")
5050
.build();
5151

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
| `ReferenceId` | [`CustomerTextFilter`](../../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. | CustomerTextFilter getReferenceId() |
2121
| `GroupIds` | [`FilterValue`](../../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. | FilterValue getGroupIds() |
2222
| `CustomAttribute` | [`CustomerCustomAttributeFilters`](../../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). | CustomerCustomAttributeFilters getCustomAttribute() |
23+
| `SegmentIds` | [`FilterValue`](../../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. | FilterValue getSegmentIds() |
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 | Getter |
1413
| --- | --- | --- | --- | --- |
15-
| `Filter` | [`CustomerFilter`](../../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. | CustomerFilter getFilter() |
16-
| `Sort` | [`CustomerSort`](../../doc/models/customer-sort.md) | Optional | Specifies how searched customers profiles are sorted, including the sort key and sort order. | CustomerSort getSort() |
14+
| `Filter` | [`CustomerFilter`](../../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. | CustomerFilter getFilter() |
15+
| `Sort` | [`CustomerSort`](../../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. | CustomerSort getSort() |
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)