diff --git a/CHANGES.md b/CHANGES.md index e6eb2d9..32bc733 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,13 @@ # Change Log +## Version 2.20190612.0 (2019-06-12) + +* **BETA releases**: + * Orders API: supports service charges with a new field and datatype. + * Catalog API: supports measurement unites for item variation quantities with a new field and datatype. +* **New functionality**: `Order` entities — now include a `source` field that contains details on where the order originated. +* **Improved functionality**: ListLocations — Expanded business information available through the Locations API, including business hours, contact email, social media handles, and longitude/latitude for physical locations. + ## Version 2.20190508.1 (2019-05-28) Bump Jackson dependency for Java SDK. diff --git a/README.md b/README.md index 5ab3bfd..f62a0dc 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Add this dependency to your project's POM: com.squareup connect - 2.20190508.1 + 2.20190612.0 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.20190508.1" +compile "com.squareup:connect:2.20190612.0" ``` ### 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.20190508.1.jar +* target/connect-2.20190612.0.jar * target/lib/*.jar ## Getting Started @@ -257,6 +257,7 @@ Class | Method | HTTP request | Description - [AdditionalRecipientReceivable](docs/AdditionalRecipientReceivable.md) - [AdditionalRecipientReceivableRefund](docs/AdditionalRecipientReceivableRefund.md) - [Address](docs/Address.md) + - [AggregationStrategy](docs/AggregationStrategy.md) - [BatchChangeInventoryRequest](docs/BatchChangeInventoryRequest.md) - [BatchChangeInventoryResponse](docs/BatchChangeInventoryResponse.md) - [BatchDeleteCatalogObjectsRequest](docs/BatchDeleteCatalogObjectsRequest.md) @@ -290,6 +291,7 @@ Class | Method | HTTP request | Description - [CatalogItemModifierListInfo](docs/CatalogItemModifierListInfo.md) - [CatalogItemProductType](docs/CatalogItemProductType.md) - [CatalogItemVariation](docs/CatalogItemVariation.md) + - [CatalogMeasurementUnit](docs/CatalogMeasurementUnit.md) - [CatalogModifier](docs/CatalogModifier.md) - [CatalogModifierList](docs/CatalogModifierList.md) - [CatalogModifierListSelectionType](docs/CatalogModifierListSelectionType.md) @@ -297,7 +299,9 @@ Class | Method | HTTP request | Description - [CatalogObject](docs/CatalogObject.md) - [CatalogObjectBatch](docs/CatalogObjectBatch.md) - [CatalogObjectType](docs/CatalogObjectType.md) + - [CatalogPricingRule](docs/CatalogPricingRule.md) - [CatalogPricingType](docs/CatalogPricingType.md) + - [CatalogProductSet](docs/CatalogProductSet.md) - [CatalogQuery](docs/CatalogQuery.md) - [CatalogQueryExact](docs/CatalogQueryExact.md) - [CatalogQueryItemsForModifierList](docs/CatalogQueryItemsForModifierList.md) @@ -307,11 +311,13 @@ Class | Method | HTTP request | Description - [CatalogQuerySortedAttribute](docs/CatalogQuerySortedAttribute.md) - [CatalogQueryText](docs/CatalogQueryText.md) - [CatalogTax](docs/CatalogTax.md) + - [CatalogTimePeriod](docs/CatalogTimePeriod.md) - [CatalogV1Id](docs/CatalogV1Id.md) - [ChargeRequest](docs/ChargeRequest.md) - [ChargeRequestAdditionalRecipient](docs/ChargeRequestAdditionalRecipient.md) - [ChargeResponse](docs/ChargeResponse.md) - [Checkout](docs/Checkout.md) + - [Coordinates](docs/Coordinates.md) - [Country](docs/Country.md) - [CreateBreakTypeRequest](docs/CreateBreakTypeRequest.md) - [CreateBreakTypeResponse](docs/CreateBreakTypeResponse.md) @@ -407,6 +413,7 @@ Class | Method | HTTP request | Description - [MeasurementUnit](docs/MeasurementUnit.md) - [MeasurementUnitArea](docs/MeasurementUnitArea.md) - [MeasurementUnitCustom](docs/MeasurementUnitCustom.md) + - [MeasurementUnitGeneric](docs/MeasurementUnitGeneric.md) - [MeasurementUnitLength](docs/MeasurementUnitLength.md) - [MeasurementUnitVolume](docs/MeasurementUnitVolume.md) - [MeasurementUnitWeight](docs/MeasurementUnitWeight.md) @@ -436,8 +443,11 @@ Class | Method | HTTP request | Description - [OrderReturnDiscount](docs/OrderReturnDiscount.md) - [OrderReturnLineItem](docs/OrderReturnLineItem.md) - [OrderReturnLineItemModifier](docs/OrderReturnLineItemModifier.md) + - [OrderReturnServiceCharge](docs/OrderReturnServiceCharge.md) - [OrderReturnTax](docs/OrderReturnTax.md) - [OrderRoundingAdjustment](docs/OrderRoundingAdjustment.md) + - [OrderServiceCharge](docs/OrderServiceCharge.md) + - [OrderServiceChargeCalculationPhase](docs/OrderServiceChargeCalculationPhase.md) - [OrderSource](docs/OrderSource.md) - [OrderState](docs/OrderState.md) - [Product](docs/Product.md) @@ -495,6 +505,8 @@ Class | Method | HTTP request | Description - [ShiftWorkdayMatcher](docs/ShiftWorkdayMatcher.md) - [SortOrder](docs/SortOrder.md) - [SourceApplication](docs/SourceApplication.md) + - [StandardUnitDescription](docs/StandardUnitDescription.md) + - [StandardUnitDescriptionGroup](docs/StandardUnitDescriptionGroup.md) - [TaxCalculationPhase](docs/TaxCalculationPhase.md) - [TaxInclusionType](docs/TaxInclusionType.md) - [Tender](docs/Tender.md) diff --git a/build.gradle b/build.gradle index 337144c..6afd9d7 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' group = 'com.squareup' -version = '2.20190508.1' +version = '2.20190612.0' buildscript { repositories { diff --git a/docs/AggregationStrategy.md b/docs/AggregationStrategy.md new file mode 100644 index 0000000..fa85c53 --- /dev/null +++ b/docs/AggregationStrategy.md @@ -0,0 +1,16 @@ + +# AggregationStrategy + +## Enum + + +* `UNKNOWN` (value: `"UNKNOWN"`) + +* `BASE` (value: `"BASE"`) + +* `STACKABLE` (value: `"STACKABLE"`) + +* `EXCLUSIVE` (value: `"EXCLUSIVE"`) + + + diff --git a/docs/ApplePayApi.md b/docs/ApplePayApi.md index 023d325..7d8b4c6 100644 --- a/docs/ApplePayApi.md +++ b/docs/ApplePayApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description RegisterDomain -Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payments/sqpaymentform/overview) guide. +Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payment-form/add-digital-wallets/apple-pay) guide. ### Example ```java diff --git a/docs/BatchRetrieveCatalogObjectsRequest.md b/docs/BatchRetrieveCatalogObjectsRequest.md index d44b912..70da82e 100644 --- a/docs/BatchRetrieveCatalogObjectsRequest.md +++ b/docs/BatchRetrieveCatalogObjectsRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **objectIds** | **List<String>** | The IDs of the [CatalogObject](#type-catalogobject)s to be retrieved. | -**includeRelatedObjects** | **Boolean** | If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. | [optional] +**includeRelatedObjects** | **Boolean** | If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. | [optional] diff --git a/docs/Card.md b/docs/Card.md index 13e1152..4109867 100644 --- a/docs/Card.md +++ b/docs/Card.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **expYear** | **Long** | The four-digit year of the card's expiration date. | [optional] **cardholderName** | **String** | The name of the cardholder. | [optional] **billingAddress** | [**Address**](Address.md) | The billing address for this card. | [optional] -**fingerprint** | **String** | __Not currently set.__ Intended as a Square-assigned identifier, based on the card number, to identify the card across multiple locations within a single application. | [optional] +**fingerprint** | **String** | A unique, Square-assigned ID that identifies the card across multiple locations and applications for a single Square account. | [optional] diff --git a/docs/CatalogApi.md b/docs/CatalogApi.md index 4838b5f..d1136c0 100644 --- a/docs/CatalogApi.md +++ b/docs/CatalogApi.md @@ -284,7 +284,7 @@ Name | Type | Description | Notes ListCatalog -Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The types parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`. +Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The `types` parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. ### Example ```java @@ -358,7 +358,7 @@ oauth2.setAccessToken("YOUR ACCESS TOKEN"); CatalogApi apiInstance = new CatalogApi(); String objectId = "objectId_example"; // String | The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. -Boolean includeRelatedObjects = true; // Boolean | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` +Boolean includeRelatedObjects = true; // Boolean | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` try { RetrieveCatalogObjectResponse result = apiInstance.retrieveCatalogObject(objectId, includeRelatedObjects); System.out.println(result); @@ -373,7 +373,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **objectId** | **String**| The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. | - **includeRelatedObjects** | **Boolean**| If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` | [optional] + **includeRelatedObjects** | **Boolean**| If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` | [optional] ### Return type diff --git a/docs/CatalogInfoResponse.md b/docs/CatalogInfoResponse.md index c8e5dfa..bcf4d15 100644 --- a/docs/CatalogInfoResponse.md +++ b/docs/CatalogInfoResponse.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **errors** | [**List<Error>**](Error.md) | The set of [Error](#type-error)s encountered. | [optional] **limits** | [**CatalogInfoResponseLimits**](CatalogInfoResponseLimits.md) | | [optional] +**standardUnitDescriptionGroup** | [**StandardUnitDescriptionGroup**](StandardUnitDescriptionGroup.md) | Names and abbreviations for standard units. | [optional] diff --git a/docs/CatalogItem.md b/docs/CatalogItem.md index 9408c90..d2ed158 100644 --- a/docs/CatalogItem.md +++ b/docs/CatalogItem.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **taxIds** | **List<String>** | 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 `UpdateItemTaxes`. | [optional] **modifierListInfo** | [**List<CatalogItemModifierListInfo>**](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 `UpdateItemModifierLists`. | [optional] **imageUrl** | **String** | __Deprecated__. The URL of an image representing this item. Deprecated in favor of `image_id` in [`CatalogObject`](#type-catalogobject). | [optional] -**variations** | [**List<CatalogObject>**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. | [optional] +**variations** | [**List<CatalogObject>**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations | [optional] **productType** | [**ProductTypeEnum**](#ProductTypeEnum) | The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values | [optional] **skipModifierScreen** | **Boolean** | If `false`, the Square Point of Sale app will present the [CatalogItem](#type-catalogitem)'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 `true`, 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's details. Third-party clients are encouraged to implement similar behaviors. | [optional] diff --git a/docs/CatalogItemVariation.md b/docs/CatalogItemVariation.md index 4d37301..28b477d 100644 --- a/docs/CatalogItemVariation.md +++ b/docs/CatalogItemVariation.md @@ -3,7 +3,7 @@ ### Description -An item variation (i.e., product) in the Catalog object model. +An item variation (i.e., product) in the Catalog object model. Each item may have a maximum of 250 item variations. ## Properties Name | Type | Description | Notes @@ -21,6 +21,8 @@ Name | Type | Description | Notes **inventoryAlertThreshold** | **Long** | If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type` is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard. This value is always an integer. | [optional] **userData** | **String** | Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable. | [optional] **serviceDuration** | **Long** | If the [CatalogItem](#type-catalogitem) that owns this item variation is of type `APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For example, a 30 minute appointment would have the value `1800000`, which is equal to 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second). | [optional] +**catalogMeasurementUnitId** | **String** | Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities. | [optional] +**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] diff --git a/docs/CatalogMeasurementUnit.md b/docs/CatalogMeasurementUnit.md new file mode 100644 index 0000000..a6bc099 --- /dev/null +++ b/docs/CatalogMeasurementUnit.md @@ -0,0 +1,15 @@ + +# CatalogMeasurementUnit + +### Description + +Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measurementUnit** | [**MeasurementUnit**](MeasurementUnit.md) | Indicates the unit used to measure the quantity of a catalog item variation. | [optional] +**precision** | **Integer** | Represents the maximum number of positions allowed after the decimal in quantities measured with this unit. For example, if the precision is 2, then an itemization’s quantity can be 0.01, 0.12, etc. Min: 0 Max: 5 Default: 3 | [optional] + + + diff --git a/docs/CatalogObject.md b/docs/CatalogObject.md index 3df10d9..5fe1172 100644 --- a/docs/CatalogObject.md +++ b/docs/CatalogObject.md @@ -26,6 +26,7 @@ Name | Type | Description | Notes **modifierListData** | [**CatalogModifierList**](CatalogModifierList.md) | Structured data for a [CatalogModifierList](#type-catalogmodifierlist), set for CatalogObjects of type `MODIFIER_LIST`. | [optional] **modifierData** | [**CatalogModifier**](CatalogModifier.md) | Structured data for a [CatalogModifier](#type-catalogmodifier), set for CatalogObjects of type `MODIFIER`. | [optional] **imageData** | [**CatalogImage**](CatalogImage.md) | Structured data for a [CatalogImage](#type-catalogimage), set for CatalogObjects of type `IMAGE`. | [optional] +**measurementUnitData** | [**CatalogMeasurementUnit**](CatalogMeasurementUnit.md) | Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type `MEASUREMENT_UNIT`. | [optional] @@ -40,6 +41,9 @@ TAX | "TAX" DISCOUNT | "DISCOUNT" MODIFIER_LIST | "MODIFIER_LIST" MODIFIER | "MODIFIER" +PRICING_RULE | "PRICING_RULE" +PRODUCT_SET | "PRODUCT_SET" +TIME_PERIOD | "TIME_PERIOD" diff --git a/docs/CatalogObjectType.md b/docs/CatalogObjectType.md index e49e001..763ec2e 100644 --- a/docs/CatalogObjectType.md +++ b/docs/CatalogObjectType.md @@ -20,5 +20,11 @@ * `MODIFIER` (value: `"MODIFIER"`) +* `PRICING_RULE` (value: `"PRICING_RULE"`) + +* `PRODUCT_SET` (value: `"PRODUCT_SET"`) + +* `TIME_PERIOD` (value: `"TIME_PERIOD"`) + diff --git a/docs/CatalogPricingRule.md b/docs/CatalogPricingRule.md new file mode 100644 index 0000000..1bee214 --- /dev/null +++ b/docs/CatalogPricingRule.md @@ -0,0 +1,36 @@ + +# CatalogPricingRule + +### Description + +Defines how prices are modified or set for items that match the pricing rule during the active time period. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\". | [optional] +**timePeriodIds** | **List<String>** | Unique ID for the [CatalogTimePeriod](#type-catalogtimeperiod)s when this pricing rule is in effect. If left unset, the pricing rule is always in effect. | [optional] +**totalPriceMoney** | [**Money**](Money.md) | The total amount of money to charge for all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. | [optional] +**itemPriceMoney** | [**Money**](Money.md) | The amount of money to charge for each matched item. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. | [optional] +**discountId** | **String** | Unique ID for the [CatalogDiscount](#type-catalogdiscount) to take off the price of all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. | [optional] +**matchProductsId** | **String** | Unique ID for the [CatalogProductSet](#type-catalogproductset) that will be matched by this rule. A match rule matches within the entire cart. | [optional] +**applyProductsId** | **String** | The [CatalogProductSet](#type-catalogproductset) to apply the pricing rule to within the set of matched products specified by `match_products_id`. An apply rule can only match once within the set of matched products. If left unset, the pricing rule will be applied to all products within the set of matched products. | [optional] +**stackable** | [**StackableEnum**](#StackableEnum) | Describes how the pricing rule can be combined with other pricing rules. See [Stackable](#type-stackable) for all possible values. See [AggregationStrategy](#type-aggregationstrategy) for possible values | [optional] +**excludeProductsId** | **String** | Identifies the [CatalogProductSet](#type-catalogproductset) to exclude from this pricing rule. An exclude rule matches within the subset of the cart that fits the match rules (the match set). An exclude rule can only match once in the match set. If not supplied, the pricing will be applied to all products in the match set. Other products retain their base price, or a price generated by other rules. | [optional] +**validFromDate** | **String** | Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional] +**validFromLocalTime** | **String** | Represents the local time the pricing rule should be valid from. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. | [optional] +**validUntilDate** | **String** | Represents the date the pricing rule will become inactive. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional] +**validUntilLocalTime** | **String** | Represents the local time at which the pricing rule will become inactive. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. | [optional] + + + +## Enum: StackableEnum +Name | Value +---- | ----- +UNKNOWN | "UNKNOWN" +BASE | "BASE" +STACKABLE | "STACKABLE" +EXCLUSIVE | "EXCLUSIVE" + + + diff --git a/docs/CatalogProductSet.md b/docs/CatalogProductSet.md new file mode 100644 index 0000000..8a4546a --- /dev/null +++ b/docs/CatalogProductSet.md @@ -0,0 +1,20 @@ + +# CatalogProductSet + +### Description + +Represents a collection of catalog objects for the purpose of applying a [PricingRule](#type-pricingrule). Including a catalog object will include all of its subtypes. For example, including a category in a product set will include all of its items and associated item variations in the product set. Including an item in a product set will also include its item variations. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | User-defined name for the product set. For example, \"Clearance Items\" or \"Winter Sale Items\". | [optional] +**productIdsAny** | **List<String>** | Unique IDs for any [CatalogObjects](#type-catalogobject)s to include in this product set. Any number of these catalog objects can be in an order for a pricing rule to apply. This can be used with `product_ids_all` in a parent [CatalogProductSet](#type-catalogproductset) to match groups of products for a bulk discount, such as a discount for an entree and side combo. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. | [optional] +**productIdsAll** | **List<String>** | Unique IDs for [CatalogObjects](#type-catalogobject) to include in this product set. All objects in this set must be included in an order for a pricing rule to apply. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. | [optional] +**quantityExact** | **Long** | If set, there must be exactly this many items from `products_any` or `products_all` in the cart for the discount to apply. Cannot be combined with either `quantity_min` or `quantity_max`. | [optional] +**quantityMin** | **Long** | If set, there must be at least this many items from `products_any` or `products_all` in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if `quantity_exact`, `quantity_min` and `quantity_max` are all unspecified. | [optional] +**quantityMax** | **Long** | If set, the pricing rule will apply to a maximum of this many items from `products_any` or `products_all`. | [optional] +**allProducts** | **Boolean** | If set to `true`, the product set will include every item in the catalog. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. | [optional] + + + diff --git a/docs/CatalogTimePeriod.md b/docs/CatalogTimePeriod.md new file mode 100644 index 0000000..9f07375 --- /dev/null +++ b/docs/CatalogTimePeriod.md @@ -0,0 +1,14 @@ + +# CatalogTimePeriod + +### Description + +Represents a time period - either a single period or a repeating period. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event** | **String** | An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. | [optional] + + + diff --git a/docs/Coordinates.md b/docs/Coordinates.md new file mode 100644 index 0000000..ef574a9 --- /dev/null +++ b/docs/Coordinates.md @@ -0,0 +1,15 @@ + +# Coordinates + +### Description + +Latitude and longitude coordinates. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**latitude** | [**BigDecimal**](BigDecimal.md) | The coordinate's latitude expressed in degrees. | [optional] +**longitude** | [**BigDecimal**](BigDecimal.md) | The coordinate's longitude expressed in degrees. | [optional] + + + diff --git a/docs/CreateOrderRequest.md b/docs/CreateOrderRequest.md index 9721ef9..2f0d782 100644 --- a/docs/CreateOrderRequest.md +++ b/docs/CreateOrderRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **order** | [**Order**](Order.md) | The order to create. If this field is set, then the only other top-level field that can be set is the idempotency_key. | [optional] **idempotencyKey** | **String** | A value you specify that uniquely identifies this order among orders you've created. If you're unsure whether a particular order was created successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate orders. See [Idempotency](/basics/api101/idempotency) for more information. | [optional] -**referenceId** | **String** | __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. -- Top-level fields necessary to support the connect v2 CreateOrderRequest shape. | [optional] +**referenceId** | **String** | __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. | [optional] **lineItems** | [**List<CreateOrderRequestLineItem>**](CreateOrderRequestLineItem.md) | __Deprecated__: Please set the line_items on the nested [order](#type-order) field instead. The line items to associate with this order. Each line item represents a different product to include in a purchase. | [optional] **taxes** | [**List<CreateOrderRequestTax>**](CreateOrderRequestTax.md) | __Deprecated__: Please set the taxes on the nested [order](#type-order) field instead. The taxes to include on the order. | [optional] **discounts** | [**List<CreateOrderRequestDiscount>**](CreateOrderRequestDiscount.md) | __Deprecated__: Please set the discounts on the nested [order](#type-order) field instead. The discounts to include on the order. | [optional] diff --git a/docs/Error.md b/docs/Error.md index 879a159..1a884f8 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -75,6 +75,7 @@ INVALID_FORM_VALUE | "INVALID_FORM_VALUE" ONE_INSTRUMENT_EXPECTED | "ONE_INSTRUMENT_EXPECTED" NO_FIELDS_SET | "NO_FIELDS_SET" DEPRECATED_FIELD_SET | "DEPRECATED_FIELD_SET" +RETIRED_FIELD_SET | "RETIRED_FIELD_SET" CARD_EXPIRED | "CARD_EXPIRED" INVALID_EXPIRATION | "INVALID_EXPIRATION" INVALID_EXPIRATION_YEAR | "INVALID_EXPIRATION_YEAR" diff --git a/docs/ErrorCode.md b/docs/ErrorCode.md index 6a88de6..dc47771 100644 --- a/docs/ErrorCode.md +++ b/docs/ErrorCode.md @@ -94,6 +94,8 @@ * `DEPRECATED_FIELD_SET` (value: `"DEPRECATED_FIELD_SET"`) +* `RETIRED_FIELD_SET` (value: `"RETIRED_FIELD_SET"`) + * `CARD_EXPIRED` (value: `"CARD_EXPIRED"`) * `INVALID_EXPIRATION` (value: `"INVALID_EXPIRATION"`) diff --git a/docs/Location.md b/docs/Location.md index 3a0fdd5..973449a 100644 --- a/docs/Location.md +++ b/docs/Location.md @@ -24,6 +24,12 @@ Name | Type | Description | Notes **type** | [**TypeEnum**](#TypeEnum) | The location's type, as set by the account owner in the Square dashboard. Typically used to indicate whether or not the location object represents a physical space like a building or mall space. See [LocationType](#type-locationtype) for possible values | [optional] **websiteUrl** | **String** | The location's website, as set by the account owner in the Square dashboard. Default: none; only exists if explicitly set. | [optional] **businessHours** | [**BusinessHours**](BusinessHours.md) | The hours of operation for a business location. Default: none; only exists if explicitly set. | [optional] +**businessEmail** | **String** | The email of the location. | [optional] +**description** | **String** | The business description of the location. | [optional] +**twitterUsername** | **String** | The Twitter username of the location without the ' | [optional] +**instagramUsername** | **String** | The Instagram username of the location without the ' | [optional] +**facebookUrl** | **String** | The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. | [optional] +**coordinates** | [**Coordinates**](Coordinates.md) | The physical coordinates (latitude and longitude) of the location. | [optional] diff --git a/docs/MeasurementUnit.md b/docs/MeasurementUnit.md index 8e30869..69a1121 100644 --- a/docs/MeasurementUnit.md +++ b/docs/MeasurementUnit.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **lengthUnit** | [**LengthUnitEnum**](#LengthUnitEnum) | Represents a standard length unit. See [MeasurementUnitLength](#type-measurementunitlength) for possible values | [optional] **volumeUnit** | [**VolumeUnitEnum**](#VolumeUnitEnum) | Represents a standard volume unit. See [MeasurementUnitVolume](#type-measurementunitvolume) for possible values | [optional] **weightUnit** | [**WeightUnitEnum**](#WeightUnitEnum) | Represents a standard unit of weight or mass. See [MeasurementUnitWeight](#type-measurementunitweight) for possible values | [optional] +**genericUnit** | [**GenericUnitEnum**](#GenericUnitEnum) | Reserved for API integrations that lack the ability to specify a real measurement unit See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values | [optional] @@ -72,4 +73,12 @@ METRIC_GRAM | "METRIC_GRAM" METRIC_KILOGRAM | "METRIC_KILOGRAM" + +## Enum: GenericUnitEnum +Name | Value +---- | ----- +INVALID_GENERIC_UNIT | "INVALID_GENERIC_UNIT" +UNIT | "UNIT" + + diff --git a/docs/MeasurementUnitGeneric.md b/docs/MeasurementUnitGeneric.md new file mode 100644 index 0000000..a3a6451 --- /dev/null +++ b/docs/MeasurementUnitGeneric.md @@ -0,0 +1,12 @@ + +# MeasurementUnitGeneric + +## Enum + + +* `INVALID_GENERIC_UNIT` (value: `"INVALID_GENERIC_UNIT"`) + +* `UNIT` (value: `"UNIT"`) + + + diff --git a/docs/OAuthApi.md b/docs/OAuthApi.md index 087d907..96d56f3 100644 --- a/docs/OAuthApi.md +++ b/docs/OAuthApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description ObtainToken -Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. By default, the OAuth API lets up to 500 Square accounts authorize your application. Please [contact support](https://squareup.com/help/us/en/contact?prefill=developer_api) if you are developing an application for a larger audience. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__. +Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__. ### Example ```java diff --git a/docs/ObtainTokenResponse.md b/docs/ObtainTokenResponse.md index 08d081b..7e589dd 100644 --- a/docs/ObtainTokenResponse.md +++ b/docs/ObtainTokenResponse.md @@ -12,8 +12,8 @@ Name | Type | Description | Notes **tokenType** | **String** | This value is always _bearer_. | [optional] **expiresAt** | **String** | The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | [optional] **merchantId** | **String** | The ID of the authorizing merchant's business. | [optional] -**subscriptionId** | **String** | __Legacy field__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] -**planId** | **String** | The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] +**subscriptionId** | **String** | __LEGACY FIELD__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] +**planId** | **String** | __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] **idToken** | **String** | Then OpenID token belonging to this this person. Only present if the OPENID scope is included in the authorize request. | [optional] **refreshToken** | **String** | A refresh token. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). | [optional] diff --git a/docs/Order.md b/docs/Order.md index 89fe262..0a7be6a 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -8,7 +8,7 @@ Contains all information related to a single order to process with Square, inclu ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | The order's unique ID. This value is only present for Order objects created by the Orders API through the [CreateOrder](#endpoint-orders-createorder) endpoint. | [optional] +**id** | **String** | The order's unique ID. This field is read-only. | [optional] **locationId** | **String** | The ID of the merchant location this order is associated with. | **referenceId** | **String** | A client specified identifier to associate an entity in another system with this order. | [optional] **source** | [**OrderSource**](OrderSource.md) | The origination details of the order. | [optional] @@ -16,20 +16,22 @@ Name | Type | Description | Notes **lineItems** | [**List<OrderLineItem>**](OrderLineItem.md) | The line items included in the order. | [optional] **taxes** | [**List<OrderLineItemTax>**](OrderLineItemTax.md) | A list of taxes applied to this order. On read or retrieve, this list includes both order-level and item-level taxes. When creating an Order, set your order-level taxes in this list. | [optional] **discounts** | [**List<OrderLineItemDiscount>**](OrderLineItemDiscount.md) | A list of discounts applied to this order. On read or retrieve, this list includes both order-level and item-level discounts. When creating an Order, set your order-level discounts in this list. | [optional] +**serviceCharges** | [**List<OrderServiceCharge>**](OrderServiceCharge.md) | A list of service charges applied to the order. | [optional] **fulfillments** | [**List<OrderFulfillment>**](OrderFulfillment.md) | Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments. | [optional] -**returns** | [**List<OrderReturn>**](OrderReturn.md) | Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. | [optional] -**returnAmounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Rollup of returned money amounts. | [optional] -**netAmounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Net money amounts (sale money - return money). | [optional] -**roundingAdjustment** | [**OrderRoundingAdjustment**](OrderRoundingAdjustment.md) | A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. | [optional] +**returns** | [**List<OrderReturn>**](OrderReturn.md) | Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. This field is read-only. | [optional] +**returnAmounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Rollup of returned money amounts. This field is read-only. | [optional] +**netAmounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Net money amounts (sale money - return money). This field is read-only. | [optional] +**roundingAdjustment** | [**OrderRoundingAdjustment**](OrderRoundingAdjustment.md) | A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. This field is read-only. | [optional] **tenders** | [**List<Tender>**](Tender.md) | The Tenders which were used to pay for the Order. This field is read-only. | [optional] **refunds** | [**List<Refund>**](Refund.md) | The Refunds that are part of this Order. This field is read-only. | [optional] -**createdAt** | **String** | Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] -**updatedAt** | **String** | Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] -**closedAt** | **String** | Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] +**createdAt** | **String** | Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. | [optional] +**updatedAt** | **String** | Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. | [optional] +**closedAt** | **String** | Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. | [optional] **state** | [**StateEnum**](#StateEnum) | The current state of the order. `OPEN`,`COMPLETED`,`CANCELED` See [OrderState](#type-orderstate) for possible values | [optional] -**totalMoney** | [**Money**](Money.md) | The total amount of money to collect for the order. | [optional] -**totalTaxMoney** | [**Money**](Money.md) | The total tax amount of money to collect for the order. | [optional] -**totalDiscountMoney** | [**Money**](Money.md) | The total discount amount of money to collect for the order. | [optional] +**totalMoney** | [**Money**](Money.md) | The total amount of money to collect for the order. This field is read-only. | [optional] +**totalTaxMoney** | [**Money**](Money.md) | The total tax amount of money to collect for the order. This field is read-only. | [optional] +**totalDiscountMoney** | [**Money**](Money.md) | The total discount amount of money to collect for the order. This field is read-only. | [optional] +**totalServiceChargeMoney** | [**Money**](Money.md) | The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts. This field is read-only. | [optional] diff --git a/docs/OrderLineItem.md b/docs/OrderLineItem.md index 1b34078..f0a3bd6 100644 --- a/docs/OrderLineItem.md +++ b/docs/OrderLineItem.md @@ -8,7 +8,7 @@ Represents a line item in an order. Each line item describes a different product ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | The line item's Unique identifier, unique only within this order. This field is read-only. | [optional] +**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). | **quantityUnit** | [**OrderQuantityUnit**](OrderQuantityUnit.md) | The unit and precision that this line item's quantity is measured in. | [optional] @@ -20,10 +20,10 @@ Name | Type | Description | Notes **discounts** | [**List<OrderLineItemDiscount>**](OrderLineItemDiscount.md) | A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. | [optional] **basePriceMoney** | [**Money**](Money.md) | The base price for a single unit of the line item. | [optional] **variationTotalPriceMoney** | [**Money**](Money.md) | The total price of all item variations sold in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers. | [optional] -**grossSalesMoney** | [**Money**](Money.md) | The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. | [optional] -**totalTaxMoney** | [**Money**](Money.md) | The total tax amount of money to collect for the line item. | [optional] -**totalDiscountMoney** | [**Money**](Money.md) | The total discount amount of money to collect for the line item. | [optional] -**totalMoney** | [**Money**](Money.md) | The total amount of money to collect for this line item. | [optional] +**grossSalesMoney** | [**Money**](Money.md) | The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. This field is read-only. | [optional] +**totalTaxMoney** | [**Money**](Money.md) | The total tax amount of money to collect for the line item. This field is read-only. | [optional] +**totalDiscountMoney** | [**Money**](Money.md) | The total discount amount of money to collect for the line item. This field is read-only. | [optional] +**totalMoney** | [**Money**](Money.md) | The total amount of money to collect for this line item. This field is read-only. | [optional] diff --git a/docs/OrderLineItemDiscount.md b/docs/OrderLineItemDiscount.md index 74aea5c..e0167e2 100644 --- a/docs/OrderLineItemDiscount.md +++ b/docs/OrderLineItemDiscount.md @@ -8,7 +8,7 @@ Represents a discount that applies to one or more line items in an order. Fixed ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | The discount's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **String** | Unique ID that identifies the discount only within this order. This field is read-only. | [optional] **catalogObjectId** | **String** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional] **name** | **String** | The discount's name. | [optional] **type** | [**TypeEnum**](#TypeEnum) | The type of the discount. If it is created by API, it would be either `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. VARIABLE_* is not supported in API because the order is created at the time of sale and either percentage or amount has to be specified. See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values | [optional] diff --git a/docs/OrderLineItemModifier.md b/docs/OrderLineItemModifier.md index 27884c3..53381f9 100644 --- a/docs/OrderLineItemModifier.md +++ b/docs/OrderLineItemModifier.md @@ -8,7 +8,7 @@ A [CatalogModifier](#type-catalogmodifier). ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | The modifier's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **String** | Unique ID that identifies the modifier only within this order. This field is read-only. | [optional] **catalogObjectId** | **String** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional] **name** | **String** | The name of the item modifier. | [optional] **basePriceMoney** | [**Money**](Money.md) | The base price for the modifier. `base_price_money` is required for ad hoc modifiers. If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will override the predefined [CatalogModifier](#type-catalogmodifier) price. | [optional] diff --git a/docs/OrderLineItemTax.md b/docs/OrderLineItemTax.md index 109c01b..125d90a 100644 --- a/docs/OrderLineItemTax.md +++ b/docs/OrderLineItemTax.md @@ -8,7 +8,7 @@ Represents a tax that applies to one or more line items in an order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | The tax's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **String** | Unique ID that identifies the tax only within this order. This field is read-only. | [optional] **catalogObjectId** | **String** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional] **name** | **String** | The tax's name. | [optional] **type** | [**TypeEnum**](#TypeEnum) | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional] diff --git a/docs/OrderReturn.md b/docs/OrderReturn.md index 5bd6c2e..eb14759 100644 --- a/docs/OrderReturn.md +++ b/docs/OrderReturn.md @@ -8,9 +8,10 @@ The set of line items, service charges, taxes, discounts, tips, etc. being retur ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | The return's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **String** | Unique ID that identifies the return only within this order. This field is read-only. | [optional] **sourceOrderId** | **String** | Order which contains the original sale of these returned line items. This will be unset for unlinked returns. | [optional] **returnLineItems** | [**List<OrderReturnLineItem>**](OrderReturnLineItem.md) | Collection of line items which are being returned. | [optional] +**returnServiceCharges** | [**List<OrderReturnServiceCharge>**](OrderReturnServiceCharge.md) | Collection of service charges which are being returned. This field is read-only. | [optional] **returnTaxes** | [**List<OrderReturnTax>**](OrderReturnTax.md) | Collection of taxes which are being returned. | [optional] **returnDiscounts** | [**List<OrderReturnDiscount>**](OrderReturnDiscount.md) | Collection of discounts which are being returned. | [optional] **roundingAdjustment** | [**OrderRoundingAdjustment**](OrderRoundingAdjustment.md) | A positive or negative rounding adjustment to the total value being returned. Commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. | [optional] diff --git a/docs/OrderReturnDiscount.md b/docs/OrderReturnDiscount.md index 78fba7f..50783bd 100644 --- a/docs/OrderReturnDiscount.md +++ b/docs/OrderReturnDiscount.md @@ -8,7 +8,7 @@ The line item discount being returned. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | The return discount's Unique identifier, unique only within this order. | [optional] +**uid** | **String** | Unique ID that identifies the return discount only within this order. This field is read-only. | [optional] **sourceDiscountUid** | **String** | `uid` of the Discount from the Order which contains the original application of this discount. | [optional] **catalogObjectId** | **String** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional] **name** | **String** | The discount's name. | [optional] diff --git a/docs/OrderReturnLineItem.md b/docs/OrderReturnLineItem.md index 15aaf8e..3f261e7 100644 --- a/docs/OrderReturnLineItem.md +++ b/docs/OrderReturnLineItem.md @@ -21,10 +21,10 @@ Name | Type | Description | Notes **returnDiscounts** | [**List<OrderReturnDiscount>**](OrderReturnDiscount.md) | A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any return-level discounts apportioned to this item. | [optional] **basePriceMoney** | [**Money**](Money.md) | The base price for a single unit of the line item. | [optional] **variationTotalPriceMoney** | [**Money**](Money.md) | The total price of all item variations returned in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers. | [optional] -**grossReturnMoney** | [**Money**](Money.md) | The gross return amount of money calculated as (item base price + modifiers price) * quantity. | [optional] -**totalTaxMoney** | [**Money**](Money.md) | The total tax amount of money to return for the line item. | [optional] -**totalDiscountMoney** | [**Money**](Money.md) | The total discount amount of money to return for the line item. | [optional] -**totalMoney** | [**Money**](Money.md) | The total amount of money to return for this line item. | [optional] +**grossReturnMoney** | [**Money**](Money.md) | The gross return amount of money calculated as (item base price + modifiers price) * quantity. This field is read-only. | [optional] +**totalTaxMoney** | [**Money**](Money.md) | The total tax amount of money to return for the line item. This field is read-only. | [optional] +**totalDiscountMoney** | [**Money**](Money.md) | The total discount amount of money to return for the line item. This field is read-only. | [optional] +**totalMoney** | [**Money**](Money.md) | The total amount of money to return for this line item. This field is read-only. | [optional] diff --git a/docs/OrderReturnLineItemModifier.md b/docs/OrderReturnLineItemModifier.md index fc3d64a..4ad8609 100644 --- a/docs/OrderReturnLineItemModifier.md +++ b/docs/OrderReturnLineItemModifier.md @@ -8,7 +8,7 @@ A line item modifier being returned. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | The return modifier's Unique identifier, unique only within this order | [optional] +**uid** | **String** | Unique ID that identifies the return modifier only within this order. This field is read-only. | [optional] **sourceModifierUid** | **String** | `uid` of the Modifier from the LineItem from the Order which contains the original sale of this line item modifier. | [optional] **catalogObjectId** | **String** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional] **name** | **String** | The name of the item modifier. | [optional] diff --git a/docs/OrderReturnServiceCharge.md b/docs/OrderReturnServiceCharge.md new file mode 100644 index 0000000..eb84181 --- /dev/null +++ b/docs/OrderReturnServiceCharge.md @@ -0,0 +1,33 @@ + +# OrderReturnServiceCharge + +### Description + +The service charge applied to the original order. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **String** | Unique ID that identifies the return service charge only within this order. This field is read-only. | [optional] +**sourceServiceChargeUid** | **String** | `uid` of the Service Charge from the Order which contains the original charge of this service charge, null for unlinked returns. | [optional] +**name** | **String** | The name of the service charge. | [optional] +**catalogObjectId** | **String** | The ID referencing the service charge [CatalogObject](#type-catalogobject) | [optional] +**percentage** | **String** | The percentage of the service charge, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. Exactly one of percentage or amount_money should be set. | [optional] +**amountMoney** | [**Money**](Money.md) | The amount of a non-percentage based service charge. Exactly one of percentage or amount_money should be set. | [optional] +**appliedMoney** | [**Money**](Money.md) | The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only. | [optional] +**totalMoney** | [**Money**](Money.md) | The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only. | [optional] +**totalTaxMoney** | [**Money**](Money.md) | The total amount of tax money to collect for the service charge. This field is read-only. | [optional] +**calculationPhase** | [**CalculationPhaseEnum**](#CalculationPhaseEnum) | The calculation phase after which to apply the service charge. This field is read-only. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values | [optional] +**taxable** | **Boolean** | Indicates whether the surcharge can be taxed. Service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. | [optional] +**returnTaxes** | [**List<OrderReturnTax>**](OrderReturnTax.md) | The taxes which apply to the service charge. Return-level taxes apply by default to service charge calculated in the `SUBTOTAL_PHASE` if the service charge is marked as taxable. | [optional] + + + +## Enum: CalculationPhaseEnum +Name | Value +---- | ----- +SUBTOTAL_PHASE | "SUBTOTAL_PHASE" +TOTAL_PHASE | "TOTAL_PHASE" + + + diff --git a/docs/OrderReturnTax.md b/docs/OrderReturnTax.md index 76c075b..5bfa140 100644 --- a/docs/OrderReturnTax.md +++ b/docs/OrderReturnTax.md @@ -8,7 +8,7 @@ The line item tax being returned. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | The return tax's Unique identifier, unique only within this order. | [optional] +**uid** | **String** | Unique ID that identifies the return tax only within this order. This field is read-only. | [optional] **sourceTaxUid** | **String** | `uid` of the Tax from the Order which contains the original charge of this tax. | [optional] **catalogObjectId** | **String** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional] **name** | **String** | The tax's name. | [optional] diff --git a/docs/OrderRoundingAdjustment.md b/docs/OrderRoundingAdjustment.md index 5f03134..57b3b73 100644 --- a/docs/OrderRoundingAdjustment.md +++ b/docs/OrderRoundingAdjustment.md @@ -8,7 +8,7 @@ A rounding adjustment of the money being returned. Commonly used to apply Cash R ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **String** | The rounding adjustment's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **String** | Unique ID that identifies the rounding adjustment only within this order. This field is read-only. | [optional] **name** | **String** | The name of the rounding adjustment from the original sale Order. | [optional] **amountMoney** | [**Money**](Money.md) | Actual rounding adjustment amount. | [optional] diff --git a/docs/OrderServiceCharge.md b/docs/OrderServiceCharge.md new file mode 100644 index 0000000..1ccc1b5 --- /dev/null +++ b/docs/OrderServiceCharge.md @@ -0,0 +1,32 @@ + +# OrderServiceCharge + +### Description + +Represents a service charge applied to an order. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **String** | Unique ID that identifies the service charge only within this order. This field is read-only. | [optional] +**name** | **String** | The name of the service charge. | [optional] +**catalogObjectId** | **String** | The catalog object ID referencing the service charge [CatalogObject](#type-catalogobject). | [optional] +**percentage** | **String** | The service charge percentage, as a string representation of a decimal number. For example, `7.25` indicates 7.25% Exactly one of `percentage` or `amount_money` should be set. | [optional] +**amountMoney** | [**Money**](Money.md) | The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set. | [optional] +**appliedMoney** | [**Money**](Money.md) | The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only. | [optional] +**totalMoney** | [**Money**](Money.md) | The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only. | [optional] +**totalTaxMoney** | [**Money**](Money.md) | The total amount of tax money to collect for the service charge. This field is read-only. | [optional] +**calculationPhase** | [**CalculationPhaseEnum**](#CalculationPhaseEnum) | The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values | [optional] +**taxable** | **Boolean** | Indicates whether the service charge can be taxed. If set to `true`, any order-level taxes will automatically apply to this service charge. Note that service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. | [optional] +**taxes** | [**List<OrderLineItemTax>**](OrderLineItemTax.md) | Taxes applied to the service charge. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. | [optional] + + + +## Enum: CalculationPhaseEnum +Name | Value +---- | ----- +SUBTOTAL_PHASE | "SUBTOTAL_PHASE" +TOTAL_PHASE | "TOTAL_PHASE" + + + diff --git a/docs/OrderServiceChargeCalculationPhase.md b/docs/OrderServiceChargeCalculationPhase.md new file mode 100644 index 0000000..9bfb8c5 --- /dev/null +++ b/docs/OrderServiceChargeCalculationPhase.md @@ -0,0 +1,12 @@ + +# OrderServiceChargeCalculationPhase + +## Enum + + +* `SUBTOTAL_PHASE` (value: `"SUBTOTAL_PHASE"`) + +* `TOTAL_PHASE` (value: `"TOTAL_PHASE"`) + + + diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md index daf383c..4a5eb22 100644 --- a/docs/OrdersApi.md +++ b/docs/OrdersApi.md @@ -125,7 +125,7 @@ Name | Type | Description | Notes SearchOrders -Search all Orders for a merchant and return either [Orders](#type-order) or [OrderEntries](#type-orderentry). Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was originally processed, not the time it was subsequently transmitted to Square. Consequently, the SearchOrder endpoint might list an offline Order chronologically between online Orders that were seen in a previous request. By default, SearchOrders will return all results for all of the merchant’s locations. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. +Search all Orders for a merchant and return either [Orders](#type-order) or [OrderEntries](#type-orderentry). Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was originally processed, not the time it was subsequently transmitted to Square. Consequently, the SearchOrder endpoint might list an offline Order chronologically between online Orders that were seen in a previous request. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. ### Example ```java diff --git a/docs/RenewTokenResponse.md b/docs/RenewTokenResponse.md index fa637a2..cb46ea2 100644 --- a/docs/RenewTokenResponse.md +++ b/docs/RenewTokenResponse.md @@ -12,8 +12,8 @@ Name | Type | Description | Notes **tokenType** | **String** | This value is always _bearer_. | [optional] **expiresAt** | **String** | The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | [optional] **merchantId** | **String** | The ID of the authorizing merchant's business. | [optional] -**subscriptionId** | **String** | The ID of the merchant [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) associated with the authorization. Only present if the merchant signed up for a subscription during authorization. | [optional] -**planId** | **String** | The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] +**subscriptionId** | **String** | __LEGACY FIELD__. The ID of the merchant subscription associated with the authorization. Only present if the merchant signed up for a subscription during authorization. | [optional] +**planId** | **String** | __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] diff --git a/docs/RetrieveCatalogObjectRequest.md b/docs/RetrieveCatalogObjectRequest.md index 79b8660..4d53608 100644 --- a/docs/RetrieveCatalogObjectRequest.md +++ b/docs/RetrieveCatalogObjectRequest.md @@ -8,7 +8,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**includeRelatedObjects** | **Boolean** | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` | [optional] +**includeRelatedObjects** | **Boolean** | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` | [optional] diff --git a/docs/SearchCatalogObjectsRequest.md b/docs/SearchCatalogObjectsRequest.md index 942776a..4defcd4 100644 --- a/docs/SearchCatalogObjectsRequest.md +++ b/docs/SearchCatalogObjectsRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **cursor** | **String** | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information. | [optional] **objectTypes** | [**List<ObjectTypesEnum>**](#List<ObjectTypesEnum>) | The desired set of object types to appear in the search results. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. See [CatalogObjectType](#type-catalogobjecttype) for possible values | [optional] **includeDeletedObjects** | **Boolean** | If `true`, deleted objects will be included in the results. Deleted objects will have their `is_deleted` field set to `true`. | [optional] -**includeRelatedObjects** | **Boolean** | If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. | [optional] +**includeRelatedObjects** | **Boolean** | If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. | [optional] **beginTime** | **String** | Return objects modified after this [timestamp](#workingwithdates), in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". The timestamp is exclusive - objects with a timestamp equal to `begin_time` will not be included in the response. | [optional] **query** | [**CatalogQuery**](CatalogQuery.md) | A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned. | [optional] **limit** | **Integer** | A limit on the number of results to be returned in a single page. The limit is advisory - the implementation may return more or fewer results. If the supplied limit is negative, zero, or is higher than the maximum limit of 1,000, it will be ignored. | [optional] @@ -29,6 +29,9 @@ TAX | "TAX" DISCOUNT | "DISCOUNT" MODIFIER_LIST | "MODIFIER_LIST" MODIFIER | "MODIFIER" +PRICING_RULE | "PRICING_RULE" +PRODUCT_SET | "PRODUCT_SET" +TIME_PERIOD | "TIME_PERIOD" diff --git a/docs/StandardUnitDescription.md b/docs/StandardUnitDescription.md new file mode 100644 index 0000000..7773262 --- /dev/null +++ b/docs/StandardUnitDescription.md @@ -0,0 +1,16 @@ + +# StandardUnitDescription + +### Description + +Contains the name and abbreviation for standard measurement unit. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit** | [**MeasurementUnit**](MeasurementUnit.md) | Identifies the measurement unit being described. | [optional] +**name** | **String** | Display name of the measurement unit. For example, 'Pound'. | [optional] +**abbreviation** | **String** | Abbreviation for the measurement unit. For example, 'lb'. | [optional] + + + diff --git a/docs/StandardUnitDescriptionGroup.md b/docs/StandardUnitDescriptionGroup.md new file mode 100644 index 0000000..6d0187a --- /dev/null +++ b/docs/StandardUnitDescriptionGroup.md @@ -0,0 +1,15 @@ + +# StandardUnitDescriptionGroup + +### Description + +Group of standard measurement units. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**standardUnitDescriptions** | [**List<StandardUnitDescription>**](StandardUnitDescription.md) | List of measurement units in this description group. | [optional] +**languageCode** | **String** | IETF language tag. | [optional] + + + diff --git a/pom.xml b/pom.xml index d3f2b59..534f453 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ connect jar connect - 2.20190508.1 + 2.20190612.0 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 a4076bf..9ed66f3 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.20190508.1"); + setUserAgent("Square-Connect-Java/2.20190612.0"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap(); diff --git a/src/main/java/com/squareup/connect/api/ApplePayApi.java b/src/main/java/com/squareup/connect/api/ApplePayApi.java index a7f705f..a9bfb06 100644 --- a/src/main/java/com/squareup/connect/api/ApplePayApi.java +++ b/src/main/java/com/squareup/connect/api/ApplePayApi.java @@ -38,7 +38,7 @@ public void setApiClient(ApiClient apiClient) { /** * RegisterDomain - * Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payments/sqpaymentform/overview) guide. + * Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payment-form/add-digital-wallets/apple-pay) guide. * @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required) * @return RegisterDomainResponse * @throws ApiException if fails to make API call @@ -58,7 +58,7 @@ public RegisterDomainResponse registerDomain(RegisterDomainRequest body) throws List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -81,7 +81,7 @@ public RegisterDomainResponse registerDomain(RegisterDomainRequest body) throws /** * RegisterDomain - * Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payments/sqpaymentform/overview) guide. + * Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payment-form/add-digital-wallets/apple-pay) guide. * @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/CatalogApi.java b/src/main/java/com/squareup/connect/api/CatalogApi.java index d9b986b..9905574 100644 --- a/src/main/java/com/squareup/connect/api/CatalogApi.java +++ b/src/main/java/com/squareup/connect/api/CatalogApi.java @@ -74,7 +74,7 @@ public BatchDeleteCatalogObjectsResponse batchDeleteCatalogObjects(BatchDeleteCa List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -158,7 +158,7 @@ public BatchRetrieveCatalogObjectsResponse batchRetrieveCatalogObjects(BatchRetr List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -242,7 +242,7 @@ public BatchUpsertCatalogObjectsResponse batchUpsertCatalogObjects(BatchUpsertCa List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -320,7 +320,7 @@ public CatalogInfoResponse catalogInfo() throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -399,7 +399,7 @@ public DeleteCatalogObjectResponse deleteCatalogObject(String objectId) throws A List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -464,7 +464,7 @@ public DeleteCatalogObjectResponse deleteCatalogObject(String objectId) throws A } /** * ListCatalog - * Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The types parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`. + * Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The `types` parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. * @param cursor The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information. (optional) * @param types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. (optional) * @return ListCatalogResponse @@ -480,7 +480,7 @@ public ListCatalogResponse listCatalog(String cursor, String types) throws ApiEx List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "types", types)); @@ -505,7 +505,7 @@ public ListCatalogResponse listCatalog(String cursor, String types) throws ApiEx /** * ListCatalog - * Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The types parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`. + * Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The `types` parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. * @param cursor The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information. (optional) * @param types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. (optional) * @return CompleteResponse @@ -546,7 +546,7 @@ public ListCatalogResponse listCatalog(String cursor, String types) throws ApiEx * RetrieveCatalogObject * Returns a single [CatalogItem](#type-catalogitem) as a [CatalogObject](#type-catalogobject) based on the provided ID. The returned object includes all of the relevant [CatalogItem](#type-catalogitem) information including: [CatalogItemVariation](#type-catalogitemvariation) children, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it. * @param objectId The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. (required) - * @param includeRelatedObjects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` (optional) + * @param includeRelatedObjects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` (optional) * @return RetrieveCatalogObjectResponse * @throws ApiException if fails to make API call */ @@ -566,7 +566,7 @@ public RetrieveCatalogObjectResponse retrieveCatalogObject(String objectId, Bool List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_related_objects", includeRelatedObjects)); @@ -592,7 +592,7 @@ public RetrieveCatalogObjectResponse retrieveCatalogObject(String objectId, Bool * RetrieveCatalogObject * Returns a single [CatalogItem](#type-catalogitem) as a [CatalogObject](#type-catalogobject) based on the provided ID. The returned object includes all of the relevant [CatalogItem](#type-catalogitem) information including: [CatalogItemVariation](#type-catalogitemvariation) children, references to its [CatalogModifierList](#type-catalogmodifierlist) objects, and the ids of any [CatalogTax](#type-catalogtax) objects that apply to it. * @param objectId The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. (required) - * @param includeRelatedObjects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` (optional) + * @param includeRelatedObjects If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` (optional) * @return CompleteResponse * @throws ApiException if fails to make API call */ @@ -654,7 +654,7 @@ public SearchCatalogObjectsResponse searchCatalogObjects(SearchCatalogObjectsReq List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -738,7 +738,7 @@ public UpdateItemModifierListsResponse updateItemModifierLists(UpdateItemModifie List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -822,7 +822,7 @@ public UpdateItemTaxesResponse updateItemTaxes(UpdateItemTaxesRequest body) thro List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -906,7 +906,7 @@ public UpsertCatalogObjectResponse upsertCatalogObject(UpsertCatalogObjectReques List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/CheckoutApi.java b/src/main/java/com/squareup/connect/api/CheckoutApi.java index f956e1a..7cbee60 100644 --- a/src/main/java/com/squareup/connect/api/CheckoutApi.java +++ b/src/main/java/com/squareup/connect/api/CheckoutApi.java @@ -65,7 +65,7 @@ public CreateCheckoutResponse createCheckout(String locationId, CreateCheckoutRe List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/CustomersApi.java b/src/main/java/com/squareup/connect/api/CustomersApi.java index e1c0593..14074dc 100644 --- a/src/main/java/com/squareup/connect/api/CustomersApi.java +++ b/src/main/java/com/squareup/connect/api/CustomersApi.java @@ -68,7 +68,7 @@ public CreateCustomerResponse createCustomer(CreateCustomerRequest body) throws List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -159,7 +159,7 @@ public CreateCustomerCardResponse createCustomerCard(String customerId, CreateCu List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -251,7 +251,7 @@ public DeleteCustomerResponse deleteCustomer(String customerId) throws ApiExcept List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -344,7 +344,7 @@ public DeleteCustomerCardResponse deleteCustomerCard(String customerId, String c List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -433,7 +433,7 @@ public ListCustomersResponse listCustomers(String cursor, String sortField, Stri List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_field", sortField)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_order", sortOrder)); @@ -521,7 +521,7 @@ public RetrieveCustomerResponse retrieveCustomer(String customerId) throws ApiEx List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -606,7 +606,7 @@ public SearchCustomersResponse searchCustomers(SearchCustomersRequest body) thro List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -697,7 +697,7 @@ public UpdateCustomerResponse updateCustomer(String customerId, UpdateCustomerRe List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/EmployeesApi.java b/src/main/java/com/squareup/connect/api/EmployeesApi.java index 47a05f5..301ba9d 100644 --- a/src/main/java/com/squareup/connect/api/EmployeesApi.java +++ b/src/main/java/com/squareup/connect/api/EmployeesApi.java @@ -56,7 +56,7 @@ public ListEmployeesResponse listEmployees(String locationId, String status, Int List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "location_id", locationId)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); @@ -147,7 +147,7 @@ public RetrieveEmployeeResponse retrieveEmployee(String id) throws ApiException List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/InventoryApi.java b/src/main/java/com/squareup/connect/api/InventoryApi.java index 3e6e7f3..08d6a7e 100644 --- a/src/main/java/com/squareup/connect/api/InventoryApi.java +++ b/src/main/java/com/squareup/connect/api/InventoryApi.java @@ -66,7 +66,7 @@ public BatchChangeInventoryResponse batchChangeInventory(BatchChangeInventoryReq List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -150,7 +150,7 @@ public BatchRetrieveInventoryChangesResponse batchRetrieveInventoryChanges(Batch List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -234,7 +234,7 @@ public BatchRetrieveInventoryCountsResponse batchRetrieveInventoryCounts(BatchRe List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -319,7 +319,7 @@ public RetrieveInventoryAdjustmentResponse retrieveInventoryAdjustment(String ad List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -407,7 +407,7 @@ public RetrieveInventoryChangesResponse retrieveInventoryChanges(String catalogO List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "location_ids", locationIds)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); @@ -501,7 +501,7 @@ public RetrieveInventoryCountResponse retrieveInventoryCount(String catalogObjec List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "location_ids", locationIds)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); @@ -593,7 +593,7 @@ public RetrieveInventoryPhysicalCountResponse retrieveInventoryPhysicalCount(Str List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/LaborApi.java b/src/main/java/com/squareup/connect/api/LaborApi.java index 19ecb14..09fbd06 100644 --- a/src/main/java/com/squareup/connect/api/LaborApi.java +++ b/src/main/java/com/squareup/connect/api/LaborApi.java @@ -76,7 +76,7 @@ public CreateBreakTypeResponse createBreakType(CreateBreakTypeRequest body) thro List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -160,7 +160,7 @@ public CreateShiftResponse createShift(CreateShiftRequest body) throws ApiExcept List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -245,7 +245,7 @@ public DeleteBreakTypeResponse deleteBreakType(String id) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -331,7 +331,7 @@ public DeleteShiftResponse deleteShift(String id) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -417,7 +417,7 @@ public GetBreakTypeResponse getBreakType(String id) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -503,7 +503,7 @@ public GetEmployeeWageResponse getEmployeeWage(String id) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -589,7 +589,7 @@ public GetShiftResponse getShift(String id) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -671,7 +671,7 @@ public ListBreakTypesResponse listBreakTypes(String locationId, Integer limit, S List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "location_id", locationId)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); @@ -755,7 +755,7 @@ public ListEmployeeWagesResponse listEmployeeWages(String employeeId, Integer li List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "employee_id", employeeId)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); @@ -838,7 +838,7 @@ public ListWorkweekConfigsResponse listWorkweekConfigs(Integer limit, String cur List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); @@ -922,7 +922,7 @@ public SearchShiftsResponse searchShifts(SearchShiftsRequest body) throws ApiExc List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1013,7 +1013,7 @@ public UpdateBreakTypeResponse updateBreakType(String id, UpdateBreakTypeRequest List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1111,7 +1111,7 @@ public UpdateShiftResponse updateShift(String id, UpdateShiftRequest body) throw List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1209,7 +1209,7 @@ public UpdateWorkweekConfigResponse updateWorkweekConfig(String id, UpdateWorkwe List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/LocationsApi.java b/src/main/java/com/squareup/connect/api/LocationsApi.java index d295161..2f814cb 100644 --- a/src/main/java/com/squareup/connect/api/LocationsApi.java +++ b/src/main/java/com/squareup/connect/api/LocationsApi.java @@ -51,7 +51,7 @@ public ListLocationsResponse listLocations() throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/MobileAuthorizationApi.java b/src/main/java/com/squareup/connect/api/MobileAuthorizationApi.java index 27e92aa..c7580b5 100644 --- a/src/main/java/com/squareup/connect/api/MobileAuthorizationApi.java +++ b/src/main/java/com/squareup/connect/api/MobileAuthorizationApi.java @@ -58,7 +58,7 @@ public CreateMobileAuthorizationCodeResponse createMobileAuthorizationCode(Creat List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/OAuthApi.java b/src/main/java/com/squareup/connect/api/OAuthApi.java index df1ecfb..6ae7c64 100644 --- a/src/main/java/com/squareup/connect/api/OAuthApi.java +++ b/src/main/java/com/squareup/connect/api/OAuthApi.java @@ -42,7 +42,7 @@ public void setApiClient(ApiClient apiClient) { /** * ObtainToken - * Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. By default, the OAuth API lets up to 500 Square accounts authorize your application. Please [contact support](https://squareup.com/help/us/en/contact?prefill=developer_api) if you are developing an application for a larger audience. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__. + * Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__. * @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required) * @return ObtainTokenResponse * @throws ApiException if fails to make API call @@ -62,7 +62,7 @@ public ObtainTokenResponse obtainToken(ObtainTokenRequest body) throws ApiExcept List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -85,7 +85,7 @@ public ObtainTokenResponse obtainToken(ObtainTokenRequest body) throws ApiExcept /** * ObtainToken - * Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. By default, the OAuth API lets up to 500 Square accounts authorize your application. Please [contact support](https://squareup.com/help/us/en/contact?prefill=developer_api) if you are developing an application for a larger audience. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__. + * Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__. * @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 @@ -153,7 +153,7 @@ public RenewTokenResponse renewToken(String clientId, RenewTokenRequest body) th List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -244,7 +244,7 @@ public RevokeTokenResponse revokeToken(RevokeTokenRequest body) throws ApiExcept List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/OrdersApi.java b/src/main/java/com/squareup/connect/api/OrdersApi.java index a9bb7e1..25bb978 100644 --- a/src/main/java/com/squareup/connect/api/OrdersApi.java +++ b/src/main/java/com/squareup/connect/api/OrdersApi.java @@ -69,7 +69,7 @@ public BatchRetrieveOrdersResponse batchRetrieveOrders(String locationId, BatchR List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -167,7 +167,7 @@ public CreateOrderResponse createOrder(String locationId, CreateOrderRequest bod List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -238,7 +238,7 @@ public CreateOrderResponse createOrder(String locationId, CreateOrderRequest bod } /** * SearchOrders - * Search all Orders for a merchant and return either [Orders](#type-order) or [OrderEntries](#type-orderentry). Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was originally processed, not the time it was subsequently transmitted to Square. Consequently, the SearchOrder endpoint might list an offline Order chronologically between online Orders that were seen in a previous request. By default, SearchOrders will return all results for all of the merchant’s locations. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. + * Search all Orders for a merchant and return either [Orders](#type-order) or [OrderEntries](#type-orderentry). Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was originally processed, not the time it was subsequently transmitted to Square. Consequently, the SearchOrder endpoint might list an offline Order chronologically between online Orders that were seen in a previous request. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. * @param body An object containing the fields to POST for the request. See the corresponding object definition for field details. (required) * @return SearchOrdersResponse * @throws ApiException if fails to make API call @@ -258,7 +258,7 @@ public SearchOrdersResponse searchOrders(SearchOrdersRequest body) throws ApiExc List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -281,7 +281,7 @@ public SearchOrdersResponse searchOrders(SearchOrdersRequest body) throws ApiExc /** * SearchOrders - * Search all Orders for a merchant and return either [Orders](#type-order) or [OrderEntries](#type-orderentry). Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was originally processed, not the time it was subsequently transmitted to Square. Consequently, the SearchOrder endpoint might list an offline Order chronologically between online Orders that were seen in a previous request. By default, SearchOrders will return all results for all of the merchant’s locations. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. + * Search all Orders for a merchant and return either [Orders](#type-order) or [OrderEntries](#type-orderentry). Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was originally processed, not the time it was subsequently transmitted to Square. Consequently, the SearchOrder endpoint might list an offline Order chronologically between online Orders that were seen in a previous request. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. * @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/ReportingApi.java b/src/main/java/com/squareup/connect/api/ReportingApi.java index 176651f..a458dca 100644 --- a/src/main/java/com/squareup/connect/api/ReportingApi.java +++ b/src/main/java/com/squareup/connect/api/ReportingApi.java @@ -63,7 +63,7 @@ public ListAdditionalRecipientReceivableRefundsResponse listAdditionalRecipientR List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_time", beginTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_order", sortOrder)); @@ -165,7 +165,7 @@ public ListAdditionalRecipientReceivablesResponse listAdditionalRecipientReceiva List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_time", beginTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_order", sortOrder)); diff --git a/src/main/java/com/squareup/connect/api/TransactionsApi.java b/src/main/java/com/squareup/connect/api/TransactionsApi.java index 9d1d78a..9d3d166 100644 --- a/src/main/java/com/squareup/connect/api/TransactionsApi.java +++ b/src/main/java/com/squareup/connect/api/TransactionsApi.java @@ -73,7 +73,7 @@ public CaptureTransactionResponse captureTransaction(String locationId, String t List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -172,7 +172,7 @@ public ChargeResponse charge(String locationId, ChargeRequest body) throws ApiEx List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -277,7 +277,7 @@ public CreateRefundResponse createRefund(String locationId, String transactionId List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -380,7 +380,7 @@ public ListRefundsResponse listRefunds(String locationId, String beginTime, Stri List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_time", beginTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_order", sortOrder)); @@ -482,7 +482,7 @@ public ListTransactionsResponse listTransactions(String locationId, String begin List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_time", beginTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_order", sortOrder)); @@ -587,7 +587,7 @@ public RetrieveTransactionResponse retrieveTransaction(String locationId, String List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -687,7 +687,7 @@ public VoidTransactionResponse voidTransaction(String locationId, String transac List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/V1EmployeesApi.java b/src/main/java/com/squareup/connect/api/V1EmployeesApi.java index 02fd88a..5340a23 100644 --- a/src/main/java/com/squareup/connect/api/V1EmployeesApi.java +++ b/src/main/java/com/squareup/connect/api/V1EmployeesApi.java @@ -61,7 +61,7 @@ public V1Employee createEmployee(V1Employee body) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -145,7 +145,7 @@ public V1EmployeeRole createEmployeeRole(V1EmployeeRole employeeRole) throws Api List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -229,7 +229,7 @@ public V1Timecard createTimecard(V1Timecard body) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -314,7 +314,7 @@ public Object deleteTimecard(String timecardId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -403,7 +403,7 @@ public List listCashDrawerShifts(String locationId, String or List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_time", beginTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime)); @@ -494,7 +494,7 @@ public List listEmployeeRoles(String order, Integer limit, Strin List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "batch_token", batchToken)); @@ -584,7 +584,7 @@ public List listEmployees(String order, String beginUpdatedAt, Strin List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_updated_at", beginUpdatedAt)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_updated_at", endUpdatedAt)); @@ -690,7 +690,7 @@ public List listTimecardEvents(String timecardId) throws ApiExc List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -780,7 +780,7 @@ public List listTimecards(String order, String employeeId, String be List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "employee_id", employeeId)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_clockin_time", beginClockinTime)); @@ -899,7 +899,7 @@ public V1CashDrawerShift retrieveCashDrawerShift(String locationId, String shift List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -992,7 +992,7 @@ public V1Employee retrieveEmployee(String employeeId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1078,7 +1078,7 @@ public V1EmployeeRole retrieveEmployeeRole(String roleId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1164,7 +1164,7 @@ public V1Timecard retrieveTimecard(String timecardId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1256,7 +1256,7 @@ public V1Employee updateEmployee(String employeeId, V1Employee body) throws ApiE List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1354,7 +1354,7 @@ public V1EmployeeRole updateEmployeeRole(String roleId, V1EmployeeRole body) thr List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1452,7 +1452,7 @@ public V1Timecard updateTimecard(String timecardId, V1Timecard body) throws ApiE List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/V1ItemsApi.java b/src/main/java/com/squareup/connect/api/V1ItemsApi.java index 4b3c4dd..e6f8cd7 100644 --- a/src/main/java/com/squareup/connect/api/V1ItemsApi.java +++ b/src/main/java/com/squareup/connect/api/V1ItemsApi.java @@ -82,7 +82,7 @@ public V1InventoryEntry adjustInventory(String locationId, String variationId, V List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -195,7 +195,7 @@ public V1Item applyFee(String locationId, String itemId, String feeId) throws Ap List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -309,7 +309,7 @@ public V1Item applyModifierList(String locationId, String modifierListId, String List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -415,7 +415,7 @@ public V1Category createCategory(String locationId, V1Category body) throws ApiE List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -513,7 +513,7 @@ public V1Discount createDiscount(String locationId, V1Discount body) throws ApiE List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -611,7 +611,7 @@ public V1Fee createFee(String locationId, V1Fee body) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -709,7 +709,7 @@ public V1Item createItem(String locationId, V1Item body) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -807,7 +807,7 @@ public V1ModifierList createModifierList(String locationId, V1ModifierList body) List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -912,7 +912,7 @@ public V1ModifierOption createModifierOption(String locationId, String modifierL List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1017,7 +1017,7 @@ public V1Page createPage(String locationId, V1Page body) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1122,7 +1122,7 @@ public V1Variation createVariation(String locationId, String itemId, V1Variation List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1228,7 +1228,7 @@ public V1Category deleteCategory(String locationId, String categoryId) throws Ap List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1328,7 +1328,7 @@ public V1Discount deleteDiscount(String locationId, String discountId) throws Ap List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1428,7 +1428,7 @@ public V1Fee deleteFee(String locationId, String feeId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1528,7 +1528,7 @@ public V1Item deleteItem(String locationId, String itemId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1628,7 +1628,7 @@ public V1ModifierList deleteModifierList(String locationId, String modifierListI List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1735,7 +1735,7 @@ public V1ModifierOption deleteModifierOption(String locationId, String modifierL List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1842,7 +1842,7 @@ public V1Page deletePage(String locationId, String pageId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1944,7 +1944,7 @@ public V1Page deletePageCell(String locationId, String pageId, String row, Strin List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "row", row)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "column", column)); @@ -2057,7 +2057,7 @@ public V1Variation deleteVariation(String locationId, String itemId, String vari List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -2157,7 +2157,7 @@ public List listCategories(String locationId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -2243,7 +2243,7 @@ public List listDiscounts(String locationId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -2329,7 +2329,7 @@ public List listFees(String locationId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -2417,7 +2417,7 @@ public List listInventory(String locationId, Integer limit, St List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "batch_token", batchToken)); @@ -2510,7 +2510,7 @@ public List listItems(String locationId, String batchToken) throws ApiEx List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "batch_token", batchToken)); @@ -2599,7 +2599,7 @@ public List listModifierLists(String locationId) throws ApiExcep List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -2685,7 +2685,7 @@ public List listPages(String locationId) throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -2785,7 +2785,7 @@ public V1Item removeFee(String locationId, String itemId, String feeId) throws A List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -2899,7 +2899,7 @@ public V1Item removeModifierList(String locationId, String modifierListId, Strin List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -3006,7 +3006,7 @@ public V1Item retrieveItem(String locationId, String itemId) throws ApiException List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -3106,7 +3106,7 @@ public V1ModifierList retrieveModifierList(String locationId, String modifierLis List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -3212,7 +3212,7 @@ public V1Category updateCategory(String locationId, String categoryId, V1Categor List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -3324,7 +3324,7 @@ public V1Discount updateDiscount(String locationId, String discountId, V1Discoun List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -3436,7 +3436,7 @@ public V1Fee updateFee(String locationId, String feeId, V1Fee body) throws ApiEx List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -3548,7 +3548,7 @@ public V1Item updateItem(String locationId, String itemId, V1Item body) throws A List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -3660,7 +3660,7 @@ public V1ModifierList updateModifierList(String locationId, String modifierListI List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -3779,7 +3779,7 @@ public V1ModifierOption updateModifierOption(String locationId, String modifierL List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -3898,7 +3898,7 @@ public V1Page updatePage(String locationId, String pageId, V1Page body) throws A List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -4010,7 +4010,7 @@ public V1Page updatePageCell(String locationId, String pageId, V1PageCell body) List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -4129,7 +4129,7 @@ public V1Variation updateVariation(String locationId, String itemId, String vari List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/V1LocationsApi.java b/src/main/java/com/squareup/connect/api/V1LocationsApi.java index f0e2927..9f1b94b 100644 --- a/src/main/java/com/squareup/connect/api/V1LocationsApi.java +++ b/src/main/java/com/squareup/connect/api/V1LocationsApi.java @@ -51,7 +51,7 @@ public List listLocations() throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -123,7 +123,7 @@ public V1Merchant retrieveBusiness() throws ApiException { List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/api/V1TransactionsApi.java b/src/main/java/com/squareup/connect/api/V1TransactionsApi.java index 8ec93d4..6c34056 100644 --- a/src/main/java/com/squareup/connect/api/V1TransactionsApi.java +++ b/src/main/java/com/squareup/connect/api/V1TransactionsApi.java @@ -70,7 +70,7 @@ public V1Refund createRefund(String locationId, V1CreateRefundRequest body) thro List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -162,7 +162,7 @@ public List listBankAccounts(String locationId) throws ApiExcepti List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -251,7 +251,7 @@ public List listOrders(String locationId, String order, Integer limit, List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "batch_token", batchToken)); @@ -352,7 +352,7 @@ public List listPayments(String locationId, String order, String begi List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_time", beginTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime)); @@ -461,7 +461,7 @@ public List listRefunds(String locationId, String order, String beginT List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_time", beginTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime)); @@ -568,7 +568,7 @@ public List listSettlements(String locationId, String order, Strin List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_time", beginTime)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime)); @@ -679,7 +679,7 @@ public V1BankAccount retrieveBankAccount(String locationId, String bankAccountId List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -779,7 +779,7 @@ public V1Order retrieveOrder(String locationId, String orderId) throws ApiExcept List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -879,7 +879,7 @@ public V1Payment retrievePayment(String locationId, String paymentId) throws Api List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -979,7 +979,7 @@ public V1Settlement retrieveSettlement(String locationId, String settlementId) t List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); @@ -1085,7 +1085,7 @@ public V1Order updateOrder(String locationId, String orderId, V1UpdateOrderReque List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarHeaderParams.put("Square-Version", "2019-05-08"); + localVarHeaderParams.put("Square-Version", "2019-06-12"); diff --git a/src/main/java/com/squareup/connect/models/AggregationStrategy.java b/src/main/java/com/squareup/connect/models/AggregationStrategy.java new file mode 100644 index 0000000..8ac23a5 --- /dev/null +++ b/src/main/java/com/squareup/connect/models/AggregationStrategy.java @@ -0,0 +1,55 @@ +/* + * 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; + +/** + * Indicates how a [CatalogPricingRule](#type-catalogpricingrule) can be combined with other rules. + */ +public enum AggregationStrategy { + + UNKNOWN("UNKNOWN"), + + BASE("BASE"), + + STACKABLE("STACKABLE"), + + EXCLUSIVE("EXCLUSIVE"); + + private String value; + + AggregationStrategy(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AggregationStrategy fromValue(String text) { + for (AggregationStrategy b : AggregationStrategy.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/squareup/connect/models/BatchRetrieveCatalogObjectsRequest.java b/src/main/java/com/squareup/connect/models/BatchRetrieveCatalogObjectsRequest.java index 0acd75a..4dfbd76 100644 --- a/src/main/java/com/squareup/connect/models/BatchRetrieveCatalogObjectsRequest.java +++ b/src/main/java/com/squareup/connect/models/BatchRetrieveCatalogObjectsRequest.java @@ -63,10 +63,10 @@ public BatchRetrieveCatalogObjectsRequest includeRelatedObjects(Boolean includeR } /** - * If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. + * If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. * @return includeRelatedObjects **/ - @ApiModelProperty(value = "If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response.") + @ApiModelProperty(value = "If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response.") public Boolean getIncludeRelatedObjects() { return includeRelatedObjects; } diff --git a/src/main/java/com/squareup/connect/models/Card.java b/src/main/java/com/squareup/connect/models/Card.java index 6ab8e7c..cd39b28 100644 --- a/src/main/java/com/squareup/connect/models/Card.java +++ b/src/main/java/com/squareup/connect/models/Card.java @@ -227,10 +227,10 @@ public Card fingerprint(String fingerprint) { } /** - * __Not currently set.__ Intended as a Square-assigned identifier, based on the card number, to identify the card across multiple locations within a single application. + * A unique, Square-assigned ID that identifies the card across multiple locations and applications for a single Square account. * @return fingerprint **/ - @ApiModelProperty(value = "__Not currently set.__ Intended as a Square-assigned identifier, based on the card number, to identify the card across multiple locations within a single application.") + @ApiModelProperty(value = "A unique, Square-assigned ID that identifies the card across multiple locations and applications for a single Square account.") public String getFingerprint() { return fingerprint; } diff --git a/src/main/java/com/squareup/connect/models/CatalogInfoResponse.java b/src/main/java/com/squareup/connect/models/CatalogInfoResponse.java index 93fc5f4..a706dd2 100644 --- a/src/main/java/com/squareup/connect/models/CatalogInfoResponse.java +++ b/src/main/java/com/squareup/connect/models/CatalogInfoResponse.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.CatalogInfoResponseLimits; import com.squareup.connect.models.Error; +import com.squareup.connect.models.StandardUnitDescriptionGroup; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; @@ -36,6 +37,9 @@ public class CatalogInfoResponse { @JsonProperty("limits") private CatalogInfoResponseLimits limits = null; + @JsonProperty("standard_unit_description_group") + private StandardUnitDescriptionGroup standardUnitDescriptionGroup = null; + public CatalogInfoResponse errors(List errors) { this.errors = errors; return this; @@ -77,6 +81,24 @@ public void setLimits(CatalogInfoResponseLimits limits) { this.limits = limits; } + public CatalogInfoResponse standardUnitDescriptionGroup(StandardUnitDescriptionGroup standardUnitDescriptionGroup) { + this.standardUnitDescriptionGroup = standardUnitDescriptionGroup; + return this; + } + + /** + * Names and abbreviations for standard units. + * @return standardUnitDescriptionGroup + **/ + @ApiModelProperty(value = "Names and abbreviations for standard units.") + public StandardUnitDescriptionGroup getStandardUnitDescriptionGroup() { + return standardUnitDescriptionGroup; + } + + public void setStandardUnitDescriptionGroup(StandardUnitDescriptionGroup standardUnitDescriptionGroup) { + this.standardUnitDescriptionGroup = standardUnitDescriptionGroup; + } + @Override public boolean equals(java.lang.Object o) { @@ -88,12 +110,13 @@ public boolean equals(java.lang.Object o) { } CatalogInfoResponse catalogInfoResponse = (CatalogInfoResponse) o; return Objects.equals(this.errors, catalogInfoResponse.errors) && - Objects.equals(this.limits, catalogInfoResponse.limits); + Objects.equals(this.limits, catalogInfoResponse.limits) && + Objects.equals(this.standardUnitDescriptionGroup, catalogInfoResponse.standardUnitDescriptionGroup); } @Override public int hashCode() { - return Objects.hash(errors, limits); + return Objects.hash(errors, limits, standardUnitDescriptionGroup); } @@ -104,6 +127,7 @@ public String toString() { sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" standardUnitDescriptionGroup: ").append(toIndentedString(standardUnitDescriptionGroup)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/squareup/connect/models/CatalogItem.java b/src/main/java/com/squareup/connect/models/CatalogItem.java index c89dde3..0713c2d 100644 --- a/src/main/java/com/squareup/connect/models/CatalogItem.java +++ b/src/main/java/com/squareup/connect/models/CatalogItem.java @@ -327,10 +327,10 @@ public CatalogItem addVariationsItem(CatalogObject variationsItem) { } /** - * A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. + * A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations * @return variations **/ - @ApiModelProperty(value = "A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item.") + @ApiModelProperty(value = "A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations") public List getVariations() { return variations; } diff --git a/src/main/java/com/squareup/connect/models/CatalogItemVariation.java b/src/main/java/com/squareup/connect/models/CatalogItemVariation.java index 5795b7f..761b93d 100644 --- a/src/main/java/com/squareup/connect/models/CatalogItemVariation.java +++ b/src/main/java/com/squareup/connect/models/CatalogItemVariation.java @@ -25,9 +25,9 @@ import java.util.List; /** - * An item variation (i.e., product) in the Catalog object model. + * An item variation (i.e., product) in the Catalog object model. Each item may have a maximum of 250 item variations. */ -@ApiModel(description = "An item variation (i.e., product) in the Catalog object model.") +@ApiModel(description = "An item variation (i.e., product) in the Catalog object model. Each item may have a maximum of 250 item variations.") public class CatalogItemVariation { @JsonProperty("item_id") @@ -129,6 +129,12 @@ public static InventoryAlertTypeEnum fromValue(String text) { @JsonProperty("service_duration") private Long serviceDuration = null; + @JsonProperty("catalog_measurement_unit_id") + private String catalogMeasurementUnitId = null; + + @JsonProperty("measurement_unit_id") + private String measurementUnitId = null; + public CatalogItemVariation itemId(String itemId) { this.itemId = itemId; return this; @@ -368,6 +374,42 @@ public void setServiceDuration(Long serviceDuration) { this.serviceDuration = serviceDuration; } + public CatalogItemVariation catalogMeasurementUnitId(String catalogMeasurementUnitId) { + this.catalogMeasurementUnitId = catalogMeasurementUnitId; + return this; + } + + /** + * Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities. + * @return catalogMeasurementUnitId + **/ + @ApiModelProperty(value = "Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities.") + public String getCatalogMeasurementUnitId() { + return catalogMeasurementUnitId; + } + + public void setCatalogMeasurementUnitId(String catalogMeasurementUnitId) { + this.catalogMeasurementUnitId = catalogMeasurementUnitId; + } + + public CatalogItemVariation measurementUnitId(String measurementUnitId) { + this.measurementUnitId = measurementUnitId; + return this; + } + + /** + * 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. + * @return measurementUnitId + **/ + @ApiModelProperty(value = "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.") + public String getMeasurementUnitId() { + return measurementUnitId; + } + + public void setMeasurementUnitId(String measurementUnitId) { + this.measurementUnitId = measurementUnitId; + } + @Override public boolean equals(java.lang.Object o) { @@ -390,12 +432,14 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.inventoryAlertType, catalogItemVariation.inventoryAlertType) && Objects.equals(this.inventoryAlertThreshold, catalogItemVariation.inventoryAlertThreshold) && Objects.equals(this.userData, catalogItemVariation.userData) && - Objects.equals(this.serviceDuration, catalogItemVariation.serviceDuration); + Objects.equals(this.serviceDuration, catalogItemVariation.serviceDuration) && + Objects.equals(this.catalogMeasurementUnitId, catalogItemVariation.catalogMeasurementUnitId) && + Objects.equals(this.measurementUnitId, catalogItemVariation.measurementUnitId); } @Override public int hashCode() { - return Objects.hash(itemId, name, sku, upc, ordinal, pricingType, priceMoney, locationOverrides, trackInventory, inventoryAlertType, inventoryAlertThreshold, userData, serviceDuration); + return Objects.hash(itemId, name, sku, upc, ordinal, pricingType, priceMoney, locationOverrides, trackInventory, inventoryAlertType, inventoryAlertThreshold, userData, serviceDuration, catalogMeasurementUnitId, measurementUnitId); } @@ -417,6 +461,8 @@ public String toString() { sb.append(" inventoryAlertThreshold: ").append(toIndentedString(inventoryAlertThreshold)).append("\n"); sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); sb.append(" serviceDuration: ").append(toIndentedString(serviceDuration)).append("\n"); + sb.append(" catalogMeasurementUnitId: ").append(toIndentedString(catalogMeasurementUnitId)).append("\n"); + sb.append(" measurementUnitId: ").append(toIndentedString(measurementUnitId)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/squareup/connect/models/CatalogMeasurementUnit.java b/src/main/java/com/squareup/connect/models/CatalogMeasurementUnit.java new file mode 100644 index 0000000..84426ba --- /dev/null +++ b/src/main/java/com/squareup/connect/models/CatalogMeasurementUnit.java @@ -0,0 +1,115 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.squareup.connect.models.MeasurementUnit; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities. + */ +@ApiModel(description = "Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities.") + +public class CatalogMeasurementUnit { + @JsonProperty("measurement_unit") + private MeasurementUnit measurementUnit = null; + + @JsonProperty("precision") + private Integer precision = null; + + public CatalogMeasurementUnit measurementUnit(MeasurementUnit measurementUnit) { + this.measurementUnit = measurementUnit; + return this; + } + + /** + * Indicates the unit used to measure the quantity of a catalog item variation. + * @return measurementUnit + **/ + @ApiModelProperty(value = "Indicates the unit used to measure the quantity of a catalog item variation.") + public MeasurementUnit getMeasurementUnit() { + return measurementUnit; + } + + public void setMeasurementUnit(MeasurementUnit measurementUnit) { + this.measurementUnit = measurementUnit; + } + + public CatalogMeasurementUnit precision(Integer precision) { + this.precision = precision; + return this; + } + + /** + * Represents the maximum number of positions allowed after the decimal in quantities measured with this unit. For example, if the precision is 2, then an itemization’s quantity can be 0.01, 0.12, etc. Min: 0 Max: 5 Default: 3 + * @return precision + **/ + @ApiModelProperty(value = " Represents the maximum number of positions allowed after the decimal in quantities measured with this unit. For example, if the precision is 2, then an itemization’s quantity can be 0.01, 0.12, etc. Min: 0 Max: 5 Default: 3") + public Integer getPrecision() { + return precision; + } + + public void setPrecision(Integer precision) { + this.precision = precision; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatalogMeasurementUnit catalogMeasurementUnit = (CatalogMeasurementUnit) o; + return Objects.equals(this.measurementUnit, catalogMeasurementUnit.measurementUnit) && + Objects.equals(this.precision, catalogMeasurementUnit.precision); + } + + @Override + public int hashCode() { + return Objects.hash(measurementUnit, precision); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatalogMeasurementUnit {\n"); + + sb.append(" measurementUnit: ").append(toIndentedString(measurementUnit)).append("\n"); + sb.append(" precision: ").append(toIndentedString(precision)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/squareup/connect/models/CatalogObject.java b/src/main/java/com/squareup/connect/models/CatalogObject.java index 0ad72af..d10be8f 100644 --- a/src/main/java/com/squareup/connect/models/CatalogObject.java +++ b/src/main/java/com/squareup/connect/models/CatalogObject.java @@ -22,6 +22,7 @@ import com.squareup.connect.models.CatalogImage; import com.squareup.connect.models.CatalogItem; import com.squareup.connect.models.CatalogItemVariation; +import com.squareup.connect.models.CatalogMeasurementUnit; import com.squareup.connect.models.CatalogModifier; import com.squareup.connect.models.CatalogModifierList; import com.squareup.connect.models.CatalogTax; @@ -55,7 +56,13 @@ public enum TypeEnum { MODIFIER_LIST("MODIFIER_LIST"), - MODIFIER("MODIFIER"); + MODIFIER("MODIFIER"), + + PRICING_RULE("PRICING_RULE"), + + PRODUCT_SET("PRODUCT_SET"), + + TIME_PERIOD("TIME_PERIOD"); private String value; @@ -133,6 +140,9 @@ public static TypeEnum fromValue(String text) { @JsonProperty("image_data") private CatalogImage imageData = null; + @JsonProperty("measurement_unit_data") + private CatalogMeasurementUnit measurementUnitData = null; + public CatalogObject type(TypeEnum type) { this.type = type; return this; @@ -472,6 +482,24 @@ public void setImageData(CatalogImage imageData) { this.imageData = imageData; } + public CatalogObject measurementUnitData(CatalogMeasurementUnit measurementUnitData) { + this.measurementUnitData = measurementUnitData; + return this; + } + + /** + * Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type `MEASUREMENT_UNIT`. + * @return measurementUnitData + **/ + @ApiModelProperty(value = "Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type `MEASUREMENT_UNIT`.") + public CatalogMeasurementUnit getMeasurementUnitData() { + return measurementUnitData; + } + + public void setMeasurementUnitData(CatalogMeasurementUnit measurementUnitData) { + this.measurementUnitData = measurementUnitData; + } + @Override public boolean equals(java.lang.Object o) { @@ -499,12 +527,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.discountData, catalogObject.discountData) && Objects.equals(this.modifierListData, catalogObject.modifierListData) && Objects.equals(this.modifierData, catalogObject.modifierData) && - Objects.equals(this.imageData, catalogObject.imageData); + Objects.equals(this.imageData, catalogObject.imageData) && + Objects.equals(this.measurementUnitData, catalogObject.measurementUnitData); } @Override public int hashCode() { - return Objects.hash(type, id, updatedAt, version, isDeleted, catalogV1Ids, presentAtAllLocations, presentAtLocationIds, absentAtLocationIds, imageId, itemData, categoryData, itemVariationData, taxData, discountData, modifierListData, modifierData, imageData); + return Objects.hash(type, id, updatedAt, version, isDeleted, catalogV1Ids, presentAtAllLocations, presentAtLocationIds, absentAtLocationIds, imageId, itemData, categoryData, itemVariationData, taxData, discountData, modifierListData, modifierData, imageData, measurementUnitData); } @@ -531,6 +560,7 @@ public String toString() { sb.append(" modifierListData: ").append(toIndentedString(modifierListData)).append("\n"); sb.append(" modifierData: ").append(toIndentedString(modifierData)).append("\n"); sb.append(" imageData: ").append(toIndentedString(imageData)).append("\n"); + sb.append(" measurementUnitData: ").append(toIndentedString(measurementUnitData)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/squareup/connect/models/CatalogObjectType.java b/src/main/java/com/squareup/connect/models/CatalogObjectType.java index 30688eb..ef64d89 100644 --- a/src/main/java/com/squareup/connect/models/CatalogObjectType.java +++ b/src/main/java/com/squareup/connect/models/CatalogObjectType.java @@ -37,7 +37,13 @@ public enum CatalogObjectType { MODIFIER_LIST("MODIFIER_LIST"), - MODIFIER("MODIFIER"); + MODIFIER("MODIFIER"), + + PRICING_RULE("PRICING_RULE"), + + PRODUCT_SET("PRODUCT_SET"), + + TIME_PERIOD("TIME_PERIOD"); private String value; diff --git a/src/main/java/com/squareup/connect/models/CatalogPricingRule.java b/src/main/java/com/squareup/connect/models/CatalogPricingRule.java new file mode 100644 index 0000000..aa248d3 --- /dev/null +++ b/src/main/java/com/squareup/connect/models/CatalogPricingRule.java @@ -0,0 +1,409 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.squareup.connect.models.Money; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * Defines how prices are modified or set for items that match the pricing rule during the active time period. + */ +@ApiModel(description = "Defines how prices are modified or set for items that match the pricing rule during the active time period.") + +public class CatalogPricingRule { + @JsonProperty("name") + private String name = null; + + @JsonProperty("time_period_ids") + private List timePeriodIds = new ArrayList(); + + @JsonProperty("total_price_money") + private Money totalPriceMoney = null; + + @JsonProperty("item_price_money") + private Money itemPriceMoney = null; + + @JsonProperty("discount_id") + private String discountId = null; + + @JsonProperty("match_products_id") + private String matchProductsId = null; + + @JsonProperty("apply_products_id") + private String applyProductsId = null; + + /** + * Describes how the pricing rule can be combined with other pricing rules. See [Stackable](#type-stackable) for all possible values. See [AggregationStrategy](#type-aggregationstrategy) for possible values + */ + public enum StackableEnum { + UNKNOWN("UNKNOWN"), + + BASE("BASE"), + + STACKABLE("STACKABLE"), + + EXCLUSIVE("EXCLUSIVE"); + + private String value; + + StackableEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StackableEnum fromValue(String text) { + for (StackableEnum b : StackableEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("stackable") + private StackableEnum stackable = null; + + @JsonProperty("exclude_products_id") + private String excludeProductsId = null; + + @JsonProperty("valid_from_date") + private String validFromDate = null; + + @JsonProperty("valid_from_local_time") + private String validFromLocalTime = null; + + @JsonProperty("valid_until_date") + private String validUntilDate = null; + + @JsonProperty("valid_until_local_time") + private String validUntilLocalTime = null; + + public CatalogPricingRule name(String name) { + this.name = name; + return this; + } + + /** + * User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\". + * @return name + **/ + @ApiModelProperty(value = "User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\".") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CatalogPricingRule timePeriodIds(List timePeriodIds) { + this.timePeriodIds = timePeriodIds; + return this; + } + + public CatalogPricingRule addTimePeriodIdsItem(String timePeriodIdsItem) { + this.timePeriodIds.add(timePeriodIdsItem); + return this; + } + + /** + * Unique ID for the [CatalogTimePeriod](#type-catalogtimeperiod)s when this pricing rule is in effect. If left unset, the pricing rule is always in effect. + * @return timePeriodIds + **/ + @ApiModelProperty(value = "Unique ID for the [CatalogTimePeriod](#type-catalogtimeperiod)s when this pricing rule is in effect. If left unset, the pricing rule is always in effect.") + public List getTimePeriodIds() { + return timePeriodIds; + } + + public void setTimePeriodIds(List timePeriodIds) { + this.timePeriodIds = timePeriodIds; + } + + public CatalogPricingRule totalPriceMoney(Money totalPriceMoney) { + this.totalPriceMoney = totalPriceMoney; + return this; + } + + /** + * The total amount of money to charge for all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. + * @return totalPriceMoney + **/ + @ApiModelProperty(value = "The total amount of money to charge for all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied.") + public Money getTotalPriceMoney() { + return totalPriceMoney; + } + + public void setTotalPriceMoney(Money totalPriceMoney) { + this.totalPriceMoney = totalPriceMoney; + } + + public CatalogPricingRule itemPriceMoney(Money itemPriceMoney) { + this.itemPriceMoney = itemPriceMoney; + return this; + } + + /** + * The amount of money to charge for each matched item. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. + * @return itemPriceMoney + **/ + @ApiModelProperty(value = "The amount of money to charge for each matched item. Only one of `total_price_money`, `item_price`, or `discount` can be supplied.") + public Money getItemPriceMoney() { + return itemPriceMoney; + } + + public void setItemPriceMoney(Money itemPriceMoney) { + this.itemPriceMoney = itemPriceMoney; + } + + public CatalogPricingRule discountId(String discountId) { + this.discountId = discountId; + return this; + } + + /** + * Unique ID for the [CatalogDiscount](#type-catalogdiscount) to take off the price of all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. + * @return discountId + **/ + @ApiModelProperty(value = "Unique ID for the [CatalogDiscount](#type-catalogdiscount) to take off the price of all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied.") + public String getDiscountId() { + return discountId; + } + + public void setDiscountId(String discountId) { + this.discountId = discountId; + } + + public CatalogPricingRule matchProductsId(String matchProductsId) { + this.matchProductsId = matchProductsId; + return this; + } + + /** + * Unique ID for the [CatalogProductSet](#type-catalogproductset) that will be matched by this rule. A match rule matches within the entire cart. + * @return matchProductsId + **/ + @ApiModelProperty(value = "Unique ID for the [CatalogProductSet](#type-catalogproductset) that will be matched by this rule. A match rule matches within the entire cart.") + public String getMatchProductsId() { + return matchProductsId; + } + + public void setMatchProductsId(String matchProductsId) { + this.matchProductsId = matchProductsId; + } + + public CatalogPricingRule applyProductsId(String applyProductsId) { + this.applyProductsId = applyProductsId; + return this; + } + + /** + * The [CatalogProductSet](#type-catalogproductset) to apply the pricing rule to within the set of matched products specified by `match_products_id`. An apply rule can only match once within the set of matched products. If left unset, the pricing rule will be applied to all products within the set of matched products. + * @return applyProductsId + **/ + @ApiModelProperty(value = "The [CatalogProductSet](#type-catalogproductset) to apply the pricing rule to within the set of matched products specified by `match_products_id`. An apply rule can only match once within the set of matched products. If left unset, the pricing rule will be applied to all products within the set of matched products.") + public String getApplyProductsId() { + return applyProductsId; + } + + public void setApplyProductsId(String applyProductsId) { + this.applyProductsId = applyProductsId; + } + + public CatalogPricingRule stackable(StackableEnum stackable) { + this.stackable = stackable; + return this; + } + + /** + * Describes how the pricing rule can be combined with other pricing rules. See [Stackable](#type-stackable) for all possible values. See [AggregationStrategy](#type-aggregationstrategy) for possible values + * @return stackable + **/ + @ApiModelProperty(value = "Describes how the pricing rule can be combined with other pricing rules. See [Stackable](#type-stackable) for all possible values. See [AggregationStrategy](#type-aggregationstrategy) for possible values") + public StackableEnum getStackable() { + return stackable; + } + + public void setStackable(StackableEnum stackable) { + this.stackable = stackable; + } + + public CatalogPricingRule excludeProductsId(String excludeProductsId) { + this.excludeProductsId = excludeProductsId; + return this; + } + + /** + * Identifies the [CatalogProductSet](#type-catalogproductset) to exclude from this pricing rule. An exclude rule matches within the subset of the cart that fits the match rules (the match set). An exclude rule can only match once in the match set. If not supplied, the pricing will be applied to all products in the match set. Other products retain their base price, or a price generated by other rules. + * @return excludeProductsId + **/ + @ApiModelProperty(value = "Identifies the [CatalogProductSet](#type-catalogproductset) to exclude from this pricing rule. An exclude rule matches within the subset of the cart that fits the match rules (the match set). An exclude rule can only match once in the match set. If not supplied, the pricing will be applied to all products in the match set. Other products retain their base price, or a price generated by other rules.") + public String getExcludeProductsId() { + return excludeProductsId; + } + + public void setExcludeProductsId(String excludeProductsId) { + this.excludeProductsId = excludeProductsId; + } + + public CatalogPricingRule validFromDate(String validFromDate) { + this.validFromDate = validFromDate; + return this; + } + + /** + * Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD). + * @return validFromDate + **/ + @ApiModelProperty(value = "Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD).") + public String getValidFromDate() { + return validFromDate; + } + + public void setValidFromDate(String validFromDate) { + this.validFromDate = validFromDate; + } + + public CatalogPricingRule validFromLocalTime(String validFromLocalTime) { + this.validFromLocalTime = validFromLocalTime; + return this; + } + + /** + * Represents the local time the pricing rule should be valid from. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. + * @return validFromLocalTime + **/ + @ApiModelProperty(value = "Represents the local time the pricing rule should be valid from. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated.") + public String getValidFromLocalTime() { + return validFromLocalTime; + } + + public void setValidFromLocalTime(String validFromLocalTime) { + this.validFromLocalTime = validFromLocalTime; + } + + public CatalogPricingRule validUntilDate(String validUntilDate) { + this.validUntilDate = validUntilDate; + return this; + } + + /** + * Represents the date the pricing rule will become inactive. Represented in RFC3339 full-date format (YYYY-MM-DD). + * @return validUntilDate + **/ + @ApiModelProperty(value = "Represents the date the pricing rule will become inactive. Represented in RFC3339 full-date format (YYYY-MM-DD).") + public String getValidUntilDate() { + return validUntilDate; + } + + public void setValidUntilDate(String validUntilDate) { + this.validUntilDate = validUntilDate; + } + + public CatalogPricingRule validUntilLocalTime(String validUntilLocalTime) { + this.validUntilLocalTime = validUntilLocalTime; + return this; + } + + /** + * Represents the local time at which the pricing rule will become inactive. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. + * @return validUntilLocalTime + **/ + @ApiModelProperty(value = "Represents the local time at which the pricing rule will become inactive. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated.") + public String getValidUntilLocalTime() { + return validUntilLocalTime; + } + + public void setValidUntilLocalTime(String validUntilLocalTime) { + this.validUntilLocalTime = validUntilLocalTime; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatalogPricingRule catalogPricingRule = (CatalogPricingRule) o; + return Objects.equals(this.name, catalogPricingRule.name) && + Objects.equals(this.timePeriodIds, catalogPricingRule.timePeriodIds) && + Objects.equals(this.totalPriceMoney, catalogPricingRule.totalPriceMoney) && + Objects.equals(this.itemPriceMoney, catalogPricingRule.itemPriceMoney) && + Objects.equals(this.discountId, catalogPricingRule.discountId) && + Objects.equals(this.matchProductsId, catalogPricingRule.matchProductsId) && + Objects.equals(this.applyProductsId, catalogPricingRule.applyProductsId) && + Objects.equals(this.stackable, catalogPricingRule.stackable) && + Objects.equals(this.excludeProductsId, catalogPricingRule.excludeProductsId) && + Objects.equals(this.validFromDate, catalogPricingRule.validFromDate) && + Objects.equals(this.validFromLocalTime, catalogPricingRule.validFromLocalTime) && + Objects.equals(this.validUntilDate, catalogPricingRule.validUntilDate) && + Objects.equals(this.validUntilLocalTime, catalogPricingRule.validUntilLocalTime); + } + + @Override + public int hashCode() { + return Objects.hash(name, timePeriodIds, totalPriceMoney, itemPriceMoney, discountId, matchProductsId, applyProductsId, stackable, excludeProductsId, validFromDate, validFromLocalTime, validUntilDate, validUntilLocalTime); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatalogPricingRule {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" timePeriodIds: ").append(toIndentedString(timePeriodIds)).append("\n"); + sb.append(" totalPriceMoney: ").append(toIndentedString(totalPriceMoney)).append("\n"); + sb.append(" itemPriceMoney: ").append(toIndentedString(itemPriceMoney)).append("\n"); + sb.append(" discountId: ").append(toIndentedString(discountId)).append("\n"); + sb.append(" matchProductsId: ").append(toIndentedString(matchProductsId)).append("\n"); + sb.append(" applyProductsId: ").append(toIndentedString(applyProductsId)).append("\n"); + sb.append(" stackable: ").append(toIndentedString(stackable)).append("\n"); + sb.append(" excludeProductsId: ").append(toIndentedString(excludeProductsId)).append("\n"); + sb.append(" validFromDate: ").append(toIndentedString(validFromDate)).append("\n"); + sb.append(" validFromLocalTime: ").append(toIndentedString(validFromLocalTime)).append("\n"); + sb.append(" validUntilDate: ").append(toIndentedString(validUntilDate)).append("\n"); + sb.append(" validUntilLocalTime: ").append(toIndentedString(validUntilLocalTime)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/squareup/connect/models/CatalogProductSet.java b/src/main/java/com/squareup/connect/models/CatalogProductSet.java new file mode 100644 index 0000000..43bfd17 --- /dev/null +++ b/src/main/java/com/squareup/connect/models/CatalogProductSet.java @@ -0,0 +1,241 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * Represents a collection of catalog objects for the purpose of applying a [PricingRule](#type-pricingrule). Including a catalog object will include all of its subtypes. For example, including a category in a product set will include all of its items and associated item variations in the product set. Including an item in a product set will also include its item variations. + */ +@ApiModel(description = "Represents a collection of catalog objects for the purpose of applying a [PricingRule](#type-pricingrule). Including a catalog object will include all of its subtypes. For example, including a category in a product set will include all of its items and associated item variations in the product set. Including an item in a product set will also include its item variations.") + +public class CatalogProductSet { + @JsonProperty("name") + private String name = null; + + @JsonProperty("product_ids_any") + private List productIdsAny = new ArrayList(); + + @JsonProperty("product_ids_all") + private List productIdsAll = new ArrayList(); + + @JsonProperty("quantity_exact") + private Long quantityExact = null; + + @JsonProperty("quantity_min") + private Long quantityMin = null; + + @JsonProperty("quantity_max") + private Long quantityMax = null; + + @JsonProperty("all_products") + private Boolean allProducts = null; + + public CatalogProductSet name(String name) { + this.name = name; + return this; + } + + /** + * User-defined name for the product set. For example, \"Clearance Items\" or \"Winter Sale Items\". + * @return name + **/ + @ApiModelProperty(value = " User-defined name for the product set. For example, \"Clearance Items\" or \"Winter Sale Items\".") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CatalogProductSet productIdsAny(List productIdsAny) { + this.productIdsAny = productIdsAny; + return this; + } + + public CatalogProductSet addProductIdsAnyItem(String productIdsAnyItem) { + this.productIdsAny.add(productIdsAnyItem); + return this; + } + + /** + * Unique IDs for any [CatalogObjects](#type-catalogobject)s to include in this product set. Any number of these catalog objects can be in an order for a pricing rule to apply. This can be used with `product_ids_all` in a parent [CatalogProductSet](#type-catalogproductset) to match groups of products for a bulk discount, such as a discount for an entree and side combo. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. + * @return productIdsAny + **/ + @ApiModelProperty(value = "Unique IDs for any [CatalogObjects](#type-catalogobject)s to include in this product set. Any number of these catalog objects can be in an order for a pricing rule to apply. This can be used with `product_ids_all` in a parent [CatalogProductSet](#type-catalogproductset) to match groups of products for a bulk discount, such as a discount for an entree and side combo. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs.") + public List getProductIdsAny() { + return productIdsAny; + } + + public void setProductIdsAny(List productIdsAny) { + this.productIdsAny = productIdsAny; + } + + public CatalogProductSet productIdsAll(List productIdsAll) { + this.productIdsAll = productIdsAll; + return this; + } + + public CatalogProductSet addProductIdsAllItem(String productIdsAllItem) { + this.productIdsAll.add(productIdsAllItem); + return this; + } + + /** + * Unique IDs for [CatalogObjects](#type-catalogobject) to include in this product set. All objects in this set must be included in an order for a pricing rule to apply. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. + * @return productIdsAll + **/ + @ApiModelProperty(value = "Unique IDs for [CatalogObjects](#type-catalogobject) to include in this product set. All objects in this set must be included in an order for a pricing rule to apply. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs.") + public List getProductIdsAll() { + return productIdsAll; + } + + public void setProductIdsAll(List productIdsAll) { + this.productIdsAll = productIdsAll; + } + + public CatalogProductSet quantityExact(Long quantityExact) { + this.quantityExact = quantityExact; + return this; + } + + /** + * If set, there must be exactly this many items from `products_any` or `products_all` in the cart for the discount to apply. Cannot be combined with either `quantity_min` or `quantity_max`. + * @return quantityExact + **/ + @ApiModelProperty(value = "If set, there must be exactly this many items from `products_any` or `products_all` in the cart for the discount to apply. Cannot be combined with either `quantity_min` or `quantity_max`.") + public Long getQuantityExact() { + return quantityExact; + } + + public void setQuantityExact(Long quantityExact) { + this.quantityExact = quantityExact; + } + + public CatalogProductSet quantityMin(Long quantityMin) { + this.quantityMin = quantityMin; + return this; + } + + /** + * If set, there must be at least this many items from `products_any` or `products_all` in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if `quantity_exact`, `quantity_min` and `quantity_max` are all unspecified. + * @return quantityMin + **/ + @ApiModelProperty(value = "If set, there must be at least this many items from `products_any` or `products_all` in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if `quantity_exact`, `quantity_min` and `quantity_max` are all unspecified.") + public Long getQuantityMin() { + return quantityMin; + } + + public void setQuantityMin(Long quantityMin) { + this.quantityMin = quantityMin; + } + + public CatalogProductSet quantityMax(Long quantityMax) { + this.quantityMax = quantityMax; + return this; + } + + /** + * If set, the pricing rule will apply to a maximum of this many items from `products_any` or `products_all`. + * @return quantityMax + **/ + @ApiModelProperty(value = "If set, the pricing rule will apply to a maximum of this many items from `products_any` or `products_all`.") + public Long getQuantityMax() { + return quantityMax; + } + + public void setQuantityMax(Long quantityMax) { + this.quantityMax = quantityMax; + } + + public CatalogProductSet allProducts(Boolean allProducts) { + this.allProducts = allProducts; + return this; + } + + /** + * If set to `true`, the product set will include every item in the catalog. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. + * @return allProducts + **/ + @ApiModelProperty(value = "If set to `true`, the product set will include every item in the catalog. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set.") + public Boolean getAllProducts() { + return allProducts; + } + + public void setAllProducts(Boolean allProducts) { + this.allProducts = allProducts; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatalogProductSet catalogProductSet = (CatalogProductSet) o; + return Objects.equals(this.name, catalogProductSet.name) && + Objects.equals(this.productIdsAny, catalogProductSet.productIdsAny) && + Objects.equals(this.productIdsAll, catalogProductSet.productIdsAll) && + Objects.equals(this.quantityExact, catalogProductSet.quantityExact) && + Objects.equals(this.quantityMin, catalogProductSet.quantityMin) && + Objects.equals(this.quantityMax, catalogProductSet.quantityMax) && + Objects.equals(this.allProducts, catalogProductSet.allProducts); + } + + @Override + public int hashCode() { + return Objects.hash(name, productIdsAny, productIdsAll, quantityExact, quantityMin, quantityMax, allProducts); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatalogProductSet {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" productIdsAny: ").append(toIndentedString(productIdsAny)).append("\n"); + sb.append(" productIdsAll: ").append(toIndentedString(productIdsAll)).append("\n"); + sb.append(" quantityExact: ").append(toIndentedString(quantityExact)).append("\n"); + sb.append(" quantityMin: ").append(toIndentedString(quantityMin)).append("\n"); + sb.append(" quantityMax: ").append(toIndentedString(quantityMax)).append("\n"); + sb.append(" allProducts: ").append(toIndentedString(allProducts)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/squareup/connect/models/CatalogTimePeriod.java b/src/main/java/com/squareup/connect/models/CatalogTimePeriod.java new file mode 100644 index 0000000..23e548f --- /dev/null +++ b/src/main/java/com/squareup/connect/models/CatalogTimePeriod.java @@ -0,0 +1,91 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Represents a time period - either a single period or a repeating period. + */ +@ApiModel(description = "Represents a time period - either a single period or a repeating period.") + +public class CatalogTimePeriod { + @JsonProperty("event") + private String event = null; + + public CatalogTimePeriod event(String event) { + this.event = event; + return this; + } + + /** + * An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. + * @return event + **/ + @ApiModelProperty(value = "An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them.") + public String getEvent() { + return event; + } + + public void setEvent(String event) { + this.event = event; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CatalogTimePeriod catalogTimePeriod = (CatalogTimePeriod) o; + return Objects.equals(this.event, catalogTimePeriod.event); + } + + @Override + public int hashCode() { + return Objects.hash(event); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatalogTimePeriod {\n"); + + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/squareup/connect/models/Coordinates.java b/src/main/java/com/squareup/connect/models/Coordinates.java new file mode 100644 index 0000000..4d92c47 --- /dev/null +++ b/src/main/java/com/squareup/connect/models/Coordinates.java @@ -0,0 +1,115 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +/** + * Latitude and longitude coordinates. + */ +@ApiModel(description = "Latitude and longitude coordinates.") + +public class Coordinates { + @JsonProperty("latitude") + private BigDecimal latitude = null; + + @JsonProperty("longitude") + private BigDecimal longitude = null; + + public Coordinates latitude(BigDecimal latitude) { + this.latitude = latitude; + return this; + } + + /** + * The coordinate's latitude expressed in degrees. + * @return latitude + **/ + @ApiModelProperty(value = "The coordinate's latitude expressed in degrees.") + public BigDecimal getLatitude() { + return latitude; + } + + public void setLatitude(BigDecimal latitude) { + this.latitude = latitude; + } + + public Coordinates longitude(BigDecimal longitude) { + this.longitude = longitude; + return this; + } + + /** + * The coordinate's longitude expressed in degrees. + * @return longitude + **/ + @ApiModelProperty(value = "The coordinate's longitude expressed in degrees.") + public BigDecimal getLongitude() { + return longitude; + } + + public void setLongitude(BigDecimal longitude) { + this.longitude = longitude; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Coordinates coordinates = (Coordinates) o; + return Objects.equals(this.latitude, coordinates.latitude) && + Objects.equals(this.longitude, coordinates.longitude); + } + + @Override + public int hashCode() { + return Objects.hash(latitude, longitude); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Coordinates {\n"); + + sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n"); + sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/squareup/connect/models/CreateOrderRequest.java b/src/main/java/com/squareup/connect/models/CreateOrderRequest.java index 822e3c6..4cb8673 100644 --- a/src/main/java/com/squareup/connect/models/CreateOrderRequest.java +++ b/src/main/java/com/squareup/connect/models/CreateOrderRequest.java @@ -92,10 +92,10 @@ public CreateOrderRequest referenceId(String referenceId) { } /** - * __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. -- Top-level fields necessary to support the connect v2 CreateOrderRequest shape. + * __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. * @return referenceId **/ - @ApiModelProperty(value = "__Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. -- Top-level fields necessary to support the connect v2 CreateOrderRequest shape.") + @ApiModelProperty(value = "__Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters.") public String getReferenceId() { return referenceId; } diff --git a/src/main/java/com/squareup/connect/models/DayOfWeek.java b/src/main/java/com/squareup/connect/models/DayOfWeek.java index d055c98..7ae1499 100644 --- a/src/main/java/com/squareup/connect/models/DayOfWeek.java +++ b/src/main/java/com/squareup/connect/models/DayOfWeek.java @@ -19,7 +19,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; /** - * Indicates the specific day of the week. + * Indicates the specific day of the week. */ public enum DayOfWeek { diff --git a/src/main/java/com/squareup/connect/models/Error.java b/src/main/java/com/squareup/connect/models/Error.java index b0465e1..c4bd08a 100644 --- a/src/main/java/com/squareup/connect/models/Error.java +++ b/src/main/java/com/squareup/connect/models/Error.java @@ -161,6 +161,8 @@ public enum CodeEnum { DEPRECATED_FIELD_SET("DEPRECATED_FIELD_SET"), + RETIRED_FIELD_SET("RETIRED_FIELD_SET"), + CARD_EXPIRED("CARD_EXPIRED"), INVALID_EXPIRATION("INVALID_EXPIRATION"), diff --git a/src/main/java/com/squareup/connect/models/ErrorCode.java b/src/main/java/com/squareup/connect/models/ErrorCode.java index 457a3e5..e57496d 100644 --- a/src/main/java/com/squareup/connect/models/ErrorCode.java +++ b/src/main/java/com/squareup/connect/models/ErrorCode.java @@ -113,6 +113,8 @@ public enum ErrorCode { DEPRECATED_FIELD_SET("DEPRECATED_FIELD_SET"), + RETIRED_FIELD_SET("RETIRED_FIELD_SET"), + CARD_EXPIRED("CARD_EXPIRED"), INVALID_EXPIRATION("INVALID_EXPIRATION"), diff --git a/src/main/java/com/squareup/connect/models/Location.java b/src/main/java/com/squareup/connect/models/Location.java index 05e8137..87c93f0 100644 --- a/src/main/java/com/squareup/connect/models/Location.java +++ b/src/main/java/com/squareup/connect/models/Location.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.squareup.connect.models.Address; import com.squareup.connect.models.BusinessHours; +import com.squareup.connect.models.Coordinates; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; @@ -1080,6 +1081,24 @@ public static TypeEnum fromValue(String text) { @JsonProperty("business_hours") private BusinessHours businessHours = null; + @JsonProperty("business_email") + private String businessEmail = null; + + @JsonProperty("description") + private String description = null; + + @JsonProperty("twitter_username") + private String twitterUsername = null; + + @JsonProperty("instagram_username") + private String instagramUsername = null; + + @JsonProperty("facebook_url") + private String facebookUrl = null; + + @JsonProperty("coordinates") + private Coordinates coordinates = null; + public Location id(String id) { this.id = id; return this; @@ -1373,6 +1392,114 @@ public void setBusinessHours(BusinessHours businessHours) { this.businessHours = businessHours; } + public Location businessEmail(String businessEmail) { + this.businessEmail = businessEmail; + return this; + } + + /** + * The email of the location. + * @return businessEmail + **/ + @ApiModelProperty(value = "The email of the location.") + public String getBusinessEmail() { + return businessEmail; + } + + public void setBusinessEmail(String businessEmail) { + this.businessEmail = businessEmail; + } + + public Location description(String description) { + this.description = description; + return this; + } + + /** + * The business description of the location. + * @return description + **/ + @ApiModelProperty(value = "The business description of the location.") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Location twitterUsername(String twitterUsername) { + this.twitterUsername = twitterUsername; + return this; + } + + /** + * The Twitter username of the location without the ' + * @return twitterUsername + **/ + @ApiModelProperty(value = "The Twitter username of the location without the '") + public String getTwitterUsername() { + return twitterUsername; + } + + public void setTwitterUsername(String twitterUsername) { + this.twitterUsername = twitterUsername; + } + + public Location instagramUsername(String instagramUsername) { + this.instagramUsername = instagramUsername; + return this; + } + + /** + * The Instagram username of the location without the ' + * @return instagramUsername + **/ + @ApiModelProperty(value = "The Instagram username of the location without the '") + public String getInstagramUsername() { + return instagramUsername; + } + + public void setInstagramUsername(String instagramUsername) { + this.instagramUsername = instagramUsername; + } + + public Location facebookUrl(String facebookUrl) { + this.facebookUrl = facebookUrl; + return this; + } + + /** + * The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. + * @return facebookUrl + **/ + @ApiModelProperty(value = "The Facebook profile URL of the location. The URL should begin with 'facebook.com/'.") + public String getFacebookUrl() { + return facebookUrl; + } + + public void setFacebookUrl(String facebookUrl) { + this.facebookUrl = facebookUrl; + } + + public Location coordinates(Coordinates coordinates) { + this.coordinates = coordinates; + return this; + } + + /** + * The physical coordinates (latitude and longitude) of the location. + * @return coordinates + **/ + @ApiModelProperty(value = "The physical coordinates (latitude and longitude) of the location.") + public Coordinates getCoordinates() { + return coordinates; + } + + public void setCoordinates(Coordinates coordinates) { + this.coordinates = coordinates; + } + @Override public boolean equals(java.lang.Object o) { @@ -1398,12 +1525,18 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.businessName, location.businessName) && Objects.equals(this.type, location.type) && Objects.equals(this.websiteUrl, location.websiteUrl) && - Objects.equals(this.businessHours, location.businessHours); + Objects.equals(this.businessHours, location.businessHours) && + Objects.equals(this.businessEmail, location.businessEmail) && + Objects.equals(this.description, location.description) && + Objects.equals(this.twitterUsername, location.twitterUsername) && + Objects.equals(this.instagramUsername, location.instagramUsername) && + Objects.equals(this.facebookUrl, location.facebookUrl) && + Objects.equals(this.coordinates, location.coordinates); } @Override public int hashCode() { - return Objects.hash(id, name, address, timezone, capabilities, status, createdAt, merchantId, country, languageCode, currency, phoneNumber, businessName, type, websiteUrl, businessHours); + return Objects.hash(id, name, address, timezone, capabilities, status, createdAt, merchantId, country, languageCode, currency, phoneNumber, businessName, type, websiteUrl, businessHours, businessEmail, description, twitterUsername, instagramUsername, facebookUrl, coordinates); } @@ -1428,6 +1561,12 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" websiteUrl: ").append(toIndentedString(websiteUrl)).append("\n"); sb.append(" businessHours: ").append(toIndentedString(businessHours)).append("\n"); + sb.append(" businessEmail: ").append(toIndentedString(businessEmail)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" twitterUsername: ").append(toIndentedString(twitterUsername)).append("\n"); + sb.append(" instagramUsername: ").append(toIndentedString(instagramUsername)).append("\n"); + sb.append(" facebookUrl: ").append(toIndentedString(facebookUrl)).append("\n"); + sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/squareup/connect/models/MeasurementUnit.java b/src/main/java/com/squareup/connect/models/MeasurementUnit.java index b74487c..3f66377 100644 --- a/src/main/java/com/squareup/connect/models/MeasurementUnit.java +++ b/src/main/java/com/squareup/connect/models/MeasurementUnit.java @@ -212,6 +212,39 @@ public static WeightUnitEnum fromValue(String text) { @JsonProperty("weight_unit") private WeightUnitEnum weightUnit = null; + /** + * Reserved for API integrations that lack the ability to specify a real measurement unit See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values + */ + public enum GenericUnitEnum { + INVALID_GENERIC_UNIT("INVALID_GENERIC_UNIT"), + + UNIT("UNIT"); + + private String value; + + GenericUnitEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static GenericUnitEnum fromValue(String text) { + for (GenericUnitEnum b : GenericUnitEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("generic_unit") + private GenericUnitEnum genericUnit = null; + public MeasurementUnit customUnit(MeasurementUnitCustom customUnit) { this.customUnit = customUnit; return this; @@ -302,6 +335,24 @@ public void setWeightUnit(WeightUnitEnum weightUnit) { this.weightUnit = weightUnit; } + public MeasurementUnit genericUnit(GenericUnitEnum genericUnit) { + this.genericUnit = genericUnit; + return this; + } + + /** + * Reserved for API integrations that lack the ability to specify a real measurement unit See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values + * @return genericUnit + **/ + @ApiModelProperty(value = "Reserved for API integrations that lack the ability to specify a real measurement unit See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values") + public GenericUnitEnum getGenericUnit() { + return genericUnit; + } + + public void setGenericUnit(GenericUnitEnum genericUnit) { + this.genericUnit = genericUnit; + } + @Override public boolean equals(java.lang.Object o) { @@ -316,12 +367,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.areaUnit, measurementUnit.areaUnit) && Objects.equals(this.lengthUnit, measurementUnit.lengthUnit) && Objects.equals(this.volumeUnit, measurementUnit.volumeUnit) && - Objects.equals(this.weightUnit, measurementUnit.weightUnit); + Objects.equals(this.weightUnit, measurementUnit.weightUnit) && + Objects.equals(this.genericUnit, measurementUnit.genericUnit); } @Override public int hashCode() { - return Objects.hash(customUnit, areaUnit, lengthUnit, volumeUnit, weightUnit); + return Objects.hash(customUnit, areaUnit, lengthUnit, volumeUnit, weightUnit, genericUnit); } @@ -335,6 +387,7 @@ public String toString() { sb.append(" lengthUnit: ").append(toIndentedString(lengthUnit)).append("\n"); sb.append(" volumeUnit: ").append(toIndentedString(volumeUnit)).append("\n"); sb.append(" weightUnit: ").append(toIndentedString(weightUnit)).append("\n"); + sb.append(" genericUnit: ").append(toIndentedString(genericUnit)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/squareup/connect/models/MeasurementUnitGeneric.java b/src/main/java/com/squareup/connect/models/MeasurementUnitGeneric.java new file mode 100644 index 0000000..bb84bc0 --- /dev/null +++ b/src/main/java/com/squareup/connect/models/MeasurementUnitGeneric.java @@ -0,0 +1,51 @@ +/* + * 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; + +/** + * A custom unit of measurement defined by the user. + */ +public enum MeasurementUnitGeneric { + + INVALID_GENERIC_UNIT("INVALID_GENERIC_UNIT"), + + UNIT("UNIT"); + + private String value; + + MeasurementUnitGeneric(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MeasurementUnitGeneric fromValue(String text) { + for (MeasurementUnitGeneric b : MeasurementUnitGeneric.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/squareup/connect/models/Money.java b/src/main/java/com/squareup/connect/models/Money.java index 0718dae..8994272 100644 --- a/src/main/java/com/squareup/connect/models/Money.java +++ b/src/main/java/com/squareup/connect/models/Money.java @@ -427,7 +427,6 @@ public Money amount(Long amount) { /** * The amount of money, in the smallest denomination of the currency indicated by `currency`. For example, when `currency` is `USD`, `amount` is in cents. - * minimum: 0 * @return amount **/ @ApiModelProperty(value = "The amount of money, in the smallest denomination of the currency indicated by `currency`. For example, when `currency` is `USD`, `amount` is in cents.") diff --git a/src/main/java/com/squareup/connect/models/ObtainTokenResponse.java b/src/main/java/com/squareup/connect/models/ObtainTokenResponse.java index 91b55f1..cc696e4 100644 --- a/src/main/java/com/squareup/connect/models/ObtainTokenResponse.java +++ b/src/main/java/com/squareup/connect/models/ObtainTokenResponse.java @@ -128,10 +128,10 @@ public ObtainTokenResponse subscriptionId(String subscriptionId) { } /** - * __Legacy field__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. + * __LEGACY FIELD__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. * @return subscriptionId **/ - @ApiModelProperty(value = "__Legacy field__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.") + @ApiModelProperty(value = "__LEGACY FIELD__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.") public String getSubscriptionId() { return subscriptionId; } @@ -146,10 +146,10 @@ public ObtainTokenResponse planId(String planId) { } /** - * The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. + * __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. * @return planId **/ - @ApiModelProperty(value = "The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.") + @ApiModelProperty(value = "__LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.") public String getPlanId() { return planId; } diff --git a/src/main/java/com/squareup/connect/models/Order.java b/src/main/java/com/squareup/connect/models/Order.java index 84b7b53..aca4dd7 100644 --- a/src/main/java/com/squareup/connect/models/Order.java +++ b/src/main/java/com/squareup/connect/models/Order.java @@ -25,6 +25,7 @@ import com.squareup.connect.models.OrderMoneyAmounts; import com.squareup.connect.models.OrderReturn; import com.squareup.connect.models.OrderRoundingAdjustment; +import com.squareup.connect.models.OrderServiceCharge; import com.squareup.connect.models.OrderSource; import com.squareup.connect.models.Refund; import com.squareup.connect.models.Tender; @@ -63,6 +64,9 @@ public class Order { @JsonProperty("discounts") private List discounts = new ArrayList(); + @JsonProperty("service_charges") + private List serviceCharges = new ArrayList(); + @JsonProperty("fulfillments") private List fulfillments = new ArrayList(); @@ -137,16 +141,19 @@ public static StateEnum fromValue(String text) { @JsonProperty("total_discount_money") private Money totalDiscountMoney = null; + @JsonProperty("total_service_charge_money") + private Money totalServiceChargeMoney = null; + public Order id(String id) { this.id = id; return this; } /** - * The order's unique ID. This value is only present for Order objects created by the Orders API through the [CreateOrder](#endpoint-orders-createorder) endpoint. + * The order's unique ID. This field is read-only. * @return id **/ - @ApiModelProperty(value = "The order's unique ID. This value is only present for Order objects created by the Orders API through the [CreateOrder](#endpoint-orders-createorder) endpoint.") + @ApiModelProperty(value = "The order's unique ID. This field is read-only.") public String getId() { return id; } @@ -296,6 +303,29 @@ public void setDiscounts(List discounts) { this.discounts = discounts; } + public Order serviceCharges(List serviceCharges) { + this.serviceCharges = serviceCharges; + return this; + } + + public Order addServiceChargesItem(OrderServiceCharge serviceChargesItem) { + this.serviceCharges.add(serviceChargesItem); + return this; + } + + /** + * A list of service charges applied to the order. + * @return serviceCharges + **/ + @ApiModelProperty(value = "A list of service charges applied to the order.") + public List getServiceCharges() { + return serviceCharges; + } + + public void setServiceCharges(List serviceCharges) { + this.serviceCharges = serviceCharges; + } + public Order fulfillments(List fulfillments) { this.fulfillments = fulfillments; return this; @@ -330,10 +360,10 @@ public Order addReturnsItem(OrderReturn returnsItem) { } /** - * Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. + * Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. This field is read-only. * @return returns **/ - @ApiModelProperty(value = "Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced.") + @ApiModelProperty(value = "Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. This field is read-only.") public List getReturns() { return returns; } @@ -348,10 +378,10 @@ public Order returnAmounts(OrderMoneyAmounts returnAmounts) { } /** - * Rollup of returned money amounts. + * Rollup of returned money amounts. This field is read-only. * @return returnAmounts **/ - @ApiModelProperty(value = "Rollup of returned money amounts.") + @ApiModelProperty(value = "Rollup of returned money amounts. This field is read-only.") public OrderMoneyAmounts getReturnAmounts() { return returnAmounts; } @@ -366,10 +396,10 @@ public Order netAmounts(OrderMoneyAmounts netAmounts) { } /** - * Net money amounts (sale money - return money). + * Net money amounts (sale money - return money). This field is read-only. * @return netAmounts **/ - @ApiModelProperty(value = "Net money amounts (sale money - return money).") + @ApiModelProperty(value = "Net money amounts (sale money - return money). This field is read-only.") public OrderMoneyAmounts getNetAmounts() { return netAmounts; } @@ -384,10 +414,10 @@ public Order roundingAdjustment(OrderRoundingAdjustment roundingAdjustment) { } /** - * A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. + * A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. This field is read-only. * @return roundingAdjustment **/ - @ApiModelProperty(value = "A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency.") + @ApiModelProperty(value = "A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. This field is read-only.") public OrderRoundingAdjustment getRoundingAdjustment() { return roundingAdjustment; } @@ -448,10 +478,10 @@ public Order createdAt(String createdAt) { } /** - * Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". + * Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. * @return createdAt **/ - @ApiModelProperty(value = "Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\".") + @ApiModelProperty(value = "Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only.") public String getCreatedAt() { return createdAt; } @@ -466,10 +496,10 @@ public Order updatedAt(String updatedAt) { } /** - * Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". + * Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. * @return updatedAt **/ - @ApiModelProperty(value = "Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\".") + @ApiModelProperty(value = "Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only.") public String getUpdatedAt() { return updatedAt; } @@ -484,10 +514,10 @@ public Order closedAt(String closedAt) { } /** - * Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". + * Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. * @return closedAt **/ - @ApiModelProperty(value = "Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\".") + @ApiModelProperty(value = "Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only.") public String getClosedAt() { return closedAt; } @@ -520,10 +550,10 @@ public Order totalMoney(Money totalMoney) { } /** - * The total amount of money to collect for the order. + * The total amount of money to collect for the order. This field is read-only. * @return totalMoney **/ - @ApiModelProperty(value = "The total amount of money to collect for the order.") + @ApiModelProperty(value = "The total amount of money to collect for the order. This field is read-only.") public Money getTotalMoney() { return totalMoney; } @@ -538,10 +568,10 @@ public Order totalTaxMoney(Money totalTaxMoney) { } /** - * The total tax amount of money to collect for the order. + * The total tax amount of money to collect for the order. This field is read-only. * @return totalTaxMoney **/ - @ApiModelProperty(value = "The total tax amount of money to collect for the order.") + @ApiModelProperty(value = "The total tax amount of money to collect for the order. This field is read-only.") public Money getTotalTaxMoney() { return totalTaxMoney; } @@ -556,10 +586,10 @@ public Order totalDiscountMoney(Money totalDiscountMoney) { } /** - * The total discount amount of money to collect for the order. + * The total discount amount of money to collect for the order. This field is read-only. * @return totalDiscountMoney **/ - @ApiModelProperty(value = "The total discount amount of money to collect for the order.") + @ApiModelProperty(value = "The total discount amount of money to collect for the order. This field is read-only.") public Money getTotalDiscountMoney() { return totalDiscountMoney; } @@ -568,6 +598,24 @@ public void setTotalDiscountMoney(Money totalDiscountMoney) { this.totalDiscountMoney = totalDiscountMoney; } + public Order totalServiceChargeMoney(Money totalServiceChargeMoney) { + this.totalServiceChargeMoney = totalServiceChargeMoney; + return this; + } + + /** + * The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts. This field is read-only. + * @return totalServiceChargeMoney + **/ + @ApiModelProperty(value = "The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts. This field is read-only.") + public Money getTotalServiceChargeMoney() { + return totalServiceChargeMoney; + } + + public void setTotalServiceChargeMoney(Money totalServiceChargeMoney) { + this.totalServiceChargeMoney = totalServiceChargeMoney; + } + @Override public boolean equals(java.lang.Object o) { @@ -586,6 +634,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.lineItems, order.lineItems) && Objects.equals(this.taxes, order.taxes) && Objects.equals(this.discounts, order.discounts) && + Objects.equals(this.serviceCharges, order.serviceCharges) && Objects.equals(this.fulfillments, order.fulfillments) && Objects.equals(this.returns, order.returns) && Objects.equals(this.returnAmounts, order.returnAmounts) && @@ -599,12 +648,13 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.state, order.state) && Objects.equals(this.totalMoney, order.totalMoney) && Objects.equals(this.totalTaxMoney, order.totalTaxMoney) && - Objects.equals(this.totalDiscountMoney, order.totalDiscountMoney); + Objects.equals(this.totalDiscountMoney, order.totalDiscountMoney) && + Objects.equals(this.totalServiceChargeMoney, order.totalServiceChargeMoney); } @Override public int hashCode() { - return Objects.hash(id, locationId, referenceId, source, customerId, lineItems, taxes, discounts, fulfillments, returns, returnAmounts, netAmounts, roundingAdjustment, tenders, refunds, createdAt, updatedAt, closedAt, state, totalMoney, totalTaxMoney, totalDiscountMoney); + return Objects.hash(id, locationId, referenceId, source, customerId, lineItems, taxes, discounts, serviceCharges, fulfillments, returns, returnAmounts, netAmounts, roundingAdjustment, tenders, refunds, createdAt, updatedAt, closedAt, state, totalMoney, totalTaxMoney, totalDiscountMoney, totalServiceChargeMoney); } @@ -621,6 +671,7 @@ public String toString() { sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n"); sb.append(" taxes: ").append(toIndentedString(taxes)).append("\n"); sb.append(" discounts: ").append(toIndentedString(discounts)).append("\n"); + sb.append(" serviceCharges: ").append(toIndentedString(serviceCharges)).append("\n"); sb.append(" fulfillments: ").append(toIndentedString(fulfillments)).append("\n"); sb.append(" returns: ").append(toIndentedString(returns)).append("\n"); sb.append(" returnAmounts: ").append(toIndentedString(returnAmounts)).append("\n"); @@ -635,6 +686,7 @@ public String toString() { sb.append(" totalMoney: ").append(toIndentedString(totalMoney)).append("\n"); sb.append(" totalTaxMoney: ").append(toIndentedString(totalTaxMoney)).append("\n"); sb.append(" totalDiscountMoney: ").append(toIndentedString(totalDiscountMoney)).append("\n"); + sb.append(" totalServiceChargeMoney: ").append(toIndentedString(totalServiceChargeMoney)).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 b6e0aa8..3fc2ea6 100644 --- a/src/main/java/com/squareup/connect/models/OrderLineItem.java +++ b/src/main/java/com/squareup/connect/models/OrderLineItem.java @@ -87,10 +87,10 @@ public OrderLineItem uid(String uid) { } /** - * The line item's Unique identifier, unique only within this order. This field is read-only. + * Unique ID that identifies the line item only within this order. This field is read-only. * @return uid **/ - @ApiModelProperty(value = "The line item's Unique identifier, unique only within this order. This field is read-only.") + @ApiModelProperty(value = "Unique ID that identifies the line item only within this order. This field is read-only.") public String getUid() { return uid; } @@ -318,10 +318,10 @@ public OrderLineItem grossSalesMoney(Money grossSalesMoney) { } /** - * The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. + * The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. This field is read-only. * @return grossSalesMoney **/ - @ApiModelProperty(value = "The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price.") + @ApiModelProperty(value = "The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. This field is read-only.") public Money getGrossSalesMoney() { return grossSalesMoney; } @@ -336,10 +336,10 @@ public OrderLineItem totalTaxMoney(Money totalTaxMoney) { } /** - * The total tax amount of money to collect for the line item. + * The total tax amount of money to collect for the line item. This field is read-only. * @return totalTaxMoney **/ - @ApiModelProperty(value = "The total tax amount of money to collect for the line item.") + @ApiModelProperty(value = "The total tax amount of money to collect for the line item. This field is read-only.") public Money getTotalTaxMoney() { return totalTaxMoney; } @@ -354,10 +354,10 @@ public OrderLineItem totalDiscountMoney(Money totalDiscountMoney) { } /** - * The total discount amount of money to collect for the line item. + * The total discount amount of money to collect for the line item. This field is read-only. * @return totalDiscountMoney **/ - @ApiModelProperty(value = "The total discount amount of money to collect for the line item.") + @ApiModelProperty(value = "The total discount amount of money to collect for the line item. This field is read-only.") public Money getTotalDiscountMoney() { return totalDiscountMoney; } @@ -372,10 +372,10 @@ public OrderLineItem totalMoney(Money totalMoney) { } /** - * The total amount of money to collect for this line item. + * The total amount of money to collect for this line item. This field is read-only. * @return totalMoney **/ - @ApiModelProperty(value = "The total amount of money to collect for this line item.") + @ApiModelProperty(value = "The total amount of money to collect for this line item. This field is read-only.") public Money getTotalMoney() { return totalMoney; } diff --git a/src/main/java/com/squareup/connect/models/OrderLineItemDiscount.java b/src/main/java/com/squareup/connect/models/OrderLineItemDiscount.java index 7e2bc4a..762a6eb 100644 --- a/src/main/java/com/squareup/connect/models/OrderLineItemDiscount.java +++ b/src/main/java/com/squareup/connect/models/OrderLineItemDiscount.java @@ -125,10 +125,10 @@ public OrderLineItemDiscount uid(String uid) { } /** - * The discount's Unique identifier, unique only within this order. This field is read-only. + * Unique ID that identifies the discount only within this order. This field is read-only. * @return uid **/ - @ApiModelProperty(value = "The discount's Unique identifier, unique only within this order. This field is read-only.") + @ApiModelProperty(value = "Unique ID that identifies the discount only within this order. This field is read-only.") public String getUid() { return uid; } diff --git a/src/main/java/com/squareup/connect/models/OrderLineItemModifier.java b/src/main/java/com/squareup/connect/models/OrderLineItemModifier.java index 6825509..20bc342 100644 --- a/src/main/java/com/squareup/connect/models/OrderLineItemModifier.java +++ b/src/main/java/com/squareup/connect/models/OrderLineItemModifier.java @@ -48,10 +48,10 @@ public OrderLineItemModifier uid(String uid) { } /** - * The modifier's Unique identifier, unique only within this order. This field is read-only. + * Unique ID that identifies the modifier only within this order. This field is read-only. * @return uid **/ - @ApiModelProperty(value = "The modifier's Unique identifier, unique only within this order. This field is read-only.") + @ApiModelProperty(value = "Unique ID that identifies the modifier only within this order. This field is read-only.") public String getUid() { return uid; } diff --git a/src/main/java/com/squareup/connect/models/OrderLineItemTax.java b/src/main/java/com/squareup/connect/models/OrderLineItemTax.java index 5456679..95e9ac6 100644 --- a/src/main/java/com/squareup/connect/models/OrderLineItemTax.java +++ b/src/main/java/com/squareup/connect/models/OrderLineItemTax.java @@ -118,10 +118,10 @@ public OrderLineItemTax uid(String uid) { } /** - * The tax's Unique identifier, unique only within this order. This field is read-only. + * Unique ID that identifies the tax only within this order. This field is read-only. * @return uid **/ - @ApiModelProperty(value = "The tax's Unique identifier, unique only within this order. This field is read-only.") + @ApiModelProperty(value = "Unique ID that identifies the tax only within this order. This field is read-only.") public String getUid() { return uid; } diff --git a/src/main/java/com/squareup/connect/models/OrderReturn.java b/src/main/java/com/squareup/connect/models/OrderReturn.java index bf40c49..130a583 100644 --- a/src/main/java/com/squareup/connect/models/OrderReturn.java +++ b/src/main/java/com/squareup/connect/models/OrderReturn.java @@ -20,6 +20,7 @@ import com.squareup.connect.models.OrderMoneyAmounts; import com.squareup.connect.models.OrderReturnDiscount; import com.squareup.connect.models.OrderReturnLineItem; +import com.squareup.connect.models.OrderReturnServiceCharge; import com.squareup.connect.models.OrderReturnTax; import com.squareup.connect.models.OrderRoundingAdjustment; import io.swagger.annotations.ApiModel; @@ -42,6 +43,9 @@ public class OrderReturn { @JsonProperty("return_line_items") private List returnLineItems = new ArrayList(); + @JsonProperty("return_service_charges") + private List returnServiceCharges = new ArrayList(); + @JsonProperty("return_taxes") private List returnTaxes = new ArrayList(); @@ -60,10 +64,10 @@ public OrderReturn uid(String uid) { } /** - * The return's Unique identifier, unique only within this order. This field is read-only. + * Unique ID that identifies the return only within this order. This field is read-only. * @return uid **/ - @ApiModelProperty(value = "The return's Unique identifier, unique only within this order. This field is read-only.") + @ApiModelProperty(value = "Unique ID that identifies the return only within this order. This field is read-only.") public String getUid() { return uid; } @@ -113,6 +117,29 @@ public void setReturnLineItems(List returnLineItems) { this.returnLineItems = returnLineItems; } + public OrderReturn returnServiceCharges(List returnServiceCharges) { + this.returnServiceCharges = returnServiceCharges; + return this; + } + + public OrderReturn addReturnServiceChargesItem(OrderReturnServiceCharge returnServiceChargesItem) { + this.returnServiceCharges.add(returnServiceChargesItem); + return this; + } + + /** + * Collection of service charges which are being returned. This field is read-only. + * @return returnServiceCharges + **/ + @ApiModelProperty(value = "Collection of service charges which are being returned. This field is read-only.") + public List getReturnServiceCharges() { + return returnServiceCharges; + } + + public void setReturnServiceCharges(List returnServiceCharges) { + this.returnServiceCharges = returnServiceCharges; + } + public OrderReturn returnTaxes(List returnTaxes) { this.returnTaxes = returnTaxes; return this; @@ -208,6 +235,7 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.uid, orderReturn.uid) && Objects.equals(this.sourceOrderId, orderReturn.sourceOrderId) && Objects.equals(this.returnLineItems, orderReturn.returnLineItems) && + Objects.equals(this.returnServiceCharges, orderReturn.returnServiceCharges) && Objects.equals(this.returnTaxes, orderReturn.returnTaxes) && Objects.equals(this.returnDiscounts, orderReturn.returnDiscounts) && Objects.equals(this.roundingAdjustment, orderReturn.roundingAdjustment) && @@ -216,7 +244,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(uid, sourceOrderId, returnLineItems, returnTaxes, returnDiscounts, roundingAdjustment, returnAmounts); + return Objects.hash(uid, sourceOrderId, returnLineItems, returnServiceCharges, returnTaxes, returnDiscounts, roundingAdjustment, returnAmounts); } @@ -228,6 +256,7 @@ public String toString() { sb.append(" uid: ").append(toIndentedString(uid)).append("\n"); sb.append(" sourceOrderId: ").append(toIndentedString(sourceOrderId)).append("\n"); sb.append(" returnLineItems: ").append(toIndentedString(returnLineItems)).append("\n"); + sb.append(" returnServiceCharges: ").append(toIndentedString(returnServiceCharges)).append("\n"); sb.append(" returnTaxes: ").append(toIndentedString(returnTaxes)).append("\n"); sb.append(" returnDiscounts: ").append(toIndentedString(returnDiscounts)).append("\n"); sb.append(" roundingAdjustment: ").append(toIndentedString(roundingAdjustment)).append("\n"); diff --git a/src/main/java/com/squareup/connect/models/OrderReturnDiscount.java b/src/main/java/com/squareup/connect/models/OrderReturnDiscount.java index 629a328..4cdf920 100644 --- a/src/main/java/com/squareup/connect/models/OrderReturnDiscount.java +++ b/src/main/java/com/squareup/connect/models/OrderReturnDiscount.java @@ -128,10 +128,10 @@ public OrderReturnDiscount uid(String uid) { } /** - * The return discount's Unique identifier, unique only within this order. + * Unique ID that identifies the return discount only within this order. This field is read-only. * @return uid **/ - @ApiModelProperty(value = "The return discount's Unique identifier, unique only within this order.") + @ApiModelProperty(value = "Unique ID that identifies the return discount only within this order. This field is read-only.") public String getUid() { return uid; } diff --git a/src/main/java/com/squareup/connect/models/OrderReturnLineItem.java b/src/main/java/com/squareup/connect/models/OrderReturnLineItem.java index be92e87..d7529ef 100644 --- a/src/main/java/com/squareup/connect/models/OrderReturnLineItem.java +++ b/src/main/java/com/squareup/connect/models/OrderReturnLineItem.java @@ -339,10 +339,10 @@ public OrderReturnLineItem grossReturnMoney(Money grossReturnMoney) { } /** - * The gross return amount of money calculated as (item base price + modifiers price) * quantity. + * The gross return amount of money calculated as (item base price + modifiers price) * quantity. This field is read-only. * @return grossReturnMoney **/ - @ApiModelProperty(value = "The gross return amount of money calculated as (item base price + modifiers price) * quantity.") + @ApiModelProperty(value = "The gross return amount of money calculated as (item base price + modifiers price) * quantity. This field is read-only.") public Money getGrossReturnMoney() { return grossReturnMoney; } @@ -357,10 +357,10 @@ public OrderReturnLineItem totalTaxMoney(Money totalTaxMoney) { } /** - * The total tax amount of money to return for the line item. + * The total tax amount of money to return for the line item. This field is read-only. * @return totalTaxMoney **/ - @ApiModelProperty(value = "The total tax amount of money to return for the line item.") + @ApiModelProperty(value = "The total tax amount of money to return for the line item. This field is read-only.") public Money getTotalTaxMoney() { return totalTaxMoney; } @@ -375,10 +375,10 @@ public OrderReturnLineItem totalDiscountMoney(Money totalDiscountMoney) { } /** - * The total discount amount of money to return for the line item. + * The total discount amount of money to return for the line item. This field is read-only. * @return totalDiscountMoney **/ - @ApiModelProperty(value = "The total discount amount of money to return for the line item.") + @ApiModelProperty(value = "The total discount amount of money to return for the line item. This field is read-only.") public Money getTotalDiscountMoney() { return totalDiscountMoney; } @@ -393,10 +393,10 @@ public OrderReturnLineItem totalMoney(Money totalMoney) { } /** - * The total amount of money to return for this line item. + * The total amount of money to return for this line item. This field is read-only. * @return totalMoney **/ - @ApiModelProperty(value = "The total amount of money to return for this line item.") + @ApiModelProperty(value = "The total amount of money to return for this line item. This field is read-only.") public Money getTotalMoney() { return totalMoney; } diff --git a/src/main/java/com/squareup/connect/models/OrderReturnLineItemModifier.java b/src/main/java/com/squareup/connect/models/OrderReturnLineItemModifier.java index a50c8fb..d3ef734 100644 --- a/src/main/java/com/squareup/connect/models/OrderReturnLineItemModifier.java +++ b/src/main/java/com/squareup/connect/models/OrderReturnLineItemModifier.java @@ -51,10 +51,10 @@ public OrderReturnLineItemModifier uid(String uid) { } /** - * The return modifier's Unique identifier, unique only within this order + * Unique ID that identifies the return modifier only within this order. This field is read-only. * @return uid **/ - @ApiModelProperty(value = "The return modifier's Unique identifier, unique only within this order") + @ApiModelProperty(value = "Unique ID that identifies the return modifier only within this order. This field is read-only.") public String getUid() { return uid; } diff --git a/src/main/java/com/squareup/connect/models/OrderReturnServiceCharge.java b/src/main/java/com/squareup/connect/models/OrderReturnServiceCharge.java new file mode 100644 index 0000000..98fbe45 --- /dev/null +++ b/src/main/java/com/squareup/connect/models/OrderReturnServiceCharge.java @@ -0,0 +1,383 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.squareup.connect.models.Money; +import com.squareup.connect.models.OrderReturnTax; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * The service charge applied to the original order. + */ +@ApiModel(description = "The service charge applied to the original order.") + +public class OrderReturnServiceCharge { + @JsonProperty("uid") + private String uid = null; + + @JsonProperty("source_service_charge_uid") + private String sourceServiceChargeUid = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("catalog_object_id") + private String catalogObjectId = null; + + @JsonProperty("percentage") + private String percentage = null; + + @JsonProperty("amount_money") + private Money amountMoney = null; + + @JsonProperty("applied_money") + private Money appliedMoney = null; + + @JsonProperty("total_money") + private Money totalMoney = null; + + @JsonProperty("total_tax_money") + private Money totalTaxMoney = null; + + /** + * The calculation phase after which to apply the service charge. This field is read-only. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values + */ + public enum CalculationPhaseEnum { + SUBTOTAL_PHASE("SUBTOTAL_PHASE"), + + TOTAL_PHASE("TOTAL_PHASE"); + + private String value; + + CalculationPhaseEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CalculationPhaseEnum fromValue(String text) { + for (CalculationPhaseEnum b : CalculationPhaseEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("calculation_phase") + private CalculationPhaseEnum calculationPhase = null; + + @JsonProperty("taxable") + private Boolean taxable = null; + + @JsonProperty("return_taxes") + private List returnTaxes = new ArrayList(); + + public OrderReturnServiceCharge uid(String uid) { + this.uid = uid; + return this; + } + + /** + * Unique ID that identifies the return service charge only within this order. This field is read-only. + * @return uid + **/ + @ApiModelProperty(value = "Unique ID that identifies the return service charge only within this order. This field is read-only.") + public String getUid() { + return uid; + } + + public void setUid(String uid) { + this.uid = uid; + } + + public OrderReturnServiceCharge sourceServiceChargeUid(String sourceServiceChargeUid) { + this.sourceServiceChargeUid = sourceServiceChargeUid; + return this; + } + + /** + * `uid` of the Service Charge from the Order which contains the original charge of this service charge, null for unlinked returns. + * @return sourceServiceChargeUid + **/ + @ApiModelProperty(value = "`uid` of the Service Charge from the Order which contains the original charge of this service charge, null for unlinked returns.") + public String getSourceServiceChargeUid() { + return sourceServiceChargeUid; + } + + public void setSourceServiceChargeUid(String sourceServiceChargeUid) { + this.sourceServiceChargeUid = sourceServiceChargeUid; + } + + public OrderReturnServiceCharge name(String name) { + this.name = name; + return this; + } + + /** + * The name of the service charge. + * @return name + **/ + @ApiModelProperty(value = "The name of the service charge.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public OrderReturnServiceCharge catalogObjectId(String catalogObjectId) { + this.catalogObjectId = catalogObjectId; + return this; + } + + /** + * The ID referencing the service charge [CatalogObject](#type-catalogobject) + * @return catalogObjectId + **/ + @ApiModelProperty(value = "The ID referencing the service charge [CatalogObject](#type-catalogobject)") + public String getCatalogObjectId() { + return catalogObjectId; + } + + public void setCatalogObjectId(String catalogObjectId) { + this.catalogObjectId = catalogObjectId; + } + + public OrderReturnServiceCharge percentage(String percentage) { + this.percentage = percentage; + return this; + } + + /** + * The percentage of the service charge, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. Exactly one of percentage or amount_money should be set. + * @return percentage + **/ + @ApiModelProperty(value = "The percentage of the service charge, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. Exactly one of percentage or amount_money should be set.") + public String getPercentage() { + return percentage; + } + + public void setPercentage(String percentage) { + this.percentage = percentage; + } + + public OrderReturnServiceCharge amountMoney(Money amountMoney) { + this.amountMoney = amountMoney; + return this; + } + + /** + * The amount of a non-percentage based service charge. Exactly one of percentage or amount_money should be set. + * @return amountMoney + **/ + @ApiModelProperty(value = "The amount of a non-percentage based service charge. Exactly one of percentage or amount_money should be set.") + public Money getAmountMoney() { + return amountMoney; + } + + public void setAmountMoney(Money amountMoney) { + this.amountMoney = amountMoney; + } + + public OrderReturnServiceCharge appliedMoney(Money appliedMoney) { + this.appliedMoney = appliedMoney; + return this; + } + + /** + * The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only. + * @return appliedMoney + **/ + @ApiModelProperty(value = "The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only.") + public Money getAppliedMoney() { + return appliedMoney; + } + + public void setAppliedMoney(Money appliedMoney) { + this.appliedMoney = appliedMoney; + } + + public OrderReturnServiceCharge totalMoney(Money totalMoney) { + this.totalMoney = totalMoney; + return this; + } + + /** + * The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only. + * @return totalMoney + **/ + @ApiModelProperty(value = "The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only.") + public Money getTotalMoney() { + return totalMoney; + } + + public void setTotalMoney(Money totalMoney) { + this.totalMoney = totalMoney; + } + + public OrderReturnServiceCharge totalTaxMoney(Money totalTaxMoney) { + this.totalTaxMoney = totalTaxMoney; + return this; + } + + /** + * The total amount of tax money to collect for the service charge. This field is read-only. + * @return totalTaxMoney + **/ + @ApiModelProperty(value = "The total amount of tax money to collect for the service charge. This field is read-only.") + public Money getTotalTaxMoney() { + return totalTaxMoney; + } + + public void setTotalTaxMoney(Money totalTaxMoney) { + this.totalTaxMoney = totalTaxMoney; + } + + public OrderReturnServiceCharge calculationPhase(CalculationPhaseEnum calculationPhase) { + this.calculationPhase = calculationPhase; + return this; + } + + /** + * The calculation phase after which to apply the service charge. This field is read-only. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values + * @return calculationPhase + **/ + @ApiModelProperty(value = "The calculation phase after which to apply the service charge. This field is read-only. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values") + public CalculationPhaseEnum getCalculationPhase() { + return calculationPhase; + } + + public void setCalculationPhase(CalculationPhaseEnum calculationPhase) { + this.calculationPhase = calculationPhase; + } + + public OrderReturnServiceCharge taxable(Boolean taxable) { + this.taxable = taxable; + return this; + } + + /** + * Indicates whether the surcharge can be taxed. Service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. + * @return taxable + **/ + @ApiModelProperty(value = "Indicates whether the surcharge can be taxed. Service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable.") + public Boolean getTaxable() { + return taxable; + } + + public void setTaxable(Boolean taxable) { + this.taxable = taxable; + } + + public OrderReturnServiceCharge returnTaxes(List returnTaxes) { + this.returnTaxes = returnTaxes; + return this; + } + + public OrderReturnServiceCharge addReturnTaxesItem(OrderReturnTax returnTaxesItem) { + this.returnTaxes.add(returnTaxesItem); + return this; + } + + /** + * The taxes which apply to the service charge. Return-level taxes apply by default to service charge calculated in the `SUBTOTAL_PHASE` if the service charge is marked as taxable. + * @return returnTaxes + **/ + @ApiModelProperty(value = "The taxes which apply to the service charge. Return-level taxes apply by default to service charge calculated in the `SUBTOTAL_PHASE` if the service charge is marked as taxable.") + public List getReturnTaxes() { + return returnTaxes; + } + + public void setReturnTaxes(List returnTaxes) { + this.returnTaxes = returnTaxes; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderReturnServiceCharge orderReturnServiceCharge = (OrderReturnServiceCharge) o; + return Objects.equals(this.uid, orderReturnServiceCharge.uid) && + Objects.equals(this.sourceServiceChargeUid, orderReturnServiceCharge.sourceServiceChargeUid) && + Objects.equals(this.name, orderReturnServiceCharge.name) && + Objects.equals(this.catalogObjectId, orderReturnServiceCharge.catalogObjectId) && + Objects.equals(this.percentage, orderReturnServiceCharge.percentage) && + Objects.equals(this.amountMoney, orderReturnServiceCharge.amountMoney) && + Objects.equals(this.appliedMoney, orderReturnServiceCharge.appliedMoney) && + Objects.equals(this.totalMoney, orderReturnServiceCharge.totalMoney) && + Objects.equals(this.totalTaxMoney, orderReturnServiceCharge.totalTaxMoney) && + Objects.equals(this.calculationPhase, orderReturnServiceCharge.calculationPhase) && + Objects.equals(this.taxable, orderReturnServiceCharge.taxable) && + Objects.equals(this.returnTaxes, orderReturnServiceCharge.returnTaxes); + } + + @Override + public int hashCode() { + return Objects.hash(uid, sourceServiceChargeUid, name, catalogObjectId, percentage, amountMoney, appliedMoney, totalMoney, totalTaxMoney, calculationPhase, taxable, returnTaxes); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderReturnServiceCharge {\n"); + + sb.append(" uid: ").append(toIndentedString(uid)).append("\n"); + sb.append(" sourceServiceChargeUid: ").append(toIndentedString(sourceServiceChargeUid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" catalogObjectId: ").append(toIndentedString(catalogObjectId)).append("\n"); + sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); + sb.append(" amountMoney: ").append(toIndentedString(amountMoney)).append("\n"); + sb.append(" appliedMoney: ").append(toIndentedString(appliedMoney)).append("\n"); + sb.append(" totalMoney: ").append(toIndentedString(totalMoney)).append("\n"); + sb.append(" totalTaxMoney: ").append(toIndentedString(totalTaxMoney)).append("\n"); + sb.append(" calculationPhase: ").append(toIndentedString(calculationPhase)).append("\n"); + sb.append(" taxable: ").append(toIndentedString(taxable)).append("\n"); + sb.append(" returnTaxes: ").append(toIndentedString(returnTaxes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/squareup/connect/models/OrderReturnTax.java b/src/main/java/com/squareup/connect/models/OrderReturnTax.java index ff71b00..27e89cf 100644 --- a/src/main/java/com/squareup/connect/models/OrderReturnTax.java +++ b/src/main/java/com/squareup/connect/models/OrderReturnTax.java @@ -121,10 +121,10 @@ public OrderReturnTax uid(String uid) { } /** - * The return tax's Unique identifier, unique only within this order. + * Unique ID that identifies the return tax only within this order. This field is read-only. * @return uid **/ - @ApiModelProperty(value = "The return tax's Unique identifier, unique only within this order.") + @ApiModelProperty(value = "Unique ID that identifies the return tax only within this order. This field is read-only.") public String getUid() { return uid; } diff --git a/src/main/java/com/squareup/connect/models/OrderRoundingAdjustment.java b/src/main/java/com/squareup/connect/models/OrderRoundingAdjustment.java index 79d49fe..b6ab77d 100644 --- a/src/main/java/com/squareup/connect/models/OrderRoundingAdjustment.java +++ b/src/main/java/com/squareup/connect/models/OrderRoundingAdjustment.java @@ -42,10 +42,10 @@ public OrderRoundingAdjustment uid(String uid) { } /** - * The rounding adjustment's Unique identifier, unique only within this order. This field is read-only. + * Unique ID that identifies the rounding adjustment only within this order. This field is read-only. * @return uid **/ - @ApiModelProperty(value = "The rounding adjustment's Unique identifier, unique only within this order. This field is read-only.") + @ApiModelProperty(value = "Unique ID that identifies the rounding adjustment only within this order. This field is read-only.") public String getUid() { return uid; } diff --git a/src/main/java/com/squareup/connect/models/OrderServiceCharge.java b/src/main/java/com/squareup/connect/models/OrderServiceCharge.java new file mode 100644 index 0000000..2c8f5c2 --- /dev/null +++ b/src/main/java/com/squareup/connect/models/OrderServiceCharge.java @@ -0,0 +1,360 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.squareup.connect.models.Money; +import com.squareup.connect.models.OrderLineItemTax; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * Represents a service charge applied to an order. + */ +@ApiModel(description = "Represents a service charge applied to an order.") + +public class OrderServiceCharge { + @JsonProperty("uid") + private String uid = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("catalog_object_id") + private String catalogObjectId = null; + + @JsonProperty("percentage") + private String percentage = null; + + @JsonProperty("amount_money") + private Money amountMoney = null; + + @JsonProperty("applied_money") + private Money appliedMoney = null; + + @JsonProperty("total_money") + private Money totalMoney = null; + + @JsonProperty("total_tax_money") + private Money totalTaxMoney = null; + + /** + * The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values + */ + public enum CalculationPhaseEnum { + SUBTOTAL_PHASE("SUBTOTAL_PHASE"), + + TOTAL_PHASE("TOTAL_PHASE"); + + private String value; + + CalculationPhaseEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CalculationPhaseEnum fromValue(String text) { + for (CalculationPhaseEnum b : CalculationPhaseEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("calculation_phase") + private CalculationPhaseEnum calculationPhase = null; + + @JsonProperty("taxable") + private Boolean taxable = null; + + @JsonProperty("taxes") + private List taxes = new ArrayList(); + + public OrderServiceCharge uid(String uid) { + this.uid = uid; + return this; + } + + /** + * Unique ID that identifies the service charge only within this order. This field is read-only. + * @return uid + **/ + @ApiModelProperty(value = "Unique ID that identifies the service charge only within this order. This field is read-only.") + public String getUid() { + return uid; + } + + public void setUid(String uid) { + this.uid = uid; + } + + public OrderServiceCharge name(String name) { + this.name = name; + return this; + } + + /** + * The name of the service charge. + * @return name + **/ + @ApiModelProperty(value = "The name of the service charge.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public OrderServiceCharge catalogObjectId(String catalogObjectId) { + this.catalogObjectId = catalogObjectId; + return this; + } + + /** + * The catalog object ID referencing the service charge [CatalogObject](#type-catalogobject). + * @return catalogObjectId + **/ + @ApiModelProperty(value = "The catalog object ID referencing the service charge [CatalogObject](#type-catalogobject).") + public String getCatalogObjectId() { + return catalogObjectId; + } + + public void setCatalogObjectId(String catalogObjectId) { + this.catalogObjectId = catalogObjectId; + } + + public OrderServiceCharge percentage(String percentage) { + this.percentage = percentage; + return this; + } + + /** + * The service charge percentage, as a string representation of a decimal number. For example, `7.25` indicates 7.25% Exactly one of `percentage` or `amount_money` should be set. + * @return percentage + **/ + @ApiModelProperty(value = "The service charge percentage, as a string representation of a decimal number. For example, `7.25` indicates 7.25% Exactly one of `percentage` or `amount_money` should be set.") + public String getPercentage() { + return percentage; + } + + public void setPercentage(String percentage) { + this.percentage = percentage; + } + + public OrderServiceCharge amountMoney(Money amountMoney) { + this.amountMoney = amountMoney; + return this; + } + + /** + * The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set. + * @return amountMoney + **/ + @ApiModelProperty(value = "The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set.") + public Money getAmountMoney() { + return amountMoney; + } + + public void setAmountMoney(Money amountMoney) { + this.amountMoney = amountMoney; + } + + public OrderServiceCharge appliedMoney(Money appliedMoney) { + this.appliedMoney = appliedMoney; + return this; + } + + /** + * The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only. + * @return appliedMoney + **/ + @ApiModelProperty(value = "The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only.") + public Money getAppliedMoney() { + return appliedMoney; + } + + public void setAppliedMoney(Money appliedMoney) { + this.appliedMoney = appliedMoney; + } + + public OrderServiceCharge totalMoney(Money totalMoney) { + this.totalMoney = totalMoney; + return this; + } + + /** + * The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only. + * @return totalMoney + **/ + @ApiModelProperty(value = "The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only.") + public Money getTotalMoney() { + return totalMoney; + } + + public void setTotalMoney(Money totalMoney) { + this.totalMoney = totalMoney; + } + + public OrderServiceCharge totalTaxMoney(Money totalTaxMoney) { + this.totalTaxMoney = totalTaxMoney; + return this; + } + + /** + * The total amount of tax money to collect for the service charge. This field is read-only. + * @return totalTaxMoney + **/ + @ApiModelProperty(value = "The total amount of tax money to collect for the service charge. This field is read-only.") + public Money getTotalTaxMoney() { + return totalTaxMoney; + } + + public void setTotalTaxMoney(Money totalTaxMoney) { + this.totalTaxMoney = totalTaxMoney; + } + + public OrderServiceCharge calculationPhase(CalculationPhaseEnum calculationPhase) { + this.calculationPhase = calculationPhase; + return this; + } + + /** + * The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values + * @return calculationPhase + **/ + @ApiModelProperty(value = "The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values") + public CalculationPhaseEnum getCalculationPhase() { + return calculationPhase; + } + + public void setCalculationPhase(CalculationPhaseEnum calculationPhase) { + this.calculationPhase = calculationPhase; + } + + public OrderServiceCharge taxable(Boolean taxable) { + this.taxable = taxable; + return this; + } + + /** + * Indicates whether the service charge can be taxed. If set to `true`, any order-level taxes will automatically apply to this service charge. Note that service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. + * @return taxable + **/ + @ApiModelProperty(value = "Indicates whether the service charge can be taxed. If set to `true`, any order-level taxes will automatically apply to this service charge. Note that service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable.") + public Boolean getTaxable() { + return taxable; + } + + public void setTaxable(Boolean taxable) { + this.taxable = taxable; + } + + public OrderServiceCharge taxes(List taxes) { + this.taxes = taxes; + return this; + } + + public OrderServiceCharge addTaxesItem(OrderLineItemTax taxesItem) { + this.taxes.add(taxesItem); + return this; + } + + /** + * Taxes applied to the service charge. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. + * @return taxes + **/ + @ApiModelProperty(value = "Taxes applied to the service charge. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`.") + public List getTaxes() { + return taxes; + } + + public void setTaxes(List taxes) { + this.taxes = taxes; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderServiceCharge orderServiceCharge = (OrderServiceCharge) o; + return Objects.equals(this.uid, orderServiceCharge.uid) && + Objects.equals(this.name, orderServiceCharge.name) && + Objects.equals(this.catalogObjectId, orderServiceCharge.catalogObjectId) && + Objects.equals(this.percentage, orderServiceCharge.percentage) && + Objects.equals(this.amountMoney, orderServiceCharge.amountMoney) && + Objects.equals(this.appliedMoney, orderServiceCharge.appliedMoney) && + Objects.equals(this.totalMoney, orderServiceCharge.totalMoney) && + Objects.equals(this.totalTaxMoney, orderServiceCharge.totalTaxMoney) && + Objects.equals(this.calculationPhase, orderServiceCharge.calculationPhase) && + Objects.equals(this.taxable, orderServiceCharge.taxable) && + Objects.equals(this.taxes, orderServiceCharge.taxes); + } + + @Override + public int hashCode() { + return Objects.hash(uid, name, catalogObjectId, percentage, amountMoney, appliedMoney, totalMoney, totalTaxMoney, calculationPhase, taxable, taxes); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderServiceCharge {\n"); + + sb.append(" uid: ").append(toIndentedString(uid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" catalogObjectId: ").append(toIndentedString(catalogObjectId)).append("\n"); + sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); + sb.append(" amountMoney: ").append(toIndentedString(amountMoney)).append("\n"); + sb.append(" appliedMoney: ").append(toIndentedString(appliedMoney)).append("\n"); + sb.append(" totalMoney: ").append(toIndentedString(totalMoney)).append("\n"); + sb.append(" totalTaxMoney: ").append(toIndentedString(totalTaxMoney)).append("\n"); + sb.append(" calculationPhase: ").append(toIndentedString(calculationPhase)).append("\n"); + sb.append(" taxable: ").append(toIndentedString(taxable)).append("\n"); + sb.append(" taxes: ").append(toIndentedString(taxes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/squareup/connect/models/OrderServiceChargeCalculationPhase.java b/src/main/java/com/squareup/connect/models/OrderServiceChargeCalculationPhase.java new file mode 100644 index 0000000..901e57b --- /dev/null +++ b/src/main/java/com/squareup/connect/models/OrderServiceChargeCalculationPhase.java @@ -0,0 +1,51 @@ +/* + * 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; + +/** + * Represents a phase in the process of calculating order totals. Service charges will be applied after the phase indicated. [Read more about how order totals are calculated.](/orders-api/how-it-works#how-totals-are-calculated) + */ +public enum OrderServiceChargeCalculationPhase { + + SUBTOTAL_PHASE("SUBTOTAL_PHASE"), + + TOTAL_PHASE("TOTAL_PHASE"); + + private String value; + + OrderServiceChargeCalculationPhase(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrderServiceChargeCalculationPhase fromValue(String text) { + for (OrderServiceChargeCalculationPhase b : OrderServiceChargeCalculationPhase.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} + diff --git a/src/main/java/com/squareup/connect/models/RenewTokenResponse.java b/src/main/java/com/squareup/connect/models/RenewTokenResponse.java index fb7a516..cd3dfee 100644 --- a/src/main/java/com/squareup/connect/models/RenewTokenResponse.java +++ b/src/main/java/com/squareup/connect/models/RenewTokenResponse.java @@ -122,10 +122,10 @@ public RenewTokenResponse subscriptionId(String subscriptionId) { } /** - * The ID of the merchant [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) associated with the authorization. Only present if the merchant signed up for a subscription during authorization. + * __LEGACY FIELD__. The ID of the merchant subscription associated with the authorization. Only present if the merchant signed up for a subscription during authorization. * @return subscriptionId **/ - @ApiModelProperty(value = "The ID of the merchant [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) associated with the authorization. Only present if the merchant signed up for a subscription during authorization.") + @ApiModelProperty(value = "__LEGACY FIELD__. The ID of the merchant subscription associated with the authorization. Only present if the merchant signed up for a subscription during authorization.") public String getSubscriptionId() { return subscriptionId; } @@ -140,10 +140,10 @@ public RenewTokenResponse planId(String planId) { } /** - * The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. + * __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. * @return planId **/ - @ApiModelProperty(value = "The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.") + @ApiModelProperty(value = "__LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.") public String getPlanId() { return planId; } diff --git a/src/main/java/com/squareup/connect/models/RetrieveCatalogObjectRequest.java b/src/main/java/com/squareup/connect/models/RetrieveCatalogObjectRequest.java index 2b18217..9f6c4e0 100644 --- a/src/main/java/com/squareup/connect/models/RetrieveCatalogObjectRequest.java +++ b/src/main/java/com/squareup/connect/models/RetrieveCatalogObjectRequest.java @@ -35,10 +35,10 @@ public RetrieveCatalogObjectRequest includeRelatedObjects(Boolean includeRelated } /** - * If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` + * If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` * @return includeRelatedObjects **/ - @ApiModelProperty(value = "If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false`") + @ApiModelProperty(value = "If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false`") public Boolean getIncludeRelatedObjects() { return includeRelatedObjects; } diff --git a/src/main/java/com/squareup/connect/models/SearchCatalogObjectsRequest.java b/src/main/java/com/squareup/connect/models/SearchCatalogObjectsRequest.java index 803782a..ac179f4 100644 --- a/src/main/java/com/squareup/connect/models/SearchCatalogObjectsRequest.java +++ b/src/main/java/com/squareup/connect/models/SearchCatalogObjectsRequest.java @@ -50,7 +50,13 @@ public enum ObjectTypesEnum { MODIFIER_LIST("MODIFIER_LIST"), - MODIFIER("MODIFIER"); + MODIFIER("MODIFIER"), + + PRICING_RULE("PRICING_RULE"), + + PRODUCT_SET("PRODUCT_SET"), + + TIME_PERIOD("TIME_PERIOD"); private String value; @@ -157,10 +163,10 @@ public SearchCatalogObjectsRequest includeRelatedObjects(Boolean includeRelatedO } /** - * If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. + * If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. * @return includeRelatedObjects **/ - @ApiModelProperty(value = "If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response.") + @ApiModelProperty(value = "If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response.") public Boolean getIncludeRelatedObjects() { return includeRelatedObjects; } diff --git a/src/main/java/com/squareup/connect/models/StandardUnitDescription.java b/src/main/java/com/squareup/connect/models/StandardUnitDescription.java new file mode 100644 index 0000000..32b4247 --- /dev/null +++ b/src/main/java/com/squareup/connect/models/StandardUnitDescription.java @@ -0,0 +1,138 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.squareup.connect.models.MeasurementUnit; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Contains the name and abbreviation for standard measurement unit. + */ +@ApiModel(description = "Contains the name and abbreviation for standard measurement unit.") + +public class StandardUnitDescription { + @JsonProperty("unit") + private MeasurementUnit unit = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("abbreviation") + private String abbreviation = null; + + public StandardUnitDescription unit(MeasurementUnit unit) { + this.unit = unit; + return this; + } + + /** + * Identifies the measurement unit being described. + * @return unit + **/ + @ApiModelProperty(value = "Identifies the measurement unit being described.") + public MeasurementUnit getUnit() { + return unit; + } + + public void setUnit(MeasurementUnit unit) { + this.unit = unit; + } + + public StandardUnitDescription name(String name) { + this.name = name; + return this; + } + + /** + * Display name of the measurement unit. For example, 'Pound'. + * @return name + **/ + @ApiModelProperty(value = "Display name of the measurement unit. For example, 'Pound'.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public StandardUnitDescription abbreviation(String abbreviation) { + this.abbreviation = abbreviation; + return this; + } + + /** + * Abbreviation for the measurement unit. For example, 'lb'. + * @return abbreviation + **/ + @ApiModelProperty(value = "Abbreviation for the measurement unit. For example, 'lb'.") + public String getAbbreviation() { + return abbreviation; + } + + public void setAbbreviation(String abbreviation) { + this.abbreviation = abbreviation; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StandardUnitDescription standardUnitDescription = (StandardUnitDescription) o; + return Objects.equals(this.unit, standardUnitDescription.unit) && + Objects.equals(this.name, standardUnitDescription.name) && + Objects.equals(this.abbreviation, standardUnitDescription.abbreviation); + } + + @Override + public int hashCode() { + return Objects.hash(unit, name, abbreviation); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StandardUnitDescription {\n"); + + sb.append(" unit: ").append(toIndentedString(unit)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" abbreviation: ").append(toIndentedString(abbreviation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/squareup/connect/models/StandardUnitDescriptionGroup.java b/src/main/java/com/squareup/connect/models/StandardUnitDescriptionGroup.java new file mode 100644 index 0000000..6f96de1 --- /dev/null +++ b/src/main/java/com/squareup/connect/models/StandardUnitDescriptionGroup.java @@ -0,0 +1,122 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.squareup.connect.models.StandardUnitDescription; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * Group of standard measurement units. + */ +@ApiModel(description = "Group of standard measurement units.") + +public class StandardUnitDescriptionGroup { + @JsonProperty("standard_unit_descriptions") + private List standardUnitDescriptions = new ArrayList(); + + @JsonProperty("language_code") + private String languageCode = null; + + public StandardUnitDescriptionGroup standardUnitDescriptions(List standardUnitDescriptions) { + this.standardUnitDescriptions = standardUnitDescriptions; + return this; + } + + public StandardUnitDescriptionGroup addStandardUnitDescriptionsItem(StandardUnitDescription standardUnitDescriptionsItem) { + this.standardUnitDescriptions.add(standardUnitDescriptionsItem); + return this; + } + + /** + * List of measurement units in this description group. + * @return standardUnitDescriptions + **/ + @ApiModelProperty(value = "List of measurement units in this description group.") + public List getStandardUnitDescriptions() { + return standardUnitDescriptions; + } + + public void setStandardUnitDescriptions(List standardUnitDescriptions) { + this.standardUnitDescriptions = standardUnitDescriptions; + } + + public StandardUnitDescriptionGroup languageCode(String languageCode) { + this.languageCode = languageCode; + return this; + } + + /** + * IETF language tag. + * @return languageCode + **/ + @ApiModelProperty(value = "IETF language tag.") + public String getLanguageCode() { + return languageCode; + } + + public void setLanguageCode(String languageCode) { + this.languageCode = languageCode; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StandardUnitDescriptionGroup standardUnitDescriptionGroup = (StandardUnitDescriptionGroup) o; + return Objects.equals(this.standardUnitDescriptions, standardUnitDescriptionGroup.standardUnitDescriptions) && + Objects.equals(this.languageCode, standardUnitDescriptionGroup.languageCode); + } + + @Override + public int hashCode() { + return Objects.hash(standardUnitDescriptions, languageCode); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StandardUnitDescriptionGroup {\n"); + + sb.append(" standardUnitDescriptions: ").append(toIndentedString(standardUnitDescriptions)).append("\n"); + sb.append(" languageCode: ").append(toIndentedString(languageCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} +