Skip to content

Commit 9da1aa9

Browse files
author
Wolfgang Schuster
authored
Merge pull request #81 from square/release/21.0.0.20220720
Generated PR for Release: 21.0.0.20220720
2 parents 614e689 + 189f879 commit 9da1aa9

File tree

60 files changed

+333
-258
lines changed

Some content is hidden

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

60 files changed

+333
-258
lines changed

doc/api/catalog.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ bodyBatches0Objects0ItemDataVariations.add(bodyBatches0Objects0ItemDataVariation
170170

171171
CatalogItem catalogItem = new CatalogItem.Builder()
172172
.name("Tea")
173-
.description("Hot Leaf Juice")
174173
.categoryId("#Beverages")
175174
.taxIds(catalogItemTaxIds)
176175
.variations(catalogItemVariations)
176+
.descriptionHtml("<p><strong>Hot</strong> Leaf Juice</p>")
177177
.build();
178178
CatalogObject bodyBatches0Objects0 = new CatalogObject.Builder(
179179
"ITEM",
@@ -215,10 +215,10 @@ bodyBatches0Objects1ItemDataVariations.add(bodyBatches0Objects1ItemDataVariation
215215

216216
CatalogItem catalogItem = new CatalogItem.Builder()
217217
.name("Coffee")
218-
.description("Hot Bean Juice")
219218
.categoryId("#Beverages")
220219
.taxIds(catalogItemTaxIds)
221220
.variations(catalogItemVariations)
221+
.descriptionHtml("<p>Hot <em>Bean Juice</em></p>")
222222
.build();
223223
CatalogObject bodyBatches0Objects1 = new CatalogObject.Builder(
224224
"ITEM",
@@ -293,7 +293,7 @@ CompletableFuture<CreateCatalogImageResponse> createCatalogImageAsync(
293293

294294
| Parameter | Type | Tags | Description |
295295
| --- | --- | --- | --- |
296-
| `request` | [`CreateCatalogImageRequest`](../../doc/models/create-catalog-image-request.md) | Form, Optional | - |
296+
| `request` | [`CreateCatalogImageRequest`](../../doc/models/create-catalog-image-request.md) | Form (JSON-Encoded), Optional | - |
297297
| `imageFile` | `FileWrapper` | Form, Optional | - |
298298

299299
## Response Type
@@ -345,7 +345,7 @@ CompletableFuture<UpdateCatalogImageResponse> updateCatalogImageAsync(
345345
| Parameter | Type | Tags | Description |
346346
| --- | --- | --- | --- |
347347
| `imageId` | `String` | Template, Required | The ID of the `CatalogImage` object to update the encapsulated image file. |
348-
| `request` | [`UpdateCatalogImageRequest`](../../doc/models/update-catalog-image-request.md) | Form, Optional | - |
348+
| `request` | [`UpdateCatalogImageRequest`](../../doc/models/update-catalog-image-request.md) | Form (JSON-Encoded), Optional | - |
349349
| `imageFile` | `FileWrapper` | Form, Optional | - |
350350

351351
## Response Type
@@ -491,9 +491,9 @@ bodyObjectItemDataVariations.add(bodyObjectItemDataVariations1);
491491

492492
CatalogItem catalogItem = new CatalogItem.Builder()
493493
.name("Cocoa")
494-
.description("Hot Chocolate")
495494
.abbreviation("Ch")
496495
.variations(catalogItemVariations)
496+
.descriptionHtml("<p><strong>Hot</strong> Chocolate</p>")
497497
.build();
498498
CatalogObject catalogObject = new CatalogObject.Builder(
499499
"ITEM",

doc/api/customers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ CustomerCreationSourceFilter customerCreationSourceFilter = new CustomerCreation
158158
.rule("INCLUDE")
159159
.build();
160160
TimeRange timeRange = new TimeRange.Builder()
161-
.startAt("2018-01-01T00:00:00-00:00")
162-
.endAt("2018-02-01T00:00:00-00:00")
161+
.startAt("2018-01-01T00:00:00+00:00")
162+
.endAt("2018-02-01T00:00:00+00:00")
163163
.build();
164164
CustomerTextFilter customerTextFilter = new CustomerTextFilter.Builder()
165165
.fuzzy("example.com")

doc/api/disputes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ CompletableFuture<CreateDisputeEvidenceFileResponse> createDisputeEvidenceFileAs
178178
| Parameter | Type | Tags | Description |
179179
| --- | --- | --- | --- |
180180
| `disputeId` | `String` | Template, Required | The ID of the dispute you want to upload evidence for. |
181-
| `request` | [`CreateDisputeEvidenceFileRequest`](../../doc/models/create-dispute-evidence-file-request.md) | Form, Optional | Defines the parameters for a `CreateDisputeEvidenceFile` request. |
181+
| `request` | [`CreateDisputeEvidenceFileRequest`](../../doc/models/create-dispute-evidence-file-request.md) | Form (JSON-Encoded), Optional | Defines the parameters for a `CreateDisputeEvidenceFile` request. |
182182
| `imageFile` | `FileWrapper` | Form, Optional | - |
183183

184184
## Response Type

doc/api/inventory.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ BatchRetrieveInventoryChangesRequest body = new BatchRetrieveInventoryChangesReq
190190
.locationIds(bodyLocationIds)
191191
.types(bodyTypes)
192192
.states(bodyStates)
193-
.updatedAfter("2016-11-01T00:00:00.000Z")
194-
.updatedBefore("2016-12-01T00:00:00.000Z")
193+
.updatedAfter("2016-11-01T00:00:00Z")
194+
.updatedBefore("2016-12-01T00:00:00Z")
195195
.build();
196196

197197
inventoryApi.deprecatedBatchRetrieveInventoryChangesAsync(body).thenAccept(result -> {
@@ -235,7 +235,7 @@ bodyLocationIds.add("59TNP9SA8VGDA");
235235
BatchRetrieveInventoryCountsRequest body = new BatchRetrieveInventoryCountsRequest.Builder()
236236
.catalogObjectIds(bodyCatalogObjectIds)
237237
.locationIds(bodyLocationIds)
238-
.updatedAfter("2016-11-16T00:00:00.000Z")
238+
.updatedAfter("2016-11-16T00:00:00Z")
239239
.build();
240240

241241
inventoryApi.deprecatedBatchRetrieveInventoryCountsAsync(body).thenAccept(result -> {
@@ -347,8 +347,8 @@ BatchRetrieveInventoryChangesRequest body = new BatchRetrieveInventoryChangesReq
347347
.locationIds(bodyLocationIds)
348348
.types(bodyTypes)
349349
.states(bodyStates)
350-
.updatedAfter("2016-11-01T00:00:00.000Z")
351-
.updatedBefore("2016-12-01T00:00:00.000Z")
350+
.updatedAfter("2016-11-01T00:00:00Z")
351+
.updatedBefore("2016-12-01T00:00:00Z")
352352
.build();
353353

354354
inventoryApi.batchRetrieveInventoryChangesAsync(body).thenAccept(result -> {
@@ -399,7 +399,7 @@ bodyLocationIds.add("59TNP9SA8VGDA");
399399
BatchRetrieveInventoryCountsRequest body = new BatchRetrieveInventoryCountsRequest.Builder()
400400
.catalogObjectIds(bodyCatalogObjectIds)
401401
.locationIds(bodyLocationIds)
402-
.updatedAfter("2016-11-16T00:00:00.000Z")
402+
.updatedAfter("2016-11-16T00:00:00Z")
403403
.build();
404404

405405
inventoryApi.batchRetrieveInventoryCountsAsync(body).thenAccept(result -> {

doc/api/labor.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,19 +354,19 @@ ShiftWage shiftWage = new ShiftWage.Builder()
354354
List<Break> bodyShiftBreaks = new LinkedList<>();
355355

356356
Break bodyShiftBreaks0 = new Break.Builder(
357-
"2019-01-25T06:11:00-05:00",
357+
"2019-01-25T11:11:00+00:00",
358358
"REGS1EQR1TPZ5",
359359
"Tea Break",
360360
"PT5M",
361361
true)
362-
.endAt("2019-01-25T06:16:00-05:00")
362+
.endAt("2019-01-25T11:16:00+00:00")
363363
.build();
364364
bodyShiftBreaks.add(bodyShiftBreaks0);
365365

366366
Shift shift = new Shift.Builder(
367-
"2019-01-25T03:11:00-05:00")
367+
"2019-01-25T08:11:00+00:00")
368368
.locationId("PAA1RJZZKXBFG")
369-
.endAt("2019-01-25T13:11:00-05:00")
369+
.endAt("2019-01-25T18:11:00+00:00")
370370
.wage(shiftWage)
371371
.breaks(shiftBreaks)
372372
.teamMemberId("ormj0jJJZ5OZIzxrZYJI")
@@ -422,7 +422,24 @@ CompletableFuture<SearchShiftsResponse> searchShiftsAsync(
422422
## Example Usage
423423

424424
```java
425+
DateRange dateRange = new DateRange.Builder()
426+
.startDate("2019-01-20")
427+
.endDate("2019-02-03")
428+
.build();
429+
ShiftWorkday shiftWorkday = new ShiftWorkday.Builder()
430+
.dateRange(shiftWorkdayDateRange)
431+
.matchShiftsBy("START_AT")
432+
.defaultTimezone("America/Los_Angeles")
433+
.build();
434+
ShiftFilter shiftFilter = new ShiftFilter.Builder()
435+
.workday(shiftFilterWorkday)
436+
.build();
437+
ShiftQuery shiftQuery = new ShiftQuery.Builder()
438+
.filter(shiftQueryFilter)
439+
.build();
425440
SearchShiftsRequest body = new SearchShiftsRequest.Builder()
441+
.query(bodyQuery)
442+
.limit(100)
426443
.build();
427444

428445
laborApi.searchShiftsAsync(body).thenAccept(result -> {
@@ -542,20 +559,20 @@ ShiftWage shiftWage = new ShiftWage.Builder()
542559
List<Break> bodyShiftBreaks = new LinkedList<>();
543560

544561
Break bodyShiftBreaks0 = new Break.Builder(
545-
"2019-01-25T06:11:00-05:00",
562+
"2019-01-25T11:11:00+00:00",
546563
"REGS1EQR1TPZ5",
547564
"Tea Break",
548565
"PT5M",
549566
true)
550567
.id("X7GAQYVVRRG6P")
551-
.endAt("2019-01-25T06:16:00-05:00")
568+
.endAt("2019-01-25T11:16:00+00:00")
552569
.build();
553570
bodyShiftBreaks.add(bodyShiftBreaks0);
554571

555572
Shift shift = new Shift.Builder(
556-
"2019-01-25T03:11:00-05:00")
573+
"2019-01-25T08:11:00+00:00")
557574
.locationId("PAA1RJZZKXBFG")
558-
.endAt("2019-01-25T13:11:00-05:00")
575+
.endAt("2019-01-25T18:11:00+00:00")
559576
.wage(shiftWage)
560577
.breaks(shiftBreaks)
561578
.version(1)

doc/api/orders.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ An `UpdateOrder` request requires the following:
418418

419419
- The `order_id` in the endpoint path, identifying the order to update.
420420
- The latest `version` of the order to update.
421-
- The [sparse order](https://developer.squareup.com/docs/orders-api/manage-orders#sparse-order-objects)
421+
- The [sparse order](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#sparse-order-objects)
422422
containing only the fields to update and the version to which the update is
423423
being applied.
424424
- If deleting fields, the [dot notation paths](https://developer.squareup.com/docs/orders-api/manage-orders#on-dot-notation)

doc/api/subscriptions.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,7 @@ CompletableFuture<UpdateSubscriptionResponse> updateSubscriptionAsync(
204204

205205
```java
206206
String subscriptionId = "subscription_id0";
207-
Money money = new Money.Builder()
208-
.amount(2000L)
209-
.currency("USD")
210-
.build();
211-
Subscription subscription = new Subscription.Builder()
212-
.taxPercentage("null")
213-
.priceOverrideMoney(subscriptionPriceOverrideMoney)
214-
.version(1594155459464L)
215-
.build();
216207
UpdateSubscriptionRequest body = new UpdateSubscriptionRequest.Builder()
217-
.subscription(bodySubscription)
218208
.build();
219209

220210
subscriptionsApi.updateSubscriptionAsync(subscriptionId, body).thenAccept(result -> {

doc/api/terminal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ CompletableFuture<SearchTerminalActionsResponse> searchTerminalActionsAsync(
9393

9494
```java
9595
TimeRange timeRange = new TimeRange.Builder()
96-
.startAt("2022-04-01T00:00:00.000Z")
96+
.startAt("2022-04-01T00:00:00Z")
9797
.build();
9898
TerminalActionQueryFilter terminalActionQueryFilter = new TerminalActionQueryFilter.Builder()
9999
.createdAt(terminalActionQueryFilterCreatedAt)

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

doc/models/batch-retrieve-inventory-changes-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
| `UpdatedAfter` | `String` | Optional | The filter to return results with their `calculated_at` value<br>after the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | String getUpdatedAfter() |
1717
| `UpdatedBefore` | `String` | Optional | The filter to return results with their `created_at` or `calculated_at` value<br>strictly before the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | String getUpdatedBefore() |
1818
| `Cursor` | `String` | Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this to retrieve the next set of results for the original query.<br><br>See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. | String getCursor() |
19-
| `Limit` | `Integer` | Optional | **Constraints**: `>= 1`, `<= 1000` | Integer getLimit() |
19+
| `Limit` | `Integer` | Optional | The number of [records](../../doc/models/inventory-change.md) to return.<br>**Constraints**: `>= 1`, `<= 1000` | Integer getLimit() |
2020

2121
## Example (as JSON)
2222

0 commit comments

Comments
 (0)