Skip to content

Commit

Permalink
Generated PR for Release: 24.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
autobot committed Nov 16, 2022
1 parent 9aaebe2 commit 6562c5f
Show file tree
Hide file tree
Showing 511 changed files with 9,165 additions and 2,785 deletions.
2 changes: 1 addition & 1 deletion doc/api-error.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The ApiError extends the ApiResponse interface, so all ApiResponse properties ar
| Name | Type | Description |
| --- | --- | --- |
| request | HttpRequest | Original request that resulted in this response. |
| statusCode | number | Response status codee. |
| statusCode | number | Response status code. |
| headers | Record<string, string> | Response headers. |
| result | T | Response data. |
| body | string \| Blob \| NodeJS.ReadableStream | Original body from the response. |
Expand Down
565 changes: 565 additions & 0 deletions doc/api/booking-custom-attributes.md

Large diffs are not rendered by default.

20 changes: 18 additions & 2 deletions doc/api/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ children.
IDs can be deleted. The response will only include IDs that were
actually deleted.

To ensure consistency, only one delete request is processed at a time per seller account.
While one (batch or non-batch) delete request is being processed, other (batched and non-batched)
delete requests are rejected with the `429` error code.

```ts
async batchDeleteCatalogObjects(
body: BatchDeleteCatalogObjectsRequest,
Expand Down Expand Up @@ -140,6 +144,10 @@ batches will be processed in order as long as the total object count for the
request (items, variations, modifier lists, discounts, and taxes) is no more
than 10,000.

To ensure consistency, only one update request is processed at a time per seller account.
While one (batch or non-batch) update request is being processed, other (batched and non-batched)
update requests are rejected with the `429` error code.

```ts
async batchUpsertCatalogObjects(
body: BatchUpsertCatalogObjectsRequest,
Expand Down Expand Up @@ -472,7 +480,7 @@ async listCatalog(
| --- | --- | --- | --- |
| `cursor` | `string \| undefined` | Query, Optional | The pagination cursor returned in the previous response. Leave unset for an initial request.<br>The page size is currently set to be 100.<br>See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. |
| `types` | `string \| undefined` | Query, Optional | An optional case-insensitive, comma-separated list of object types to retrieve.<br><br>The valid values are defined in the [CatalogObjectType](../../doc/models/catalog-object-type.md) enum, for example,<br>`ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,<br>`MODIFIER`, `MODIFIER_LIST`, `IMAGE`, etc.<br><br>If this is unspecified, the operation returns objects of all the top level types at the version<br>of the Square API used to make the request. Object types that are nested onto other object types<br>are not included in the defaults.<br><br>At the current API version the default object types are:<br>ITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST,<br>PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,<br>SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS. |
| `catalogVersion` | `bigint \| undefined` | Query, Optional | The specific version of the catalog objects to be included in the response.<br>This allows you to retrieve historical<br>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. |
| `catalogVersion` | `bigint \| undefined` | Query, 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 be from the<br>current version of the catalog. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type
Expand All @@ -497,7 +505,11 @@ try {

# Upsert Catalog Object

Creates or updates the target [CatalogObject](../../doc/models/catalog-object.md).
Creates a new or updates the specified [CatalogObject](../../doc/models/catalog-object.md).

To ensure consistency, only one update request is processed at a time per seller account.
While one (batch or non-batch) update request is being processed, other (batched and non-batched)
update requests are rejected with the `429` error code.

```ts
async upsertCatalogObject(
Expand Down Expand Up @@ -593,6 +605,10 @@ are also deleted. For example, deleting a [CatalogItem](../../doc/models/catalog
will also delete all of its
[CatalogItemVariation](../../doc/models/catalog-item-variation.md) children.

To ensure consistency, only one delete request is processed at a time per seller account.
While one (batch or non-batch) delete request is being processed, other (batched and non-batched)
delete requests are rejected with the `429` error code.

```ts
async deleteCatalogObject(
objectId: string,
Expand Down
1 change: 0 additions & 1 deletion doc/api/customer-custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ const customerId = 'customer_id8';
const key = 'key0';
const contentType = null;
const bodyCustomAttribute: CustomAttribute = {};
bodyCustomAttribute.value = '"Dune"';

const body: UpsertCustomerCustomAttributeRequest = {
customAttribute: bodyCustomAttribute,
Expand Down
10 changes: 7 additions & 3 deletions doc/api/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ try {

Deletes a customer profile from a business. This operation also unlinks any associated cards on file.

As a best practice, you should include the `version` field in the request to enable [optimistic concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency) control. The value must be set to the current version of the customer profile.
As a best practice, include the `version` field in the request to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control.
If included, the value must be set to the current version of the customer profile.

To delete a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.

Expand Down Expand Up @@ -302,9 +303,12 @@ try {

# Update Customer

Updates a customer profile. To change an attribute, specify the new value. To remove an attribute, specify the value as an empty string or empty object.
Updates a customer profile. This endpoint supports sparse updates, so only new or changed fields are required in the request.
To add or update a field, specify the new value. To remove a field, specify `null` and include the `X-Clear-Null` header set to `true`
(recommended) or specify an empty string (string fields only).

As a best practice, you should include the `version` field in the request to enable [optimistic concurrency](https://developer.squareup.com/docs/working-with-apis/optimistic-concurrency) control. The value must be set to the current version of the customer profile.
As a best practice, include the `version` field in the request to enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control.
If included, the value must be set to the current version of the customer profile.

To update a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.

Expand Down
7 changes: 7 additions & 0 deletions doc/api/loyalty.md
Original file line number Diff line number Diff line change
Expand Up @@ -599,12 +599,19 @@ const bodyLoyaltyPromotionTriggerLimit: LoyaltyPromotionTriggerLimit = {
};
bodyLoyaltyPromotionTriggerLimit.interval = 'DAY';

const bodyLoyaltyPromotionMinimumSpendAmountMoney: Money = {};
bodyLoyaltyPromotionMinimumSpendAmountMoney.amount = BigInt(2000);
bodyLoyaltyPromotionMinimumSpendAmountMoney.currency = 'USD';

const bodyLoyaltyPromotionQualifyingCategoryIds: string[] = ['XTQPYLR3IIU9C44VRCB3XD12'];
const bodyLoyaltyPromotion: LoyaltyPromotion = {
name: 'Tuesday Happy Hour Promo',
incentive: bodyLoyaltyPromotionIncentive,
availableTime: bodyLoyaltyPromotionAvailableTime,
};
bodyLoyaltyPromotion.triggerLimit = bodyLoyaltyPromotionTriggerLimit;
bodyLoyaltyPromotion.minimumSpendAmountMoney = bodyLoyaltyPromotionMinimumSpendAmountMoney;
bodyLoyaltyPromotion.qualifyingCategoryIds = bodyLoyaltyPromotionQualifyingCategoryIds;

const body: CreateLoyaltyPromotionRequest = {
loyaltyPromotion: bodyLoyaltyPromotion,
Expand Down
Loading

0 comments on commit 6562c5f

Please sign in to comment.