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

Commit 6970107

Browse files
authored
Merge pull request #68 from square/release/2.20190508.0
Release 2.20190508.0
2 parents aa5566a + f98eaf2 commit 6970107

File tree

118 files changed

+6474
-206
lines changed

Some content is hidden

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

118 files changed

+6474
-206
lines changed

CHANGES.md

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

3+
## Version 2.20190508.0 (2019-05-08)
4+
5+
## Details
6+
7+
* **Beta functionality**: Orders API — support for fractional quantities,
8+
expanded metadata, and embedded information on payments, refunds, and returns.
9+
* **Beta functionality**: Inventory API — support for fractional quantities.
10+
* **New functionality**: `Locations.business_hours` — read-only field with
11+
information about the business hours at a particular location.
12+
313
## Version 2.20190410.1 (2019-04-24)
414

515
## Details

README.md

+34-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Add this dependency to your project's POM:
1818
<dependency>
1919
<groupId>com.squareup</groupId>
2020
<artifactId>connect</artifactId>
21-
<version>2.20190410.1</version>
21+
<version>2.20190508.0</version>
2222
<scope>compile</scope>
2323
</dependency>
2424
```
@@ -28,7 +28,7 @@ Add this dependency to your project's POM:
2828
Add this dependency to your project's build file:
2929

3030
```groovy
31-
compile "com.squareup:connect:2.20190410.1"
31+
compile "com.squareup:connect:2.20190508.0"
3232
```
3333

3434
### Option 3: Build and Install locally
@@ -70,7 +70,7 @@ At first generate the JAR by executing:
7070

7171
Then manually install the following JARs:
7272

73-
* target/connect-2.20190410.1.jar
73+
* target/connect-2.20190508.0.jar
7474
* target/lib/*.jar
7575

7676
## Getting Started
@@ -170,6 +170,7 @@ Class | Method | HTTP request | Description
170170
*OAuthApi* | [**revokeToken**](docs/OAuthApi.md#revokeToken) | **POST** /oauth2/revoke | RevokeToken
171171
*OrdersApi* | [**batchRetrieveOrders**](docs/OrdersApi.md#batchRetrieveOrders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders
172172
*OrdersApi* | [**createOrder**](docs/OrdersApi.md#createOrder) | **POST** /v2/locations/{location_id}/orders | CreateOrder
173+
*OrdersApi* | [**searchOrders**](docs/OrdersApi.md#searchOrders) | **POST** /v2/orders/search | SearchOrders
173174
*ReportingApi* | [**listAdditionalRecipientReceivableRefunds**](docs/ReportingApi.md#listAdditionalRecipientReceivableRefunds) | **GET** /v2/locations/{location_id}/additional-recipient-receivable-refunds | ListAdditionalRecipientReceivableRefunds
174175
*ReportingApi* | [**listAdditionalRecipientReceivables**](docs/ReportingApi.md#listAdditionalRecipientReceivables) | **GET** /v2/locations/{location_id}/additional-recipient-receivables | ListAdditionalRecipientReceivables
175176
*TransactionsApi* | [**captureTransaction**](docs/TransactionsApi.md#captureTransaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/capture | CaptureTransaction
@@ -271,6 +272,8 @@ Class | Method | HTTP request | Description
271272
- [BatchUpsertCatalogObjectsRequest](docs/BatchUpsertCatalogObjectsRequest.md)
272273
- [BatchUpsertCatalogObjectsResponse](docs/BatchUpsertCatalogObjectsResponse.md)
273274
- [BreakType](docs/BreakType.md)
275+
- [BusinessHours](docs/BusinessHours.md)
276+
- [BusinessHoursPeriod](docs/BusinessHoursPeriod.md)
274277
- [CaptureTransactionRequest](docs/CaptureTransactionRequest.md)
275278
- [CaptureTransactionResponse](docs/CaptureTransactionResponse.md)
276279
- [Card](docs/Card.md)
@@ -342,6 +345,7 @@ Class | Method | HTTP request | Description
342345
- [CustomerSort](docs/CustomerSort.md)
343346
- [CustomerSortField](docs/CustomerSortField.md)
344347
- [DateRange](docs/DateRange.md)
348+
- [DayOfWeek](docs/DayOfWeek.md)
345349
- [DeleteBreakTypeRequest](docs/DeleteBreakTypeRequest.md)
346350
- [DeleteBreakTypeResponse](docs/DeleteBreakTypeResponse.md)
347351
- [DeleteCatalogObjectRequest](docs/DeleteCatalogObjectRequest.md)
@@ -400,11 +404,18 @@ Class | Method | HTTP request | Description
400404
- [LocationCapability](docs/LocationCapability.md)
401405
- [LocationStatus](docs/LocationStatus.md)
402406
- [LocationType](docs/LocationType.md)
407+
- [MeasurementUnit](docs/MeasurementUnit.md)
408+
- [MeasurementUnitArea](docs/MeasurementUnitArea.md)
409+
- [MeasurementUnitCustom](docs/MeasurementUnitCustom.md)
410+
- [MeasurementUnitLength](docs/MeasurementUnitLength.md)
411+
- [MeasurementUnitVolume](docs/MeasurementUnitVolume.md)
412+
- [MeasurementUnitWeight](docs/MeasurementUnitWeight.md)
403413
- [ModelBreak](docs/ModelBreak.md)
404414
- [Money](docs/Money.md)
405415
- [ObtainTokenRequest](docs/ObtainTokenRequest.md)
406416
- [ObtainTokenResponse](docs/ObtainTokenResponse.md)
407417
- [Order](docs/Order.md)
418+
- [OrderEntry](docs/OrderEntry.md)
408419
- [OrderFulfillment](docs/OrderFulfillment.md)
409420
- [OrderFulfillmentPickupDetails](docs/OrderFulfillmentPickupDetails.md)
410421
- [OrderFulfillmentPickupDetailsScheduleType](docs/OrderFulfillmentPickupDetailsScheduleType.md)
@@ -419,7 +430,16 @@ Class | Method | HTTP request | Description
419430
- [OrderLineItemTax](docs/OrderLineItemTax.md)
420431
- [OrderLineItemTaxScope](docs/OrderLineItemTaxScope.md)
421432
- [OrderLineItemTaxType](docs/OrderLineItemTaxType.md)
433+
- [OrderMoneyAmounts](docs/OrderMoneyAmounts.md)
434+
- [OrderQuantityUnit](docs/OrderQuantityUnit.md)
435+
- [OrderReturn](docs/OrderReturn.md)
436+
- [OrderReturnDiscount](docs/OrderReturnDiscount.md)
437+
- [OrderReturnLineItem](docs/OrderReturnLineItem.md)
438+
- [OrderReturnLineItemModifier](docs/OrderReturnLineItemModifier.md)
439+
- [OrderReturnTax](docs/OrderReturnTax.md)
440+
- [OrderRoundingAdjustment](docs/OrderRoundingAdjustment.md)
422441
- [OrderSource](docs/OrderSource.md)
442+
- [OrderState](docs/OrderState.md)
423443
- [Product](docs/Product.md)
424444
- [Refund](docs/Refund.md)
425445
- [RefundStatus](docs/RefundStatus.md)
@@ -450,6 +470,17 @@ Class | Method | HTTP request | Description
450470
- [SearchCatalogObjectsResponse](docs/SearchCatalogObjectsResponse.md)
451471
- [SearchCustomersRequest](docs/SearchCustomersRequest.md)
452472
- [SearchCustomersResponse](docs/SearchCustomersResponse.md)
473+
- [SearchOrdersCustomerFilter](docs/SearchOrdersCustomerFilter.md)
474+
- [SearchOrdersDateTimeFilter](docs/SearchOrdersDateTimeFilter.md)
475+
- [SearchOrdersFilter](docs/SearchOrdersFilter.md)
476+
- [SearchOrdersFulfillmentFilter](docs/SearchOrdersFulfillmentFilter.md)
477+
- [SearchOrdersQuery](docs/SearchOrdersQuery.md)
478+
- [SearchOrdersRequest](docs/SearchOrdersRequest.md)
479+
- [SearchOrdersResponse](docs/SearchOrdersResponse.md)
480+
- [SearchOrdersSort](docs/SearchOrdersSort.md)
481+
- [SearchOrdersSortField](docs/SearchOrdersSortField.md)
482+
- [SearchOrdersSourceFilter](docs/SearchOrdersSourceFilter.md)
483+
- [SearchOrdersStateFilter](docs/SearchOrdersStateFilter.md)
453484
- [SearchShiftsRequest](docs/SearchShiftsRequest.md)
454485
- [SearchShiftsResponse](docs/SearchShiftsResponse.md)
455486
- [Shift](docs/Shift.md)

build.gradle

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

44
group = 'com.squareup'
5-
version = '2.20190410.1'
5+
version = '2.20190508.0'
66

77
buildscript {
88
repositories {

docs/BatchRetrieveOrdersResponse.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
1111
**orders** | [**List&lt;Order&gt;**](Order.md) | The requested orders. This will omit any requested orders that do not exist or are not charged. | [optional]
1212
**errors** | [**List&lt;Error&gt;**](Error.md) | Any errors that occurred during the request. | [optional]
13+
**unconvertibleTransactionIds** | **List&lt;String&gt;** | List of transaction ids within the requested set of ids that encountered transformation issues when being converted to an Order. | [optional]
1314

1415

1516

docs/BusinessHours.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
# BusinessHours
3+
4+
### Description
5+
6+
Represents the hours of operation for a business location.
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**periods** | [**List&lt;BusinessHoursPeriod&gt;**](BusinessHoursPeriod.md) | The list of time periods during which the business is open. There may be at most 10 periods per day. | [optional]
12+
13+
14+

docs/BusinessHoursPeriod.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# BusinessHoursPeriod
3+
4+
### Description
5+
6+
Represents a period of time during which a business location is open.
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**dayOfWeek** | [**DayOfWeekEnum**](#DayOfWeekEnum) | The day of week for this time period. See [DayOfWeek](#type-dayofweek) for possible values | [optional]
12+
**startLocalTime** | **String** | The start time of a business hours period, specified in local time using partial-time RFC3339 format. | [optional]
13+
**endLocalTime** | **String** | The end time of a business hours period, specified in local time using partial-time RFC3339 format. | [optional]
14+
15+
16+
<a name="DayOfWeekEnum"></a>
17+
## Enum: DayOfWeekEnum
18+
Name | Value
19+
---- | -----
20+
SUN | &quot;SUN&quot;
21+
MON | &quot;MON&quot;
22+
TUE | &quot;TUE&quot;
23+
WED | &quot;WED&quot;
24+
THU | &quot;THU&quot;
25+
FRI | &quot;FRI&quot;
26+
SAT | &quot;SAT&quot;
27+
28+
29+

docs/ChargeRequest.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Name | Type | Description | Notes
1616
**referenceId** | **String** | An optional ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters. | [optional]
1717
**note** | **String** | An optional note to associate with the transaction. This value cannot exceed 60 characters. | [optional]
1818
**customerId** | **String** | The ID of the customer to associate this transaction with. This field is required if you provide a value for &#x60;customer_card_id&#x60;, and optional otherwise. | [optional]
19-
**billingAddress** | [**Address**](Address.md) | The buyer&#39;s billing address. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor &#x60;shipping_address&#x60; is provided. | [optional]
20-
**shippingAddress** | [**Address**](Address.md) | The buyer&#39;s shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor &#x60;billing_address&#x60; is provided. | [optional]
21-
**buyerEmailAddress** | **String** | The buyer&#39;s email address, if available. This value is optional, but this transaction is ineligible for chargeback protection if it is not provided. | [optional]
19+
**billingAddress** | [**Address**](Address.md) | The buyer&#39;s billing address. | [optional]
20+
**shippingAddress** | [**Address**](Address.md) | The buyer&#39;s shipping address, if available. | [optional]
21+
**buyerEmailAddress** | **String** | The buyer&#39;s email address, if available. | [optional]
2222
**orderId** | **String** | The ID of the order to associate with this transaction. If you provide this value, the &#x60;amount_money&#x60; value of your request must __exactly match__ the value of the order&#39;s &#x60;total_money&#x60; field. | [optional]
2323
**additionalRecipients** | [**List&lt;AdditionalRecipient&gt;**](AdditionalRecipient.md) | The basic primitive of multi-party transaction. The value is optional. The transaction facilitated by you can be split from here. If you provide this value, the &#x60;amount_money&#x60; value in your additional_recipients must not be more than 90% of the &#x60;amount_money&#x60; value in the charge request. The &#x60;location_id&#x60; must be the valid location of the app owner merchant. This field requires the &#x60;PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS&#x60; OAuth permission. This field is currently not supported in sandbox. | [optional]
2424

docs/CreateOrderRequest.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
1111
**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]
1212
**idempotencyKey** | **String** | A value you specify that uniquely identifies this order among orders you&#39;ve created. If you&#39;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]
13-
**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]
13+
**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]
1414
**lineItems** | [**List&lt;CreateOrderRequestLineItem&gt;**](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]
1515
**taxes** | [**List&lt;CreateOrderRequestTax&gt;**](CreateOrderRequestTax.md) | __Deprecated__: Please set the taxes on the nested [order](#type-order) field instead. The taxes to include on the order. | [optional]
1616
**discounts** | [**List&lt;CreateOrderRequestDiscount&gt;**](CreateOrderRequestDiscount.md) | __Deprecated__: Please set the discounts on the nested [order](#type-order) field instead. The discounts to include on the order. | [optional]

docs/CreateOrderRequestTax.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
1111
**catalogObjectId** | **String** | Only used for catalog taxes. The catalog object ID of an existing [CatalogTax](#type-catalogtax). Do not provide a value for this field if you provide values in other fields for an ad hoc tax. | [optional]
1212
**name** | **String** | Only used for ad hoc taxes. The tax&#39;s name. Do not provide a value for this field if you set &#x60;catalog_object_id&#x60;. | [optional]
13-
**type** | [**TypeEnum**](#TypeEnum) | Only used for ad hoc taxes. Indicates the calculation method used to apply the line item tax. Default: &#x60;ADDITIVE&#x60;; See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional]
13+
**type** | [**TypeEnum**](#TypeEnum) | Only used for ad hoc taxes. Indicates the calculation method used to apply the line item tax. Default: &#x60;ADDITIVE&#x60;; See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional]
1414
**percentage** | **String** | Only used for ad hoc taxes. The percentage of the tax, as a string representation of a decimal number. A value of &#x60;7.25&#x60; corresponds to a percentage of 7.25%. This value range between 0.0 up to 100.0 | [optional]
1515

1616

docs/DayOfWeek.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
# DayOfWeek
3+
4+
## Enum
5+
6+
7+
* `SUN` (value: `"SUN"`)
8+
9+
* `MON` (value: `"MON"`)
10+
11+
* `TUE` (value: `"TUE"`)
12+
13+
* `WED` (value: `"WED"`)
14+
15+
* `THU` (value: `"THU"`)
16+
17+
* `FRI` (value: `"FRI"`)
18+
19+
* `SAT` (value: `"SAT"`)
20+
21+
22+

docs/Error.md

+2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ INVALID_EMAIL_ADDRESS | &quot;INVALID_EMAIL_ADDRESS&quot;
103103
INVALID_PHONE_NUMBER | &quot;INVALID_PHONE_NUMBER&quot;
104104
CHECKOUT_EXPIRED | &quot;CHECKOUT_EXPIRED&quot;
105105
BAD_CERTIFICATE | &quot;BAD_CERTIFICATE&quot;
106+
INVALID_SQUARE_VERSION_FORMAT | &quot;INVALID_SQUARE_VERSION_FORMAT&quot;
107+
API_VERSION_INCOMPATIBLE | &quot;API_VERSION_INCOMPATIBLE&quot;
106108
CARD_DECLINED | &quot;CARD_DECLINED&quot;
107109
VERIFY_CVV_FAILURE | &quot;VERIFY_CVV_FAILURE&quot;
108110
VERIFY_AVS_FAILURE | &quot;VERIFY_AVS_FAILURE&quot;

docs/ErrorCode.md

+4
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@
150150

151151
* `BAD_CERTIFICATE` (value: `"BAD_CERTIFICATE"`)
152152

153+
* `INVALID_SQUARE_VERSION_FORMAT` (value: `"INVALID_SQUARE_VERSION_FORMAT"`)
154+
155+
* `API_VERSION_INCOMPATIBLE` (value: `"API_VERSION_INCOMPATIBLE"`)
156+
153157
* `CARD_DECLINED` (value: `"CARD_DECLINED"`)
154158

155159
* `VERIFY_CVV_FAILURE` (value: `"VERIFY_CVV_FAILURE"`)

docs/InventoryAdjustment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Name | Type | Description | Notes
1515
**locationId** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
1616
**catalogObjectId** | **String** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional]
1717
**catalogObjectType** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the &#x60;ITEM_VARIATION&#x60; type. | [optional]
18-
**quantity** | **String** | The number of items affected by the adjustment as a decimal string. Fractional quantities are not supported. | [optional]
18+
**quantity** | **String** | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, &#x60;2.5&#x60; will become &#x60;2&#x60;, and &#x60;-2.5&#x60; will become &#x60;-3&#x60;. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional]
1919
**totalPriceMoney** | [**Money**](Money.md) | The read-only total price paid for goods associated with the adjustment. Present if and only if &#x60;to_state&#x60; is &#x60;SOLD&#x60;. Always non-negative. | [optional]
2020
**occurredAt** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the adjustment took place. For write actions, the &#x60;occurred_at&#x60; timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional]
2121
**createdAt** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the adjustment. | [optional]

docs/InventoryCount.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
### Description
55

6-
Represents the estimated quantity of items in a particular state at a particular location based on the known history of physical counts and inventory adjustments.
6+
Represents Square's estimated quantity of items in a particular state at a particular location based on the known history of physical counts and inventory adjustments
77

88
## Properties
99
Name | Type | Description | Notes
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**catalogObjectType** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the &#x60;ITEM_VARIATION&#x60; type. | [optional]
1313
**state** | [**StateEnum**](#StateEnum) | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional]
1414
**locationId** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional]
15-
**quantity** | **String** | The number of items in the count as a decimal string. Fractional quantities are not supported. | [optional]
15+
**quantity** | **String** | The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, &#x60;2.5&#x60; will become &#x60;2&#x60;, and &#x60;-2.5&#x60; will become &#x60;-3&#x60;. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional]
1616
**calculatedAt** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the most recent physical count or adjustment that had an affect on the estimated count. | [optional]
1717

1818

0 commit comments

Comments
 (0)