Skip to content

Commit 97fcf76

Browse files
Merge pull request #91 from square/release/26.0.0.20221116
Generated PR for Release: 26.0.0.20221116
2 parents bf4456d + bae7745 commit 97fcf76

File tree

514 files changed

+53009
-8341
lines changed

Some content is hidden

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

514 files changed

+53009
-8341
lines changed

doc/api/booking-custom-attributes.md

Lines changed: 497 additions & 0 deletions
Large diffs are not rendered by default.

doc/api/catalog.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ children.
3737

3838
`BatchDeleteCatalogObjects` succeeds even if only a portion of the targeted
3939
IDs can be deleted. The response will only include IDs that were
40-
actually deleted.
40+
actually deleted.
41+
42+
To ensure consistency, only one delete request is processed at a time per seller account.
43+
While one (batch or non-batch) delete request is being processed, other (batched and non-batched)
44+
delete requests are rejected with the `429` error code.
4145

4246
```java
4347
CompletableFuture<BatchDeleteCatalogObjectsResponse> batchDeleteCatalogObjectsAsync(
@@ -129,7 +133,11 @@ containing that item will be disregarded. However, other batches in the same
129133
request may still succeed. Each batch may contain up to 1,000 objects, and
130134
batches will be processed in order as long as the total object count for the
131135
request (items, variations, modifier lists, discounts, and taxes) is no more
132-
than 10,000.
136+
than 10,000.
137+
138+
To ensure consistency, only one update request is processed at a time per seller account.
139+
While one (batch or non-batch) update request is being processed, other (batched and non-batched)
140+
update requests are rejected with the `429` error code.
133141

134142
```java
135143
CompletableFuture<BatchUpsertCatalogObjectsResponse> batchUpsertCatalogObjectsAsync(
@@ -451,7 +459,7 @@ CompletableFuture<ListCatalogResponse> listCatalogAsync(
451459
| --- | --- | --- | --- |
452460
| `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. |
453461
| `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. |
454-
| `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. |
462+
| `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. |
455463

456464
## Response Type
457465

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

472480
# Upsert Catalog Object
473481

474-
Creates or updates the target [CatalogObject](../../doc/models/catalog-object.md).
482+
Creates a new or updates the specified [CatalogObject](../../doc/models/catalog-object.md).
483+
484+
To ensure consistency, only one update request is processed at a time per seller account.
485+
While one (batch or non-batch) update request is being processed, other (batched and non-batched)
486+
update requests are rejected with the `429` error code.
475487

476488
```java
477489
CompletableFuture<UpsertCatalogObjectResponse> upsertCatalogObjectAsync(
@@ -559,7 +571,11 @@ provided ID and returns the set of successfully deleted IDs in the response.
559571
Deletion is a cascading event such that all children of the targeted object
560572
are also deleted. For example, deleting a [CatalogItem](../../doc/models/catalog-item.md)
561573
will also delete all of its
562-
[CatalogItemVariation](../../doc/models/catalog-item-variation.md) children.
574+
[CatalogItemVariation](../../doc/models/catalog-item-variation.md) children.
575+
576+
To ensure consistency, only one delete request is processed at a time per seller account.
577+
While one (batch or non-batch) delete request is being processed, other (batched and non-batched)
578+
delete requests are rejected with the `429` error code.
563579

564580
```java
565581
CompletableFuture<DeleteCatalogObjectResponse> deleteCatalogObjectAsync(

doc/api/customer-custom-attributes.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,6 @@ CompletableFuture<BulkUpsertCustomerCustomAttributesResponse> bulkUpsertCustomer
276276
Map<String, BulkUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest> values = new LinkedHashMap<>();
277277
values.put("", values0);
278278
values.put("", values1);
279-
values.put("", values2);
280-
values.put("", values3);
281-
values.put("", values4);
282279

283280
BulkUpsertCustomerCustomAttributesRequest body = new BulkUpsertCustomerCustomAttributesRequest.Builder(
284281
values)
@@ -465,7 +462,6 @@ CompletableFuture<UpsertCustomerCustomAttributeResponse> upsertCustomerCustomAtt
465462
String customerId = "customer_id8";
466463
String key = "key0";
467464
CustomAttribute customAttribute = new CustomAttribute.Builder()
468-
.value(JsonValue.fromObject("\"Dune\""))
469465
.build();
470466

471467
UpsertCustomerCustomAttributeRequest body = new UpsertCustomerCustomAttributeRequest.Builder(

doc/api/customers.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ customersApi.searchCustomersAsync(body).thenAccept(result -> {
211211

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

214-
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.
214+
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.
215+
If included, the value must be set to the current version of the customer profile.
215216

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

@@ -281,9 +282,12 @@ customersApi.retrieveCustomerAsync(customerId).thenAccept(result -> {
281282

282283
# Update Customer
283284

284-
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.
285+
Updates a customer profile. This endpoint supports sparse updates, so only new or changed fields are required in the request.
286+
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`
287+
(recommended) or specify an empty string (string fields only).
285288

286-
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.
289+
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.
290+
If included, the value must be set to the current version of the customer profile.
287291

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

doc/api/loyalty.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,11 +527,21 @@ LoyaltyPromotionTriggerLimit triggerLimit = new LoyaltyPromotionTriggerLimit.Bui
527527
.interval("DAY")
528528
.build();
529529

530+
Money minimumSpendAmountMoney = new Money.Builder()
531+
.amount(2000L)
532+
.currency("USD")
533+
.build();
534+
535+
List<String> qualifyingCategoryIds = new LinkedList<>();
536+
qualifyingCategoryIds.add("XTQPYLR3IIU9C44VRCB3XD12");
537+
530538
LoyaltyPromotion loyaltyPromotion = new LoyaltyPromotion.Builder(
531539
"Tuesday Happy Hour Promo",
532540
incentive,
533541
availableTime)
534542
.triggerLimit(triggerLimit)
543+
.minimumSpendAmountMoney(minimumSpendAmountMoney)
544+
.qualifyingCategoryIds(qualifyingCategoryIds)
535545
.build();
536546

537547
CreateLoyaltyPromotionRequest body = new CreateLoyaltyPromotionRequest.Builder(

0 commit comments

Comments
 (0)