Skip to content

Commit 6ca0420

Browse files
authored
Merge pull request #111 from square/release/36.0.0.20231213
Generated PR for Release: 36.0.0.20231213
2 parents 466c586 + 8c6d066 commit 6ca0420

File tree

79 files changed

+6845
-130
lines changed

Some content is hidden

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

79 files changed

+6845
-130
lines changed

doc/api/catalog.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ BatchUpsertCatalogObjectsRequest body = new BatchUpsertCatalogObjectsRequest.Bui
172172
.presentAtAllLocations(true)
173173
.itemData(new CatalogItem.Builder()
174174
.name("Tea")
175-
.categoryId("#Beverages")
176175
.taxIds(Arrays.asList(
177176
"#SalesTax"
178177
))
@@ -193,6 +192,11 @@ BatchUpsertCatalogObjectsRequest body = new BatchUpsertCatalogObjectsRequest.Bui
193192
.build())
194193
.build()
195194
))
195+
.categories(Arrays.asList(
196+
new CatalogObjectCategory.Builder()
197+
.id("#Beverages")
198+
.build()
199+
))
196200
.descriptionHtml("<p><strong>Hot</strong> Leaf Juice</p>")
197201
.build())
198202
.build(),
@@ -203,7 +207,6 @@ BatchUpsertCatalogObjectsRequest body = new BatchUpsertCatalogObjectsRequest.Bui
203207
.presentAtAllLocations(true)
204208
.itemData(new CatalogItem.Builder()
205209
.name("Coffee")
206-
.categoryId("#Beverages")
207210
.taxIds(Arrays.asList(
208211
"#SalesTax"
209212
))
@@ -239,6 +242,11 @@ BatchUpsertCatalogObjectsRequest body = new BatchUpsertCatalogObjectsRequest.Bui
239242
.build())
240243
.build()
241244
))
245+
.categories(Arrays.asList(
246+
new CatalogObjectCategory.Builder()
247+
.id("#Beverages")
248+
.build()
249+
))
242250
.descriptionHtml("<p>Hot <em>Bean Juice</em></p>")
243251
.build())
244252
.build(),
@@ -592,7 +600,8 @@ any [CatalogTax](../../doc/models/catalog-tax.md) objects that apply to it.
592600
CompletableFuture<RetrieveCatalogObjectResponse> retrieveCatalogObjectAsync(
593601
final String objectId,
594602
final Boolean includeRelatedObjects,
595-
final Long catalogVersion)
603+
final Long catalogVersion,
604+
final Boolean includeCategoryPathToRoot)
596605
```
597606

598607
## Parameters
@@ -602,6 +611,7 @@ CompletableFuture<RetrieveCatalogObjectResponse> retrieveCatalogObjectAsync(
602611
| `objectId` | `String` | Template, Required | The object ID of any type of catalog objects to be retrieved. |
603612
| `includeRelatedObjects` | `Boolean` | Query, Optional | If `true`, the response will include additional objects that are related to the<br>requested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field<br>of the response. These objects are put in the `related_objects` field. Setting this to `true` is<br>helpful when the objects are needed for immediate display to a user.<br>This process only goes one level deep. Objects referenced by the related objects will not be included. For example,<br><br>if the `objects` field of the response contains a CatalogItem, its associated<br>CatalogCategory objects, CatalogTax objects, CatalogImage objects and<br>CatalogModifierLists will be returned in the `related_objects` field of the<br>response. If the `objects` field of the response contains a CatalogItemVariation,<br>its parent CatalogItem will be returned in the `related_objects` field of<br>the response.<br><br>Default value: `false`<br>**Default**: `false` |
604613
| `catalogVersion` | `Long` | Query, Optional | Requests objects as of a specific version of the catalog. This allows you to retrieve historical<br>versions of objects. The value to retrieve a specific version of an object can be found<br>in the version field of [CatalogObject](../../doc/models/catalog-object.md)s. If not included, results will<br>be from the current version of the catalog. |
614+
| `includeCategoryPathToRoot` | `Boolean` | Query, Optional | Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists<br>of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category<br>and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned<br>in the response payload.<br>**Default**: `false` |
605615

606616
## Response Type
607617

@@ -612,8 +622,9 @@ CompletableFuture<RetrieveCatalogObjectResponse> retrieveCatalogObjectAsync(
612622
```java
613623
String objectId = "object_id8";
614624
Boolean includeRelatedObjects = false;
625+
Boolean includeCategoryPathToRoot = false;
615626

616-
catalogApi.retrieveCatalogObjectAsync(objectId, includeRelatedObjects, null).thenAccept(result -> {
627+
catalogApi.retrieveCatalogObjectAsync(objectId, includeRelatedObjects, null, includeCategoryPathToRoot).thenAccept(result -> {
617628
// TODO success callback handler
618629
System.out.println(result);
619630
}).exceptionally(exception -> {

doc/api/checkout.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ CheckoutApi checkoutApi = client.getCheckoutApi();
1111
## Methods
1212

1313
* [Create Checkout](../../doc/api/checkout.md#create-checkout)
14+
* [Retrieve Location Settings](../../doc/api/checkout.md#retrieve-location-settings)
15+
* [Update Location Settings](../../doc/api/checkout.md#update-location-settings)
16+
* [Retrieve Merchant Settings](../../doc/api/checkout.md#retrieve-merchant-settings)
17+
* [Update Merchant Settings](../../doc/api/checkout.md#update-merchant-settings)
1418
* [List Payment Links](../../doc/api/checkout.md#list-payment-links)
1519
* [Create Payment Link](../../doc/api/checkout.md#create-payment-link)
1620
* [Delete Payment Link](../../doc/api/checkout.md#delete-payment-link)
@@ -160,6 +164,148 @@ checkoutApi.createCheckoutAsync(locationId, body).thenAccept(result -> {
160164
```
161165

162166

167+
# Retrieve Location Settings
168+
169+
Retrieves the location-level settings for a Square-hosted checkout page.
170+
171+
```java
172+
CompletableFuture<RetrieveLocationSettingsResponse> retrieveLocationSettingsAsync(
173+
final String locationId)
174+
```
175+
176+
## Parameters
177+
178+
| Parameter | Type | Tags | Description |
179+
| --- | --- | --- | --- |
180+
| `locationId` | `String` | Template, Required | The ID of the location for which to retrieve settings. |
181+
182+
## Response Type
183+
184+
[`RetrieveLocationSettingsResponse`](../../doc/models/retrieve-location-settings-response.md)
185+
186+
## Example Usage
187+
188+
```java
189+
String locationId = "location_id4";
190+
191+
checkoutApi.retrieveLocationSettingsAsync(locationId).thenAccept(result -> {
192+
// TODO success callback handler
193+
System.out.println(result);
194+
}).exceptionally(exception -> {
195+
// TODO failure callback handler
196+
exception.printStackTrace();
197+
return null;
198+
});
199+
```
200+
201+
202+
# Update Location Settings
203+
204+
Updates the location-level settings for a Square-hosted checkout page.
205+
206+
```java
207+
CompletableFuture<UpdateLocationSettingsResponse> updateLocationSettingsAsync(
208+
final String locationId,
209+
final UpdateLocationSettingsRequest body)
210+
```
211+
212+
## Parameters
213+
214+
| Parameter | Type | Tags | Description |
215+
| --- | --- | --- | --- |
216+
| `locationId` | `String` | Template, Required | The ID of the location for which to retrieve settings. |
217+
| `body` | [`UpdateLocationSettingsRequest`](../../doc/models/update-location-settings-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
218+
219+
## Response Type
220+
221+
[`UpdateLocationSettingsResponse`](../../doc/models/update-location-settings-response.md)
222+
223+
## Example Usage
224+
225+
```java
226+
String locationId = "location_id4";
227+
UpdateLocationSettingsRequest body = new UpdateLocationSettingsRequest.Builder(
228+
new CheckoutLocationSettings.Builder()
229+
.build()
230+
)
231+
.build();
232+
233+
checkoutApi.updateLocationSettingsAsync(locationId, body).thenAccept(result -> {
234+
// TODO success callback handler
235+
System.out.println(result);
236+
}).exceptionally(exception -> {
237+
// TODO failure callback handler
238+
exception.printStackTrace();
239+
return null;
240+
});
241+
```
242+
243+
244+
# Retrieve Merchant Settings
245+
246+
Retrieves the merchant-level settings for a Square-hosted checkout page.
247+
248+
```java
249+
CompletableFuture<RetrieveMerchantSettingsResponse> retrieveMerchantSettingsAsync()
250+
```
251+
252+
## Response Type
253+
254+
[`RetrieveMerchantSettingsResponse`](../../doc/models/retrieve-merchant-settings-response.md)
255+
256+
## Example Usage
257+
258+
```java
259+
checkoutApi.retrieveMerchantSettingsAsync().thenAccept(result -> {
260+
// TODO success callback handler
261+
System.out.println(result);
262+
}).exceptionally(exception -> {
263+
// TODO failure callback handler
264+
exception.printStackTrace();
265+
return null;
266+
});
267+
```
268+
269+
270+
# Update Merchant Settings
271+
272+
Updates the merchant-level settings for a Square-hosted checkout page.
273+
274+
```java
275+
CompletableFuture<UpdateMerchantSettingsResponse> updateMerchantSettingsAsync(
276+
final UpdateMerchantSettingsRequest body)
277+
```
278+
279+
## Parameters
280+
281+
| Parameter | Type | Tags | Description |
282+
| --- | --- | --- | --- |
283+
| `body` | [`UpdateMerchantSettingsRequest`](../../doc/models/update-merchant-settings-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
284+
285+
## Response Type
286+
287+
[`UpdateMerchantSettingsResponse`](../../doc/models/update-merchant-settings-response.md)
288+
289+
## Example Usage
290+
291+
```java
292+
UpdateMerchantSettingsRequest body = new UpdateMerchantSettingsRequest.Builder(
293+
new CheckoutMerchantSettings.Builder()
294+
.build()
295+
)
296+
.build();
297+
298+
checkoutApi.updateMerchantSettingsAsync(body).thenAccept(result -> {
299+
// TODO success callback handler
300+
System.out.println(result);
301+
}).exceptionally(exception -> {
302+
// TODO failure callback handler
303+
exception.printStackTrace();
304+
return null;
305+
});
306+
```
307+
308+
163309
# List Payment Links
164310

165311
Lists all payment links.

doc/api/terminal.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ TerminalApi terminalApi = client.getTerminalApi();
1919
* [Search Terminal Checkouts](../../doc/api/terminal.md#search-terminal-checkouts)
2020
* [Get Terminal Checkout](../../doc/api/terminal.md#get-terminal-checkout)
2121
* [Cancel Terminal Checkout](../../doc/api/terminal.md#cancel-terminal-checkout)
22+
* [Dismiss Terminal Checkout](../../doc/api/terminal.md#dismiss-terminal-checkout)
2223
* [Create Terminal Refund](../../doc/api/terminal.md#create-terminal-refund)
2324
* [Search Terminal Refunds](../../doc/api/terminal.md#search-terminal-refunds)
2425
* [Get Terminal Refund](../../doc/api/terminal.md#get-terminal-refund)
25-
* [Cancel Terminal Refund](../../doc/api/terminal.md#cancel-terminal-refund)
26+
* [Cancel Terminal Refund](../../doc/api/terminal.md#cancel-terminal-refund)
27+
* [Dismiss Terminal Refund](../../doc/api/terminal.md#dismiss-terminal-refund)
2628

2729

2830
# Create Terminal Action
@@ -205,7 +207,7 @@ CompletableFuture<DismissTerminalActionResponse> dismissTerminalActionAsync(
205207

206208
| Parameter | Type | Tags | Description |
207209
| --- | --- | --- | --- |
208-
| `actionId` | `String` | Template, Required | Unique ID for the `TerminalAction` associated with the waiting dialog to be dismissed. |
210+
| `actionId` | `String` | Template, Required | Unique ID for the `TerminalAction` associated with the action to be dismissed. |
209211

210212
## Response Type
211213

@@ -391,6 +393,41 @@ terminalApi.cancelTerminalCheckoutAsync(checkoutId).thenAccept(result -> {
391393
```
392394

393395

396+
# Dismiss Terminal Checkout
397+
398+
Dismisses a Terminal checkout request if the status and type of the request permits it.
399+
400+
```java
401+
CompletableFuture<DismissTerminalCheckoutResponse> dismissTerminalCheckoutAsync(
402+
final String checkoutId)
403+
```
404+
405+
## Parameters
406+
407+
| Parameter | Type | Tags | Description |
408+
| --- | --- | --- | --- |
409+
| `checkoutId` | `String` | Template, Required | Unique ID for the `TerminalCheckout` associated with the checkout to be dismissed. |
410+
411+
## Response Type
412+
413+
[`DismissTerminalCheckoutResponse`](../../doc/models/dismiss-terminal-checkout-response.md)
414+
415+
## Example Usage
416+
417+
```java
418+
String checkoutId = "checkout_id8";
419+
420+
terminalApi.dismissTerminalCheckoutAsync(checkoutId).thenAccept(result -> {
421+
// TODO success callback handler
422+
System.out.println(result);
423+
}).exceptionally(exception -> {
424+
// TODO failure callback handler
425+
exception.printStackTrace();
426+
return null;
427+
});
428+
```
429+
430+
394431
# Create Terminal Refund
395432

396433
Creates a request to refund an Interac payment completed on a Square Terminal. Refunds for Interac payments on a Square Terminal are supported only for Interac debit cards in Canada. Other refunds for Terminal payments should use the Refunds API. For more information, see [Refunds API](../../doc/api/refunds.md).
@@ -550,3 +587,38 @@ terminalApi.cancelTerminalRefundAsync(terminalRefundId).thenAccept(result -> {
550587
});
551588
```
552589

590+
591+
# Dismiss Terminal Refund
592+
593+
Dismisses a Terminal refund request if the status and type of the request permits it.
594+
595+
```java
596+
CompletableFuture<DismissTerminalRefundResponse> dismissTerminalRefundAsync(
597+
final String terminalRefundId)
598+
```
599+
600+
## Parameters
601+
602+
| Parameter | Type | Tags | Description |
603+
| --- | --- | --- | --- |
604+
| `terminalRefundId` | `String` | Template, Required | Unique ID for the `TerminalRefund` associated with the refund to be dismissed. |
605+
606+
## Response Type
607+
608+
[`DismissTerminalRefundResponse`](../../doc/models/dismiss-terminal-refund-response.md)
609+
610+
## Example Usage
611+
612+
```java
613+
String terminalRefundId = "terminal_refund_id0";
614+
615+
terminalApi.dismissTerminalRefundAsync(terminalRefundId).thenAccept(result -> {
616+
// TODO success callback handler
617+
System.out.println(result);
618+
}).exceptionally(exception -> {
619+
// TODO failure callback handler
620+
exception.printStackTrace();
621+
return null;
622+
});
623+
```
624+

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*: `"2023-11-15"` |
8+
| `squareVersion` | `String` | Square Connect API versions<br>*Default*: `"2023-12-13"` |
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("2023-11-15")
22+
.squareVersion("2023-12-13")
2323
.accessToken("AccessToken")
2424
.environment(Environment.PRODUCTION)
2525
.customUrl("https://connect.squareup.com")
@@ -40,7 +40,7 @@ public class Program {
4040
SquareClient client = new SquareClient.Builder()
4141
.httpClientConfig(configBuilder -> configBuilder
4242
.timeout(0))
43-
.squareVersion("2023-11-15")
43+
.squareVersion("2023-12-13")
4444
.accessToken("AccessToken")
4545
.build();
4646

doc/models/batch-retrieve-catalog-objects-request.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
| `IncludeRelatedObjects` | `Boolean` | Optional | If `true`, the response will include additional objects that are related to the<br>requested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field<br>of the response. These objects are put in the `related_objects` field. Setting this to `true` is<br>helpful when the objects are needed for immediate display to a user.<br>This process only goes one level deep. Objects referenced by the related objects will not be included. For example,<br><br>if the `objects` field of the response contains a CatalogItem, its associated<br>CatalogCategory objects, CatalogTax objects, CatalogImage objects and<br>CatalogModifierLists will be returned in the `related_objects` field of the<br>response. If the `objects` field of the response contains a CatalogItemVariation,<br>its parent CatalogItem will be returned in the `related_objects` field of<br>the response.<br><br>Default value: `false` | Boolean getIncludeRelatedObjects() |
1414
| `CatalogVersion` | `Long` | Optional | The specific version of the catalog objects to be included in the response.<br>This allows you to retrieve historical versions of objects. The specified version value is matched against<br>the [CatalogObject](../../doc/models/catalog-object.md)s' `version` attribute. If not included, results will<br>be from the current version of the catalog. | Long getCatalogVersion() |
1515
| `IncludeDeletedObjects` | `Boolean` | Optional | Indicates whether to include (`true`) or not (`false`) in the response deleted objects, namely, those with the `is_deleted` attribute set to `true`. | Boolean getIncludeDeletedObjects() |
16+
| `IncludeCategoryPathToRoot` | `Boolean` | Optional | Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists<br>of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category<br>and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned<br>in the response payload. | Boolean getIncludeCategoryPathToRoot() |
1617

1718
## Example (as JSON)
1819

@@ -24,7 +25,8 @@
2425
"AA27W3M2GGTF3H6AVPNB77CK"
2526
],
2627
"catalog_version": 190,
27-
"include_deleted_objects": false
28+
"include_deleted_objects": false,
29+
"include_category_path_to_root": false
2830
}
2931
```
3032

0 commit comments

Comments
 (0)