Skip to content

Commit 4f94247

Browse files
author
Wolfgang Schuster
authored
Merge pull request #97 from square/release/20.0.0
Generated PR for Release: 20.0.0
2 parents ce8f8fd + df29fb6 commit 4f94247

File tree

59 files changed

+197
-178
lines changed

Some content is hidden

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

59 files changed

+197
-178
lines changed

doc/api/catalog.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ bodybatches0objects0ItemDataVariations[0] = bodybatches0objects0ItemDatavariatio
185185

186186
const bodybatches0objects0ItemData: CatalogItem = {};
187187
bodybatches0objects0ItemData.name = 'Tea';
188-
bodybatches0objects0ItemData.description = 'Hot Leaf Juice';
189188
bodybatches0objects0ItemData.categoryId = '#Beverages';
190189
bodybatches0objects0ItemData.taxIds = bodybatches0objects0ItemDataTaxIds;
191190
bodybatches0objects0ItemData.variations = bodybatches0objects0ItemDataVariations;
191+
bodybatches0objects0ItemData.descriptionHtml = '<p><strong>Hot</strong> Leaf Juice</p>';
192192

193193
const bodybatches0objects0: CatalogObject = {
194194
type: 'ITEM',
@@ -232,10 +232,10 @@ bodybatches0objects1ItemDataVariations[1] = bodybatches0objects1ItemDatavariatio
232232

233233
const bodybatches0objects1ItemData: CatalogItem = {};
234234
bodybatches0objects1ItemData.name = 'Coffee';
235-
bodybatches0objects1ItemData.description = 'Hot Bean Juice';
236235
bodybatches0objects1ItemData.categoryId = '#Beverages';
237236
bodybatches0objects1ItemData.taxIds = bodybatches0objects1ItemDataTaxIds;
238237
bodybatches0objects1ItemData.variations = bodybatches0objects1ItemDataVariations;
238+
bodybatches0objects1ItemData.descriptionHtml = '<p>Hot <em>Bean Juice</em></p>';
239239

240240
const bodybatches0objects1: CatalogObject = {
241241
type: 'ITEM',
@@ -320,7 +320,7 @@ async createCatalogImage(
320320

321321
| Parameter | Type | Tags | Description |
322322
| --- | --- | --- | --- |
323-
| `request` | [`CreateCatalogImageRequest \| undefined`](../../doc/models/create-catalog-image-request.md) | Form, Optional | - |
323+
| `request` | [`CreateCatalogImageRequest \| undefined`](../../doc/models/create-catalog-image-request.md) | Form (JSON-Encoded), Optional | - |
324324
| `imageFile` | `FileWrapper \| undefined` | Form, Optional | - |
325325
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
326326

@@ -380,7 +380,7 @@ async updateCatalogImage(
380380
| Parameter | Type | Tags | Description |
381381
| --- | --- | --- | --- |
382382
| `imageId` | `string` | Template, Required | The ID of the `CatalogImage` object to update the encapsulated image file. |
383-
| `request` | [`UpdateCatalogImageRequest \| undefined`](../../doc/models/update-catalog-image-request.md) | Form, Optional | - |
383+
| `request` | [`UpdateCatalogImageRequest \| undefined`](../../doc/models/update-catalog-image-request.md) | Form (JSON-Encoded), Optional | - |
384384
| `imageFile` | `FileWrapper \| undefined` | Form, Optional | - |
385385
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
386386

@@ -556,9 +556,9 @@ bodyObjectItemDataVariations[1] = bodyObjectItemDatavariations1;
556556

557557
const bodyObjectItemData: CatalogItem = {};
558558
bodyObjectItemData.name = 'Cocoa';
559-
bodyObjectItemData.description = 'Hot Chocolate';
560559
bodyObjectItemData.abbreviation = 'Ch';
561560
bodyObjectItemData.variations = bodyObjectItemDataVariations;
561+
bodyObjectItemData.descriptionHtml = '<p><strong>Hot</strong> Chocolate</p>';
562562

563563
const bodyObject: CatalogObject = {
564564
type: 'ITEM',

doc/api/customers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ bodyQueryFilterCreationSource.values = bodyQueryFilterCreationSourceValues;
175175
bodyQueryFilterCreationSource.rule = 'INCLUDE';
176176

177177
const bodyQueryFilterCreatedAt: TimeRange = {};
178-
bodyQueryFilterCreatedAt.startAt = '2018-01-01T00:00:00-00:00';
179-
bodyQueryFilterCreatedAt.endAt = '2018-02-01T00:00:00-00:00';
178+
bodyQueryFilterCreatedAt.startAt = '2018-01-01T00:00:00+00:00';
179+
bodyQueryFilterCreatedAt.endAt = '2018-02-01T00:00:00+00:00';
180180

181181
const bodyQueryFilterEmailAddress: CustomerTextFilter = {};
182182
bodyQueryFilterEmailAddress.fuzzy = 'example.com';

doc/api/disputes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ async createDisputeEvidenceFile(
205205
| Parameter | Type | Tags | Description |
206206
| --- | --- | --- | --- |
207207
| `disputeId` | `string` | Template, Required | The ID of the dispute you want to upload evidence for. |
208-
| `request` | [`CreateDisputeEvidenceFileRequest \| undefined`](../../doc/models/create-dispute-evidence-file-request.md) | Form, Optional | Defines the parameters for a `CreateDisputeEvidenceFile` request. |
208+
| `request` | [`CreateDisputeEvidenceFileRequest \| undefined`](../../doc/models/create-dispute-evidence-file-request.md) | Form (JSON-Encoded), Optional | Defines the parameters for a `CreateDisputeEvidenceFile` request. |
209209
| `imageFile` | `FileWrapper \| undefined` | Form, Optional | - |
210210
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
211211

doc/api/inventory.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ body.catalogObjectIds = bodyCatalogObjectIds;
210210
body.locationIds = bodyLocationIds;
211211
body.types = bodyTypes;
212212
body.states = bodyStates;
213-
body.updatedAfter = '2016-11-01T00:00:00.000Z';
214-
body.updatedBefore = '2016-12-01T00:00:00.000Z';
213+
body.updatedAfter = '2016-11-01T00:00:00Z';
214+
body.updatedBefore = '2016-12-01T00:00:00Z';
215215

216216
try {
217217
const { result, ...httpResponse } = await inventoryApi.deprecatedBatchRetrieveInventoryChanges(body);
@@ -260,7 +260,7 @@ const bodyLocationIds: string[] = ['59TNP9SA8VGDA'];
260260
const body: BatchRetrieveInventoryCountsRequest = {};
261261
body.catalogObjectIds = bodyCatalogObjectIds;
262262
body.locationIds = bodyLocationIds;
263-
body.updatedAfter = '2016-11-16T00:00:00.000Z';
263+
body.updatedAfter = '2016-11-16T00:00:00Z';
264264

265265
try {
266266
const { result, ...httpResponse } = await inventoryApi.deprecatedBatchRetrieveInventoryCounts(body);
@@ -383,8 +383,8 @@ body.catalogObjectIds = bodyCatalogObjectIds;
383383
body.locationIds = bodyLocationIds;
384384
body.types = bodyTypes;
385385
body.states = bodyStates;
386-
body.updatedAfter = '2016-11-01T00:00:00.000Z';
387-
body.updatedBefore = '2016-12-01T00:00:00.000Z';
386+
body.updatedAfter = '2016-11-01T00:00:00Z';
387+
body.updatedBefore = '2016-12-01T00:00:00Z';
388388

389389
try {
390390
const { result, ...httpResponse } = await inventoryApi.batchRetrieveInventoryChanges(body);
@@ -440,7 +440,7 @@ const bodyLocationIds: string[] = ['59TNP9SA8VGDA'];
440440
const body: BatchRetrieveInventoryCountsRequest = {};
441441
body.catalogObjectIds = bodyCatalogObjectIds;
442442
body.locationIds = bodyLocationIds;
443-
body.updatedAfter = '2016-11-16T00:00:00.000Z';
443+
body.updatedAfter = '2016-11-16T00:00:00Z';
444444

445445
try {
446446
const { result, ...httpResponse } = await inventoryApi.batchRetrieveInventoryCounts(body);

doc/api/labor.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -408,21 +408,21 @@ bodyShiftWage.hourlyRate = bodyShiftWageHourlyRate;
408408
const bodyShiftBreaks: Break[] = [];
409409

410410
const bodyShiftbreaks0: Break = {
411-
startAt: '2019-01-25T06:11:00-05:00',
411+
startAt: '2019-01-25T11:11:00+00:00',
412412
breakTypeId: 'REGS1EQR1TPZ5',
413413
name: 'Tea Break',
414414
expectedDuration: 'PT5M',
415415
isPaid: true,
416416
};
417-
bodyShiftbreaks0.endAt = '2019-01-25T06:16:00-05:00';
417+
bodyShiftbreaks0.endAt = '2019-01-25T11:16:00+00:00';
418418

419419
bodyShiftBreaks[0] = bodyShiftbreaks0;
420420

421421
const bodyShift: Shift = {
422-
startAt: '2019-01-25T03:11:00-05:00',
422+
startAt: '2019-01-25T08:11:00+00:00',
423423
};
424424
bodyShift.locationId = 'PAA1RJZZKXBFG';
425-
bodyShift.endAt = '2019-01-25T13:11:00-05:00';
425+
bodyShift.endAt = '2019-01-25T18:11:00+00:00';
426426
bodyShift.wage = bodyShiftWage;
427427
bodyShift.breaks = bodyShiftBreaks;
428428
bodyShift.teamMemberId = 'ormj0jJJZ5OZIzxrZYJI';
@@ -486,7 +486,24 @@ async searchShifts(
486486

487487
```ts
488488
const contentType = null;
489+
const bodyQueryFilterWorkdayDateRange: DateRange = {};
490+
bodyQueryFilterWorkdayDateRange.startDate = '2019-01-20';
491+
bodyQueryFilterWorkdayDateRange.endDate = '2019-02-03';
492+
493+
const bodyQueryFilterWorkday: ShiftWorkday = {};
494+
bodyQueryFilterWorkday.dateRange = bodyQueryFilterWorkdayDateRange;
495+
bodyQueryFilterWorkday.matchShiftsBy = 'START_AT';
496+
bodyQueryFilterWorkday.defaultTimezone = 'America/Los_Angeles';
497+
498+
const bodyQueryFilter: ShiftFilter = {};
499+
bodyQueryFilter.workday = bodyQueryFilterWorkday;
500+
501+
const bodyQuery: ShiftQuery = {};
502+
bodyQuery.filter = bodyQueryFilter;
503+
489504
const body: SearchShiftsRequest = {};
505+
body.query = bodyQuery;
506+
body.limit = 100;
490507

491508
try {
492509
const { result, ...httpResponse } = await laborApi.searchShifts(body);
@@ -625,22 +642,22 @@ bodyShiftWage.hourlyRate = bodyShiftWageHourlyRate;
625642
const bodyShiftBreaks: Break[] = [];
626643

627644
const bodyShiftbreaks0: Break = {
628-
startAt: '2019-01-25T06:11:00-05:00',
645+
startAt: '2019-01-25T11:11:00+00:00',
629646
breakTypeId: 'REGS1EQR1TPZ5',
630647
name: 'Tea Break',
631648
expectedDuration: 'PT5M',
632649
isPaid: true,
633650
};
634651
bodyShiftbreaks0.id = 'X7GAQYVVRRG6P';
635-
bodyShiftbreaks0.endAt = '2019-01-25T06:16:00-05:00';
652+
bodyShiftbreaks0.endAt = '2019-01-25T11:16:00+00:00';
636653

637654
bodyShiftBreaks[0] = bodyShiftbreaks0;
638655

639656
const bodyShift: Shift = {
640-
startAt: '2019-01-25T03:11:00-05:00',
657+
startAt: '2019-01-25T08:11:00+00:00',
641658
};
642659
bodyShift.locationId = 'PAA1RJZZKXBFG';
643-
bodyShift.endAt = '2019-01-25T13:11:00-05:00';
660+
bodyShift.endAt = '2019-01-25T18:11:00+00:00';
644661
bodyShift.wage = bodyShiftWage;
645662
bodyShift.breaks = bodyShiftBreaks;
646663
bodyShift.version = 1;

doc/api/orders.md

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

467467
- The `order_id` in the endpoint path, identifying the order to update.
468468
- The latest `version` of the order to update.
469-
- The [sparse order](https://developer.squareup.com/docs/orders-api/manage-orders#sparse-order-objects)
469+
- The [sparse order](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders#sparse-order-objects)
470470
containing only the fields to update and the version to which the update is
471471
being applied.
472472
- 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
@@ -226,17 +226,7 @@ async updateSubscription(
226226
```ts
227227
const subscriptionId = 'subscription_id0';
228228
const contentType = null;
229-
const bodySubscriptionPriceOverrideMoney: Money = {};
230-
bodySubscriptionPriceOverrideMoney.amount = 2000;
231-
bodySubscriptionPriceOverrideMoney.currency = 'USD';
232-
233-
const bodySubscription: Subscription = {};
234-
bodySubscription.taxPercentage = 'null';
235-
bodySubscription.priceOverrideMoney = bodySubscriptionPriceOverrideMoney;
236-
bodySubscription.version = 1594155459464;
237-
238229
const body: UpdateSubscriptionRequest = {};
239-
body.subscription = bodySubscription;
240230

241231
try {
242232
const { result, ...httpResponse } = await subscriptionsApi.updateSubscription(subscriptionId, body);

doc/api/terminal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async searchTerminalActions(
106106
```ts
107107
const contentType = null;
108108
const bodyQueryFilterCreatedAt: TimeRange = {};
109-
bodyQueryFilterCreatedAt.startAt = '2022-04-01T00:00:00.000Z';
109+
bodyQueryFilterCreatedAt.startAt = '2022-04-01T00:00:00Z';
110110

111111
const bodyQueryFilter: TerminalActionQueryFilter = {};
112112
bodyQueryFilter.createdAt = bodyQueryFilterCreatedAt;

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
| `additionalHeaders` | `Readonly<Record<string, string>>` | Additional headers to add to each API call<br>*Default*: `{}` |
@@ -40,7 +40,7 @@ The API client can be initialized as follows:
4040

4141
```ts
4242
const client = new Client({
43-
squareVersion: '2022-06-16',
43+
squareVersion: '2022-07-20',
4444
timeout: 60000,
4545
additionalHeaders: {},
4646
userAgentDetail: '',
@@ -56,7 +56,7 @@ import fs from 'fs';
5656
import { ApiError, Client, FileWrapper, LocationsApi } from 'square';
5757

5858
const client = new Client({
59-
squareVersion: '2022-06-16',
59+
squareVersion: '2022-07-20',
6060
timeout: 60000,
6161
additionalHeaders: {},
6262
userAgentDetail: '',

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 \| undefined` | 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`). |
1717
| `updatedBefore` | `string \| undefined` | 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`). |
1818
| `cursor` | `string \| undefined` | 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. |
19-
| `limit` | `number \| undefined` | Optional | **Constraints**: `>= 1`, `<= 1000` |
19+
| `limit` | `number \| undefined` | Optional | The number of [records](../../doc/models/inventory-change.md) to return.<br>**Constraints**: `>= 1`, `<= 1000` |
2020

2121
## Example (as JSON)
2222

0 commit comments

Comments
 (0)