Skip to content

Commit

Permalink
Merge pull request #91 from square/release/26.0.0.20221116
Browse files Browse the repository at this point in the history
Generated PR for Release: 26.0.0.20221116
  • Loading branch information
steefan-square authored Nov 16, 2022
2 parents bf4456d + bae7745 commit 97fcf76
Show file tree
Hide file tree
Showing 514 changed files with 53,009 additions and 8,341 deletions.
497 changes: 497 additions & 0 deletions doc/api/booking-custom-attributes.md

Large diffs are not rendered by default.

26 changes: 21 additions & 5 deletions doc/api/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ children.

`BatchDeleteCatalogObjects` succeeds even if only a portion of the targeted
IDs can be deleted. The response will only include IDs that were
actually deleted.
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.

```java
CompletableFuture<BatchDeleteCatalogObjectsResponse> batchDeleteCatalogObjectsAsync(
Expand Down Expand Up @@ -129,7 +133,11 @@ containing that item will be disregarded. However, other batches in the same
request may still succeed. Each batch may contain up to 1,000 objects, and
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.
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.

```java
CompletableFuture<BatchUpsertCatalogObjectsResponse> batchUpsertCatalogObjectsAsync(
Expand Down Expand Up @@ -451,7 +459,7 @@ CompletableFuture<ListCatalogResponse> listCatalogAsync(
| --- | --- | --- | --- |
| `cursor` | `String` | 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` | 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` | `Long` | 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` | `Long` | 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. |

## Response Type

Expand All @@ -471,7 +479,11 @@ catalogApi.listCatalogAsync(null, null, null).thenAccept(result -> {

# 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.

```java
CompletableFuture<UpsertCatalogObjectResponse> upsertCatalogObjectAsync(
Expand Down Expand Up @@ -559,7 +571,11 @@ provided ID and returns the set of successfully deleted IDs in the response.
Deletion is a cascading event such that all children of the targeted object
are also deleted. For example, deleting a [CatalogItem](../../doc/models/catalog-item.md)
will also delete all of its
[CatalogItemVariation](../../doc/models/catalog-item-variation.md) children.
[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.

```java
CompletableFuture<DeleteCatalogObjectResponse> deleteCatalogObjectAsync(
Expand Down
4 changes: 0 additions & 4 deletions doc/api/customer-custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,6 @@ CompletableFuture<BulkUpsertCustomerCustomAttributesResponse> bulkUpsertCustomer
Map<String, BulkUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest> values = new LinkedHashMap<>();
values.put("", values0);
values.put("", values1);
values.put("", values2);
values.put("", values3);
values.put("", values4);

BulkUpsertCustomerCustomAttributesRequest body = new BulkUpsertCustomerCustomAttributesRequest.Builder(
values)
Expand Down Expand Up @@ -465,7 +462,6 @@ CompletableFuture<UpsertCustomerCustomAttributeResponse> upsertCustomerCustomAtt
String customerId = "customer_id8";
String key = "key0";
CustomAttribute customAttribute = new CustomAttribute.Builder()
.value(JsonValue.fromObject("\"Dune\""))
.build();

UpsertCustomerCustomAttributeRequest body = new UpsertCustomerCustomAttributeRequest.Builder(
Expand Down
10 changes: 7 additions & 3 deletions doc/api/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ customersApi.searchCustomersAsync(body).thenAccept(result -> {

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 @@ -281,9 +282,12 @@ customersApi.retrieveCustomerAsync(customerId).thenAccept(result -> {

# 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
10 changes: 10 additions & 0 deletions doc/api/loyalty.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,11 +527,21 @@ LoyaltyPromotionTriggerLimit triggerLimit = new LoyaltyPromotionTriggerLimit.Bui
.interval("DAY")
.build();

Money minimumSpendAmountMoney = new Money.Builder()
.amount(2000L)
.currency("USD")
.build();

List<String> qualifyingCategoryIds = new LinkedList<>();
qualifyingCategoryIds.add("XTQPYLR3IIU9C44VRCB3XD12");

LoyaltyPromotion loyaltyPromotion = new LoyaltyPromotion.Builder(
"Tuesday Happy Hour Promo",
incentive,
availableTime)
.triggerLimit(triggerLimit)
.minimumSpendAmountMoney(minimumSpendAmountMoney)
.qualifyingCategoryIds(qualifyingCategoryIds)
.build();

CreateLoyaltyPromotionRequest body = new CreateLoyaltyPromotionRequest.Builder(
Expand Down
Loading

0 comments on commit 97fcf76

Please sign in to comment.