diff --git a/CHANGES.md b/CHANGES.md
index 32bc733..4305674 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,9 @@
# Change Log
+## Version 2.20190612.1 (2019-06-26)
+
+* **Bug fix**: `Transaction.Charge` and `Customers.CreateCustomerCard` request objects — now include the `verification_token` required for [Strong Customer Authentication](https://developer.squareup.com/docs/sca-overview).
+
## Version 2.20190612.0 (2019-06-12)
* **BETA releases**:
diff --git a/README.md b/README.md
index f62a0dc..0f7f25b 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ Add this dependency to your project's POM:
com.squareup
connect
- 2.20190612.0
+ 2.20190612.1
compile
```
@@ -28,7 +28,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:
```groovy
-compile "com.squareup:connect:2.20190612.0"
+compile "com.squareup:connect:2.20190612.1"
```
### Option 3: Build and Install locally
@@ -70,7 +70,7 @@ At first generate the JAR by executing:
Then manually install the following JARs:
-* target/connect-2.20190612.0.jar
+* target/connect-2.20190612.1.jar
* target/lib/*.jar
## Getting Started
@@ -694,6 +694,7 @@ Class | Method | HTTP request | Description
- [V1VariationPricingType](docs/V1VariationPricingType.md)
- [VoidTransactionRequest](docs/VoidTransactionRequest.md)
- [VoidTransactionResponse](docs/VoidTransactionResponse.md)
+ - [WebhookEvents](docs/WebhookEvents.md)
- [Weekday](docs/Weekday.md)
- [WorkweekConfig](docs/WorkweekConfig.md)
diff --git a/build.gradle b/build.gradle
index 6afd9d7..54ba061 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'com.squareup'
-version = '2.20190612.0'
+version = '2.20190612.1'
buildscript {
repositories {
diff --git a/docs/CatalogObject.md b/docs/CatalogObject.md
index 5fe1172..20aa93e 100644
--- a/docs/CatalogObject.md
+++ b/docs/CatalogObject.md
@@ -3,7 +3,7 @@
### Description
-The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
+The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide.
## Properties
Name | Type | Description | Notes
diff --git a/docs/ChargeRequest.md b/docs/ChargeRequest.md
index 36cafa2..86c5991 100644
--- a/docs/ChargeRequest.md
+++ b/docs/ChargeRequest.md
@@ -21,6 +21,7 @@ Name | Type | Description | Notes
**buyerEmailAddress** | **String** | The buyer's email address, if available. | [optional]
**orderId** | **String** | The ID of the order to associate with this transaction. If you provide this value, the `amount_money` value of your request must __exactly match__ the value of the order's `total_money` field. | [optional]
**additionalRecipients** | [**List<AdditionalRecipient>**](AdditionalRecipient.md) | The basic primitive of multi-party transaction. The value is optional. The transaction facilitated by you can be split from here. If you provide this value, the `amount_money` value in your additional_recipients must not be more than 90% of the `amount_money` value in the charge request. The `location_id` must be the valid location of the app owner merchant. This field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox. | [optional]
+**verificationToken** | **String** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. | [optional]
diff --git a/docs/CreateCustomerCardRequest.md b/docs/CreateCustomerCardRequest.md
index 7f200e1..4ffa8b2 100644
--- a/docs/CreateCustomerCardRequest.md
+++ b/docs/CreateCustomerCardRequest.md
@@ -8,9 +8,10 @@ Defines the fields that are included in the request body of a request to the Cre
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**cardNonce** | **String** | A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payments/sqpaymentform/overview) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card. |
+**cardNonce** | **String** | A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payment-form/payment-form-walkthrough) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card. |
**billingAddress** | [**Address**](Address.md) | Address information for the card on file. Only the `postal_code` field is required for payments in the US and Canada. | [optional]
-**cardholderName** | **String** | The cardholder's name. | [optional]
+**cardholderName** | **String** | The full name printed on the credit card. | [optional]
+**verificationToken** | **String** | An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. | [optional]
diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md
index 757f531..aa57bfc 100644
--- a/docs/CustomersApi.md
+++ b/docs/CustomersApi.md
@@ -91,7 +91,7 @@ OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");
CustomersApi apiInstance = new CustomersApi();
-String customerId = "customerId_example"; // String | The ID of the customer to link the card on file to.
+String customerId = "customerId_example"; // String | The Square ID of the customer profile the card is linked to.
CreateCustomerCardRequest body = new CreateCustomerCardRequest(); // CreateCustomerCardRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
try {
CreateCustomerCardResponse result = apiInstance.createCustomerCard(customerId, body);
@@ -106,7 +106,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **customerId** | **String**| The ID of the customer to link the card on file to. |
+ **customerId** | **String**| The Square ID of the customer profile the card is linked to. |
**body** | [**CreateCustomerCardRequest**](CreateCustomerCardRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
### Return type
diff --git a/docs/OAuthApi.md b/docs/OAuthApi.md
index 96d56f3..138d9c6 100644
--- a/docs/OAuthApi.md
+++ b/docs/OAuthApi.md
@@ -60,7 +60,7 @@ No authorization required
RenewToken
-`RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](/authz/oauth/cookbook/oauth-renew). Renews an OAuth access token before it expires. OAuth access tokens besides your application's personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning. __Important:__ The `Authorization` header for this endpoint must have the following format: ``` Authorization: Client APPLICATION_SECRET ``` Replace `APPLICATION_SECRET` with the application secret on the Credentials page in the [application dashboard](https://connect.squareup.com/apps).
+`RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](https://developer.squareup.com/docs/oauth-api/cookbook/renew-oauth-tokens). Renews an OAuth access token before it expires. OAuth access tokens besides your application's personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning. __Important:__ The `Authorization` header for this endpoint must have the following format: ``` Authorization: Client APPLICATION_SECRET ``` Replace `APPLICATION_SECRET` with the application secret on the Credentials page in the [application dashboard](https://connect.squareup.com/apps).
### Example
```java
diff --git a/docs/OrderLineItem.md b/docs/OrderLineItem.md
index f0a3bd6..ff56347 100644
--- a/docs/OrderLineItem.md
+++ b/docs/OrderLineItem.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uid** | **String** | Unique ID that identifies the line item only within this order. This field is read-only. | [optional]
**name** | **String** | The name of the line item. | [optional]
-**quantity** | **String** | The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities). |
+**quantity** | **String** | The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. |
**quantityUnit** | [**OrderQuantityUnit**](OrderQuantityUnit.md) | The unit and precision that this line item's quantity is measured in. | [optional]
**note** | **String** | The note of the line item. | [optional]
**catalogObjectId** | **String** | The [CatalogItemVariation](#type-catalogitemvariation) id applied to this line item. | [optional]
diff --git a/docs/OrderQuantityUnit.md b/docs/OrderQuantityUnit.md
index 500a2bc..7128982 100644
--- a/docs/OrderQuantityUnit.md
+++ b/docs/OrderQuantityUnit.md
@@ -9,7 +9,7 @@ Contains the measurement unit for a quantity and a precision which specifies the
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**measurementUnit** | [**MeasurementUnit**](MeasurementUnit.md) | A [MeasurementUnit](#type-measurementunit) that represents the unit of measure for the quantity. | [optional]
-**precision** | **Integer** | For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities). | [optional]
+**precision** | **Integer** | For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5. | [optional]
diff --git a/docs/V1CashDrawerShift.md b/docs/V1CashDrawerShift.md
index 755b72f..354dcc6 100644
--- a/docs/V1CashDrawerShift.md
+++ b/docs/V1CashDrawerShift.md
@@ -3,7 +3,7 @@
### Description
-V1CashDrawerShift
+Contains details for a single cash drawer shift.
## Properties
Name | Type | Description | Notes
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**openingEmployeeId** | **String** | The ID of the employee that started the cash drawer shift. | [optional]
**endingEmployeeId** | **String** | The ID of the employee that ended the cash drawer shift. | [optional]
**closingEmployeeId** | **String** | The ID of the employee that closed the cash drawer shift by auditing the cash drawer's contents. | [optional]
-**description** | **String** | The time when the timecard was created, in ISO 8601 format. | [optional]
+**description** | **String** | A description of the cash drawer shift. | [optional]
**startingCashMoney** | [**V1Money**](V1Money.md) | The amount of money in the cash drawer at the start of the shift. | [optional]
**cashPaymentMoney** | [**V1Money**](V1Money.md) | The amount of money added to the cash drawer from cash payments. | [optional]
**cashRefundsMoney** | [**V1Money**](V1Money.md) | The amount of money removed from the cash drawer from cash refunds. This value is always negative or zero. | [optional]
diff --git a/docs/V1Item.md b/docs/V1Item.md
index b9bd467..d29a723 100644
--- a/docs/V1Item.md
+++ b/docs/V1Item.md
@@ -19,7 +19,7 @@ Name | Type | Description | Notes
**masterImage** | [**V1ItemImage**](V1ItemImage.md) | The item's master image, if any. | [optional]
**category** | [**V1Category**](V1Category.md) | The category the item belongs to, if any. | [optional]
**variations** | [**List<V1Variation>**](V1Variation.md) | The item's variations. You must specify at least one variation. | [optional]
-**modifierLists** | [**List<V1Variation>**](V1Variation.md) | The modifier lists that apply to the item, if any. | [optional]
+**modifierLists** | [**List<V1ModifierList>**](V1ModifierList.md) | The modifier lists that apply to the item, if any. | [optional]
**fees** | [**List<V1Fee>**](V1Fee.md) | The fees that apply to the item, if any. | [optional]
**taxable** | **Boolean** | Deprecated. This field is not used. | [optional]
**categoryId** | **String** | The ID of the item's category, if any. | [optional]
diff --git a/docs/WebhookEvents.md b/docs/WebhookEvents.md
new file mode 100644
index 0000000..5cac9c4
--- /dev/null
+++ b/docs/WebhookEvents.md
@@ -0,0 +1,10 @@
+
+# WebhookEvents
+
+## Enum
+
+
+* `UPDATED` (value: `"inventory.count.updated"`)
+
+
+
diff --git a/pom.xml b/pom.xml
index 534f453..b71e65a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
connect
jar
connect
- 2.20190612.0
+ 2.20190612.1
https://github.com/square/connect-java-sdk/
Java client library for the Square Connect API
diff --git a/src/main/java/com/squareup/connect/ApiClient.java b/src/main/java/com/squareup/connect/ApiClient.java
index 9ed66f3..99aa82f 100644
--- a/src/main/java/com/squareup/connect/ApiClient.java
+++ b/src/main/java/com/squareup/connect/ApiClient.java
@@ -73,7 +73,7 @@ public ApiClient() {
this.dateFormat = new RFC3339DateFormat();
// Set default User-Agent.
- setUserAgent("Square-Connect-Java/2.20190612.0");
+ setUserAgent("Square-Connect-Java/2.20190612.1");
// Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap();
diff --git a/src/main/java/com/squareup/connect/api/CustomersApi.java b/src/main/java/com/squareup/connect/api/CustomersApi.java
index 14074dc..2083419 100644
--- a/src/main/java/com/squareup/connect/api/CustomersApi.java
+++ b/src/main/java/com/squareup/connect/api/CustomersApi.java
@@ -133,7 +133,7 @@ public CreateCustomerResponse createCustomer(CreateCustomerRequest body) throws
/**
* CreateCustomerCard
* Adds a card on file to an existing customer. As with charges, calls to `CreateCustomerCard` are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call. Cards on file are automatically updated on a monthly basis to confirm they are still valid and can be charged.
- * @param customerId The ID of the customer to link the card on file to. (required)
+ * @param customerId The Square ID of the customer profile the card is linked to. (required)
* @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
* @return CreateCustomerCardResponse
* @throws ApiException if fails to make API call
@@ -183,7 +183,7 @@ public CreateCustomerCardResponse createCustomerCard(String customerId, CreateCu
/**
* CreateCustomerCard
* Adds a card on file to an existing customer. As with charges, calls to `CreateCustomerCard` are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the _first_ call. Cards on file are automatically updated on a monthly basis to confirm they are still valid and can be charged.
- * @param customerId The ID of the customer to link the card on file to. (required)
+ * @param customerId The Square ID of the customer profile the card is linked to. (required)
* @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
* @return CompleteResponse
* @throws ApiException if fails to make API call
diff --git a/src/main/java/com/squareup/connect/api/OAuthApi.java b/src/main/java/com/squareup/connect/api/OAuthApi.java
index 6ae7c64..a9947a2 100644
--- a/src/main/java/com/squareup/connect/api/OAuthApi.java
+++ b/src/main/java/com/squareup/connect/api/OAuthApi.java
@@ -126,7 +126,7 @@ public ObtainTokenResponse obtainToken(ObtainTokenRequest body) throws ApiExcept
}
/**
* RenewToken
- * `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](/authz/oauth/cookbook/oauth-renew). Renews an OAuth access token before it expires. OAuth access tokens besides your application's personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning. __Important:__ The `Authorization` header for this endpoint must have the following format: ``` Authorization: Client APPLICATION_SECRET ``` Replace `APPLICATION_SECRET` with the application secret on the Credentials page in the [application dashboard](https://connect.squareup.com/apps).
+ * `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](https://developer.squareup.com/docs/oauth-api/cookbook/renew-oauth-tokens). Renews an OAuth access token before it expires. OAuth access tokens besides your application's personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning. __Important:__ The `Authorization` header for this endpoint must have the following format: ``` Authorization: Client APPLICATION_SECRET ``` Replace `APPLICATION_SECRET` with the application secret on the Credentials page in the [application dashboard](https://connect.squareup.com/apps).
* @param clientId Your application's ID, available from the [application dashboard](https://connect.squareup.com/apps). (required)
* @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
* @return RenewTokenResponse
@@ -176,7 +176,7 @@ public RenewTokenResponse renewToken(String clientId, RenewTokenRequest body) th
/**
* RenewToken
- * `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](/authz/oauth/cookbook/oauth-renew). Renews an OAuth access token before it expires. OAuth access tokens besides your application's personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning. __Important:__ The `Authorization` header for this endpoint must have the following format: ``` Authorization: Client APPLICATION_SECRET ``` Replace `APPLICATION_SECRET` with the application secret on the Credentials page in the [application dashboard](https://connect.squareup.com/apps).
+ * `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see [Renew OAuth Token](https://developer.squareup.com/docs/oauth-api/cookbook/renew-oauth-tokens). Renews an OAuth access token before it expires. OAuth access tokens besides your application's personal access token expire after __30 days__. You can also renew expired tokens within __15 days__ of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning. __Important:__ The `Authorization` header for this endpoint must have the following format: ``` Authorization: Client APPLICATION_SECRET ``` Replace `APPLICATION_SECRET` with the application secret on the Credentials page in the [application dashboard](https://connect.squareup.com/apps).
* @param clientId Your application's ID, available from the [application dashboard](https://connect.squareup.com/apps). (required)
* @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required)
* @return CompleteResponse
diff --git a/src/main/java/com/squareup/connect/models/CatalogObject.java b/src/main/java/com/squareup/connect/models/CatalogObject.java
index d10be8f..e87f884 100644
--- a/src/main/java/com/squareup/connect/models/CatalogObject.java
+++ b/src/main/java/com/squareup/connect/models/CatalogObject.java
@@ -33,9 +33,9 @@
import java.util.List;
/**
- * The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
+ * The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide.
*/
-@ApiModel(description = "The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).")
+@ApiModel(description = "The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Design a Catalog](/catalog-api/design-a-catalog) guide.")
public class CatalogObject {
/**
diff --git a/src/main/java/com/squareup/connect/models/ChargeRequest.java b/src/main/java/com/squareup/connect/models/ChargeRequest.java
index 52478ee..b6b3e6d 100644
--- a/src/main/java/com/squareup/connect/models/ChargeRequest.java
+++ b/src/main/java/com/squareup/connect/models/ChargeRequest.java
@@ -70,6 +70,9 @@ public class ChargeRequest {
@JsonProperty("additional_recipients")
private List additionalRecipients = new ArrayList();
+ @JsonProperty("verification_token")
+ private String verificationToken = null;
+
public ChargeRequest idempotencyKey(String idempotencyKey) {
this.idempotencyKey = idempotencyKey;
return this;
@@ -309,6 +312,24 @@ public void setAdditionalRecipients(List additionalRecipien
this.additionalRecipients = additionalRecipients;
}
+ public ChargeRequest verificationToken(String verificationToken) {
+ this.verificationToken = verificationToken;
+ return this;
+ }
+
+ /**
+ * An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity.
+ * @return verificationToken
+ **/
+ @ApiModelProperty(value = "An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity.")
+ public String getVerificationToken() {
+ return verificationToken;
+ }
+
+ public void setVerificationToken(String verificationToken) {
+ this.verificationToken = verificationToken;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
@@ -331,12 +352,13 @@ public boolean equals(java.lang.Object o) {
Objects.equals(this.shippingAddress, chargeRequest.shippingAddress) &&
Objects.equals(this.buyerEmailAddress, chargeRequest.buyerEmailAddress) &&
Objects.equals(this.orderId, chargeRequest.orderId) &&
- Objects.equals(this.additionalRecipients, chargeRequest.additionalRecipients);
+ Objects.equals(this.additionalRecipients, chargeRequest.additionalRecipients) &&
+ Objects.equals(this.verificationToken, chargeRequest.verificationToken);
}
@Override
public int hashCode() {
- return Objects.hash(idempotencyKey, amountMoney, cardNonce, customerCardId, delayCapture, referenceId, note, customerId, billingAddress, shippingAddress, buyerEmailAddress, orderId, additionalRecipients);
+ return Objects.hash(idempotencyKey, amountMoney, cardNonce, customerCardId, delayCapture, referenceId, note, customerId, billingAddress, shippingAddress, buyerEmailAddress, orderId, additionalRecipients, verificationToken);
}
@@ -358,6 +380,7 @@ public String toString() {
sb.append(" buyerEmailAddress: ").append(toIndentedString(buyerEmailAddress)).append("\n");
sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n");
sb.append(" additionalRecipients: ").append(toIndentedString(additionalRecipients)).append("\n");
+ sb.append(" verificationToken: ").append(toIndentedString(verificationToken)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/src/main/java/com/squareup/connect/models/CreateCustomerCardRequest.java b/src/main/java/com/squareup/connect/models/CreateCustomerCardRequest.java
index 8b91155..87828d4 100644
--- a/src/main/java/com/squareup/connect/models/CreateCustomerCardRequest.java
+++ b/src/main/java/com/squareup/connect/models/CreateCustomerCardRequest.java
@@ -36,16 +36,19 @@ public class CreateCustomerCardRequest {
@JsonProperty("cardholder_name")
private String cardholderName = null;
+ @JsonProperty("verification_token")
+ private String verificationToken = null;
+
public CreateCustomerCardRequest cardNonce(String cardNonce) {
this.cardNonce = cardNonce;
return this;
}
/**
- * A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payments/sqpaymentform/overview) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card.
+ * A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payment-form/payment-form-walkthrough) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card.
* @return cardNonce
**/
- @ApiModelProperty(required = true, value = "A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payments/sqpaymentform/overview) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card.")
+ @ApiModelProperty(required = true, value = "A card nonce representing the credit card to link to the customer. Card nonces are generated by the `SqPaymentForm` that buyers enter their card information into. See [Embedding the payment form](/payment-form/payment-form-walkthrough) for more information. __Note:__ Card nonces generated by digital wallets (e.g., Apple Pay) cannot be used to create a customer card.")
public String getCardNonce() {
return cardNonce;
}
@@ -78,10 +81,10 @@ public CreateCustomerCardRequest cardholderName(String cardholderName) {
}
/**
- * The cardholder's name.
+ * The full name printed on the credit card.
* @return cardholderName
**/
- @ApiModelProperty(value = "The cardholder's name.")
+ @ApiModelProperty(value = "The full name printed on the credit card.")
public String getCardholderName() {
return cardholderName;
}
@@ -90,6 +93,24 @@ public void setCardholderName(String cardholderName) {
this.cardholderName = cardholderName;
}
+ public CreateCustomerCardRequest verificationToken(String verificationToken) {
+ this.verificationToken = verificationToken;
+ return this;
+ }
+
+ /**
+ * An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity.
+ * @return verificationToken
+ **/
+ @ApiModelProperty(value = "An identifying token generated by `SqPaymentForm.verifyBuyer()`. Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity.")
+ public String getVerificationToken() {
+ return verificationToken;
+ }
+
+ public void setVerificationToken(String verificationToken) {
+ this.verificationToken = verificationToken;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
@@ -102,12 +123,13 @@ public boolean equals(java.lang.Object o) {
CreateCustomerCardRequest createCustomerCardRequest = (CreateCustomerCardRequest) o;
return Objects.equals(this.cardNonce, createCustomerCardRequest.cardNonce) &&
Objects.equals(this.billingAddress, createCustomerCardRequest.billingAddress) &&
- Objects.equals(this.cardholderName, createCustomerCardRequest.cardholderName);
+ Objects.equals(this.cardholderName, createCustomerCardRequest.cardholderName) &&
+ Objects.equals(this.verificationToken, createCustomerCardRequest.verificationToken);
}
@Override
public int hashCode() {
- return Objects.hash(cardNonce, billingAddress, cardholderName);
+ return Objects.hash(cardNonce, billingAddress, cardholderName, verificationToken);
}
@@ -119,6 +141,7 @@ public String toString() {
sb.append(" cardNonce: ").append(toIndentedString(cardNonce)).append("\n");
sb.append(" billingAddress: ").append(toIndentedString(billingAddress)).append("\n");
sb.append(" cardholderName: ").append(toIndentedString(cardholderName)).append("\n");
+ sb.append(" verificationToken: ").append(toIndentedString(verificationToken)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/src/main/java/com/squareup/connect/models/OrderLineItem.java b/src/main/java/com/squareup/connect/models/OrderLineItem.java
index 3fc2ea6..16b381a 100644
--- a/src/main/java/com/squareup/connect/models/OrderLineItem.java
+++ b/src/main/java/com/squareup/connect/models/OrderLineItem.java
@@ -123,10 +123,10 @@ public OrderLineItem quantity(String quantity) {
}
/**
- * The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities).
+ * The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
* @return quantity
**/
- @ApiModelProperty(required = true, value = "The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities).")
+ @ApiModelProperty(required = true, value = "The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.")
public String getQuantity() {
return quantity;
}
diff --git a/src/main/java/com/squareup/connect/models/OrderQuantityUnit.java b/src/main/java/com/squareup/connect/models/OrderQuantityUnit.java
index 7a81f9c..dcb4b11 100644
--- a/src/main/java/com/squareup/connect/models/OrderQuantityUnit.java
+++ b/src/main/java/com/squareup/connect/models/OrderQuantityUnit.java
@@ -57,10 +57,10 @@ public OrderQuantityUnit precision(Integer precision) {
}
/**
- * For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities).
+ * For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5.
* @return precision
**/
- @ApiModelProperty(value = "For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities).")
+ @ApiModelProperty(value = "For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5.")
public Integer getPrecision() {
return precision;
}
diff --git a/src/main/java/com/squareup/connect/models/V1CashDrawerShift.java b/src/main/java/com/squareup/connect/models/V1CashDrawerShift.java
index 856dbb4..a2ecb5d 100644
--- a/src/main/java/com/squareup/connect/models/V1CashDrawerShift.java
+++ b/src/main/java/com/squareup/connect/models/V1CashDrawerShift.java
@@ -26,9 +26,9 @@
import java.util.List;
/**
- * V1CashDrawerShift
+ * Contains details for a single cash drawer shift.
*/
-@ApiModel(description = "V1CashDrawerShift")
+@ApiModel(description = "Contains details for a single cash drawer shift.")
public class V1CashDrawerShift {
@JsonProperty("id")
@@ -293,10 +293,10 @@ public V1CashDrawerShift description(String description) {
}
/**
- * The time when the timecard was created, in ISO 8601 format.
+ * A description of the cash drawer shift.
* @return description
**/
- @ApiModelProperty(value = "The time when the timecard was created, in ISO 8601 format.")
+ @ApiModelProperty(value = "A description of the cash drawer shift.")
public String getDescription() {
return description;
}
diff --git a/src/main/java/com/squareup/connect/models/V1Item.java b/src/main/java/com/squareup/connect/models/V1Item.java
index 39b3c0e..a5e20e0 100644
--- a/src/main/java/com/squareup/connect/models/V1Item.java
+++ b/src/main/java/com/squareup/connect/models/V1Item.java
@@ -20,6 +20,7 @@
import com.squareup.connect.models.V1Category;
import com.squareup.connect.models.V1Fee;
import com.squareup.connect.models.V1ItemImage;
+import com.squareup.connect.models.V1ModifierList;
import com.squareup.connect.models.V1Variation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -172,7 +173,7 @@ public static VisibilityEnum fromValue(String text) {
private List variations = new ArrayList();
@JsonProperty("modifier_lists")
- private List modifierLists = new ArrayList();
+ private List modifierLists = new ArrayList();
@JsonProperty("fees")
private List fees = new ArrayList();
@@ -392,12 +393,12 @@ public void setVariations(List variations) {
this.variations = variations;
}
- public V1Item modifierLists(List modifierLists) {
+ public V1Item modifierLists(List modifierLists) {
this.modifierLists = modifierLists;
return this;
}
- public V1Item addModifierListsItem(V1Variation modifierListsItem) {
+ public V1Item addModifierListsItem(V1ModifierList modifierListsItem) {
this.modifierLists.add(modifierListsItem);
return this;
}
@@ -407,11 +408,11 @@ public V1Item addModifierListsItem(V1Variation modifierListsItem) {
* @return modifierLists
**/
@ApiModelProperty(value = "The modifier lists that apply to the item, if any.")
- public List getModifierLists() {
+ public List getModifierLists() {
return modifierLists;
}
- public void setModifierLists(List modifierLists) {
+ public void setModifierLists(List modifierLists) {
this.modifierLists = modifierLists;
}
diff --git a/src/main/java/com/squareup/connect/models/WebhookEvents.java b/src/main/java/com/squareup/connect/models/WebhookEvents.java
new file mode 100644
index 0000000..16e52e0
--- /dev/null
+++ b/src/main/java/com/squareup/connect/models/WebhookEvents.java
@@ -0,0 +1,49 @@
+/*
+ * Square Connect API
+ * Client library for accessing the Square Connect APIs
+ *
+ * OpenAPI spec version: 2.0
+ * Contact: developers@squareup.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package com.squareup.connect.models;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+
+/**
+ * The type of an event that triggers a webhook notification to an application.
+ */
+public enum WebhookEvents {
+
+ UPDATED("inventory.count.updated");
+
+ private String value;
+
+ WebhookEvents(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static WebhookEvents fromValue(String text) {
+ for (WebhookEvents b : WebhookEvents.values()) {
+ if (String.valueOf(b.value).equals(text)) {
+ return b;
+ }
+ }
+ return null;
+ }
+}
+