Skip to content

Commit b7839af

Browse files
authored
Merge pull request #61 from square/release/15.1.0.20210915
Generated PR for Release: 15.1.0.20210915
2 parents 8cf32bf + bc99f17 commit b7839af

File tree

248 files changed

+2827
-4637
lines changed

Some content is hidden

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

248 files changed

+2827
-4637
lines changed

CHANGELOG.md

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
## Version 15.0.0.20210915 (2021-09-15)
3+
## Version 15.1.0.20210915 (2021-09-15)
44
## API updates
55

66
* **Invoices API:**
@@ -22,53 +22,6 @@
2222
* Revised API descriptions for the ObtainToken and Authorize endpoints. Clarified that the Authorize endpoint is not a callable API but is used to direct the seller to the Square authorization page. For more information about the Authorize endpoint, see [Create the Redirect URL and Square Authorization Page URL.](https://developer.squareup.com/docs/oauth-api/create-urls-for-square-authorization)
2323

2424

25-
## Version 13.0.0.20210721 (2021-07-21)
26-
## SDK updates
27-
* The [Square Java SDK](https://developer.squareup.com/docs/sdks/java) now lets you customize `HttpClient` by creating an `okhttpclient` instance and setting it in `HttpClientConfiguration` to override the default behavior.
28-
29-
## API updates
30-
31-
* **Orders API:**
32-
* [OrderServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderServiceCharge) object. Added a new field, `type`. It identifies the service charge type.
33-
34-
* [OrderQuantityUnit](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderQuantityUnit),
35-
[OrderLineItem](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItem),
36-
[OrderLineItemDiscount](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemDiscount),
37-
[OrderLineItemModifier](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemModifier),
38-
[OrderLineItemTax](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderLineItemTax),
39-
[OrderServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderServiceCharge),
40-
[OrderReturnLineItem](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnLineItem),
41-
[OrderReturnLineItemModifier](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnLineItemModifier),
42-
[OrderReturnServiceCharge](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnServiceCharge),
43-
[OrderReturnTax](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnTax), and
44-
[OrderReturnDiscount](https://developer.squareup.com/reference/square_2021-07-21/objects/OrderReturnDiscount) objects. Added a new field, `catalog_version`.
45-
* **Locations API:**
46-
* [Location](https://developer.squareup.com/reference/square_2021-07-21/objects/Location) object. Added a new field `tax_ids` of type `TaxIds`. In the current implementation, sellers in Ireland and France can configure tax IDs during the onboarding process. They can also provide the information later by updating the location information in the Seller Dashboard. These tax IDs appear in this field.
47-
48-
* **Loyalty API:**
49-
* As of July 15, 2021, the country in which the seller’s Square account is activated determines whether Square uses pretax or post-tax purchase amounts to calculate accrued points. This change supports consumption tax models, such as value-added tax (VAT). Previously, point accrual was based on pretax purchase amounts only. This change does not affect the existing point balance of loyalty accounts. For more information, see [Availability of Square Loyalty.](https://developer.squareup.com/docs/loyalty-api/overview#loyalty-market-availability)
50-
51-
* **Payments API:**
52-
* [UpdatePayment](https://developer.squareup.com/reference/square_2021-07-21/payments-api/update-payment). The endpoint has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state. Also, you can now update gift card payments (similar to card, cash, and external payments).
53-
54-
* **Subscriptions API:**
55-
* The [Subscriptions API](https://developer.squareup.com/docs/subscriptions-api/overview) has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state.
56-
* [CatalogSubscriptionPlan](https://developer.squareup.com/reference/square_2021-07-21/objects/CatalogSubscriptionPlan) object. The `name` and `price` are now write-once fields. You specify these values at the time of creating a plan. After the plan is created, these fields cannot be updated. This makes a subscription plan immutable.
57-
58-
* **Inventory API:**
59-
* [RetrieveInventoryTransfer.](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Transfer) This new endpoint is introduced to support the retrieval of inventory transfer.
60-
* [RetrieveInventoryChanges.](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Changes) This endpoint is deprecated. Its support ends when it is retired in about 12 months.
61-
* The following endpoints have updated URLs to conform to the standard REST API convention. For more information about migrating deprecated URLs to updated URLs in your application, see [Inventory API: Migrate to Updated API Entities.](https://developer.squareup.com/docs/inventory-api/migrate-to-updated-api-entities)
62-
* [RetrieveInventoryAdjustment](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Adjustment)
63-
* [BatchChangeInventory](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Change-Inventory)
64-
* [BatchRetrieveInventoryChanges](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Retrieve-Inventory-Changes)
65-
* [BatchRetrieveInventoryCounts](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Batch-Retrieve-Inventory-Counts)
66-
* [RetrieveInventoryPhysicalCount](https://developer.squareup.com/reference/square_2021-07-21/inventory-api/Retrieve-Inventory-Physical-Count)
67-
68-
## Documentation updates
69-
* **Webhooks.** Revised the steps and descriptions for creating and using webhooks. For more information, see [Webhooks Overview.](https://developer.squareup.com/docs/webhooks/overview)
70-
71-
7225
## Version 12.0.0.20210616 (2021-06-16)
7326
## New API releases
7427
* **Gift Cards API and Gift Card Activities API.** Gift card support is integrated in the [Square Seller Dashboard](https://squareup.com/dashboard/) and the [Square Point of Sale](https://squareup.com/us/en/point-of-sale) application. Sellers can sell, redeem, track, and reload Square gift cards. Now developers can use the [Gift Cards API](https://developer.squareup.com/reference/square_2021-06-16/gift-cards-api) and the [Gift Card Activities API](https://developer.squareup.com/reference/square_2021-06-16/gift-card-activities-api) to integrate Square gift cards into third-party applications. For more information, see [Gift Cards API Overview.](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api)

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Install the client dynamically by adding a dependency to the POM for your projec
3333
<dependency>
3434
<groupId>com.squareup</groupId>
3535
<artifactId>square</artifactId>
36-
<version>15.0.0.20210915</version>
36+
<version>15.1.0.20210915</version>
3737
</dependency>
3838
```
3939

@@ -42,7 +42,7 @@ Install the client dynamically by adding a dependency to the POM for your projec
4242
Install the client by adding the following dependency to the build file for your project:
4343

4444
```
45-
implementation "com.squareup:square:15.0.0.20210915"
45+
implementation "com.squareup:square:15.1.0.20210915"
4646
```
4747

4848
## API documentation
@@ -53,6 +53,9 @@ implementation "com.squareup:square:15.0.0.20210915"
5353
* [Disputes]
5454
* [Checkout]
5555
* [Apple Pay]
56+
* [Cards]
57+
58+
### Terminal
5659
* [Terminal]
5760

5861
### Orders
@@ -76,19 +79,22 @@ implementation "com.squareup:square:15.0.0.20210915"
7679
### Loyalty
7780
* [Loyalty]
7881

82+
### Gift Cards
83+
* [Gift Cards]
84+
* [Gift Card Activities]
85+
7986
### Bookings
8087
* [Bookings]
8188

8289
### Business
8390
* [Merchants]
8491
* [Locations]
8592
* [Devices]
93+
* [Cash Drawers]
8694

8795
### Team
8896
* [Team]
89-
* [Employees]
9097
* [Labor]
91-
* [Cash Drawers]
9298

9399
### Financials
94100
* [Bank Accounts]
@@ -102,6 +108,7 @@ implementation "com.squareup:square:15.0.0.20210915"
102108
* [OAuth]
103109

104110
### Deprecated APIs
111+
* [Employees]
105112
* [V1 Employees]
106113
* [V1 Transactions]
107114
* [V1 Items]
@@ -349,3 +356,6 @@ You can also use the Square API to create applications or services that work wit
349356
[Transactions]: doc/api/transactions.md
350357
[Sites]: doc/api/sites.md
351358
[Snippets]: doc/api/snippets.md
359+
[Cards]: doc/api/cards.md
360+
[Gift Cards]: doc/api/gift-cards.md
361+
[Gift Card Activities]: doc/api/gift-card-activities.md

doc/api/catalog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,9 @@ CatalogObject requestImage = new CatalogObject.Builder(
485485
.imageData(requestImageImageData)
486486
.build();
487487
CreateCatalogImageRequest request = new CreateCatalogImageRequest.Builder(
488-
"528dea59-7bfb-43c1-bd48-4a6bba7dd61f86")
488+
"528dea59-7bfb-43c1-bd48-4a6bba7dd61f86",
489+
requestImage)
489490
.objectId("ND6EA5AAJEO5WL3JNNIAQA32")
490-
.image(requestImage)
491491
.build();
492492
FileWrapper imageFile = new FileWrapper(new File("dummy_file"), "optional-content-type");
493493

@@ -813,7 +813,7 @@ catalogApi.retrieveCatalogObjectAsync(objectId, includeRelatedObjects, catalogVe
813813
# Search Catalog Objects
814814

815815
Searches for [CatalogObject](/doc/models/catalog-object.md) of any type by matching supported search attribute values,
816-
excluding custom attribute values on items or item variations, against one or more of the specified query expressions.
816+
excluding custom attribute values on items or item variations, against one or more of the specified query filters.
817817

818818
This (`SearchCatalogObjects`) endpoint differs from the [SearchCatalogItems](/doc/api/catalog.md#search-catalog-items)
819819
endpoint in the following aspects:
@@ -896,7 +896,7 @@ catalogApi.searchCatalogObjectsAsync(body).thenAccept(result -> {
896896
# Search Catalog Items
897897

898898
Searches for catalog items or item variations by matching supported search attribute values, including
899-
custom attribute values, against one or more of the specified query expressions.
899+
custom attribute values, against one or more of the specified query filters.
900900

901901
This (`SearchCatalogItems`) endpoint differs from the [SearchCatalogObjects](/doc/api/catalog.md#search-catalog-objects)
902902
endpoint in the following aspects:

doc/api/checkout.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ MeasurementUnit bodyOrderOrderLineItems0QuantityUnitMeasurementUnit = new Measur
5050
OrderQuantityUnit bodyOrderOrderLineItems0QuantityUnit = new OrderQuantityUnit.Builder()
5151
.measurementUnit(bodyOrderOrderLineItems0QuantityUnitMeasurementUnit)
5252
.precision(191)
53+
.catalogObjectId("catalog_object_id7")
5354
.catalogVersion(131L)
5455
.build();
5556
List<OrderLineItemAppliedTax> bodyOrderOrderLineItems0AppliedTaxes = new LinkedList<>();
@@ -104,6 +105,7 @@ MeasurementUnit bodyOrderOrderLineItems1QuantityUnitMeasurementUnit = new Measur
104105
OrderQuantityUnit bodyOrderOrderLineItems1QuantityUnit = new OrderQuantityUnit.Builder()
105106
.measurementUnit(bodyOrderOrderLineItems1QuantityUnitMeasurementUnit)
106107
.precision(192)
108+
.catalogObjectId("catalog_object_id6")
107109
.catalogVersion(130L)
108110
.build();
109111
Money bodyOrderOrderLineItems1BasePriceMoney = new Money.Builder()
@@ -130,6 +132,7 @@ MeasurementUnit bodyOrderOrderLineItems2QuantityUnitMeasurementUnit = new Measur
130132
OrderQuantityUnit bodyOrderOrderLineItems2QuantityUnit = new OrderQuantityUnit.Builder()
131133
.measurementUnit(bodyOrderOrderLineItems2QuantityUnitMeasurementUnit)
132134
.precision(193)
135+
.catalogObjectId("catalog_object_id5")
133136
.catalogVersion(129L)
134137
.build();
135138
Money bodyOrderOrderLineItems2BasePriceMoney = new Money.Builder()

doc/api/customer-groups.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ Retrieves the list of customer groups of a business.
2323

2424
```java
2525
CompletableFuture<ListCustomerGroupsResponse> listCustomerGroupsAsync(
26-
final String cursor)
26+
final String cursor,
27+
final Integer limit)
2728
```
2829

2930
## Parameters
3031

3132
| Parameter | Type | Tags | Description |
3233
| --- | --- | --- | --- |
3334
| `cursor` | `String` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for your original query.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
35+
| `limit` | `Integer` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>The limit is ignored if it is less than 1 or greater than 50. The default value is 50.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
3436

3537
## Response Type
3638

@@ -40,8 +42,9 @@ CompletableFuture<ListCustomerGroupsResponse> listCustomerGroupsAsync(
4042

4143
```java
4244
String cursor = "cursor6";
45+
Integer limit = 172;
4346

44-
customerGroupsApi.listCustomerGroupsAsync(cursor).thenAccept(result -> {
47+
customerGroupsApi.listCustomerGroupsAsync(cursor, limit).thenAccept(result -> {
4548
// TODO success callback handler
4649
}).exceptionally(exception -> {
4750
// TODO failure callback handler

doc/api/customer-segments.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ Retrieves the list of customer segments of a business.
2020

2121
```java
2222
CompletableFuture<ListCustomerSegmentsResponse> listCustomerSegmentsAsync(
23-
final String cursor)
23+
final String cursor,
24+
final Integer limit)
2425
```
2526

2627
## Parameters
2728

2829
| Parameter | Type | Tags | Description |
2930
| --- | --- | --- | --- |
3031
| `cursor` | `String` | Query, Optional | A pagination cursor returned by previous calls to `ListCustomerSegments`.<br>This cursor is used to retrieve the next set of query results.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
32+
| `limit` | `Integer` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>The limit is ignored if it is less than 1 or greater than 50. The default value is 50.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
3133

3234
## Response Type
3335

@@ -37,8 +39,9 @@ CompletableFuture<ListCustomerSegmentsResponse> listCustomerSegmentsAsync(
3739

3840
```java
3941
String cursor = "cursor6";
42+
Integer limit = 172;
4043

41-
customerSegmentsApi.listCustomerSegmentsAsync(cursor).thenAccept(result -> {
44+
customerSegmentsApi.listCustomerSegmentsAsync(cursor, limit).thenAccept(result -> {
4245
// TODO success callback handler
4346
}).exceptionally(exception -> {
4447
// TODO failure callback handler

doc/api/customers.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ profiles can take closer to one minute or longer, especially during network inci
3333
```java
3434
CompletableFuture<ListCustomersResponse> listCustomersAsync(
3535
final String cursor,
36+
final Integer limit,
3637
final String sortField,
3738
final String sortOrder)
3839
```
@@ -42,8 +43,9 @@ CompletableFuture<ListCustomersResponse> listCustomersAsync(
4243
| Parameter | Type | Tags | Description |
4344
| --- | --- | --- | --- |
4445
| `cursor` | `String` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for your original query.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
45-
| `sortField` | [`String`](/doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>Default: `DEFAULT`. |
46-
| `sortOrder` | [`String`](/doc/models/sort-order.md) | Query, Optional | Indicates whether customers should be sorted in ascending (`ASC`) or<br>descending (`DESC`) order.<br><br>Default: `ASC`. |
46+
| `limit` | `Integer` | Query, Optional | The maximum number of results to return in a single page. This limit is advisory. The response might contain more or fewer results.<br>The limit is ignored if it is less than 1 or greater than 100. The default value is 100.<br><br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
47+
| `sortField` | [`String`](/doc/models/customer-sort-field.md) | Query, Optional | Indicates how customers should be sorted.<br><br>The default value is `DEFAULT`. |
48+
| `sortOrder` | [`String`](/doc/models/sort-order.md) | Query, Optional | Indicates whether customers should be sorted in ascending (`ASC`) or<br>descending (`DESC`) order.<br><br>The default value is `ASC`. |
4749

4850
## Response Type
4951

@@ -53,10 +55,11 @@ CompletableFuture<ListCustomersResponse> listCustomersAsync(
5355

5456
```java
5557
String cursor = "cursor6";
58+
Integer limit = 172;
5659
String sortField = "DEFAULT";
5760
String sortOrder = "DESC";
5861

59-
customersApi.listCustomersAsync(cursor, sortField, sortOrder).thenAccept(result -> {
62+
customersApi.listCustomersAsync(cursor, limit, sortField, sortOrder).thenAccept(result -> {
6063
// TODO success callback handler
6164
}).exceptionally(exception -> {
6265
// TODO failure callback handler

doc/api/gift-cards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ giftCardsApi.listGiftCardsAsync(type, state, limit, cursor, customerId).thenAcce
6767

6868
# Create Gift Card
6969

70-
Creates a digital gift card. You must activate the gift card before
71-
it can be used. For more information, see
70+
Creates a digital gift card or registers a physical (plastic) gift card. You must activate the gift card before
71+
it can be used for payment. For more information, see
7272
[Selling gift cards](https://developer.squareup.com/docs/gift-cards/using-gift-cards-api#selling-square-gift-cards).
7373

7474
```java

doc/api/invoices.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ Invoice bodyInvoice = new Invoice.Builder()
165165
.scheduledAt("2030-01-13T10:00:00Z")
166166
.acceptedPaymentMethods(bodyInvoiceAcceptedPaymentMethods)
167167
.customFields(bodyInvoiceCustomFields)
168+
.saleOrServiceDate("2030-01-24")
168169
.build();
169170
CreateInvoiceRequest body = new CreateInvoiceRequest.Builder(
170171
bodyInvoice)

0 commit comments

Comments
 (0)