Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Commit 01df84d

Browse files
authored
Merge pull request #73 from square/release/2.20190724.0
Release 2.20190724.0
2 parents 34abc22 + 77b7db3 commit 01df84d

26 files changed

+1110
-17
lines changed

CHANGES.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## Version 2.20190724.0 (2019-07-24)
4+
5+
* **BETA releases**:
6+
* Catalog API: supports item options with datatypes and enums for item options and item option values.
7+
38
## Version 2.20190710.0 (2019-07-10)
49

510
* **Breaking change** — As of 2019-07-10 Java Connect SDK does not support explicit `ENUM` types. Instead, the SDKs pass `ENUM` values as static `Strings`. Developer code can now choose to ignore unexpected `String` values when Square APIs return new values instead of being forced to throw runtime errors due to unexpected types. Additional information, including migration help, is available in the README.

README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Add this dependency to your project's POM:
3939
<dependency>
4040
<groupId>com.squareup</groupId>
4141
<artifactId>connect</artifactId>
42-
<version>2.20190710.0</version>
42+
<version>2.20190724.0</version>
4343
<scope>compile</scope>
4444
</dependency>
4545
```
@@ -49,7 +49,7 @@ Add this dependency to your project's POM:
4949
Add this dependency to your project's build file:
5050

5151
```groovy
52-
compile "com.squareup:connect:2.20190710.0"
52+
compile "com.squareup:connect:2.20190724.0"
5353
```
5454

5555
### Option 3: Build and Install locally
@@ -91,7 +91,7 @@ At first generate the JAR by executing:
9191

9292
Then manually install the following JARs:
9393

94-
* target/connect-2.20190710.0.jar
94+
* target/connect-2.20190724.0.jar
9595
* target/lib/*.jar
9696

9797
## Getting Started
@@ -308,6 +308,10 @@ Class | Method | HTTP request | Description
308308
- [CatalogInfoResponseLimits](docs/CatalogInfoResponseLimits.md)
309309
- [CatalogItem](docs/CatalogItem.md)
310310
- [CatalogItemModifierListInfo](docs/CatalogItemModifierListInfo.md)
311+
- [CatalogItemOption](docs/CatalogItemOption.md)
312+
- [CatalogItemOptionForItem](docs/CatalogItemOptionForItem.md)
313+
- [CatalogItemOptionValue](docs/CatalogItemOptionValue.md)
314+
- [CatalogItemOptionValueForItemVariation](docs/CatalogItemOptionValueForItemVariation.md)
311315
- [CatalogItemProductType](docs/CatalogItemProductType.md)
312316
- [CatalogItemVariation](docs/CatalogItemVariation.md)
313317
- [CatalogMeasurementUnit](docs/CatalogMeasurementUnit.md)
@@ -323,6 +327,8 @@ Class | Method | HTTP request | Description
323327
- [CatalogProductSet](docs/CatalogProductSet.md)
324328
- [CatalogQuery](docs/CatalogQuery.md)
325329
- [CatalogQueryExact](docs/CatalogQueryExact.md)
330+
- [CatalogQueryItemVariationsForItemOptionValues](docs/CatalogQueryItemVariationsForItemOptionValues.md)
331+
- [CatalogQueryItemsForItemOptions](docs/CatalogQueryItemsForItemOptions.md)
326332
- [CatalogQueryItemsForModifierList](docs/CatalogQueryItemsForModifierList.md)
327333
- [CatalogQueryItemsForTax](docs/CatalogQueryItemsForTax.md)
328334
- [CatalogQueryPrefix](docs/CatalogQueryPrefix.md)
@@ -734,7 +740,7 @@ Authentication schemes defined for the API:
734740
- EMPLOYEES_WRITE: __HTTP Method__: &#x60;POST&#x60;, &#x60;PUT&#x60;, &#x60;DELETE&#x60; Grants write access to employee profile information. For example, to create and modify employee profiles.
735741
- INVENTORY_READ: __HTTP Method__: &#x60;GET&#x60; Grants read access to inventory information. For example, to call the RetrieveInventoryCount endpoint.
736742
- INVENTORY_WRITE: __HTTP Method__: &#x60;POST&#x60;, &#x60;PUT&#x60;, &#x60;DELETE&#x60; Grants write access to inventory information. For example, to call the BatchChangeInventory endpoint.
737-
- ITEMS_READ: __HTTP Method__: &#x60;GET&#x60; Grants read access to business and location information. For example, to obtain a location ID for subsequent activity.
743+
- ITEMS_READ: __HTTP Method__: &#x60;GET&#x60; Grants read access to product catalog information. For example, to get an item or a list of items.
738744
- ITEMS_WRITE: __HTTP Method__: &#x60;POST&#x60;, &#x60;PUT&#x60;, &#x60;DELETE&#x60; Grants write access to product catalog information. For example, to modify or add to a product catalog.
739745
- MERCHANT_PROFILE_READ: __HTTP Method__: &#x60;GET&#x60; Grants read access to business and location information. For example, to obtain a location ID for subsequent activity.
740746
- ORDERS_READ: __HTTP Method__: &#x60;GET&#x60; Grants read access to order information. For example, to call the BatchRetrieveOrders endpoint.

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'idea'
22
apply plugin: 'eclipse'
33

44
group = 'com.squareup'
5-
version = '2.20190710.0'
5+
version = '2.20190724.0'
66

77
buildscript {
88
repositories {

docs/CatalogItem.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ Name | Type | Description | Notes
1919
**taxIds** | **List&lt;String&gt;** | A set of IDs indicating the [CatalogTax](#type-catalogtax)es that are enabled for this item. When updating an item, any taxes listed here will be added to the item. [CatalogTax](#type-catalogtax)es may also be added to or deleted from an item using &#x60;UpdateItemTaxes&#x60;. | [optional]
2020
**modifierListInfo** | [**List&lt;CatalogItemModifierListInfo&gt;**](CatalogItemModifierListInfo.md) | A set of [CatalogItemModifierListInfo](#type-catalogitemmodifierlistinfo) objects representing the modifier lists that apply to this item, along with the overrides and min and max limits that are specific to this item. [CatalogModifierList](#type-catalogmodifierlist)s may also be added to or deleted from an item using &#x60;UpdateItemModifierLists&#x60;. | [optional]
2121
**variations** | [**List&lt;CatalogObject&gt;**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations | [optional]
22-
**productType** | **String** | The product type of the item. May not be changed once an item has been created. Only items of product type &#x60;REGULAR&#x60; may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values | [optional]
22+
**productType** | **String** | The product type of the item. May not be changed once an item has been created. Only items of product type &#x60;REGULAR&#x60; or &#x60;APPOINTMENTS_SERVICE&#x60; may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values | [optional]
2323
**skipModifierScreen** | **Boolean** | If &#x60;false&#x60;, the Square Point of Sale app will present the [CatalogItem](#type-catalogitem)&#39;s details screen immediately, allowing the merchant to choose [CatalogModifier](#type-catalogmodifier)s before adding the item to the cart. This is the default behavior. If &#x60;true&#x60;, the Square Point of Sale app will immediately add the item to the cart with the pre-selected modifiers, and merchants can edit modifiers by drilling down onto the item&#39;s details. Third-party clients are encouraged to implement similar behaviors. | [optional]
24+
**itemOptions** | [**List&lt;CatalogItemOptionForItem&gt;**](CatalogItemOptionForItem.md) | List of item options IDs for this item. Used to manage and group item variations in a specified order. Maximum: 6 item options. | [optional]
2425

2526

2627

docs/CatalogItemOption.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# CatalogItemOption
3+
4+
### Description
5+
6+
A group of variations for a [CatalogItem](#type-catalogitem)'s.
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**name** | **String** | The item option&#39;s display name for the seller. Must be unique across all item options. Searchable. | [optional]
12+
**displayName** | **String** | The item option&#39;s display name for the customer. Searchable. | [optional]
13+
**description** | **String** | The item option&#39;s human-readable description. Displays for in the Square Point of Sale app for the seller and in the Online Store or on receipts for the buyer. | [optional]
14+
**showColors** | **Boolean** | If true, display colors for entries in &#x60;values&#x60; when present. | [optional]
15+
**values** | [**List&lt;CatalogObject&gt;**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemOptionValue](#type-catalogitemoptionvalue)s for this item. | [optional]
16+
**itemCount** | **Long** | The number of [CatalogItem](#type-catalogitem)s currently associated with this item option. Present only if the &#x60;include_counts&#x60; was specified in the request. Any count over 100 will be returned as &#x60;100&#x60;. | [optional]
17+
18+
19+

docs/CatalogItemOptionForItem.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
# CatalogItemOptionForItem
3+
4+
### Description
5+
6+
A list of item option values that can be assigned to item variations. For example, a t-shirt item may offer a color option or a size option.
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**itemOptionId** | **String** | The unique id of the item option, used to form the dimensions of the item option matrix in a specified order. | [optional]
12+
13+
14+

docs/CatalogItemOptionValue.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# CatalogItemOptionValue
3+
4+
### Description
5+
6+
An enumerated value that can link a [CatalogItemVariation(#type-catalogitemvariation) to an item option as one of its item option values.
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**itemOptionId** | **String** | Unique ID of the associated item option. | [optional]
12+
**name** | **String** | Name of this item option value. Searchable. | [optional]
13+
**description** | **String** | The option value&#39;s human-readable description. | [optional]
14+
**color** | **String** | The HTML color for this value in the format #FFRRGGBB or #RRGGBB (e.g., \&quot;#ff8d4e85\&quot;). Only displayed if parent Item Option&#39;s &#x60;show_colors&#x60; flag is enabled. value. | [optional]
15+
**ordinal** | **Integer** | Determines where this option value appears in a list of option values. | [optional]
16+
**itemVariationCount** | **Long** | The number of [CatalogItemVariation(#type-catalogitemvariation)s that currently make use of this Item Option value. Present only if &#x60;retrieve_counts&#x60; was specified on the request used to retrieve the parent Item Option of this value. Maximum: 100 counts. | [optional]
17+
18+
19+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
# CatalogItemOptionValueForItemVariation
3+
4+
### Description
5+
6+
A [CatalogItemOptionValue](#type-catalogitemoptionvalue) links an item variation to an item option as an item option value. For example, a t-shirt item may offer a color option and a size option. An item option value would represent each variation of t-shirt: For example, “Color:Red, Size:Small” or “Color:Blue, Size:Medium”.
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**itemOptionId** | **String** | The unique id of an item option. | [optional]
12+
**itemOptionValueId** | **String** | The unique id of the selected value for the item option. | [optional]
13+
14+
15+

docs/CatalogItemVariation.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Name | Type | Description | Notes
2121
**inventoryAlertThreshold** | **Long** | If the inventory quantity for the variation is less than or equal to this value and &#x60;inventory_alert_type&#x60; is &#x60;LOW_QUANTITY&#x60;, the variation displays an alert in the merchant dashboard. This value is always an integer. | [optional]
2222
**userData** | **String** | Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable. | [optional]
2323
**serviceDuration** | **Long** | If the [CatalogItem](#type-catalogitem) that owns this item variation is of type &#x60;APPOINTMENTS_SERVICE&#x60;, then this is the duration of the service in milliseconds. For example, a 30 minute appointment would have the value &#x60;1800000&#x60;, which is equal to 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second). | [optional]
24+
**itemOptionValues** | [**List&lt;CatalogItemOptionValueForItemVariation&gt;**](CatalogItemOptionValueForItemVariation.md) | List of item option values associated with this item variation. Listed in the same order as the item options of the parent item. | [optional]
2425
**measurementUnitId** | **String** | ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity sold of this item variation. If left unset, the item will be sold in whole quantities. | [optional]
2526

2627

docs/CatalogObject.md

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Name | Type | Description | Notes
3030
**pricingRuleData** | [**CatalogPricingRule**](CatalogPricingRule.md) | Structured data for a [CatalogPricingRule](#type-catalogpricingrule), set for CatalogObjects of type &#x60;PRICING_RULE&#x60;. | [optional]
3131
**imageData** | [**CatalogImage**](CatalogImage.md) | Structured data for a [CatalogImage](#type-catalogimage), set for CatalogObjects of type &#x60;IMAGE&#x60;. | [optional]
3232
**measurementUnitData** | [**CatalogMeasurementUnit**](CatalogMeasurementUnit.md) | Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type &#x60;MEASUREMENT_UNIT&#x60;. | [optional]
33+
**itemOptionData** | [**CatalogItemOption**](CatalogItemOption.md) | Structured data for a [CatalogItemOption](#type-catalogitemoption), set for CatalogObjects of type &#x60;ITEM_OPTION&#x60;. | [optional]
34+
**itemOptionValueData** | [**CatalogItemOptionValue**](CatalogItemOptionValue.md) | Structured data for a [CatalogItemOptionValue](#type-catalogitemoptionvalue), set for CatalogObjects of type &#x60;ITEM_OPTION_VAL&#x60;. | [optional]
3335

3436

3537

docs/CatalogObjectType.md

+6
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,11 @@
2424

2525
* `"TIME_PERIOD"`
2626

27+
* `"MEASUREMENT_UNIT"`
28+
29+
* `"ITEM_OPTION"`
30+
31+
* `"ITEM_OPTION_VAL"`
32+
2733

2834

docs/CatalogQuery.md

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Name | Type | Description | Notes
1515
**textQuery** | [**CatalogQueryText**](CatalogQueryText.md) | A query that returns only objects whose searchable attributes contain all of the given keywords as prefixes. For example, if a [CatalogItem](#type-catalogitem) contains attributes &#x60;{\&quot;name\&quot;: \&quot;t-shirt\&quot;}&#x60; and &#x60;{\&quot;description\&quot;: \&quot;Small, Purple\&quot;}&#x60;, it will be matched by the query &#x60;{\&quot;keywords\&quot;: [\&quot;shirt\&quot;, \&quot;sma\&quot;, \&quot;purp\&quot;]}&#x60;. | [optional]
1616
**itemsForTaxQuery** | [**CatalogQueryItemsForTax**](CatalogQueryItemsForTax.md) | A query that returns all [CatalogItem](#type-catalogitem)s that have any of the given [CatalogTax](#type-catalogtax)es enabled. | [optional]
1717
**itemsForModifierListQuery** | [**CatalogQueryItemsForModifierList**](CatalogQueryItemsForModifierList.md) | A query that returns all [CatalogItem](#type-catalogitem)s that have any of the given [CatalogModifierList](#type-catalogmodifierlist)s enabled. | [optional]
18+
**itemsForItemOptionsQuery** | [**CatalogQueryItemsForItemOptions**](CatalogQueryItemsForItemOptions.md) | A query that returns all [CatalogItem](#type-catalogitem)s that have all of the given [CatalogItemOption](#type-catalogitemoption)s. | [optional]
19+
**itemVariationsForItemOptionValuesQuery** | [**CatalogQueryItemVariationsForItemOptionValues**](CatalogQueryItemVariationsForItemOptionValues.md) | A query that returns all [CatalogItemVariation](#type-catalogitemvariations)s that have all of the given [CatalogItemOption](#type-catalogitemoption) values. | [optional]
1820

1921

2022

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
# CatalogQueryItemVariationsForItemOptionValues
3+
4+
### Description
5+
6+
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**itemOptionValueIds** | **List&lt;String&gt;** | A set of [CatalogItemOptionValue](#type-catalogitemoptionvalue) IDs to be used to find associated [CatalogItemVariation](#type-catalogitemvariation)s. All ItemVariations that contain all of the given Item Option Values (in any order) will be returned. | [optional]
12+
13+
14+
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
# CatalogQueryItemsForItemOptions
3+
4+
### Description
5+
6+
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**itemOptionIds** | **List&lt;String&gt;** | A set of [CatalogItemOption](#type-catalogitemoption) IDs to be used to find associated [CatalogItem](#type-catalogitem)s. All Items that contain all of the given Item Options (in any order) will be returned. | [optional]
12+
13+
14+

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>connect</artifactId>
66
<packaging>jar</packaging>
77
<name>connect</name>
8-
<version>2.20190710.0</version>
8+
<version>2.20190724.0</version>
99
<url>https://github.com/square/connect-java-sdk/</url>
1010
<description>Java client library for the Square Connect API</description>
1111
<scm>

src/main/java/com/squareup/connect/ApiClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public ApiClient() {
7373
this.dateFormat = new RFC3339DateFormat();
7474

7575
// Set default User-Agent.
76-
setUserAgent("Square-Connect-Java/2.20190710.0");
76+
setUserAgent("Square-Connect-Java/2.20190724.0");
7777

7878
// Setup authentications (key: authentication name, value: authentication).
7979
authentications = new HashMap<String, Authentication>();

0 commit comments

Comments
 (0)