diff --git a/CHANGES.md b/CHANGES.md index d52d275..27de47d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,15 @@ # Change Log +## Version 2.20190508.0 (2019-05-08) + +## Details + +* **Beta functionality**: Orders API — support for fractional quantities, + expanded metadata, and embedded information on payments, refunds, and returns. +* **Beta functionality**: Inventory API — support for fractional quantities. +* **New functionality**: `Locations.business_hours` — read-only field with + information about the business hours at a particular location. + ## Version 2.20190410.1 (2019-04-24) ## Details diff --git a/README.md b/README.md index ad1958e..316ab59 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ Class | Method | HTTP request | Description *SquareConnect.OAuthApi* | [**revokeToken**](docs/OAuthApi.md#revokeToken) | **POST** /oauth2/revoke | RevokeToken *SquareConnect.OrdersApi* | [**batchRetrieveOrders**](docs/OrdersApi.md#batchRetrieveOrders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders *SquareConnect.OrdersApi* | [**createOrder**](docs/OrdersApi.md#createOrder) | **POST** /v2/locations/{location_id}/orders | CreateOrder +*SquareConnect.OrdersApi* | [**searchOrders**](docs/OrdersApi.md#searchOrders) | **POST** /v2/orders/search | SearchOrders *SquareConnect.ReportingApi* | [**listAdditionalRecipientReceivableRefunds**](docs/ReportingApi.md#listAdditionalRecipientReceivableRefunds) | **GET** /v2/locations/{location_id}/additional-recipient-receivable-refunds | ListAdditionalRecipientReceivableRefunds *SquareConnect.ReportingApi* | [**listAdditionalRecipientReceivables**](docs/ReportingApi.md#listAdditionalRecipientReceivables) | **GET** /v2/locations/{location_id}/additional-recipient-receivables | ListAdditionalRecipientReceivables *SquareConnect.TransactionsApi* | [**captureTransaction**](docs/TransactionsApi.md#captureTransaction) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/capture | CaptureTransaction @@ -196,6 +197,8 @@ Class | Method | HTTP request | Description - [SquareConnect.BatchUpsertCatalogObjectsRequest](docs/BatchUpsertCatalogObjectsRequest.md) - [SquareConnect.BatchUpsertCatalogObjectsResponse](docs/BatchUpsertCatalogObjectsResponse.md) - [SquareConnect.BreakType](docs/BreakType.md) + - [SquareConnect.BusinessHours](docs/BusinessHours.md) + - [SquareConnect.BusinessHoursPeriod](docs/BusinessHoursPeriod.md) - [SquareConnect.CaptureTransactionRequest](docs/CaptureTransactionRequest.md) - [SquareConnect.CaptureTransactionResponse](docs/CaptureTransactionResponse.md) - [SquareConnect.Card](docs/Card.md) @@ -267,6 +270,7 @@ Class | Method | HTTP request | Description - [SquareConnect.CustomerSort](docs/CustomerSort.md) - [SquareConnect.CustomerSortField](docs/CustomerSortField.md) - [SquareConnect.DateRange](docs/DateRange.md) + - [SquareConnect.DayOfWeek](docs/DayOfWeek.md) - [SquareConnect.DeleteBreakTypeRequest](docs/DeleteBreakTypeRequest.md) - [SquareConnect.DeleteBreakTypeResponse](docs/DeleteBreakTypeResponse.md) - [SquareConnect.DeleteCatalogObjectRequest](docs/DeleteCatalogObjectRequest.md) @@ -325,11 +329,18 @@ Class | Method | HTTP request | Description - [SquareConnect.LocationCapability](docs/LocationCapability.md) - [SquareConnect.LocationStatus](docs/LocationStatus.md) - [SquareConnect.LocationType](docs/LocationType.md) + - [SquareConnect.MeasurementUnit](docs/MeasurementUnit.md) + - [SquareConnect.MeasurementUnitArea](docs/MeasurementUnitArea.md) + - [SquareConnect.MeasurementUnitCustom](docs/MeasurementUnitCustom.md) + - [SquareConnect.MeasurementUnitLength](docs/MeasurementUnitLength.md) + - [SquareConnect.MeasurementUnitVolume](docs/MeasurementUnitVolume.md) + - [SquareConnect.MeasurementUnitWeight](docs/MeasurementUnitWeight.md) - [SquareConnect.ModelBreak](docs/ModelBreak.md) - [SquareConnect.Money](docs/Money.md) - [SquareConnect.ObtainTokenRequest](docs/ObtainTokenRequest.md) - [SquareConnect.ObtainTokenResponse](docs/ObtainTokenResponse.md) - [SquareConnect.Order](docs/Order.md) + - [SquareConnect.OrderEntry](docs/OrderEntry.md) - [SquareConnect.OrderFulfillment](docs/OrderFulfillment.md) - [SquareConnect.OrderFulfillmentPickupDetails](docs/OrderFulfillmentPickupDetails.md) - [SquareConnect.OrderFulfillmentPickupDetailsScheduleType](docs/OrderFulfillmentPickupDetailsScheduleType.md) @@ -344,7 +355,16 @@ Class | Method | HTTP request | Description - [SquareConnect.OrderLineItemTax](docs/OrderLineItemTax.md) - [SquareConnect.OrderLineItemTaxScope](docs/OrderLineItemTaxScope.md) - [SquareConnect.OrderLineItemTaxType](docs/OrderLineItemTaxType.md) + - [SquareConnect.OrderMoneyAmounts](docs/OrderMoneyAmounts.md) + - [SquareConnect.OrderQuantityUnit](docs/OrderQuantityUnit.md) + - [SquareConnect.OrderReturn](docs/OrderReturn.md) + - [SquareConnect.OrderReturnDiscount](docs/OrderReturnDiscount.md) + - [SquareConnect.OrderReturnLineItem](docs/OrderReturnLineItem.md) + - [SquareConnect.OrderReturnLineItemModifier](docs/OrderReturnLineItemModifier.md) + - [SquareConnect.OrderReturnTax](docs/OrderReturnTax.md) + - [SquareConnect.OrderRoundingAdjustment](docs/OrderRoundingAdjustment.md) - [SquareConnect.OrderSource](docs/OrderSource.md) + - [SquareConnect.OrderState](docs/OrderState.md) - [SquareConnect.Product](docs/Product.md) - [SquareConnect.Refund](docs/Refund.md) - [SquareConnect.RefundStatus](docs/RefundStatus.md) @@ -375,6 +395,17 @@ Class | Method | HTTP request | Description - [SquareConnect.SearchCatalogObjectsResponse](docs/SearchCatalogObjectsResponse.md) - [SquareConnect.SearchCustomersRequest](docs/SearchCustomersRequest.md) - [SquareConnect.SearchCustomersResponse](docs/SearchCustomersResponse.md) + - [SquareConnect.SearchOrdersCustomerFilter](docs/SearchOrdersCustomerFilter.md) + - [SquareConnect.SearchOrdersDateTimeFilter](docs/SearchOrdersDateTimeFilter.md) + - [SquareConnect.SearchOrdersFilter](docs/SearchOrdersFilter.md) + - [SquareConnect.SearchOrdersFulfillmentFilter](docs/SearchOrdersFulfillmentFilter.md) + - [SquareConnect.SearchOrdersQuery](docs/SearchOrdersQuery.md) + - [SquareConnect.SearchOrdersRequest](docs/SearchOrdersRequest.md) + - [SquareConnect.SearchOrdersResponse](docs/SearchOrdersResponse.md) + - [SquareConnect.SearchOrdersSort](docs/SearchOrdersSort.md) + - [SquareConnect.SearchOrdersSortField](docs/SearchOrdersSortField.md) + - [SquareConnect.SearchOrdersSourceFilter](docs/SearchOrdersSourceFilter.md) + - [SquareConnect.SearchOrdersStateFilter](docs/SearchOrdersStateFilter.md) - [SquareConnect.SearchShiftsRequest](docs/SearchShiftsRequest.md) - [SquareConnect.SearchShiftsResponse](docs/SearchShiftsResponse.md) - [SquareConnect.Shift](docs/Shift.md) diff --git a/docs/BatchRetrieveOrdersResponse.md b/docs/BatchRetrieveOrdersResponse.md index e332429..2be8d84 100644 --- a/docs/BatchRetrieveOrdersResponse.md +++ b/docs/BatchRetrieveOrdersResponse.md @@ -9,5 +9,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **orders** | [**[Order]**](Order.md) | The requested orders. This will omit any requested orders that do not exist or are not charged. | [optional] **errors** | [**[Error]**](Error.md) | Any errors that occurred during the request. | [optional] +**unconvertible_transaction_ids** | **[String]** | List of transaction ids within the requested set of ids that encountered transformation issues when being converted to an Order. | [optional] diff --git a/docs/BusinessHours.md b/docs/BusinessHours.md new file mode 100644 index 0000000..a785a51 --- /dev/null +++ b/docs/BusinessHours.md @@ -0,0 +1,12 @@ +# SquareConnect.BusinessHours + +### Description + + Represents the hours of operation for a business location. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**periods** | [**[BusinessHoursPeriod]**](BusinessHoursPeriod.md) | The list of time periods during which the business is open. There may be at most 10 periods per day. | [optional] + + diff --git a/docs/BusinessHoursPeriod.md b/docs/BusinessHoursPeriod.md new file mode 100644 index 0000000..eea66bd --- /dev/null +++ b/docs/BusinessHoursPeriod.md @@ -0,0 +1,35 @@ +# SquareConnect.BusinessHoursPeriod + +### Description + + Represents a period of time during which a business location is open. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**day_of_week** | **String** | The day of week for this time period. See [DayOfWeek](#type-dayofweek) for possible values | [optional] +**start_local_time** | **String** | The start time of a business hours period, specified in local time using partial-time RFC3339 format. | [optional] +**end_local_time** | **String** | The end time of a business hours period, specified in local time using partial-time RFC3339 format. | [optional] + + + +## Enum: DayOfWeekEnum + + +* `SUN` (value: `"SUN"`) + +* `MON` (value: `"MON"`) + +* `TUE` (value: `"TUE"`) + +* `WED` (value: `"WED"`) + +* `THU` (value: `"THU"`) + +* `FRI` (value: `"FRI"`) + +* `SAT` (value: `"SAT"`) + + + + diff --git a/docs/ChargeRequest.md b/docs/ChargeRequest.md index 9b0a61b..601b9d0 100644 --- a/docs/ChargeRequest.md +++ b/docs/ChargeRequest.md @@ -15,9 +15,9 @@ Name | Type | Description | Notes **reference_id** | **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] **note** | **String** | An optional note to associate with the transaction. This value cannot exceed 60 characters. | [optional] **customer_id** | **String** | The ID of the customer to associate this transaction with. This field is required if you provide a value for `customer_card_id`, and optional otherwise. | [optional] -**billing_address** | [**Address**](Address.md) | The buyer's billing address. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `shipping_address` is provided. | [optional] -**shipping_address** | [**Address**](Address.md) | The buyer's shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `billing_address` is provided. | [optional] -**buyer_email_address** | **String** | The buyer's email address, if available. This value is optional, but this transaction is ineligible for chargeback protection if it is not provided. | [optional] +**billing_address** | [**Address**](Address.md) | The buyer's billing address. | [optional] +**shipping_address** | [**Address**](Address.md) | The buyer's shipping address, if available. | [optional] +**buyer_email_address** | **String** | The buyer's email address, if available. | [optional] **order_id** | **String** | The ID of the order to associate with this transaction. If you provide this value, the `amount_money` value of your request must __exactly match__ the value of the order's `total_money` field. | [optional] **additional_recipients** | [**[AdditionalRecipient]**](AdditionalRecipient.md) | The basic primitive of multi-party transaction. The value is optional. The transaction facilitated by you can be split from here. If you provide this value, the `amount_money` value in your additional_recipients must not be more than 90% of the `amount_money` value in the charge request. The `location_id` must be the valid location of the app owner merchant. This field requires the `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission. This field is currently not supported in sandbox. | [optional] diff --git a/docs/CreateOrderRequest.md b/docs/CreateOrderRequest.md index e070eea..b72620c 100644 --- a/docs/CreateOrderRequest.md +++ b/docs/CreateOrderRequest.md @@ -9,7 +9,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] **idempotency_key** | **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] -**reference_id** | **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] +**reference_id** | **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] **line_items** | [**[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** | [**[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** | [**[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/CreateOrderRequestTax.md b/docs/CreateOrderRequestTax.md index 4825445..7d7a3c9 100644 --- a/docs/CreateOrderRequestTax.md +++ b/docs/CreateOrderRequestTax.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **catalog_object_id** | **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] **name** | **String** | Only used for ad hoc taxes. The tax's name. Do not provide a value for this field if you set `catalog_object_id`. | [optional] -**type** | **String** | Only used for ad hoc taxes. Indicates the calculation method used to apply the line item tax. Default: `ADDITIVE`; See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional] +**type** | **String** | Only used for ad hoc taxes. Indicates the calculation method used to apply the line item tax. Default: `ADDITIVE`; See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional] **percentage** | **String** | Only used for ad hoc taxes. The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. This value range between 0.0 up to 100.0 | [optional] diff --git a/docs/DayOfWeek.md b/docs/DayOfWeek.md new file mode 100644 index 0000000..1b5129d --- /dev/null +++ b/docs/DayOfWeek.md @@ -0,0 +1,20 @@ +# SquareConnect.DayOfWeek + +## Enum + + +* `SUN` (value: `"SUN"`) + +* `MON` (value: `"MON"`) + +* `TUE` (value: `"TUE"`) + +* `WED` (value: `"WED"`) + +* `THU` (value: `"THU"`) + +* `FRI` (value: `"FRI"`) + +* `SAT` (value: `"SAT"`) + + diff --git a/docs/Error.md b/docs/Error.md index 47264d6..d51aa69 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -182,6 +182,10 @@ Name | Type | Description | Notes * `BAD_CERTIFICATE` (value: `"BAD_CERTIFICATE"`) +* `INVALID_SQUARE_VERSION_FORMAT` (value: `"INVALID_SQUARE_VERSION_FORMAT"`) + +* `API_VERSION_INCOMPATIBLE` (value: `"API_VERSION_INCOMPATIBLE"`) + * `CARD_DECLINED` (value: `"CARD_DECLINED"`) * `VERIFY_CVV_FAILURE` (value: `"VERIFY_CVV_FAILURE"`) diff --git a/docs/ErrorCode.md b/docs/ErrorCode.md index 57d9105..02020c8 100644 --- a/docs/ErrorCode.md +++ b/docs/ErrorCode.md @@ -149,6 +149,10 @@ * `BAD_CERTIFICATE` (value: `"BAD_CERTIFICATE"`) +* `INVALID_SQUARE_VERSION_FORMAT` (value: `"INVALID_SQUARE_VERSION_FORMAT"`) + +* `API_VERSION_INCOMPATIBLE` (value: `"API_VERSION_INCOMPATIBLE"`) + * `CARD_DECLINED` (value: `"CARD_DECLINED"`) * `VERIFY_CVV_FAILURE` (value: `"VERIFY_CVV_FAILURE"`) diff --git a/docs/InventoryAdjustment.md b/docs/InventoryAdjustment.md index e072ca3..52b6290 100644 --- a/docs/InventoryAdjustment.md +++ b/docs/InventoryAdjustment.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **location_id** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional] **catalog_object_id** | **String** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional] **catalog_object_type** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional] -**quantity** | **String** | The number of items affected by the adjustment as a decimal string. Fractional quantities are not supported. | [optional] +**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, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional] **total_price_money** | [**Money**](Money.md) | The read-only total price paid for goods associated with the adjustment. Present if and only if `to_state` is `SOLD`. Always non-negative. | [optional] **occurred_at** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the adjustment took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional] **created_at** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the adjustment. | [optional] diff --git a/docs/InventoryCount.md b/docs/InventoryCount.md index 256659a..9d1a485 100644 --- a/docs/InventoryCount.md +++ b/docs/InventoryCount.md @@ -2,7 +2,7 @@ ### Description -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. +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 ## Properties Name | Type | Description | Notes @@ -11,7 +11,7 @@ Name | Type | Description | Notes **catalog_object_type** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional] **state** | **String** | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional] **location_id** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional] -**quantity** | **String** | The number of items in the count as a decimal string. Fractional quantities are not supported. | [optional] +**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, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional] **calculated_at** | **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] diff --git a/docs/InventoryPhysicalCount.md b/docs/InventoryPhysicalCount.md index 61b4c84..c02638a 100644 --- a/docs/InventoryPhysicalCount.md +++ b/docs/InventoryPhysicalCount.md @@ -2,7 +2,7 @@ ### Description -Represents a verified (re)count of items in a given state at a specific location. For example, the quantity of items currently on hand at a physical store). +Represents the quantity of an item variation that is physically present at a specific location, verified by a seller or a seller's employee. For example, a physical count might come from an employee counting the item variations on hand or from syncing with an external system. ## Properties Name | Type | Description | Notes @@ -13,7 +13,7 @@ Name | Type | Description | Notes **catalog_object_type** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional] **state** | **String** | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional] **location_id** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional] -**quantity** | **String** | The number of items affected by the physical count as a decimal string. Fractional quantities are not supported. | [optional] +**quantity** | **String** | The number of items affected by the physical 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, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional] **source** | [**SourceApplication**](SourceApplication.md) | Read-only information about the application that submitted the physical count. | [optional] **employee_id** | **String** | The Square ID of the [Employee](#type-employee) responsible for the physical count. | [optional] **occurred_at** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the physical count took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional] diff --git a/docs/InventoryTransfer.md b/docs/InventoryTransfer.md index 5c8bf7d..45d105f 100644 --- a/docs/InventoryTransfer.md +++ b/docs/InventoryTransfer.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **to_location_id** | **String** | The Square ID of the [Location](#type-location) where the related quantity of items were tracked after the transfer. | [optional] **catalog_object_id** | **String** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional] **catalog_object_type** | **String** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked.Tracking is only supported for the `ITEM_VARIATION` type. | [optional] -**quantity** | **String** | The number of items affected by the transfer as a decimal string. Fractional quantities are not supported. | [optional] +**quantity** | **String** | The number of items affected by the transfer 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, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional] **occurred_at** | **String** | A client-generated timestamp in RFC 3339 format that indicates when the transfer took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional] **created_at** | **String** | A read-only timestamp in RFC 3339 format that indicates when Square received the transfer request. | [optional] **source** | [**SourceApplication**](SourceApplication.md) | Read-only information about the application that initiated the inventory transfer. | [optional] diff --git a/docs/Location.md b/docs/Location.md index 286ea06..f04cee0 100644 --- a/docs/Location.md +++ b/docs/Location.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **business_name** | **String** | The location's business_name which is shown to its customers. For example, this is the name printed on its customer's receipts. | [optional] **type** | **String** | 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] **website_url** | **String** | The location's website, as set by the account owner in the Square dashboard. Default: none; only exists if explicitly set. | [optional] +**business_hours** | [**BusinessHours**](BusinessHours.md) | The hours of operation for a business location. Default: none; only exists if explicitly set. | [optional] diff --git a/docs/MeasurementUnit.md b/docs/MeasurementUnit.md new file mode 100644 index 0000000..b5c39d8 --- /dev/null +++ b/docs/MeasurementUnit.md @@ -0,0 +1,110 @@ +# SquareConnect.MeasurementUnit + +### Description + +Represents a unit of measurement to use with a quantity, such as ounces or inches. Exactly one of the following fields are required: `custom_unit`, `area_unit`, `length_unit`, `volume_unit`, and `weight_unit`. The `family` field describes the type of measurement. For example, ounces are in the weight family. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**custom_unit** | [**MeasurementUnitCustom**](MeasurementUnitCustom.md) | A custom unit of measurement defined by the seller using the Point of Sale app or ad-hoc as an order line item. | [optional] +**area_unit** | **String** | Represents a standard area unit. See [MeasurementUnitArea](#type-measurementunitarea) for possible values | [optional] +**length_unit** | **String** | Represents a standard length unit. See [MeasurementUnitLength](#type-measurementunitlength) for possible values | [optional] +**volume_unit** | **String** | Represents a standard volume unit. See [MeasurementUnitVolume](#type-measurementunitvolume) for possible values | [optional] +**weight_unit** | **String** | Represents a standard unit of weight or mass. See [MeasurementUnitWeight](#type-measurementunitweight) for possible values | [optional] + + + +## Enum: AreaUnitEnum + + +* `IMPERIAL_ACRE` (value: `"IMPERIAL_ACRE"`) + +* `IMPERIAL_SQUARE_INCH` (value: `"IMPERIAL_SQUARE_INCH"`) + +* `IMPERIAL_SQUARE_FOOT` (value: `"IMPERIAL_SQUARE_FOOT"`) + +* `IMPERIAL_SQUARE_YARD` (value: `"IMPERIAL_SQUARE_YARD"`) + +* `IMPERIAL_SQUARE_MILE` (value: `"IMPERIAL_SQUARE_MILE"`) + +* `METRIC_SQUARE_CENTIMETER` (value: `"METRIC_SQUARE_CENTIMETER"`) + +* `METRIC_SQUARE_METER` (value: `"METRIC_SQUARE_METER"`) + +* `METRIC_SQUARE_KILOMETER` (value: `"METRIC_SQUARE_KILOMETER"`) + + + + + +## Enum: LengthUnitEnum + + +* `IMPERIAL_INCH` (value: `"IMPERIAL_INCH"`) + +* `IMPERIAL_FOOT` (value: `"IMPERIAL_FOOT"`) + +* `IMPERIAL_YARD` (value: `"IMPERIAL_YARD"`) + +* `IMPERIAL_MILE` (value: `"IMPERIAL_MILE"`) + +* `METRIC_MILLIMETER` (value: `"METRIC_MILLIMETER"`) + +* `METRIC_CENTIMETER` (value: `"METRIC_CENTIMETER"`) + +* `METRIC_METER` (value: `"METRIC_METER"`) + +* `METRIC_KILOMETER` (value: `"METRIC_KILOMETER"`) + + + + + +## Enum: VolumeUnitEnum + + +* `GENERIC_FLUID_OUNCE` (value: `"GENERIC_FLUID_OUNCE"`) + +* `GENERIC_SHOT` (value: `"GENERIC_SHOT"`) + +* `GENERIC_CUP` (value: `"GENERIC_CUP"`) + +* `GENERIC_PINT` (value: `"GENERIC_PINT"`) + +* `GENERIC_QUART` (value: `"GENERIC_QUART"`) + +* `GENERIC_GALLON` (value: `"GENERIC_GALLON"`) + +* `IMPERIAL_CUBIC_INCH` (value: `"IMPERIAL_CUBIC_INCH"`) + +* `IMPERIAL_CUBIC_FOOT` (value: `"IMPERIAL_CUBIC_FOOT"`) + +* `IMPERIAL_CUBIC_YARD` (value: `"IMPERIAL_CUBIC_YARD"`) + +* `METRIC_MILLILITER` (value: `"METRIC_MILLILITER"`) + +* `METRIC_LITER` (value: `"METRIC_LITER"`) + + + + + +## Enum: WeightUnitEnum + + +* `IMPERIAL_WEIGHT_OUNCE` (value: `"IMPERIAL_WEIGHT_OUNCE"`) + +* `IMPERIAL_POUND` (value: `"IMPERIAL_POUND"`) + +* `IMPERIAL_STONE` (value: `"IMPERIAL_STONE"`) + +* `METRIC_MILLIGRAM` (value: `"METRIC_MILLIGRAM"`) + +* `METRIC_GRAM` (value: `"METRIC_GRAM"`) + +* `METRIC_KILOGRAM` (value: `"METRIC_KILOGRAM"`) + + + + diff --git a/docs/MeasurementUnitArea.md b/docs/MeasurementUnitArea.md new file mode 100644 index 0000000..65ba579 --- /dev/null +++ b/docs/MeasurementUnitArea.md @@ -0,0 +1,22 @@ +# SquareConnect.MeasurementUnitArea + +## Enum + + +* `IMPERIAL_ACRE` (value: `"IMPERIAL_ACRE"`) + +* `IMPERIAL_SQUARE_INCH` (value: `"IMPERIAL_SQUARE_INCH"`) + +* `IMPERIAL_SQUARE_FOOT` (value: `"IMPERIAL_SQUARE_FOOT"`) + +* `IMPERIAL_SQUARE_YARD` (value: `"IMPERIAL_SQUARE_YARD"`) + +* `IMPERIAL_SQUARE_MILE` (value: `"IMPERIAL_SQUARE_MILE"`) + +* `METRIC_SQUARE_CENTIMETER` (value: `"METRIC_SQUARE_CENTIMETER"`) + +* `METRIC_SQUARE_METER` (value: `"METRIC_SQUARE_METER"`) + +* `METRIC_SQUARE_KILOMETER` (value: `"METRIC_SQUARE_KILOMETER"`) + + diff --git a/docs/MeasurementUnitCustom.md b/docs/MeasurementUnitCustom.md new file mode 100644 index 0000000..7edae90 --- /dev/null +++ b/docs/MeasurementUnitCustom.md @@ -0,0 +1,13 @@ +# SquareConnect.MeasurementUnitCustom + +### Description + +The information needed to define a custom unit, provided by the seller. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The name of the custom unit, for example \"bushel\". | +**abbreviation** | **String** | The abbreviation of the custom unit, such as \"bsh\" (bushel). This appears in the cart for the Point of Sale app, and in reports. | + + diff --git a/docs/MeasurementUnitLength.md b/docs/MeasurementUnitLength.md new file mode 100644 index 0000000..e6d8296 --- /dev/null +++ b/docs/MeasurementUnitLength.md @@ -0,0 +1,22 @@ +# SquareConnect.MeasurementUnitLength + +## Enum + + +* `IMPERIAL_INCH` (value: `"IMPERIAL_INCH"`) + +* `IMPERIAL_FOOT` (value: `"IMPERIAL_FOOT"`) + +* `IMPERIAL_YARD` (value: `"IMPERIAL_YARD"`) + +* `IMPERIAL_MILE` (value: `"IMPERIAL_MILE"`) + +* `METRIC_MILLIMETER` (value: `"METRIC_MILLIMETER"`) + +* `METRIC_CENTIMETER` (value: `"METRIC_CENTIMETER"`) + +* `METRIC_METER` (value: `"METRIC_METER"`) + +* `METRIC_KILOMETER` (value: `"METRIC_KILOMETER"`) + + diff --git a/docs/MeasurementUnitVolume.md b/docs/MeasurementUnitVolume.md new file mode 100644 index 0000000..827f3a5 --- /dev/null +++ b/docs/MeasurementUnitVolume.md @@ -0,0 +1,28 @@ +# SquareConnect.MeasurementUnitVolume + +## Enum + + +* `GENERIC_FLUID_OUNCE` (value: `"GENERIC_FLUID_OUNCE"`) + +* `GENERIC_SHOT` (value: `"GENERIC_SHOT"`) + +* `GENERIC_CUP` (value: `"GENERIC_CUP"`) + +* `GENERIC_PINT` (value: `"GENERIC_PINT"`) + +* `GENERIC_QUART` (value: `"GENERIC_QUART"`) + +* `GENERIC_GALLON` (value: `"GENERIC_GALLON"`) + +* `IMPERIAL_CUBIC_INCH` (value: `"IMPERIAL_CUBIC_INCH"`) + +* `IMPERIAL_CUBIC_FOOT` (value: `"IMPERIAL_CUBIC_FOOT"`) + +* `IMPERIAL_CUBIC_YARD` (value: `"IMPERIAL_CUBIC_YARD"`) + +* `METRIC_MILLILITER` (value: `"METRIC_MILLILITER"`) + +* `METRIC_LITER` (value: `"METRIC_LITER"`) + + diff --git a/docs/MeasurementUnitWeight.md b/docs/MeasurementUnitWeight.md new file mode 100644 index 0000000..c22f257 --- /dev/null +++ b/docs/MeasurementUnitWeight.md @@ -0,0 +1,18 @@ +# SquareConnect.MeasurementUnitWeight + +## Enum + + +* `IMPERIAL_WEIGHT_OUNCE` (value: `"IMPERIAL_WEIGHT_OUNCE"`) + +* `IMPERIAL_POUND` (value: `"IMPERIAL_POUND"`) + +* `IMPERIAL_STONE` (value: `"IMPERIAL_STONE"`) + +* `METRIC_MILLIGRAM` (value: `"METRIC_MILLIGRAM"`) + +* `METRIC_GRAM` (value: `"METRIC_GRAM"`) + +* `METRIC_KILOGRAM` (value: `"METRIC_KILOGRAM"`) + + diff --git a/docs/Order.md b/docs/Order.md index a8629db..3341163 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -2,7 +2,7 @@ ### Description -Contains all information related to a single order to process with Square, including line items that specify the products to purchase +Contains all information related to a single order to process with Square, including line items that specify the products to purchase. Order objects also include information on any associated tenders, refunds, and returns. All Connect V2 Transactions have all been converted to Orders including all associated itemization data. ## Properties Name | Type | Description | Notes @@ -11,12 +11,36 @@ Name | Type | Description | Notes **location_id** | **String** | The ID of the merchant location this order is associated with. | **reference_id** | **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] +**customer_id** | **String** | The [Customer](#type-customer) ID of the customer associated with the order. | [optional] **line_items** | [**[OrderLineItem]**](OrderLineItem.md) | The line items included in the order. | [optional] **taxes** | [**[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** | [**[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] **fulfillments** | [**[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** | [**[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] +**return_amounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Rollup of returned money amounts. | [optional] +**net_amounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Net money amounts (sale money - return money). | [optional] +**rounding_adjustment** | [**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] +**tenders** | [**[Tender]**](Tender.md) | The Tenders which were used to pay for the Order. This field is read-only. | [optional] +**refunds** | [**[Refund]**](Refund.md) | The Refunds that are part of this Order. This field is read-only. | [optional] +**created_at** | **String** | Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] +**updated_at** | **String** | Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] +**closed_at** | **String** | Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] +**state** | **String** | The current state of the order. `OPEN`,`COMPLETED`,`CANCELED` See [OrderState](#type-orderstate) for possible values | [optional] **total_money** | [**Money**](Money.md) | The total amount of money to collect for the order. | [optional] **total_tax_money** | [**Money**](Money.md) | The total tax amount of money to collect for the order. | [optional] **total_discount_money** | [**Money**](Money.md) | The total discount amount of money to collect for the order. | [optional] + +## Enum: StateEnum + + +* `OPEN` (value: `"OPEN"`) + +* `COMPLETED` (value: `"COMPLETED"`) + +* `CANCELED` (value: `"CANCELED"`) + + + + diff --git a/docs/OrderEntry.md b/docs/OrderEntry.md new file mode 100644 index 0000000..538d764 --- /dev/null +++ b/docs/OrderEntry.md @@ -0,0 +1,13 @@ +# SquareConnect.OrderEntry + +### Description + +A lightweight description of an [Order](#type-order) that is returned when `returned_entries` is true on a [SearchOrderRequest](#type-searchorderrequest) + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_id** | **String** | The id of the Order | [optional] +**location_id** | **String** | The location id the Order belongs to. | [optional] + + diff --git a/docs/OrderLineItem.md b/docs/OrderLineItem.md index a0033ee..dd4f787 100644 --- a/docs/OrderLineItem.md +++ b/docs/OrderLineItem.md @@ -7,8 +7,10 @@ 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] **name** | **String** | The name of the line item. | [optional] -**quantity** | **String** | The quantity purchased, as a string representation of a number. This string must have a positive integer value. | +**quantity** | **String** | The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities). | +**quantity_unit** | [**OrderQuantityUnit**](OrderQuantityUnit.md) | The unit and precision that this line item's quantity is measured in. | [optional] **note** | **String** | The note of the line item. | [optional] **catalog_object_id** | **String** | The [CatalogItemVariation](#type-catalogitemvariation) id applied to this line item. | [optional] **variation_name** | **String** | The name of the variation applied to this line item. | [optional] @@ -16,7 +18,8 @@ Name | Type | Description | Notes **taxes** | [**[OrderLineItemTax]**](OrderLineItemTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any order-level taxes apportioned to this item. When creating an Order, set your item-level taxes in this list. | [optional] **discounts** | [**[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] **base_price_money** | [**Money**](Money.md) | The base price for a single unit of the line item. | [optional] -**gross_sales_money** | [**Money**](Money.md) | The gross sales amount of money calculated as (item base price + modifiers price) * quantity. | [optional] +**variation_total_price_money** | [**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] +**gross_sales_money** | [**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] **total_tax_money** | [**Money**](Money.md) | The total tax amount of money to collect for the line item. | [optional] **total_discount_money** | [**Money**](Money.md) | The total discount amount of money to collect for the line item. | [optional] **total_money** | [**Money**](Money.md) | The total amount of money to collect for this line item. | [optional] diff --git a/docs/OrderLineItemDiscount.md b/docs/OrderLineItemDiscount.md index 8ecb19a..c305478 100644 --- a/docs/OrderLineItemDiscount.md +++ b/docs/OrderLineItemDiscount.md @@ -7,10 +7,11 @@ 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] **catalog_object_id** | **String** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional] **name** | **String** | The discount's name. | [optional] **type** | **String** | 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] -**percentage** | **String** | The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount. | [optional] +**percentage** | **String** | The percentage of the discount, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount. | [optional] **amount_money** | [**Money**](Money.md) | The total monetary amount of the applicable discount. If it is at order level, it is the value of the order level discount. If it is at line item level, it is the value of the line item level discount. The amount_money won't be set for a percentage-based discount. | [optional] **applied_money** | [**Money**](Money.md) | The amount of discount actually applied to this line item. Represents the amount of money applied to a line item as a discount When an amount-based discount is at order-level, this value is different from `amount_money` because the discount is distributed across the line items. | [optional] **scope** | **String** | Indicates the level at which the discount applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values | [optional] diff --git a/docs/OrderLineItemModifier.md b/docs/OrderLineItemModifier.md index 4091236..8f072ec 100644 --- a/docs/OrderLineItemModifier.md +++ b/docs/OrderLineItemModifier.md @@ -7,9 +7,10 @@ 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] **catalog_object_id** | **String** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional] **name** | **String** | The name of the item modifier. | [optional] **base_price_money** | [**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] -**total_price_money** | [**Money**](Money.md) | The total price of the item modifier for its line item. This is the modifier's base_price_money multiplied by the line item's quantity. | [optional] +**total_price_money** | [**Money**](Money.md) | The total price of the item modifier for its line item. This is the modifier's `base_price_money` multiplied by the line item's quantity. | [optional] diff --git a/docs/OrderLineItemTax.md b/docs/OrderLineItemTax.md index 65b736a..eb31fd9 100644 --- a/docs/OrderLineItemTax.md +++ b/docs/OrderLineItemTax.md @@ -7,6 +7,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] **catalog_object_id** | **String** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional] **name** | **String** | The tax's name. | [optional] **type** | **String** | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional] diff --git a/docs/OrderMoneyAmounts.md b/docs/OrderMoneyAmounts.md new file mode 100644 index 0000000..5bb2fc3 --- /dev/null +++ b/docs/OrderMoneyAmounts.md @@ -0,0 +1,16 @@ +# SquareConnect.OrderMoneyAmounts + +### Description + +A collection of various money amounts. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_money** | [**Money**](Money.md) | Total money. | [optional] +**tax_money** | [**Money**](Money.md) | Money associated with taxes. | [optional] +**discount_money** | [**Money**](Money.md) | Money associated with discounts. | [optional] +**tip_money** | [**Money**](Money.md) | Money associated with tips. | [optional] +**service_charge_money** | [**Money**](Money.md) | Money associated with service charges. | [optional] + + diff --git a/docs/OrderQuantityUnit.md b/docs/OrderQuantityUnit.md new file mode 100644 index 0000000..ebe96cc --- /dev/null +++ b/docs/OrderQuantityUnit.md @@ -0,0 +1,13 @@ +# SquareConnect.OrderQuantityUnit + +### Description + +Contains the measurement unit for a quantity and a precision which specifies the number of digits after the decimal point for decimal quantities. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measurement_unit** | [**MeasurementUnit**](MeasurementUnit.md) | A [MeasurementUnit](#type-measurementunit) that represents the unit of measure for the quantity. | [optional] +**precision** | **Number** | For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities). | [optional] + + diff --git a/docs/OrderReturn.md b/docs/OrderReturn.md new file mode 100644 index 0000000..46cd1ce --- /dev/null +++ b/docs/OrderReturn.md @@ -0,0 +1,18 @@ +# SquareConnect.OrderReturn + +### Description + +The set of line items, service charges, taxes, discounts, tips, etc. being returned in an Order. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **String** | The return's Unique identifier, unique only within this order. This field is read-only. | [optional] +**source_order_id** | **String** | Order which contains the original sale of these returned line items. This will be unset for unlinked returns. | [optional] +**return_line_items** | [**[OrderReturnLineItem]**](OrderReturnLineItem.md) | Collection of line items which are being returned. | [optional] +**return_taxes** | [**[OrderReturnTax]**](OrderReturnTax.md) | Collection of taxes which are being returned. | [optional] +**return_discounts** | [**[OrderReturnDiscount]**](OrderReturnDiscount.md) | Collection of discounts which are being returned. | [optional] +**rounding_adjustment** | [**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] +**return_amounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Aggregate monetary value being returned by this Return entry. | [optional] + + diff --git a/docs/OrderReturnDiscount.md b/docs/OrderReturnDiscount.md new file mode 100644 index 0000000..a6a27f8 --- /dev/null +++ b/docs/OrderReturnDiscount.md @@ -0,0 +1,50 @@ +# SquareConnect.OrderReturnDiscount + +### Description + +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] +**source_discount_uid** | **String** | `uid` of the Discount from the Order which contains the original application of this discount. | [optional] +**catalog_object_id** | **String** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional] +**name** | **String** | The discount's name. | [optional] +**type** | **String** | 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] +**percentage** | **String** | The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount. | [optional] +**amount_money** | [**Money**](Money.md) | The total monetary amount of the applicable discount. If it is at order level, it is the value of the order level discount. If it is at line item level, it is the value of the line item level discount. The amount_money won't be set for a percentage-based discount. | [optional] +**applied_money** | [**Money**](Money.md) | The amount of discount actually applied to this line item. When an amount-based discount is at order-level, this value is different from `amount_money` because the discount is distributed across the line items. | [optional] +**scope** | **String** | Indicates the level at which the discount applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values | [optional] + + + +## Enum: TypeEnum + + +* `UNKNOWN_DISCOUNT` (value: `"UNKNOWN_DISCOUNT"`) + +* `FIXED_PERCENTAGE` (value: `"FIXED_PERCENTAGE"`) + +* `FIXED_AMOUNT` (value: `"FIXED_AMOUNT"`) + +* `VARIABLE_PERCENTAGE` (value: `"VARIABLE_PERCENTAGE"`) + +* `VARIABLE_AMOUNT` (value: `"VARIABLE_AMOUNT"`) + + + + + +## Enum: ScopeEnum + + +* `OTHER_DISCOUNT_SCOPE` (value: `"OTHER_DISCOUNT_SCOPE"`) + +* `LINE_ITEM` (value: `"LINE_ITEM"`) + +* `ORDER` (value: `"ORDER"`) + + + + diff --git a/docs/OrderReturnLineItem.md b/docs/OrderReturnLineItem.md new file mode 100644 index 0000000..3969a99 --- /dev/null +++ b/docs/OrderReturnLineItem.md @@ -0,0 +1,28 @@ +# SquareConnect.OrderReturnLineItem + +### Description + +The line item being returned in an Order. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **String** | Unique identifier for this return line item entry. This is a read-only field. | [optional] +**source_line_item_uid** | **String** | `uid` of the LineItem in the original sale Order. | [optional] +**name** | **String** | The name of the line item. | [optional] +**quantity** | **String** | The quantity returned, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. | +**quantity_unit** | [**OrderQuantityUnit**](OrderQuantityUnit.md) | The unit and precision that this return line item's quantity is measured in. | [optional] +**note** | **String** | The note of the returned line item. | [optional] +**catalog_object_id** | **String** | The [CatalogItemVariation](#type-catalogitemvariation) id applied to this returned line item. | [optional] +**variation_name** | **String** | The name of the variation applied to this returned line item. | [optional] +**return_modifiers** | [**[OrderReturnLineItemModifier]**](OrderReturnLineItemModifier.md) | The [CatalogModifier](#type-catalogmodifier)s applied to this line item. | [optional] +**return_taxes** | [**[OrderReturnTax]**](OrderReturnTax.md) | A list of taxes applied to this line item. On read or retrieve, this list includes both item-level taxes and any return-level taxes apportioned to this item. | [optional] +**return_discounts** | [**[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] +**base_price_money** | [**Money**](Money.md) | The base price for a single unit of the line item. | [optional] +**variation_total_price_money** | [**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] +**gross_return_money** | [**Money**](Money.md) | The gross return amount of money calculated as (item base price + modifiers price) * quantity. | [optional] +**total_tax_money** | [**Money**](Money.md) | The total tax amount of money to return for the line item. | [optional] +**total_discount_money** | [**Money**](Money.md) | The total discount amount of money to return for the line item. | [optional] +**total_money** | [**Money**](Money.md) | The total amount of money to return for this line item. | [optional] + + diff --git a/docs/OrderReturnLineItemModifier.md b/docs/OrderReturnLineItemModifier.md new file mode 100644 index 0000000..bca7eb1 --- /dev/null +++ b/docs/OrderReturnLineItemModifier.md @@ -0,0 +1,17 @@ +# SquareConnect.OrderReturnLineItemModifier + +### Description + +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] +**source_modifier_uid** | **String** | `uid` of the Modifier from the LineItem from the Order which contains the original sale of this line item modifier. | [optional] +**catalog_object_id** | **String** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional] +**name** | **String** | The name of the item modifier. | [optional] +**base_price_money** | [**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] +**total_price_money** | [**Money**](Money.md) | The total price of the item modifier for its line item. This is the modifier's `base_price_money` multiplied by the line item's quantity. | [optional] + + diff --git a/docs/OrderReturnTax.md b/docs/OrderReturnTax.md new file mode 100644 index 0000000..a5294f9 --- /dev/null +++ b/docs/OrderReturnTax.md @@ -0,0 +1,45 @@ +# SquareConnect.OrderReturnTax + +### Description + +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] +**source_tax_uid** | **String** | `uid` of the Tax from the Order which contains the original charge of this tax. | [optional] +**catalog_object_id** | **String** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional] +**name** | **String** | The tax's name. | [optional] +**type** | **String** | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional] +**percentage** | **String** | The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. | [optional] +**applied_money** | [**Money**](Money.md) | The amount of the money applied by the tax in an order. | [optional] +**scope** | **String** | Indicates the level at which the tax applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values | [optional] + + + +## Enum: TypeEnum + + +* `UNKNOWN_TAX` (value: `"UNKNOWN_TAX"`) + +* `ADDITIVE` (value: `"ADDITIVE"`) + +* `INCLUSIVE` (value: `"INCLUSIVE"`) + + + + + +## Enum: ScopeEnum + + +* `OTHER_TAX_SCOPE` (value: `"OTHER_TAX_SCOPE"`) + +* `LINE_ITEM` (value: `"LINE_ITEM"`) + +* `ORDER` (value: `"ORDER"`) + + + + diff --git a/docs/OrderRoundingAdjustment.md b/docs/OrderRoundingAdjustment.md new file mode 100644 index 0000000..1aef904 --- /dev/null +++ b/docs/OrderRoundingAdjustment.md @@ -0,0 +1,14 @@ +# SquareConnect.OrderRoundingAdjustment + +### Description + +A rounding adjustment of the money being returned. Commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **String** | The rounding adjustment's Unique identifier, unique only within this order. This field is read-only. | [optional] +**name** | **String** | The name of the rounding adjustment from the original sale Order. | [optional] +**amount_money** | [**Money**](Money.md) | Actual rounding adjustment amount. | [optional] + + diff --git a/docs/OrderSource.md b/docs/OrderSource.md index 25178fb..95f984b 100644 --- a/docs/OrderSource.md +++ b/docs/OrderSource.md @@ -7,6 +7,6 @@ Represents the origination details of an order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | The name used to identify the place (physical or digital) that an order originates. If unset, the name defaults to the name of the application that created the order. | [optional] +**name** | **String** | The name used to identify the place (physical or digital) that an order originates. If unset, the name defaults to the name of the application that created the order. | [optional] diff --git a/docs/OrderState.md b/docs/OrderState.md new file mode 100644 index 0000000..c51bb6e --- /dev/null +++ b/docs/OrderState.md @@ -0,0 +1,12 @@ +# SquareConnect.OrderState + +## Enum + + +* `OPEN` (value: `"OPEN"`) + +* `COMPLETED` (value: `"COMPLETED"`) + +* `CANCELED` (value: `"CANCELED"`) + + diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md index da8b7ef..57aeaf3 100644 --- a/docs/OrdersApi.md +++ b/docs/OrdersApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**batchRetrieveOrders**](OrdersApi.md#batchRetrieveOrders) | **POST** /v2/locations/{location_id}/orders/batch-retrieve | BatchRetrieveOrders [**createOrder**](OrdersApi.md#createOrder) | **POST** /v2/locations/{location_id}/orders | CreateOrder +[**searchOrders**](OrdersApi.md#searchOrders) | **POST** /v2/orders/search | SearchOrders @@ -65,7 +66,7 @@ Name | Type | Description | Notes CreateOrder -Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-transactions-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](/products/orders/overview). +Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](/products/orders/overview). ### Example ```javascript @@ -110,3 +111,51 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json + +# **searchOrders** +> SearchOrdersResponse searchOrders(body) + +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. + +### Example +```javascript +var SquareConnect = require('square-connect'); +var defaultClient = SquareConnect.ApiClient.instance; + +// Configure OAuth2 access token for authorization: oauth2 +var oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new SquareConnect.OrdersApi(); + +var body = new SquareConnect.SearchOrdersRequest(); // SearchOrdersRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details. + +apiInstance.searchOrders(body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SearchOrdersRequest**](SearchOrdersRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. | + +### Return type + +[**SearchOrdersResponse**](SearchOrdersResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/SearchOrdersCustomerFilter.md b/docs/SearchOrdersCustomerFilter.md new file mode 100644 index 0000000..df3a2c6 --- /dev/null +++ b/docs/SearchOrdersCustomerFilter.md @@ -0,0 +1,12 @@ +# SquareConnect.SearchOrdersCustomerFilter + +### Description + +Filter based on Order `customer_id` and any Tender `customer_id` associated with the Order. Does not filter based on the [FulfillmentRecipient](#type-orderfulfillmentrecipient) `customer_id`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_ids** | **[String]** | Filter by orders with any of the listed `customer_id`s. Max: 10 `customer_id`s. | [optional] + + diff --git a/docs/SearchOrdersDateTimeFilter.md b/docs/SearchOrdersDateTimeFilter.md new file mode 100644 index 0000000..952e9ca --- /dev/null +++ b/docs/SearchOrdersDateTimeFilter.md @@ -0,0 +1,14 @@ +# SquareConnect.SearchOrdersDateTimeFilter + +### Description + +Filter for `Order` objects based on whether their `CREATED_AT`, `CLOSED_AT` or `UPDATED_AT` timestamps fall within a specified time range. You can specify the time range and which timestamp to filter for. You can filter for only one time range at a time. For each time range, the start time and end time are inclusive. If the end time is absent, it defaults to the time of the first request for the cursor. __Important:__ If you use the DateTimeFilter to filter for `CLOSED_AT` or `UPDATED_AT`, you must also set the [OrdersSort](#type-searchorderordersort). The TimeRange used in DateTimeFilter must correspond to the `sort_field` in the [OrdersSort](#type-searchorderordersort) object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | [**TimeRange**](TimeRange.md) | Time range for filtering on the `created_at` timestamp. | [optional] +**updated_at** | [**TimeRange**](TimeRange.md) | Time range for filtering on the `updated_at` timestamp. | [optional] +**closed_at** | [**TimeRange**](TimeRange.md) | Time range for filtering on the `closed_at` timestamp. | [optional] + + diff --git a/docs/SearchOrdersFilter.md b/docs/SearchOrdersFilter.md new file mode 100644 index 0000000..b52d20c --- /dev/null +++ b/docs/SearchOrdersFilter.md @@ -0,0 +1,16 @@ +# SquareConnect.SearchOrdersFilter + +### Description + +Filter options to use for a query. Multiple filters will be ANDed together. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state_filter** | [**SearchOrdersStateFilter**](SearchOrdersStateFilter.md) | Filter by [`OrderState`](#type-orderstate). | [optional] +**date_time_filter** | [**SearchOrdersDateTimeFilter**](SearchOrdersDateTimeFilter.md) | Filter for results within a time range. | [optional] +**fulfillment_filter** | [**SearchOrdersFulfillmentFilter**](SearchOrdersFulfillmentFilter.md) | Filter by fulfillment type or state. | [optional] +**source_filter** | [**SearchOrdersSourceFilter**](SearchOrdersSourceFilter.md) | Filter by source of order. | [optional] +**customer_filter** | [**SearchOrdersCustomerFilter**](SearchOrdersCustomerFilter.md) | Filter by customers associated with the order. | [optional] + + diff --git a/docs/SearchOrdersFulfillmentFilter.md b/docs/SearchOrdersFulfillmentFilter.md new file mode 100644 index 0000000..d970002 --- /dev/null +++ b/docs/SearchOrdersFulfillmentFilter.md @@ -0,0 +1,41 @@ +# SquareConnect.SearchOrdersFulfillmentFilter + +### Description + +Filter based on [Order Fulfillment](#type-orderfulfillment) information. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fulfillment_types** | **[String]** | List of [fulfillment types](#type-orderfulfillmenttype) to filter for. Will return orders if any of its fulfillments match any of the fulfillment types listed in this field. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values | +**fulfillment_states** | **[String]** | List of [fulfillment states](#type-orderfulfillmentstate) to filter for. Will return orders if any of its fulfillments match any of the fulfillment states listed in this field. See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values | [optional] + + + +## Enum: [FulfillmentTypesEnum] + + +* `PICKUP` (value: `"PICKUP"`) + + + + + +## Enum: [FulfillmentStatesEnum] + + +* `PROPOSED` (value: `"PROPOSED"`) + +* `RESERVED` (value: `"RESERVED"`) + +* `PREPARED` (value: `"PREPARED"`) + +* `COMPLETED` (value: `"COMPLETED"`) + +* `CANCELED` (value: `"CANCELED"`) + +* `FAILED` (value: `"FAILED"`) + + + + diff --git a/docs/SearchOrdersQuery.md b/docs/SearchOrdersQuery.md new file mode 100644 index 0000000..ccd8e82 --- /dev/null +++ b/docs/SearchOrdersQuery.md @@ -0,0 +1,13 @@ +# SquareConnect.SearchOrdersQuery + +### Description + +Contains query criteria for the search. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | [**SearchOrdersFilter**](SearchOrdersFilter.md) | Criteria to filter results by. | [optional] +**sort** | [**SearchOrdersSort**](SearchOrdersSort.md) | Criteria to sort results by. | [optional] + + diff --git a/docs/SearchOrdersRequest.md b/docs/SearchOrdersRequest.md new file mode 100644 index 0000000..bc6ccbe --- /dev/null +++ b/docs/SearchOrdersRequest.md @@ -0,0 +1,16 @@ +# SquareConnect.SearchOrdersRequest + +### Description + +The request does not have any required fields. When given no query criteria, 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. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**location_ids** | **[String]** | The location IDs for the orders to query. The caller must have access to all provided locations. Min: 1 `location_ids`. Max: 10 `location_ids`. | [optional] +**cursor** | **String** | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](/basics/api101/pagination) for more information. | [optional] +**query** | [**SearchOrdersQuery**](SearchOrdersQuery.md) | Query conditions used to filter or sort the results. Note that when fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. | [optional] +**limit** | **Number** | Number of results to be returned in a single page. SearchOrders may use a smaller limit than specified depending on server load. If the response includes a `cursor` field, you can use it to retrieve the next set of results. Default: `500` | [optional] +**return_entries** | **Boolean** | If set to `true`, SearchOrders will return [`OrderEntry`](#type-orderentry) objects instead of `Order` objects. `OrderEntry` objects are lightweight descriptions of orders that include `order_id`s. Default: `false`. | [optional] + + diff --git a/docs/SearchOrdersResponse.md b/docs/SearchOrdersResponse.md new file mode 100644 index 0000000..cf6161f --- /dev/null +++ b/docs/SearchOrdersResponse.md @@ -0,0 +1,16 @@ +# SquareConnect.SearchOrdersResponse + +### Description + +Only one of `order_entries` or `orders` fields will be set, depending on whether `return_entries` was set on the [SearchOrdersRequest](#type-searchorderrequest). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**order_entries** | [**[OrderEntry]**](OrderEntry.md) | List of [OrderEntries](#type-orderentry) that fit the query conditions. Populated only if `order_entries` was set to `true` in the request. | [optional] +**orders** | [**[Order]**](Order.md) | List of [Orders](#type-order) that match query conditions. Populated only if `return_entries` in the request is set to `false`. | [optional] +**cursor** | **String** | The pagination cursor to be used in a subsequent request. If unset, this is the final response. See [Pagination](/basics/api101/pagination) for more information. | [optional] +**errors** | [**[Error]**](Error.md) | [Errors](#type-error) encountered during the search. | [optional] +**unconvertible_transaction_ids** | **[String]** | List of transaction IDs identifying transactions that could not be converted to an `Order`. Empty if `return_entries` is true, however, attempts to retrieve those orders may encounter subsequent `unconvertible_transcation_ids` Note that this field will not be present after SearchOrders moves from BETA to GA. | [optional] + + diff --git a/docs/SearchOrdersSort.md b/docs/SearchOrdersSort.md new file mode 100644 index 0000000..c637c77 --- /dev/null +++ b/docs/SearchOrdersSort.md @@ -0,0 +1,37 @@ +# SquareConnect.SearchOrdersSort + +### Description + +Sorting options for a query. Returned Orders will always be sorted on a timestamp. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sort_field** | **String** | The field to sort by. __Important:__ When using a [DateTimeFilter](#type-searchordersfilter), `sort_field` must match the set time range field. If this field does not match the time range field in `DateTimeFilter`, SearchOrder will return an error. Default: `CREATED_AT`. See [SearchOrdersSortField](#type-searchorderssortfield) for possible values | +**sort_order** | **String** | The order in which results are returned. Defaults to `DESC`. See [SortOrder](#type-sortorder) for possible values | [optional] + + + +## Enum: SortFieldEnum + + +* `CREATED_AT` (value: `"CREATED_AT"`) + +* `UPDATED_AT` (value: `"UPDATED_AT"`) + +* `CLOSED_AT` (value: `"CLOSED_AT"`) + + + + + +## Enum: SortOrderEnum + + +* `DESC` (value: `"DESC"`) + +* `ASC` (value: `"ASC"`) + + + + diff --git a/docs/SearchOrdersSortField.md b/docs/SearchOrdersSortField.md new file mode 100644 index 0000000..e1f48e4 --- /dev/null +++ b/docs/SearchOrdersSortField.md @@ -0,0 +1,12 @@ +# SquareConnect.SearchOrdersSortField + +## Enum + + +* `CREATED_AT` (value: `"CREATED_AT"`) + +* `UPDATED_AT` (value: `"UPDATED_AT"`) + +* `CLOSED_AT` (value: `"CLOSED_AT"`) + + diff --git a/docs/SearchOrdersSourceFilter.md b/docs/SearchOrdersSourceFilter.md new file mode 100644 index 0000000..357b5eb --- /dev/null +++ b/docs/SearchOrdersSourceFilter.md @@ -0,0 +1,12 @@ +# SquareConnect.SearchOrdersSourceFilter + +### Description + +Filter based on Order `source` information. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source_names** | **[String]** | Filters by [Source](#type-ordersource) `name`. Will return any orders with with `source.name`s that match any of the listed source names. Max: 10 `source_names`. | [optional] + + diff --git a/docs/SearchOrdersStateFilter.md b/docs/SearchOrdersStateFilter.md new file mode 100644 index 0000000..2498436 --- /dev/null +++ b/docs/SearchOrdersStateFilter.md @@ -0,0 +1,25 @@ +# SquareConnect.SearchOrdersStateFilter + +### Description + +Filter by current Order `state`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**states** | **[String]** | States to filter for. See [OrderState](#type-orderstate) for possible values | + + + +## Enum: [StatesEnum] + + +* `OPEN` (value: `"OPEN"`) + +* `COMPLETED` (value: `"COMPLETED"`) + +* `CANCELED` (value: `"CANCELED"`) + + + + diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index 4149090..78f807d 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -70,7 +70,7 @@ Name | Type | Description | Notes Charge -Charges a card represented by a card nonce or a customer's card on file. Your request to this endpoint must include _either_: - A value for the `card_nonce` parameter (to charge a card nonce generated with the `SqPaymentForm`) - Values for the `customer_card_id` and `customer_id` parameters (to charge a customer's card on file) In order for an eCommerce payment to potentially qualify for [Square chargeback protection](https://squareup.com/help/article/5394), you _must_ provide values for the following parameters in your request: - `buyer_email_address` - At least one of `billing_address` or `shipping_address` When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-transactions-retrievetransaction). See the `processing_fee_money` field of each [Tender included](#type-tender) in the transaction. +Charges a card represented by a card nonce or a customer's card on file. Your request to this endpoint must include _either_: - A value for the `card_nonce` parameter (to charge a card nonce generated with the `SqPaymentForm`) - Values for the `customer_card_id` and `customer_id` parameters (to charge a customer's card on file) When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-transactions-retrievetransaction). See the `processing_fee_money` field of each [Tender included](#type-tender) in the transaction. ### Example ```javascript diff --git a/package.json b/package.json index d160256..7367f56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "square-connect", - "version": "2.20190410.1", + "version": "2.20190508.0", "description": "JavaScript client library for the Square Connect v2 API", "keywords": [ "square", diff --git a/src/ApiClient.js b/src/ApiClient.js index 0110715..7272e0b 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -16,7 +16,7 @@ var querystring = require('querystring'); /** * @module ApiClient - * @version 2.20190410.1 + * @version 2.20190508.0 */ /** @@ -48,7 +48,7 @@ var exports = function() { * @default {} */ this.defaultHeaders = { - 'User-Agent': 'Square-Connect-Javascript/2.20190410.1' + 'User-Agent': 'Square-Connect-Javascript/2.20190508.0' }; /** * The default HTTP timeout for all API calls. diff --git a/src/api/ApplePayApi.js b/src/api/ApplePayApi.js index a5972b4..7e5baf6 100644 --- a/src/api/ApplePayApi.js +++ b/src/api/ApplePayApi.js @@ -53,7 +53,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/CatalogApi.js b/src/api/CatalogApi.js index a6d6a64..f51f134 100644 --- a/src/api/CatalogApi.js +++ b/src/api/CatalogApi.js @@ -69,7 +69,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -121,7 +121,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -173,7 +173,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -219,7 +219,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -271,7 +271,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -323,7 +323,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -382,7 +382,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -436,7 +436,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -488,7 +488,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -540,7 +540,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -592,7 +592,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/CheckoutApi.js b/src/api/CheckoutApi.js index 61448e9..0356b6c 100644 --- a/src/api/CheckoutApi.js +++ b/src/api/CheckoutApi.js @@ -60,7 +60,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/CustomersApi.js b/src/api/CustomersApi.js index 72f4a50..8225c23 100644 --- a/src/api/CustomersApi.js +++ b/src/api/CustomersApi.js @@ -63,7 +63,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -122,7 +122,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -176,7 +176,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -236,7 +236,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -291,7 +291,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -347,7 +347,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -399,7 +399,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -458,7 +458,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/EmployeesApi.js b/src/api/EmployeesApi.js index 39fcd53..3f2a0b1 100644 --- a/src/api/EmployeesApi.js +++ b/src/api/EmployeesApi.js @@ -57,7 +57,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -114,7 +114,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/InventoryApi.js b/src/api/InventoryApi.js index 0c6f7dd..69ed3d9 100644 --- a/src/api/InventoryApi.js +++ b/src/api/InventoryApi.js @@ -61,7 +61,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -113,7 +113,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -165,7 +165,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -218,7 +218,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -277,7 +277,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -339,7 +339,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -395,7 +395,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/LaborApi.js b/src/api/LaborApi.js index bb9ad98..a7a9667 100644 --- a/src/api/LaborApi.js +++ b/src/api/LaborApi.js @@ -71,7 +71,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -123,7 +123,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -176,7 +176,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -229,7 +229,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -282,7 +282,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -335,7 +335,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -388,7 +388,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -442,7 +442,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -499,7 +499,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -554,7 +554,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -608,7 +608,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -667,7 +667,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -727,7 +727,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -787,7 +787,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/LocationsApi.js b/src/api/LocationsApi.js index 5751a97..a291e3c 100644 --- a/src/api/LocationsApi.js +++ b/src/api/LocationsApi.js @@ -46,7 +46,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/MobileAuthorizationApi.js b/src/api/MobileAuthorizationApi.js index 7b934c7..c0a523a 100644 --- a/src/api/MobileAuthorizationApi.js +++ b/src/api/MobileAuthorizationApi.js @@ -53,7 +53,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/OAuthApi.js b/src/api/OAuthApi.js index 9ff822c..a538372 100644 --- a/src/api/OAuthApi.js +++ b/src/api/OAuthApi.js @@ -57,7 +57,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -116,7 +116,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -169,7 +169,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/OrdersApi.js b/src/api/OrdersApi.js index 58c6839..9973bb0 100644 --- a/src/api/OrdersApi.js +++ b/src/api/OrdersApi.js @@ -16,6 +16,8 @@ var BatchRetrieveOrdersRequest = require('../model/BatchRetrieveOrdersRequest'); var BatchRetrieveOrdersResponse = require('../model/BatchRetrieveOrdersResponse'); var CreateOrderRequest = require('../model/CreateOrderRequest'); var CreateOrderResponse = require('../model/CreateOrderResponse'); +var SearchOrdersRequest = require('../model/SearchOrdersRequest'); +var SearchOrdersResponse = require('../model/SearchOrdersResponse'); /** * Orders service. @@ -62,7 +64,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -96,7 +98,7 @@ module.exports = function(apiClient) { /** * CreateOrder - * Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-transactions-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](/products/orders/overview). + * Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](/products/orders/overview). * @param {String} locationId The ID of the business location to associate the order with. * @param {module:model/CreateOrderRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateOrderResponse} and HTTP response @@ -122,7 +124,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -141,7 +143,7 @@ module.exports = function(apiClient) { /** * CreateOrder - * Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-transactions-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](/products/orders/overview). + * Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](/products/orders/overview). * @param {String} locationId The ID of the business location to associate the order with. * @param {module:model/CreateOrderRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateOrderResponse} @@ -152,4 +154,56 @@ module.exports = function(apiClient) { return response_and_data.data; }); } + + + /** + * 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. + * @param {module:model/SearchOrdersRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchOrdersResponse} and HTTP response + */ + this.searchOrdersWithHttpInfo = function(body) { + var postBody = body; + + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling searchOrders"); + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + headerParams['Square-Version'] = '2019-05-08'; + + var formParams = { + }; + + var authNames = ['oauth2']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = SearchOrdersResponse; + + return this.apiClient.callApi( + '/v2/orders/search', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType + ); + } + + /** + * 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. + * @param {module:model/SearchOrdersRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchOrdersResponse} + */ + this.searchOrders = function(body) { + return this.searchOrdersWithHttpInfo(body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } }; diff --git a/src/api/ReportingApi.js b/src/api/ReportingApi.js index 2726503..d8c4c92 100644 --- a/src/api/ReportingApi.js +++ b/src/api/ReportingApi.js @@ -64,7 +64,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -132,7 +132,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/TransactionsApi.js b/src/api/TransactionsApi.js index 8c158c1..f1add9b 100644 --- a/src/api/TransactionsApi.js +++ b/src/api/TransactionsApi.js @@ -68,7 +68,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -102,7 +102,7 @@ module.exports = function(apiClient) { /** * Charge - * Charges a card represented by a card nonce or a customer's card on file. Your request to this endpoint must include _either_: - A value for the `card_nonce` parameter (to charge a card nonce generated with the `SqPaymentForm`) - Values for the `customer_card_id` and `customer_id` parameters (to charge a customer's card on file) In order for an eCommerce payment to potentially qualify for [Square chargeback protection](https://squareup.com/help/article/5394), you _must_ provide values for the following parameters in your request: - `buyer_email_address` - At least one of `billing_address` or `shipping_address` When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-transactions-retrievetransaction). See the `processing_fee_money` field of each [Tender included](#type-tender) in the transaction. + * Charges a card represented by a card nonce or a customer's card on file. Your request to this endpoint must include _either_: - A value for the `card_nonce` parameter (to charge a card nonce generated with the `SqPaymentForm`) - Values for the `customer_card_id` and `customer_id` parameters (to charge a customer's card on file) When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-transactions-retrievetransaction). See the `processing_fee_money` field of each [Tender included](#type-tender) in the transaction. * @param {String} locationId The ID of the location to associate the created transaction with. * @param {module:model/ChargeRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ChargeResponse} and HTTP response @@ -128,7 +128,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -147,7 +147,7 @@ module.exports = function(apiClient) { /** * Charge - * Charges a card represented by a card nonce or a customer's card on file. Your request to this endpoint must include _either_: - A value for the `card_nonce` parameter (to charge a card nonce generated with the `SqPaymentForm`) - Values for the `customer_card_id` and `customer_id` parameters (to charge a customer's card on file) In order for an eCommerce payment to potentially qualify for [Square chargeback protection](https://squareup.com/help/article/5394), you _must_ provide values for the following parameters in your request: - `buyer_email_address` - At least one of `billing_address` or `shipping_address` When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-transactions-retrievetransaction). See the `processing_fee_money` field of each [Tender included](#type-tender) in the transaction. + * Charges a card represented by a card nonce or a customer's card on file. Your request to this endpoint must include _either_: - A value for the `card_nonce` parameter (to charge a card nonce generated with the `SqPaymentForm`) - Values for the `customer_card_id` and `customer_id` parameters (to charge a customer's card on file) When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-transactions-retrievetransaction). See the `processing_fee_money` field of each [Tender included](#type-tender) in the transaction. * @param {String} locationId The ID of the location to associate the created transaction with. * @param {module:model/ChargeRequest} body An object containing the fields to POST for the request. See the corresponding object definition for field details. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ChargeResponse} @@ -195,7 +195,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -260,7 +260,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -328,7 +328,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -393,7 +393,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -454,7 +454,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/V1EmployeesApi.js b/src/api/V1EmployeesApi.js index 3935f25..54e85a3 100644 --- a/src/api/V1EmployeesApi.js +++ b/src/api/V1EmployeesApi.js @@ -56,7 +56,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -108,7 +108,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -160,7 +160,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -213,7 +213,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -274,7 +274,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -332,7 +332,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -401,7 +401,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -463,7 +463,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -533,7 +533,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -604,7 +604,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -658,7 +658,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -711,7 +711,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -764,7 +764,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -823,7 +823,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -883,7 +883,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -943,7 +943,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/V1ItemsApi.js b/src/api/V1ItemsApi.js index 7ad128b..14b0a57 100644 --- a/src/api/V1ItemsApi.js +++ b/src/api/V1ItemsApi.js @@ -77,7 +77,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -146,7 +146,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -215,7 +215,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -276,7 +276,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -336,7 +336,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -396,7 +396,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -456,7 +456,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -516,7 +516,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -583,7 +583,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -644,7 +644,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -711,7 +711,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -773,7 +773,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -834,7 +834,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -895,7 +895,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -956,7 +956,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1017,7 +1017,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1085,7 +1085,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1147,7 +1147,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1214,7 +1214,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1285,7 +1285,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1340,7 +1340,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1393,7 +1393,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1446,7 +1446,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1505,7 +1505,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1565,7 +1565,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1620,7 +1620,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1673,7 +1673,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1740,7 +1740,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1809,7 +1809,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1871,7 +1871,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1932,7 +1932,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -1999,7 +1999,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -2067,7 +2067,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -2135,7 +2135,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -2203,7 +2203,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -2271,7 +2271,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -2346,7 +2346,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -2415,7 +2415,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -2483,7 +2483,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -2558,7 +2558,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/V1LocationsApi.js b/src/api/V1LocationsApi.js index ad52fcd..a931420 100644 --- a/src/api/V1LocationsApi.js +++ b/src/api/V1LocationsApi.js @@ -46,7 +46,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -91,7 +91,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/api/V1TransactionsApi.js b/src/api/V1TransactionsApi.js index 9f96242..bee901e 100644 --- a/src/api/V1TransactionsApi.js +++ b/src/api/V1TransactionsApi.js @@ -65,7 +65,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -119,7 +119,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -180,7 +180,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -251,7 +251,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -323,7 +323,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -396,7 +396,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -463,7 +463,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -524,7 +524,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -585,7 +585,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -646,7 +646,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; @@ -713,7 +713,7 @@ module.exports = function(apiClient) { }; var headerParams = { }; - headerParams['Square-Version'] = '2019-04-10'; + headerParams['Square-Version'] = '2019-05-08'; var formParams = { }; diff --git a/src/index.js b/src/index.js index aa9ec39..5a6eca3 100644 --- a/src/index.js +++ b/src/index.js @@ -32,6 +32,8 @@ var BatchRetrieveOrdersResponse = require('./model/BatchRetrieveOrdersResponse') var BatchUpsertCatalogObjectsRequest = require('./model/BatchUpsertCatalogObjectsRequest'); var BatchUpsertCatalogObjectsResponse = require('./model/BatchUpsertCatalogObjectsResponse'); var BreakType = require('./model/BreakType'); +var BusinessHours = require('./model/BusinessHours'); +var BusinessHoursPeriod = require('./model/BusinessHoursPeriod'); var CaptureTransactionRequest = require('./model/CaptureTransactionRequest'); var CaptureTransactionResponse = require('./model/CaptureTransactionResponse'); var Card = require('./model/Card'); @@ -103,6 +105,7 @@ var CustomerQuery = require('./model/CustomerQuery'); var CustomerSort = require('./model/CustomerSort'); var CustomerSortField = require('./model/CustomerSortField'); var DateRange = require('./model/DateRange'); +var DayOfWeek = require('./model/DayOfWeek'); var DeleteBreakTypeRequest = require('./model/DeleteBreakTypeRequest'); var DeleteBreakTypeResponse = require('./model/DeleteBreakTypeResponse'); var DeleteCatalogObjectRequest = require('./model/DeleteCatalogObjectRequest'); @@ -161,11 +164,18 @@ var Location = require('./model/Location'); var LocationCapability = require('./model/LocationCapability'); var LocationStatus = require('./model/LocationStatus'); var LocationType = require('./model/LocationType'); +var MeasurementUnit = require('./model/MeasurementUnit'); +var MeasurementUnitArea = require('./model/MeasurementUnitArea'); +var MeasurementUnitCustom = require('./model/MeasurementUnitCustom'); +var MeasurementUnitLength = require('./model/MeasurementUnitLength'); +var MeasurementUnitVolume = require('./model/MeasurementUnitVolume'); +var MeasurementUnitWeight = require('./model/MeasurementUnitWeight'); var ModelBreak = require('./model/ModelBreak'); var Money = require('./model/Money'); var ObtainTokenRequest = require('./model/ObtainTokenRequest'); var ObtainTokenResponse = require('./model/ObtainTokenResponse'); var Order = require('./model/Order'); +var OrderEntry = require('./model/OrderEntry'); var OrderFulfillment = require('./model/OrderFulfillment'); var OrderFulfillmentPickupDetails = require('./model/OrderFulfillmentPickupDetails'); var OrderFulfillmentPickupDetailsScheduleType = require('./model/OrderFulfillmentPickupDetailsScheduleType'); @@ -180,7 +190,16 @@ var OrderLineItemModifier = require('./model/OrderLineItemModifier'); var OrderLineItemTax = require('./model/OrderLineItemTax'); var OrderLineItemTaxScope = require('./model/OrderLineItemTaxScope'); var OrderLineItemTaxType = require('./model/OrderLineItemTaxType'); +var OrderMoneyAmounts = require('./model/OrderMoneyAmounts'); +var OrderQuantityUnit = require('./model/OrderQuantityUnit'); +var OrderReturn = require('./model/OrderReturn'); +var OrderReturnDiscount = require('./model/OrderReturnDiscount'); +var OrderReturnLineItem = require('./model/OrderReturnLineItem'); +var OrderReturnLineItemModifier = require('./model/OrderReturnLineItemModifier'); +var OrderReturnTax = require('./model/OrderReturnTax'); +var OrderRoundingAdjustment = require('./model/OrderRoundingAdjustment'); var OrderSource = require('./model/OrderSource'); +var OrderState = require('./model/OrderState'); var Product = require('./model/Product'); var Refund = require('./model/Refund'); var RefundStatus = require('./model/RefundStatus'); @@ -211,6 +230,17 @@ var SearchCatalogObjectsRequest = require('./model/SearchCatalogObjectsRequest') var SearchCatalogObjectsResponse = require('./model/SearchCatalogObjectsResponse'); var SearchCustomersRequest = require('./model/SearchCustomersRequest'); var SearchCustomersResponse = require('./model/SearchCustomersResponse'); +var SearchOrdersCustomerFilter = require('./model/SearchOrdersCustomerFilter'); +var SearchOrdersDateTimeFilter = require('./model/SearchOrdersDateTimeFilter'); +var SearchOrdersFilter = require('./model/SearchOrdersFilter'); +var SearchOrdersFulfillmentFilter = require('./model/SearchOrdersFulfillmentFilter'); +var SearchOrdersQuery = require('./model/SearchOrdersQuery'); +var SearchOrdersRequest = require('./model/SearchOrdersRequest'); +var SearchOrdersResponse = require('./model/SearchOrdersResponse'); +var SearchOrdersSort = require('./model/SearchOrdersSort'); +var SearchOrdersSortField = require('./model/SearchOrdersSortField'); +var SearchOrdersSourceFilter = require('./model/SearchOrdersSourceFilter'); +var SearchOrdersStateFilter = require('./model/SearchOrdersStateFilter'); var SearchShiftsRequest = require('./model/SearchShiftsRequest'); var SearchShiftsResponse = require('./model/SearchShiftsResponse'); var Shift = require('./model/Shift'); @@ -463,7 +493,7 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * *
* @module index - * @version 2.20190410.1 + * @version 2.20190508.0 */ module.exports = { /** @@ -566,6 +596,16 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/BreakType} */ BreakType: BreakType, + /** + * The BusinessHours model constructor. + * @property {module:model/BusinessHours} + */ + BusinessHours: BusinessHours, + /** + * The BusinessHoursPeriod model constructor. + * @property {module:model/BusinessHoursPeriod} + */ + BusinessHoursPeriod: BusinessHoursPeriod, /** * The CaptureTransactionRequest model constructor. * @property {module:model/CaptureTransactionRequest} @@ -921,6 +961,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/DateRange} */ DateRange: DateRange, + /** + * The DayOfWeek model constructor. + * @property {module:model/DayOfWeek} + */ + DayOfWeek: DayOfWeek, /** * The DeleteBreakTypeRequest model constructor. * @property {module:model/DeleteBreakTypeRequest} @@ -1211,6 +1256,36 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/LocationType} */ LocationType: LocationType, + /** + * The MeasurementUnit model constructor. + * @property {module:model/MeasurementUnit} + */ + MeasurementUnit: MeasurementUnit, + /** + * The MeasurementUnitArea model constructor. + * @property {module:model/MeasurementUnitArea} + */ + MeasurementUnitArea: MeasurementUnitArea, + /** + * The MeasurementUnitCustom model constructor. + * @property {module:model/MeasurementUnitCustom} + */ + MeasurementUnitCustom: MeasurementUnitCustom, + /** + * The MeasurementUnitLength model constructor. + * @property {module:model/MeasurementUnitLength} + */ + MeasurementUnitLength: MeasurementUnitLength, + /** + * The MeasurementUnitVolume model constructor. + * @property {module:model/MeasurementUnitVolume} + */ + MeasurementUnitVolume: MeasurementUnitVolume, + /** + * The MeasurementUnitWeight model constructor. + * @property {module:model/MeasurementUnitWeight} + */ + MeasurementUnitWeight: MeasurementUnitWeight, /** * The ModelBreak model constructor. * @property {module:model/ModelBreak} @@ -1236,6 +1311,11 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/Order} */ Order: Order, + /** + * The OrderEntry model constructor. + * @property {module:model/OrderEntry} + */ + OrderEntry: OrderEntry, /** * The OrderFulfillment model constructor. * @property {module:model/OrderFulfillment} @@ -1306,11 +1386,56 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/OrderLineItemTaxType} */ OrderLineItemTaxType: OrderLineItemTaxType, + /** + * The OrderMoneyAmounts model constructor. + * @property {module:model/OrderMoneyAmounts} + */ + OrderMoneyAmounts: OrderMoneyAmounts, + /** + * The OrderQuantityUnit model constructor. + * @property {module:model/OrderQuantityUnit} + */ + OrderQuantityUnit: OrderQuantityUnit, + /** + * The OrderReturn model constructor. + * @property {module:model/OrderReturn} + */ + OrderReturn: OrderReturn, + /** + * The OrderReturnDiscount model constructor. + * @property {module:model/OrderReturnDiscount} + */ + OrderReturnDiscount: OrderReturnDiscount, + /** + * The OrderReturnLineItem model constructor. + * @property {module:model/OrderReturnLineItem} + */ + OrderReturnLineItem: OrderReturnLineItem, + /** + * The OrderReturnLineItemModifier model constructor. + * @property {module:model/OrderReturnLineItemModifier} + */ + OrderReturnLineItemModifier: OrderReturnLineItemModifier, + /** + * The OrderReturnTax model constructor. + * @property {module:model/OrderReturnTax} + */ + OrderReturnTax: OrderReturnTax, + /** + * The OrderRoundingAdjustment model constructor. + * @property {module:model/OrderRoundingAdjustment} + */ + OrderRoundingAdjustment: OrderRoundingAdjustment, /** * The OrderSource model constructor. * @property {module:model/OrderSource} */ OrderSource: OrderSource, + /** + * The OrderState model constructor. + * @property {module:model/OrderState} + */ + OrderState: OrderState, /** * The Product model constructor. * @property {module:model/Product} @@ -1461,6 +1586,61 @@ var V1TransactionsApi = require('./api/V1TransactionsApi'); * @property {module:model/SearchCustomersResponse} */ SearchCustomersResponse: SearchCustomersResponse, + /** + * The SearchOrdersCustomerFilter model constructor. + * @property {module:model/SearchOrdersCustomerFilter} + */ + SearchOrdersCustomerFilter: SearchOrdersCustomerFilter, + /** + * The SearchOrdersDateTimeFilter model constructor. + * @property {module:model/SearchOrdersDateTimeFilter} + */ + SearchOrdersDateTimeFilter: SearchOrdersDateTimeFilter, + /** + * The SearchOrdersFilter model constructor. + * @property {module:model/SearchOrdersFilter} + */ + SearchOrdersFilter: SearchOrdersFilter, + /** + * The SearchOrdersFulfillmentFilter model constructor. + * @property {module:model/SearchOrdersFulfillmentFilter} + */ + SearchOrdersFulfillmentFilter: SearchOrdersFulfillmentFilter, + /** + * The SearchOrdersQuery model constructor. + * @property {module:model/SearchOrdersQuery} + */ + SearchOrdersQuery: SearchOrdersQuery, + /** + * The SearchOrdersRequest model constructor. + * @property {module:model/SearchOrdersRequest} + */ + SearchOrdersRequest: SearchOrdersRequest, + /** + * The SearchOrdersResponse model constructor. + * @property {module:model/SearchOrdersResponse} + */ + SearchOrdersResponse: SearchOrdersResponse, + /** + * The SearchOrdersSort model constructor. + * @property {module:model/SearchOrdersSort} + */ + SearchOrdersSort: SearchOrdersSort, + /** + * The SearchOrdersSortField model constructor. + * @property {module:model/SearchOrdersSortField} + */ + SearchOrdersSortField: SearchOrdersSortField, + /** + * The SearchOrdersSourceFilter model constructor. + * @property {module:model/SearchOrdersSourceFilter} + */ + SearchOrdersSourceFilter: SearchOrdersSourceFilter, + /** + * The SearchOrdersStateFilter model constructor. + * @property {module:model/SearchOrdersStateFilter} + */ + SearchOrdersStateFilter: SearchOrdersStateFilter, /** * The SearchShiftsRequest model constructor. * @property {module:model/SearchShiftsRequest} diff --git a/src/model/BatchRetrieveOrdersResponse.js b/src/model/BatchRetrieveOrdersResponse.js index 44799e4..8f3427b 100644 --- a/src/model/BatchRetrieveOrdersResponse.js +++ b/src/model/BatchRetrieveOrdersResponse.js @@ -34,6 +34,7 @@ var exports = function() { + }; /** @@ -52,6 +53,9 @@ exports.constructFromObject = function(data, obj) { } if (data.hasOwnProperty('errors')) { obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + if (data.hasOwnProperty('unconvertible_transaction_ids')) { + obj['unconvertible_transaction_ids'] = ApiClient.convertToType(data['unconvertible_transaction_ids'], ['String']); } } return obj; @@ -67,6 +71,11 @@ exports.prototype['orders'] = undefined; * @member {Array.BusinessHours
.
+ * Represents the hours of operation for a business location.
+ * @alias module:model/BusinessHours
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+};
+
+/**
+ * Constructs a BusinessHours
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/BusinessHours} obj Optional instance to populate.
+ * @return {module:model/BusinessHours} The populated BusinessHours
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('periods')) {
+ obj['periods'] = ApiClient.convertToType(data['periods'], [BusinessHoursPeriod]);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The list of time periods during which the business is open. There may be at most 10 periods per day.
+ * @member {Array.BusinessHoursPeriod
.
+ * Represents a period of time during which a business location is open.
+ * @alias module:model/BusinessHoursPeriod
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+};
+
+/**
+ * Constructs a BusinessHoursPeriod
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/BusinessHoursPeriod} obj Optional instance to populate.
+ * @return {module:model/BusinessHoursPeriod} The populated BusinessHoursPeriod
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('day_of_week')) {
+ obj['day_of_week'] = ApiClient.convertToType(data['day_of_week'], 'String');
+ }
+ if (data.hasOwnProperty('start_local_time')) {
+ obj['start_local_time'] = ApiClient.convertToType(data['start_local_time'], 'String');
+ }
+ if (data.hasOwnProperty('end_local_time')) {
+ obj['end_local_time'] = ApiClient.convertToType(data['end_local_time'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The day of week for this time period. See [DayOfWeek](#type-dayofweek) for possible values
+ * @member {module:model/BusinessHoursPeriod.DayOfWeekEnum} day_of_week
+ */
+exports.prototype['day_of_week'] = undefined;
+/**
+ * The start time of a business hours period, specified in local time using partial-time RFC3339 format.
+ * @member {String} start_local_time
+ */
+exports.prototype['start_local_time'] = undefined;
+/**
+ * The end time of a business hours period, specified in local time using partial-time RFC3339 format.
+ * @member {String} end_local_time
+ */
+exports.prototype['end_local_time'] = undefined;
+
+
+ /**
+ * Allowed values for the day_of_week
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.DayOfWeekEnum = {
+ /**
+ * value: "SUN"
+ * @const
+ */
+ "SUN": "SUN",
+ /**
+ * value: "MON"
+ * @const
+ */
+ "MON": "MON",
+ /**
+ * value: "TUE"
+ * @const
+ */
+ "TUE": "TUE",
+ /**
+ * value: "WED"
+ * @const
+ */
+ "WED": "WED",
+ /**
+ * value: "THU"
+ * @const
+ */
+ "THU": "THU",
+ /**
+ * value: "FRI"
+ * @const
+ */
+ "FRI": "FRI",
+ /**
+ * value: "SAT"
+ * @const
+ */
+ "SAT": "SAT" };
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/ChargeRequest.js b/src/model/ChargeRequest.js
index aea84f2..a9c1f2d 100644
--- a/src/model/ChargeRequest.js
+++ b/src/model/ChargeRequest.js
@@ -145,17 +145,17 @@ exports.prototype['note'] = undefined;
*/
exports.prototype['customer_id'] = undefined;
/**
- * The buyer's billing address. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `shipping_address` is provided.
+ * The buyer's billing address.
* @member {module:model/Address} billing_address
*/
exports.prototype['billing_address'] = undefined;
/**
- * The buyer's shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `billing_address` is provided.
+ * The buyer's shipping address, if available.
* @member {module:model/Address} shipping_address
*/
exports.prototype['shipping_address'] = undefined;
/**
- * The buyer's email address, if available. This value is optional, but this transaction is ineligible for chargeback protection if it is not provided.
+ * The buyer's email address, if available.
* @member {String} buyer_email_address
*/
exports.prototype['buyer_email_address'] = undefined;
diff --git a/src/model/CreateOrderRequest.js b/src/model/CreateOrderRequest.js
index 4ec6182..2ac1efd 100644
--- a/src/model/CreateOrderRequest.js
+++ b/src/model/CreateOrderRequest.js
@@ -86,7 +86,7 @@ exports.prototype['order'] = undefined;
*/
exports.prototype['idempotency_key'] = undefined;
/**
- * __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.
+ * __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.
* @member {String} reference_id
*/
exports.prototype['reference_id'] = undefined;
diff --git a/src/model/CreateOrderRequestTax.js b/src/model/CreateOrderRequestTax.js
index 7153672..f55ee6f 100644
--- a/src/model/CreateOrderRequestTax.js
+++ b/src/model/CreateOrderRequestTax.js
@@ -74,7 +74,7 @@ exports.prototype['catalog_object_id'] = undefined;
*/
exports.prototype['name'] = undefined;
/**
- * Only used for ad hoc taxes. Indicates the calculation method used to apply the line item tax. Default: `ADDITIVE`; See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values
+ * Only used for ad hoc taxes. Indicates the calculation method used to apply the line item tax. Default: `ADDITIVE`; See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values
* @member {module:model/CreateOrderRequestTax.TypeEnum} type
*/
exports.prototype['type'] = undefined;
diff --git a/src/model/DayOfWeek.js b/src/model/DayOfWeek.js
new file mode 100644
index 0000000..a1b5ba3
--- /dev/null
+++ b/src/model/DayOfWeek.js
@@ -0,0 +1,70 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+/**
+ * Enum class DayOfWeek.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "SUN"
+ * @const
+ */
+ "SUN": "SUN",
+ /**
+ * value: "MON"
+ * @const
+ */
+ "MON": "MON",
+ /**
+ * value: "TUE"
+ * @const
+ */
+ "TUE": "TUE",
+ /**
+ * value: "WED"
+ * @const
+ */
+ "WED": "WED",
+ /**
+ * value: "THU"
+ * @const
+ */
+ "THU": "THU",
+ /**
+ * value: "FRI"
+ * @const
+ */
+ "FRI": "FRI",
+ /**
+ * value: "SAT"
+ * @const
+ */
+ "SAT": "SAT"};
+
+/**
+ * Returns a DayOfWeek
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/DayOfWeek} The enum DayOfWeek
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/Error.js b/src/model/Error.js
index 7cbe042..302da9b 100644
--- a/src/model/Error.js
+++ b/src/model/Error.js
@@ -495,6 +495,16 @@ exports.prototype['field'] = undefined;
* @const
*/
"BAD_CERTIFICATE": "BAD_CERTIFICATE",
+ /**
+ * value: "INVALID_SQUARE_VERSION_FORMAT"
+ * @const
+ */
+ "INVALID_SQUARE_VERSION_FORMAT": "INVALID_SQUARE_VERSION_FORMAT",
+ /**
+ * value: "API_VERSION_INCOMPATIBLE"
+ * @const
+ */
+ "API_VERSION_INCOMPATIBLE": "API_VERSION_INCOMPATIBLE",
/**
* value: "CARD_DECLINED"
* @const
diff --git a/src/model/ErrorCode.js b/src/model/ErrorCode.js
index 0874090..32aad56 100644
--- a/src/model/ErrorCode.js
+++ b/src/model/ErrorCode.js
@@ -385,6 +385,16 @@ var exports = {
* @const
*/
"BAD_CERTIFICATE": "BAD_CERTIFICATE",
+ /**
+ * value: "INVALID_SQUARE_VERSION_FORMAT"
+ * @const
+ */
+ "INVALID_SQUARE_VERSION_FORMAT": "INVALID_SQUARE_VERSION_FORMAT",
+ /**
+ * value: "API_VERSION_INCOMPATIBLE"
+ * @const
+ */
+ "API_VERSION_INCOMPATIBLE": "API_VERSION_INCOMPATIBLE",
/**
* value: "CARD_DECLINED"
* @const
diff --git a/src/model/InventoryAdjustment.js b/src/model/InventoryAdjustment.js
index 8e95eb8..f9ed788 100644
--- a/src/model/InventoryAdjustment.js
+++ b/src/model/InventoryAdjustment.js
@@ -153,7 +153,7 @@ exports.prototype['catalog_object_id'] = undefined;
*/
exports.prototype['catalog_object_type'] = undefined;
/**
- * The number of items affected by the adjustment as a decimal string. Fractional quantities are not supported.
+ * 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, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information.
* @member {String} quantity
*/
exports.prototype['quantity'] = undefined;
diff --git a/src/model/InventoryCount.js b/src/model/InventoryCount.js
index 69f1386..89be1ed 100644
--- a/src/model/InventoryCount.js
+++ b/src/model/InventoryCount.js
@@ -23,7 +23,7 @@ var ApiClient = require('../ApiClient');
/**
* Constructs a new InventoryCount
.
- * 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.
+ * 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
* @alias module:model/InventoryCount
* @class
*/
@@ -92,7 +92,7 @@ exports.prototype['state'] = undefined;
*/
exports.prototype['location_id'] = undefined;
/**
- * The number of items in the count as a decimal string. Fractional quantities are not supported.
+ * 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, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information.
* @member {String} quantity
*/
exports.prototype['quantity'] = undefined;
diff --git a/src/model/InventoryPhysicalCount.js b/src/model/InventoryPhysicalCount.js
index 1afa2f0..5c01af8 100644
--- a/src/model/InventoryPhysicalCount.js
+++ b/src/model/InventoryPhysicalCount.js
@@ -24,7 +24,7 @@ var SourceApplication = require('./SourceApplication');
/**
* Constructs a new InventoryPhysicalCount
.
- * Represents a verified (re)count of items in a given state at a specific location. For example, the quantity of items currently on hand at a physical store).
+ * Represents the quantity of an item variation that is physically present at a specific location, verified by a seller or a seller's employee. For example, a physical count might come from an employee counting the item variations on hand or from syncing with an external system.
* @alias module:model/InventoryPhysicalCount
* @class
*/
@@ -123,7 +123,7 @@ exports.prototype['state'] = undefined;
*/
exports.prototype['location_id'] = undefined;
/**
- * The number of items affected by the physical count as a decimal string. Fractional quantities are not supported.
+ * The number of items affected by the physical 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, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information.
* @member {String} quantity
*/
exports.prototype['quantity'] = undefined;
diff --git a/src/model/InventoryTransfer.js b/src/model/InventoryTransfer.js
index 7840de0..42a175b 100644
--- a/src/model/InventoryTransfer.js
+++ b/src/model/InventoryTransfer.js
@@ -132,7 +132,7 @@ exports.prototype['catalog_object_id'] = undefined;
*/
exports.prototype['catalog_object_type'] = undefined;
/**
- * The number of items affected by the transfer as a decimal string. Fractional quantities are not supported.
+ * The number of items affected by the transfer 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, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information.
* @member {String} quantity
*/
exports.prototype['quantity'] = undefined;
diff --git a/src/model/Location.js b/src/model/Location.js
index 924cbe1..890c5a8 100644
--- a/src/model/Location.js
+++ b/src/model/Location.js
@@ -13,6 +13,7 @@
*/
var ApiClient = require('../ApiClient');
var Address = require('./Address');
+var BusinessHours = require('./BusinessHours');
@@ -46,6 +47,7 @@ var exports = function() {
+
};
/**
@@ -103,6 +105,9 @@ exports.constructFromObject = function(data, obj) {
}
if (data.hasOwnProperty('website_url')) {
obj['website_url'] = ApiClient.convertToType(data['website_url'], 'String');
+ }
+ if (data.hasOwnProperty('business_hours')) {
+ obj['business_hours'] = BusinessHours.constructFromObject(data['business_hours']);
}
}
return obj;
@@ -183,6 +188,11 @@ exports.prototype['type'] = undefined;
* @member {String} website_url
*/
exports.prototype['website_url'] = undefined;
+/**
+ * The hours of operation for a business location. Default: none; only exists if explicitly set.
+ * @member {module:model/BusinessHours} business_hours
+ */
+exports.prototype['business_hours'] = undefined;
/**
diff --git a/src/model/MeasurementUnit.js b/src/model/MeasurementUnit.js
new file mode 100644
index 0000000..bcc632d
--- /dev/null
+++ b/src/model/MeasurementUnit.js
@@ -0,0 +1,295 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var MeasurementUnitCustom = require('./MeasurementUnitCustom');
+
+
+
+
+/**
+ * The MeasurementUnit model module.
+ * @module model/MeasurementUnit
+ */
+
+/**
+ * Constructs a new MeasurementUnit
.
+ * Represents a unit of measurement to use with a quantity, such as ounces or inches. Exactly one of the following fields are required: `custom_unit`, `area_unit`, `length_unit`, `volume_unit`, and `weight_unit`. The `family` field describes the type of measurement. For example, ounces are in the weight family.
+ * @alias module:model/MeasurementUnit
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a MeasurementUnit
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/MeasurementUnit} obj Optional instance to populate.
+ * @return {module:model/MeasurementUnit} The populated MeasurementUnit
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('custom_unit')) {
+ obj['custom_unit'] = MeasurementUnitCustom.constructFromObject(data['custom_unit']);
+ }
+ if (data.hasOwnProperty('area_unit')) {
+ obj['area_unit'] = ApiClient.convertToType(data['area_unit'], 'String');
+ }
+ if (data.hasOwnProperty('length_unit')) {
+ obj['length_unit'] = ApiClient.convertToType(data['length_unit'], 'String');
+ }
+ if (data.hasOwnProperty('volume_unit')) {
+ obj['volume_unit'] = ApiClient.convertToType(data['volume_unit'], 'String');
+ }
+ if (data.hasOwnProperty('weight_unit')) {
+ obj['weight_unit'] = ApiClient.convertToType(data['weight_unit'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * A custom unit of measurement defined by the seller using the Point of Sale app or ad-hoc as an order line item.
+ * @member {module:model/MeasurementUnitCustom} custom_unit
+ */
+exports.prototype['custom_unit'] = undefined;
+/**
+ * Represents a standard area unit. See [MeasurementUnitArea](#type-measurementunitarea) for possible values
+ * @member {module:model/MeasurementUnit.AreaUnitEnum} area_unit
+ */
+exports.prototype['area_unit'] = undefined;
+/**
+ * Represents a standard length unit. See [MeasurementUnitLength](#type-measurementunitlength) for possible values
+ * @member {module:model/MeasurementUnit.LengthUnitEnum} length_unit
+ */
+exports.prototype['length_unit'] = undefined;
+/**
+ * Represents a standard volume unit. See [MeasurementUnitVolume](#type-measurementunitvolume) for possible values
+ * @member {module:model/MeasurementUnit.VolumeUnitEnum} volume_unit
+ */
+exports.prototype['volume_unit'] = undefined;
+/**
+ * Represents a standard unit of weight or mass. See [MeasurementUnitWeight](#type-measurementunitweight) for possible values
+ * @member {module:model/MeasurementUnit.WeightUnitEnum} weight_unit
+ */
+exports.prototype['weight_unit'] = undefined;
+
+
+ /**
+ * Allowed values for the area_unit
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.AreaUnitEnum = {
+ /**
+ * value: "IMPERIAL_ACRE"
+ * @const
+ */
+ "IMPERIAL_ACRE": "IMPERIAL_ACRE",
+ /**
+ * value: "IMPERIAL_SQUARE_INCH"
+ * @const
+ */
+ "IMPERIAL_SQUARE_INCH": "IMPERIAL_SQUARE_INCH",
+ /**
+ * value: "IMPERIAL_SQUARE_FOOT"
+ * @const
+ */
+ "IMPERIAL_SQUARE_FOOT": "IMPERIAL_SQUARE_FOOT",
+ /**
+ * value: "IMPERIAL_SQUARE_YARD"
+ * @const
+ */
+ "IMPERIAL_SQUARE_YARD": "IMPERIAL_SQUARE_YARD",
+ /**
+ * value: "IMPERIAL_SQUARE_MILE"
+ * @const
+ */
+ "IMPERIAL_SQUARE_MILE": "IMPERIAL_SQUARE_MILE",
+ /**
+ * value: "METRIC_SQUARE_CENTIMETER"
+ * @const
+ */
+ "METRIC_SQUARE_CENTIMETER": "METRIC_SQUARE_CENTIMETER",
+ /**
+ * value: "METRIC_SQUARE_METER"
+ * @const
+ */
+ "METRIC_SQUARE_METER": "METRIC_SQUARE_METER",
+ /**
+ * value: "METRIC_SQUARE_KILOMETER"
+ * @const
+ */
+ "METRIC_SQUARE_KILOMETER": "METRIC_SQUARE_KILOMETER" };
+
+ /**
+ * Allowed values for the length_unit
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.LengthUnitEnum = {
+ /**
+ * value: "IMPERIAL_INCH"
+ * @const
+ */
+ "IMPERIAL_INCH": "IMPERIAL_INCH",
+ /**
+ * value: "IMPERIAL_FOOT"
+ * @const
+ */
+ "IMPERIAL_FOOT": "IMPERIAL_FOOT",
+ /**
+ * value: "IMPERIAL_YARD"
+ * @const
+ */
+ "IMPERIAL_YARD": "IMPERIAL_YARD",
+ /**
+ * value: "IMPERIAL_MILE"
+ * @const
+ */
+ "IMPERIAL_MILE": "IMPERIAL_MILE",
+ /**
+ * value: "METRIC_MILLIMETER"
+ * @const
+ */
+ "METRIC_MILLIMETER": "METRIC_MILLIMETER",
+ /**
+ * value: "METRIC_CENTIMETER"
+ * @const
+ */
+ "METRIC_CENTIMETER": "METRIC_CENTIMETER",
+ /**
+ * value: "METRIC_METER"
+ * @const
+ */
+ "METRIC_METER": "METRIC_METER",
+ /**
+ * value: "METRIC_KILOMETER"
+ * @const
+ */
+ "METRIC_KILOMETER": "METRIC_KILOMETER" };
+
+ /**
+ * Allowed values for the volume_unit
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.VolumeUnitEnum = {
+ /**
+ * value: "GENERIC_FLUID_OUNCE"
+ * @const
+ */
+ "GENERIC_FLUID_OUNCE": "GENERIC_FLUID_OUNCE",
+ /**
+ * value: "GENERIC_SHOT"
+ * @const
+ */
+ "GENERIC_SHOT": "GENERIC_SHOT",
+ /**
+ * value: "GENERIC_CUP"
+ * @const
+ */
+ "GENERIC_CUP": "GENERIC_CUP",
+ /**
+ * value: "GENERIC_PINT"
+ * @const
+ */
+ "GENERIC_PINT": "GENERIC_PINT",
+ /**
+ * value: "GENERIC_QUART"
+ * @const
+ */
+ "GENERIC_QUART": "GENERIC_QUART",
+ /**
+ * value: "GENERIC_GALLON"
+ * @const
+ */
+ "GENERIC_GALLON": "GENERIC_GALLON",
+ /**
+ * value: "IMPERIAL_CUBIC_INCH"
+ * @const
+ */
+ "IMPERIAL_CUBIC_INCH": "IMPERIAL_CUBIC_INCH",
+ /**
+ * value: "IMPERIAL_CUBIC_FOOT"
+ * @const
+ */
+ "IMPERIAL_CUBIC_FOOT": "IMPERIAL_CUBIC_FOOT",
+ /**
+ * value: "IMPERIAL_CUBIC_YARD"
+ * @const
+ */
+ "IMPERIAL_CUBIC_YARD": "IMPERIAL_CUBIC_YARD",
+ /**
+ * value: "METRIC_MILLILITER"
+ * @const
+ */
+ "METRIC_MILLILITER": "METRIC_MILLILITER",
+ /**
+ * value: "METRIC_LITER"
+ * @const
+ */
+ "METRIC_LITER": "METRIC_LITER" };
+
+ /**
+ * Allowed values for the weight_unit
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.WeightUnitEnum = {
+ /**
+ * value: "IMPERIAL_WEIGHT_OUNCE"
+ * @const
+ */
+ "IMPERIAL_WEIGHT_OUNCE": "IMPERIAL_WEIGHT_OUNCE",
+ /**
+ * value: "IMPERIAL_POUND"
+ * @const
+ */
+ "IMPERIAL_POUND": "IMPERIAL_POUND",
+ /**
+ * value: "IMPERIAL_STONE"
+ * @const
+ */
+ "IMPERIAL_STONE": "IMPERIAL_STONE",
+ /**
+ * value: "METRIC_MILLIGRAM"
+ * @const
+ */
+ "METRIC_MILLIGRAM": "METRIC_MILLIGRAM",
+ /**
+ * value: "METRIC_GRAM"
+ * @const
+ */
+ "METRIC_GRAM": "METRIC_GRAM",
+ /**
+ * value: "METRIC_KILOGRAM"
+ * @const
+ */
+ "METRIC_KILOGRAM": "METRIC_KILOGRAM" };
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/MeasurementUnitArea.js b/src/model/MeasurementUnitArea.js
new file mode 100644
index 0000000..a718f89
--- /dev/null
+++ b/src/model/MeasurementUnitArea.js
@@ -0,0 +1,75 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+/**
+ * Enum class MeasurementUnitArea.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "IMPERIAL_ACRE"
+ * @const
+ */
+ "IMPERIAL_ACRE": "IMPERIAL_ACRE",
+ /**
+ * value: "IMPERIAL_SQUARE_INCH"
+ * @const
+ */
+ "IMPERIAL_SQUARE_INCH": "IMPERIAL_SQUARE_INCH",
+ /**
+ * value: "IMPERIAL_SQUARE_FOOT"
+ * @const
+ */
+ "IMPERIAL_SQUARE_FOOT": "IMPERIAL_SQUARE_FOOT",
+ /**
+ * value: "IMPERIAL_SQUARE_YARD"
+ * @const
+ */
+ "IMPERIAL_SQUARE_YARD": "IMPERIAL_SQUARE_YARD",
+ /**
+ * value: "IMPERIAL_SQUARE_MILE"
+ * @const
+ */
+ "IMPERIAL_SQUARE_MILE": "IMPERIAL_SQUARE_MILE",
+ /**
+ * value: "METRIC_SQUARE_CENTIMETER"
+ * @const
+ */
+ "METRIC_SQUARE_CENTIMETER": "METRIC_SQUARE_CENTIMETER",
+ /**
+ * value: "METRIC_SQUARE_METER"
+ * @const
+ */
+ "METRIC_SQUARE_METER": "METRIC_SQUARE_METER",
+ /**
+ * value: "METRIC_SQUARE_KILOMETER"
+ * @const
+ */
+ "METRIC_SQUARE_KILOMETER": "METRIC_SQUARE_KILOMETER"};
+
+/**
+ * Returns a MeasurementUnitArea
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/MeasurementUnitArea} The enum MeasurementUnitArea
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/MeasurementUnitCustom.js b/src/model/MeasurementUnitCustom.js
new file mode 100644
index 0000000..86844a4
--- /dev/null
+++ b/src/model/MeasurementUnitCustom.js
@@ -0,0 +1,76 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The MeasurementUnitCustom model module.
+ * @module model/MeasurementUnitCustom
+ */
+
+/**
+ * Constructs a new MeasurementUnitCustom
.
+ * The information needed to define a custom unit, provided by the seller.
+ * @alias module:model/MeasurementUnitCustom
+ * @class
+ * @param name {String} The name of the custom unit, for example \"bushel\".
+ * @param abbreviation {String} The abbreviation of the custom unit, such as \"bsh\" (bushel). This appears in the cart for the Point of Sale app, and in reports.
+ */
+var exports = function(name, abbreviation) {
+ var _this = this;
+
+ _this['name'] = name;
+ _this['abbreviation'] = abbreviation;
+};
+
+/**
+ * Constructs a MeasurementUnitCustom
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/MeasurementUnitCustom} obj Optional instance to populate.
+ * @return {module:model/MeasurementUnitCustom} The populated MeasurementUnitCustom
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('abbreviation')) {
+ obj['abbreviation'] = ApiClient.convertToType(data['abbreviation'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The name of the custom unit, for example \"bushel\".
+ * @member {String} name
+ */
+exports.prototype['name'] = undefined;
+/**
+ * The abbreviation of the custom unit, such as \"bsh\" (bushel). This appears in the cart for the Point of Sale app, and in reports.
+ * @member {String} abbreviation
+ */
+exports.prototype['abbreviation'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/MeasurementUnitLength.js b/src/model/MeasurementUnitLength.js
new file mode 100644
index 0000000..3c5e4fe
--- /dev/null
+++ b/src/model/MeasurementUnitLength.js
@@ -0,0 +1,75 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+/**
+ * Enum class MeasurementUnitLength.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "IMPERIAL_INCH"
+ * @const
+ */
+ "IMPERIAL_INCH": "IMPERIAL_INCH",
+ /**
+ * value: "IMPERIAL_FOOT"
+ * @const
+ */
+ "IMPERIAL_FOOT": "IMPERIAL_FOOT",
+ /**
+ * value: "IMPERIAL_YARD"
+ * @const
+ */
+ "IMPERIAL_YARD": "IMPERIAL_YARD",
+ /**
+ * value: "IMPERIAL_MILE"
+ * @const
+ */
+ "IMPERIAL_MILE": "IMPERIAL_MILE",
+ /**
+ * value: "METRIC_MILLIMETER"
+ * @const
+ */
+ "METRIC_MILLIMETER": "METRIC_MILLIMETER",
+ /**
+ * value: "METRIC_CENTIMETER"
+ * @const
+ */
+ "METRIC_CENTIMETER": "METRIC_CENTIMETER",
+ /**
+ * value: "METRIC_METER"
+ * @const
+ */
+ "METRIC_METER": "METRIC_METER",
+ /**
+ * value: "METRIC_KILOMETER"
+ * @const
+ */
+ "METRIC_KILOMETER": "METRIC_KILOMETER"};
+
+/**
+ * Returns a MeasurementUnitLength
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/MeasurementUnitLength} The enum MeasurementUnitLength
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/MeasurementUnitVolume.js b/src/model/MeasurementUnitVolume.js
new file mode 100644
index 0000000..1bd84b0
--- /dev/null
+++ b/src/model/MeasurementUnitVolume.js
@@ -0,0 +1,90 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+/**
+ * Enum class MeasurementUnitVolume.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "GENERIC_FLUID_OUNCE"
+ * @const
+ */
+ "GENERIC_FLUID_OUNCE": "GENERIC_FLUID_OUNCE",
+ /**
+ * value: "GENERIC_SHOT"
+ * @const
+ */
+ "GENERIC_SHOT": "GENERIC_SHOT",
+ /**
+ * value: "GENERIC_CUP"
+ * @const
+ */
+ "GENERIC_CUP": "GENERIC_CUP",
+ /**
+ * value: "GENERIC_PINT"
+ * @const
+ */
+ "GENERIC_PINT": "GENERIC_PINT",
+ /**
+ * value: "GENERIC_QUART"
+ * @const
+ */
+ "GENERIC_QUART": "GENERIC_QUART",
+ /**
+ * value: "GENERIC_GALLON"
+ * @const
+ */
+ "GENERIC_GALLON": "GENERIC_GALLON",
+ /**
+ * value: "IMPERIAL_CUBIC_INCH"
+ * @const
+ */
+ "IMPERIAL_CUBIC_INCH": "IMPERIAL_CUBIC_INCH",
+ /**
+ * value: "IMPERIAL_CUBIC_FOOT"
+ * @const
+ */
+ "IMPERIAL_CUBIC_FOOT": "IMPERIAL_CUBIC_FOOT",
+ /**
+ * value: "IMPERIAL_CUBIC_YARD"
+ * @const
+ */
+ "IMPERIAL_CUBIC_YARD": "IMPERIAL_CUBIC_YARD",
+ /**
+ * value: "METRIC_MILLILITER"
+ * @const
+ */
+ "METRIC_MILLILITER": "METRIC_MILLILITER",
+ /**
+ * value: "METRIC_LITER"
+ * @const
+ */
+ "METRIC_LITER": "METRIC_LITER"};
+
+/**
+ * Returns a MeasurementUnitVolume
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/MeasurementUnitVolume} The enum MeasurementUnitVolume
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/MeasurementUnitWeight.js b/src/model/MeasurementUnitWeight.js
new file mode 100644
index 0000000..b7ce88b
--- /dev/null
+++ b/src/model/MeasurementUnitWeight.js
@@ -0,0 +1,65 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+/**
+ * Enum class MeasurementUnitWeight.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "IMPERIAL_WEIGHT_OUNCE"
+ * @const
+ */
+ "IMPERIAL_WEIGHT_OUNCE": "IMPERIAL_WEIGHT_OUNCE",
+ /**
+ * value: "IMPERIAL_POUND"
+ * @const
+ */
+ "IMPERIAL_POUND": "IMPERIAL_POUND",
+ /**
+ * value: "IMPERIAL_STONE"
+ * @const
+ */
+ "IMPERIAL_STONE": "IMPERIAL_STONE",
+ /**
+ * value: "METRIC_MILLIGRAM"
+ * @const
+ */
+ "METRIC_MILLIGRAM": "METRIC_MILLIGRAM",
+ /**
+ * value: "METRIC_GRAM"
+ * @const
+ */
+ "METRIC_GRAM": "METRIC_GRAM",
+ /**
+ * value: "METRIC_KILOGRAM"
+ * @const
+ */
+ "METRIC_KILOGRAM": "METRIC_KILOGRAM"};
+
+/**
+ * Returns a MeasurementUnitWeight
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/MeasurementUnitWeight} The enum MeasurementUnitWeight
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/Order.js b/src/model/Order.js
index 2fb11aa..9a3c35d 100644
--- a/src/model/Order.js
+++ b/src/model/Order.js
@@ -17,7 +17,12 @@ var OrderFulfillment = require('./OrderFulfillment');
var OrderLineItem = require('./OrderLineItem');
var OrderLineItemDiscount = require('./OrderLineItemDiscount');
var OrderLineItemTax = require('./OrderLineItemTax');
+var OrderMoneyAmounts = require('./OrderMoneyAmounts');
+var OrderReturn = require('./OrderReturn');
+var OrderRoundingAdjustment = require('./OrderRoundingAdjustment');
var OrderSource = require('./OrderSource');
+var Refund = require('./Refund');
+var Tender = require('./Tender');
@@ -29,7 +34,7 @@ var OrderSource = require('./OrderSource');
/**
* Constructs a new Order
.
- * Contains all information related to a single order to process with Square, including line items that specify the products to purchase
+ * Contains all information related to a single order to process with Square, including line items that specify the products to purchase. Order objects also include information on any associated tenders, refunds, and returns. All Connect V2 Transactions have all been converted to Orders including all associated itemization data.
* @alias module:model/Order
* @class
* @param locationId {String} The ID of the merchant location this order is associated with.
@@ -48,6 +53,17 @@ var exports = function(locationId) {
+
+
+
+
+
+
+
+
+
+
+
};
/**
@@ -72,6 +88,9 @@ exports.constructFromObject = function(data, obj) {
}
if (data.hasOwnProperty('source')) {
obj['source'] = OrderSource.constructFromObject(data['source']);
+ }
+ if (data.hasOwnProperty('customer_id')) {
+ obj['customer_id'] = ApiClient.convertToType(data['customer_id'], 'String');
}
if (data.hasOwnProperty('line_items')) {
obj['line_items'] = ApiClient.convertToType(data['line_items'], [OrderLineItem]);
@@ -84,6 +103,36 @@ exports.constructFromObject = function(data, obj) {
}
if (data.hasOwnProperty('fulfillments')) {
obj['fulfillments'] = ApiClient.convertToType(data['fulfillments'], [OrderFulfillment]);
+ }
+ if (data.hasOwnProperty('returns')) {
+ obj['returns'] = ApiClient.convertToType(data['returns'], [OrderReturn]);
+ }
+ if (data.hasOwnProperty('return_amounts')) {
+ obj['return_amounts'] = OrderMoneyAmounts.constructFromObject(data['return_amounts']);
+ }
+ if (data.hasOwnProperty('net_amounts')) {
+ obj['net_amounts'] = OrderMoneyAmounts.constructFromObject(data['net_amounts']);
+ }
+ if (data.hasOwnProperty('rounding_adjustment')) {
+ obj['rounding_adjustment'] = OrderRoundingAdjustment.constructFromObject(data['rounding_adjustment']);
+ }
+ if (data.hasOwnProperty('tenders')) {
+ obj['tenders'] = ApiClient.convertToType(data['tenders'], [Tender]);
+ }
+ if (data.hasOwnProperty('refunds')) {
+ obj['refunds'] = ApiClient.convertToType(data['refunds'], [Refund]);
+ }
+ if (data.hasOwnProperty('created_at')) {
+ obj['created_at'] = ApiClient.convertToType(data['created_at'], 'String');
+ }
+ if (data.hasOwnProperty('updated_at')) {
+ obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'String');
+ }
+ if (data.hasOwnProperty('closed_at')) {
+ obj['closed_at'] = ApiClient.convertToType(data['closed_at'], 'String');
+ }
+ if (data.hasOwnProperty('state')) {
+ obj['state'] = ApiClient.convertToType(data['state'], 'String');
}
if (data.hasOwnProperty('total_money')) {
obj['total_money'] = Money.constructFromObject(data['total_money']);
@@ -118,6 +167,11 @@ exports.prototype['reference_id'] = undefined;
* @member {module:model/OrderSource} source
*/
exports.prototype['source'] = undefined;
+/**
+ * The [Customer](#type-customer) ID of the customer associated with the order.
+ * @member {String} customer_id
+ */
+exports.prototype['customer_id'] = undefined;
/**
* The line items included in the order.
* @member {Array.state
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.StateEnum = {
+ /**
+ * value: "OPEN"
+ * @const
+ */
+ "OPEN": "OPEN",
+ /**
+ * value: "COMPLETED"
+ * @const
+ */
+ "COMPLETED": "COMPLETED",
+ /**
+ * value: "CANCELED"
+ * @const
+ */
+ "CANCELED": "CANCELED" };
+
module.exports = exports;
diff --git a/src/model/OrderEntry.js b/src/model/OrderEntry.js
new file mode 100644
index 0000000..d6cda7f
--- /dev/null
+++ b/src/model/OrderEntry.js
@@ -0,0 +1,74 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The OrderEntry model module.
+ * @module model/OrderEntry
+ */
+
+/**
+ * Constructs a new OrderEntry
.
+ * A lightweight description of an [Order](#type-order) that is returned when `returned_entries` is true on a [SearchOrderRequest](#type-searchorderrequest)
+ * @alias module:model/OrderEntry
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a OrderEntry
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/OrderEntry} obj Optional instance to populate.
+ * @return {module:model/OrderEntry} The populated OrderEntry
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('order_id')) {
+ obj['order_id'] = ApiClient.convertToType(data['order_id'], 'String');
+ }
+ if (data.hasOwnProperty('location_id')) {
+ obj['location_id'] = ApiClient.convertToType(data['location_id'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The id of the Order
+ * @member {String} order_id
+ */
+exports.prototype['order_id'] = undefined;
+/**
+ * The location id the Order belongs to.
+ * @member {String} location_id
+ */
+exports.prototype['location_id'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/OrderLineItem.js b/src/model/OrderLineItem.js
index 5ffb52e..149b921 100644
--- a/src/model/OrderLineItem.js
+++ b/src/model/OrderLineItem.js
@@ -16,6 +16,7 @@ var Money = require('./Money');
var OrderLineItemDiscount = require('./OrderLineItemDiscount');
var OrderLineItemModifier = require('./OrderLineItemModifier');
var OrderLineItemTax = require('./OrderLineItemTax');
+var OrderQuantityUnit = require('./OrderQuantityUnit');
@@ -30,12 +31,13 @@ var OrderLineItemTax = require('./OrderLineItemTax');
* Represents a line item in an order. Each line item describes a different product to purchase, with its own quantity and price details.
* @alias module:model/OrderLineItem
* @class
- * @param quantity {String} The quantity purchased, as a string representation of a number. This string must have a positive integer value.
+ * @param 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).
*/
var exports = function(quantity) {
var _this = this;
+
_this['quantity'] = quantity;
@@ -48,6 +50,8 @@ var exports = function(quantity) {
+
+
};
/**
@@ -61,11 +65,17 @@ exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
+ if (data.hasOwnProperty('uid')) {
+ obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
+ }
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('quantity')) {
obj['quantity'] = ApiClient.convertToType(data['quantity'], 'String');
+ }
+ if (data.hasOwnProperty('quantity_unit')) {
+ obj['quantity_unit'] = OrderQuantityUnit.constructFromObject(data['quantity_unit']);
}
if (data.hasOwnProperty('note')) {
obj['note'] = ApiClient.convertToType(data['note'], 'String');
@@ -87,6 +97,9 @@ exports.constructFromObject = function(data, obj) {
}
if (data.hasOwnProperty('base_price_money')) {
obj['base_price_money'] = Money.constructFromObject(data['base_price_money']);
+ }
+ if (data.hasOwnProperty('variation_total_price_money')) {
+ obj['variation_total_price_money'] = Money.constructFromObject(data['variation_total_price_money']);
}
if (data.hasOwnProperty('gross_sales_money')) {
obj['gross_sales_money'] = Money.constructFromObject(data['gross_sales_money']);
@@ -104,16 +117,26 @@ exports.constructFromObject = function(data, obj) {
return obj;
}
+/**
+ * The line item's Unique identifier, unique only within this order. This field is read-only.
+ * @member {String} uid
+ */
+exports.prototype['uid'] = undefined;
/**
* The name of the line item.
* @member {String} name
*/
exports.prototype['name'] = undefined;
/**
- * The quantity purchased, as a string representation of a number. This string must have a positive integer value.
+ * The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities).
* @member {String} quantity
*/
exports.prototype['quantity'] = undefined;
+/**
+ * The unit and precision that this line item's quantity is measured in.
+ * @member {module:model/OrderQuantityUnit} quantity_unit
+ */
+exports.prototype['quantity_unit'] = undefined;
/**
* The note of the line item.
* @member {String} note
@@ -150,7 +173,12 @@ exports.prototype['discounts'] = undefined;
*/
exports.prototype['base_price_money'] = undefined;
/**
- * The gross sales amount of money calculated as (item base price + modifiers price) * quantity.
+ * The total price of all item variations sold in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers.
+ * @member {module:model/Money} variation_total_price_money
+ */
+exports.prototype['variation_total_price_money'] = undefined;
+/**
+ * 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.
* @member {module:model/Money} gross_sales_money
*/
exports.prototype['gross_sales_money'] = undefined;
diff --git a/src/model/OrderLineItemDiscount.js b/src/model/OrderLineItemDiscount.js
index b468fcf..f584a62 100644
--- a/src/model/OrderLineItemDiscount.js
+++ b/src/model/OrderLineItemDiscount.js
@@ -38,6 +38,7 @@ var exports = function() {
+
};
/**
@@ -51,6 +52,9 @@ exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
+ if (data.hasOwnProperty('uid')) {
+ obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
+ }
if (data.hasOwnProperty('catalog_object_id')) {
obj['catalog_object_id'] = ApiClient.convertToType(data['catalog_object_id'], 'String');
}
@@ -76,6 +80,11 @@ exports.constructFromObject = function(data, obj) {
return obj;
}
+/**
+ * The discount's Unique identifier, unique only within this order. This field is read-only.
+ * @member {String} uid
+ */
+exports.prototype['uid'] = undefined;
/**
* The catalog object id referencing [CatalogDiscount](#type-catalogdiscount).
* @member {String} catalog_object_id
@@ -92,7 +101,7 @@ exports.prototype['name'] = undefined;
*/
exports.prototype['type'] = undefined;
/**
- * The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount.
+ * The percentage of the discount, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount.
* @member {String} percentage
*/
exports.prototype['percentage'] = undefined;
diff --git a/src/model/OrderLineItemModifier.js b/src/model/OrderLineItemModifier.js
index d7306e2..ee56469 100644
--- a/src/model/OrderLineItemModifier.js
+++ b/src/model/OrderLineItemModifier.js
@@ -35,6 +35,7 @@ var exports = function() {
+
};
/**
@@ -48,6 +49,9 @@ exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
+ if (data.hasOwnProperty('uid')) {
+ obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
+ }
if (data.hasOwnProperty('catalog_object_id')) {
obj['catalog_object_id'] = ApiClient.convertToType(data['catalog_object_id'], 'String');
}
@@ -64,6 +68,11 @@ exports.constructFromObject = function(data, obj) {
return obj;
}
+/**
+ * The modifier's Unique identifier, unique only within this order. This field is read-only.
+ * @member {String} uid
+ */
+exports.prototype['uid'] = undefined;
/**
* The catalog object id referencing [CatalogModifier](#type-catalogmodifier).
* @member {String} catalog_object_id
@@ -80,7 +89,7 @@ exports.prototype['name'] = undefined;
*/
exports.prototype['base_price_money'] = undefined;
/**
- * The total price of the item modifier for its line item. This is the modifier's base_price_money multiplied by the line item's quantity.
+ * The total price of the item modifier for its line item. This is the modifier's `base_price_money` multiplied by the line item's quantity.
* @member {module:model/Money} total_price_money
*/
exports.prototype['total_price_money'] = undefined;
diff --git a/src/model/OrderLineItemTax.js b/src/model/OrderLineItemTax.js
index 162b531..b0d51a2 100644
--- a/src/model/OrderLineItemTax.js
+++ b/src/model/OrderLineItemTax.js
@@ -37,6 +37,7 @@ var exports = function() {
+
};
/**
@@ -50,6 +51,9 @@ exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
+ if (data.hasOwnProperty('uid')) {
+ obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
+ }
if (data.hasOwnProperty('catalog_object_id')) {
obj['catalog_object_id'] = ApiClient.convertToType(data['catalog_object_id'], 'String');
}
@@ -72,6 +76,11 @@ exports.constructFromObject = function(data, obj) {
return obj;
}
+/**
+ * The tax's Unique identifier, unique only within this order. This field is read-only.
+ * @member {String} uid
+ */
+exports.prototype['uid'] = undefined;
/**
* The catalog object id referencing [CatalogTax](#type-catalogtax).
* @member {String} catalog_object_id
diff --git a/src/model/OrderMoneyAmounts.js b/src/model/OrderMoneyAmounts.js
new file mode 100644
index 0000000..472f826
--- /dev/null
+++ b/src/model/OrderMoneyAmounts.js
@@ -0,0 +1,102 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var Money = require('./Money');
+
+
+
+
+/**
+ * The OrderMoneyAmounts model module.
+ * @module model/OrderMoneyAmounts
+ */
+
+/**
+ * Constructs a new OrderMoneyAmounts
.
+ * A collection of various money amounts.
+ * @alias module:model/OrderMoneyAmounts
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a OrderMoneyAmounts
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/OrderMoneyAmounts} obj Optional instance to populate.
+ * @return {module:model/OrderMoneyAmounts} The populated OrderMoneyAmounts
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('total_money')) {
+ obj['total_money'] = Money.constructFromObject(data['total_money']);
+ }
+ if (data.hasOwnProperty('tax_money')) {
+ obj['tax_money'] = Money.constructFromObject(data['tax_money']);
+ }
+ if (data.hasOwnProperty('discount_money')) {
+ obj['discount_money'] = Money.constructFromObject(data['discount_money']);
+ }
+ if (data.hasOwnProperty('tip_money')) {
+ obj['tip_money'] = Money.constructFromObject(data['tip_money']);
+ }
+ if (data.hasOwnProperty('service_charge_money')) {
+ obj['service_charge_money'] = Money.constructFromObject(data['service_charge_money']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Total money.
+ * @member {module:model/Money} total_money
+ */
+exports.prototype['total_money'] = undefined;
+/**
+ * Money associated with taxes.
+ * @member {module:model/Money} tax_money
+ */
+exports.prototype['tax_money'] = undefined;
+/**
+ * Money associated with discounts.
+ * @member {module:model/Money} discount_money
+ */
+exports.prototype['discount_money'] = undefined;
+/**
+ * Money associated with tips.
+ * @member {module:model/Money} tip_money
+ */
+exports.prototype['tip_money'] = undefined;
+/**
+ * Money associated with service charges.
+ * @member {module:model/Money} service_charge_money
+ */
+exports.prototype['service_charge_money'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/OrderQuantityUnit.js b/src/model/OrderQuantityUnit.js
new file mode 100644
index 0000000..ee5ba5f
--- /dev/null
+++ b/src/model/OrderQuantityUnit.js
@@ -0,0 +1,75 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var MeasurementUnit = require('./MeasurementUnit');
+
+
+
+
+/**
+ * The OrderQuantityUnit model module.
+ * @module model/OrderQuantityUnit
+ */
+
+/**
+ * Constructs a new OrderQuantityUnit
.
+ * Contains the measurement unit for a quantity and a precision which specifies the number of digits after the decimal point for decimal quantities.
+ * @alias module:model/OrderQuantityUnit
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a OrderQuantityUnit
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/OrderQuantityUnit} obj Optional instance to populate.
+ * @return {module:model/OrderQuantityUnit} The populated OrderQuantityUnit
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('measurement_unit')) {
+ obj['measurement_unit'] = MeasurementUnit.constructFromObject(data['measurement_unit']);
+ }
+ if (data.hasOwnProperty('precision')) {
+ obj['precision'] = ApiClient.convertToType(data['precision'], 'Number');
+ }
+ }
+ return obj;
+}
+
+/**
+ * A [MeasurementUnit](#type-measurementunit) that represents the unit of measure for the quantity.
+ * @member {module:model/MeasurementUnit} measurement_unit
+ */
+exports.prototype['measurement_unit'] = undefined;
+/**
+ * For non-integer quantities, represents the number of digits after the decimal point that are recorded for this quantity. For example, a precision of 1 allows quantities like `\"1.0\"` and `\"1.1\"`, but not `\"1.01\"`. Min: 0. Max: 5. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities).
+ * @member {Number} precision
+ */
+exports.prototype['precision'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/OrderReturn.js b/src/model/OrderReturn.js
new file mode 100644
index 0000000..03a41d2
--- /dev/null
+++ b/src/model/OrderReturn.js
@@ -0,0 +1,124 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var OrderMoneyAmounts = require('./OrderMoneyAmounts');
+var OrderReturnDiscount = require('./OrderReturnDiscount');
+var OrderReturnLineItem = require('./OrderReturnLineItem');
+var OrderReturnTax = require('./OrderReturnTax');
+var OrderRoundingAdjustment = require('./OrderRoundingAdjustment');
+
+
+
+
+/**
+ * The OrderReturn model module.
+ * @module model/OrderReturn
+ */
+
+/**
+ * Constructs a new OrderReturn
.
+ * The set of line items, service charges, taxes, discounts, tips, etc. being returned in an Order.
+ * @alias module:model/OrderReturn
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a OrderReturn
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/OrderReturn} obj Optional instance to populate.
+ * @return {module:model/OrderReturn} The populated OrderReturn
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('uid')) {
+ obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
+ }
+ if (data.hasOwnProperty('source_order_id')) {
+ obj['source_order_id'] = ApiClient.convertToType(data['source_order_id'], 'String');
+ }
+ if (data.hasOwnProperty('return_line_items')) {
+ obj['return_line_items'] = ApiClient.convertToType(data['return_line_items'], [OrderReturnLineItem]);
+ }
+ if (data.hasOwnProperty('return_taxes')) {
+ obj['return_taxes'] = ApiClient.convertToType(data['return_taxes'], [OrderReturnTax]);
+ }
+ if (data.hasOwnProperty('return_discounts')) {
+ obj['return_discounts'] = ApiClient.convertToType(data['return_discounts'], [OrderReturnDiscount]);
+ }
+ if (data.hasOwnProperty('rounding_adjustment')) {
+ obj['rounding_adjustment'] = OrderRoundingAdjustment.constructFromObject(data['rounding_adjustment']);
+ }
+ if (data.hasOwnProperty('return_amounts')) {
+ obj['return_amounts'] = OrderMoneyAmounts.constructFromObject(data['return_amounts']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The return's Unique identifier, unique only within this order. This field is read-only.
+ * @member {String} uid
+ */
+exports.prototype['uid'] = undefined;
+/**
+ * Order which contains the original sale of these returned line items. This will be unset for unlinked returns.
+ * @member {String} source_order_id
+ */
+exports.prototype['source_order_id'] = undefined;
+/**
+ * Collection of line items which are being returned.
+ * @member {Array.OrderReturnDiscount
.
+ * The line item discount being returned.
+ * @alias module:model/OrderReturnDiscount
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a OrderReturnDiscount
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/OrderReturnDiscount} obj Optional instance to populate.
+ * @return {module:model/OrderReturnDiscount} The populated OrderReturnDiscount
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('uid')) {
+ obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
+ }
+ if (data.hasOwnProperty('source_discount_uid')) {
+ obj['source_discount_uid'] = ApiClient.convertToType(data['source_discount_uid'], 'String');
+ }
+ if (data.hasOwnProperty('catalog_object_id')) {
+ obj['catalog_object_id'] = ApiClient.convertToType(data['catalog_object_id'], 'String');
+ }
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('type')) {
+ obj['type'] = ApiClient.convertToType(data['type'], 'String');
+ }
+ if (data.hasOwnProperty('percentage')) {
+ obj['percentage'] = ApiClient.convertToType(data['percentage'], 'String');
+ }
+ if (data.hasOwnProperty('amount_money')) {
+ obj['amount_money'] = Money.constructFromObject(data['amount_money']);
+ }
+ if (data.hasOwnProperty('applied_money')) {
+ obj['applied_money'] = Money.constructFromObject(data['applied_money']);
+ }
+ if (data.hasOwnProperty('scope')) {
+ obj['scope'] = ApiClient.convertToType(data['scope'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The return discount's Unique identifier, unique only within this order.
+ * @member {String} uid
+ */
+exports.prototype['uid'] = undefined;
+/**
+ * `uid` of the Discount from the Order which contains the original application of this discount.
+ * @member {String} source_discount_uid
+ */
+exports.prototype['source_discount_uid'] = undefined;
+/**
+ * The catalog object id referencing [CatalogDiscount](#type-catalogdiscount).
+ * @member {String} catalog_object_id
+ */
+exports.prototype['catalog_object_id'] = undefined;
+/**
+ * The discount's name.
+ * @member {String} name
+ */
+exports.prototype['name'] = undefined;
+/**
+ * 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
+ * @member {module:model/OrderReturnDiscount.TypeEnum} type
+ */
+exports.prototype['type'] = undefined;
+/**
+ * The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. The percentage won't be set for an amount-based discount.
+ * @member {String} percentage
+ */
+exports.prototype['percentage'] = undefined;
+/**
+ * The total monetary amount of the applicable discount. If it is at order level, it is the value of the order level discount. If it is at line item level, it is the value of the line item level discount. The amount_money won't be set for a percentage-based discount.
+ * @member {module:model/Money} amount_money
+ */
+exports.prototype['amount_money'] = undefined;
+/**
+ * The amount of discount actually applied to this line item. When an amount-based discount is at order-level, this value is different from `amount_money` because the discount is distributed across the line items.
+ * @member {module:model/Money} applied_money
+ */
+exports.prototype['applied_money'] = undefined;
+/**
+ * Indicates the level at which the discount applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemDiscountScope](#type-orderlineitemdiscountscope) for possible values
+ * @member {module:model/OrderReturnDiscount.ScopeEnum} scope
+ */
+exports.prototype['scope'] = undefined;
+
+
+ /**
+ * Allowed values for the type
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.TypeEnum = {
+ /**
+ * value: "UNKNOWN_DISCOUNT"
+ * @const
+ */
+ "UNKNOWN_DISCOUNT": "UNKNOWN_DISCOUNT",
+ /**
+ * value: "FIXED_PERCENTAGE"
+ * @const
+ */
+ "FIXED_PERCENTAGE": "FIXED_PERCENTAGE",
+ /**
+ * value: "FIXED_AMOUNT"
+ * @const
+ */
+ "FIXED_AMOUNT": "FIXED_AMOUNT",
+ /**
+ * value: "VARIABLE_PERCENTAGE"
+ * @const
+ */
+ "VARIABLE_PERCENTAGE": "VARIABLE_PERCENTAGE",
+ /**
+ * value: "VARIABLE_AMOUNT"
+ * @const
+ */
+ "VARIABLE_AMOUNT": "VARIABLE_AMOUNT" };
+
+ /**
+ * Allowed values for the scope
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.ScopeEnum = {
+ /**
+ * value: "OTHER_DISCOUNT_SCOPE"
+ * @const
+ */
+ "OTHER_DISCOUNT_SCOPE": "OTHER_DISCOUNT_SCOPE",
+ /**
+ * value: "LINE_ITEM"
+ * @const
+ */
+ "LINE_ITEM": "LINE_ITEM",
+ /**
+ * value: "ORDER"
+ * @const
+ */
+ "ORDER": "ORDER" };
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/OrderReturnLineItem.js b/src/model/OrderReturnLineItem.js
new file mode 100644
index 0000000..2c2eab4
--- /dev/null
+++ b/src/model/OrderReturnLineItem.js
@@ -0,0 +1,215 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var Money = require('./Money');
+var OrderQuantityUnit = require('./OrderQuantityUnit');
+var OrderReturnDiscount = require('./OrderReturnDiscount');
+var OrderReturnLineItemModifier = require('./OrderReturnLineItemModifier');
+var OrderReturnTax = require('./OrderReturnTax');
+
+
+
+
+/**
+ * The OrderReturnLineItem model module.
+ * @module model/OrderReturnLineItem
+ */
+
+/**
+ * Constructs a new OrderReturnLineItem
.
+ * The line item being returned in an Order.
+ * @alias module:model/OrderReturnLineItem
+ * @class
+ * @param quantity {String} The quantity returned, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
+ */
+var exports = function(quantity) {
+ var _this = this;
+
+
+
+
+ _this['quantity'] = quantity;
+
+
+
+
+
+
+
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a OrderReturnLineItem
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/OrderReturnLineItem} obj Optional instance to populate.
+ * @return {module:model/OrderReturnLineItem} The populated OrderReturnLineItem
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('uid')) {
+ obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
+ }
+ if (data.hasOwnProperty('source_line_item_uid')) {
+ obj['source_line_item_uid'] = ApiClient.convertToType(data['source_line_item_uid'], 'String');
+ }
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('quantity')) {
+ obj['quantity'] = ApiClient.convertToType(data['quantity'], 'String');
+ }
+ if (data.hasOwnProperty('quantity_unit')) {
+ obj['quantity_unit'] = OrderQuantityUnit.constructFromObject(data['quantity_unit']);
+ }
+ if (data.hasOwnProperty('note')) {
+ obj['note'] = ApiClient.convertToType(data['note'], 'String');
+ }
+ if (data.hasOwnProperty('catalog_object_id')) {
+ obj['catalog_object_id'] = ApiClient.convertToType(data['catalog_object_id'], 'String');
+ }
+ if (data.hasOwnProperty('variation_name')) {
+ obj['variation_name'] = ApiClient.convertToType(data['variation_name'], 'String');
+ }
+ if (data.hasOwnProperty('return_modifiers')) {
+ obj['return_modifiers'] = ApiClient.convertToType(data['return_modifiers'], [OrderReturnLineItemModifier]);
+ }
+ if (data.hasOwnProperty('return_taxes')) {
+ obj['return_taxes'] = ApiClient.convertToType(data['return_taxes'], [OrderReturnTax]);
+ }
+ if (data.hasOwnProperty('return_discounts')) {
+ obj['return_discounts'] = ApiClient.convertToType(data['return_discounts'], [OrderReturnDiscount]);
+ }
+ if (data.hasOwnProperty('base_price_money')) {
+ obj['base_price_money'] = Money.constructFromObject(data['base_price_money']);
+ }
+ if (data.hasOwnProperty('variation_total_price_money')) {
+ obj['variation_total_price_money'] = Money.constructFromObject(data['variation_total_price_money']);
+ }
+ if (data.hasOwnProperty('gross_return_money')) {
+ obj['gross_return_money'] = Money.constructFromObject(data['gross_return_money']);
+ }
+ if (data.hasOwnProperty('total_tax_money')) {
+ obj['total_tax_money'] = Money.constructFromObject(data['total_tax_money']);
+ }
+ if (data.hasOwnProperty('total_discount_money')) {
+ obj['total_discount_money'] = Money.constructFromObject(data['total_discount_money']);
+ }
+ if (data.hasOwnProperty('total_money')) {
+ obj['total_money'] = Money.constructFromObject(data['total_money']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Unique identifier for this return line item entry. This is a read-only field.
+ * @member {String} uid
+ */
+exports.prototype['uid'] = undefined;
+/**
+ * `uid` of the LineItem in the original sale Order.
+ * @member {String} source_line_item_uid
+ */
+exports.prototype['source_line_item_uid'] = undefined;
+/**
+ * The name of the line item.
+ * @member {String} name
+ */
+exports.prototype['name'] = undefined;
+/**
+ * The quantity returned, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`.
+ * @member {String} quantity
+ */
+exports.prototype['quantity'] = undefined;
+/**
+ * The unit and precision that this return line item's quantity is measured in.
+ * @member {module:model/OrderQuantityUnit} quantity_unit
+ */
+exports.prototype['quantity_unit'] = undefined;
+/**
+ * The note of the returned line item.
+ * @member {String} note
+ */
+exports.prototype['note'] = undefined;
+/**
+ * The [CatalogItemVariation](#type-catalogitemvariation) id applied to this returned line item.
+ * @member {String} catalog_object_id
+ */
+exports.prototype['catalog_object_id'] = undefined;
+/**
+ * The name of the variation applied to this returned line item.
+ * @member {String} variation_name
+ */
+exports.prototype['variation_name'] = undefined;
+/**
+ * The [CatalogModifier](#type-catalogmodifier)s applied to this line item.
+ * @member {Array.OrderReturnLineItemModifier
.
+ * A line item modifier being returned.
+ * @alias module:model/OrderReturnLineItemModifier
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a OrderReturnLineItemModifier
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/OrderReturnLineItemModifier} obj Optional instance to populate.
+ * @return {module:model/OrderReturnLineItemModifier} The populated OrderReturnLineItemModifier
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('uid')) {
+ obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
+ }
+ if (data.hasOwnProperty('source_modifier_uid')) {
+ obj['source_modifier_uid'] = ApiClient.convertToType(data['source_modifier_uid'], 'String');
+ }
+ if (data.hasOwnProperty('catalog_object_id')) {
+ obj['catalog_object_id'] = ApiClient.convertToType(data['catalog_object_id'], 'String');
+ }
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('base_price_money')) {
+ obj['base_price_money'] = Money.constructFromObject(data['base_price_money']);
+ }
+ if (data.hasOwnProperty('total_price_money')) {
+ obj['total_price_money'] = Money.constructFromObject(data['total_price_money']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The return modifier's Unique identifier, unique only within this order
+ * @member {String} uid
+ */
+exports.prototype['uid'] = undefined;
+/**
+ * `uid` of the Modifier from the LineItem from the Order which contains the original sale of this line item modifier.
+ * @member {String} source_modifier_uid
+ */
+exports.prototype['source_modifier_uid'] = undefined;
+/**
+ * The catalog object id referencing [CatalogModifier](#type-catalogmodifier).
+ * @member {String} catalog_object_id
+ */
+exports.prototype['catalog_object_id'] = undefined;
+/**
+ * The name of the item modifier.
+ * @member {String} name
+ */
+exports.prototype['name'] = undefined;
+/**
+ * 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.
+ * @member {module:model/Money} base_price_money
+ */
+exports.prototype['base_price_money'] = undefined;
+/**
+ * The total price of the item modifier for its line item. This is the modifier's `base_price_money` multiplied by the line item's quantity.
+ * @member {module:model/Money} total_price_money
+ */
+exports.prototype['total_price_money'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/OrderReturnTax.js b/src/model/OrderReturnTax.js
new file mode 100644
index 0000000..35256bf
--- /dev/null
+++ b/src/model/OrderReturnTax.js
@@ -0,0 +1,173 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var Money = require('./Money');
+
+
+
+
+/**
+ * The OrderReturnTax model module.
+ * @module model/OrderReturnTax
+ */
+
+/**
+ * Constructs a new OrderReturnTax
.
+ * The line item tax being returned.
+ * @alias module:model/OrderReturnTax
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a OrderReturnTax
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/OrderReturnTax} obj Optional instance to populate.
+ * @return {module:model/OrderReturnTax} The populated OrderReturnTax
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('uid')) {
+ obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
+ }
+ if (data.hasOwnProperty('source_tax_uid')) {
+ obj['source_tax_uid'] = ApiClient.convertToType(data['source_tax_uid'], 'String');
+ }
+ if (data.hasOwnProperty('catalog_object_id')) {
+ obj['catalog_object_id'] = ApiClient.convertToType(data['catalog_object_id'], 'String');
+ }
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('type')) {
+ obj['type'] = ApiClient.convertToType(data['type'], 'String');
+ }
+ if (data.hasOwnProperty('percentage')) {
+ obj['percentage'] = ApiClient.convertToType(data['percentage'], 'String');
+ }
+ if (data.hasOwnProperty('applied_money')) {
+ obj['applied_money'] = Money.constructFromObject(data['applied_money']);
+ }
+ if (data.hasOwnProperty('scope')) {
+ obj['scope'] = ApiClient.convertToType(data['scope'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The return tax's Unique identifier, unique only within this order.
+ * @member {String} uid
+ */
+exports.prototype['uid'] = undefined;
+/**
+ * `uid` of the Tax from the Order which contains the original charge of this tax.
+ * @member {String} source_tax_uid
+ */
+exports.prototype['source_tax_uid'] = undefined;
+/**
+ * The catalog object id referencing [CatalogTax](#type-catalogtax).
+ * @member {String} catalog_object_id
+ */
+exports.prototype['catalog_object_id'] = undefined;
+/**
+ * The tax's name.
+ * @member {String} name
+ */
+exports.prototype['name'] = undefined;
+/**
+ * Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values
+ * @member {module:model/OrderReturnTax.TypeEnum} type
+ */
+exports.prototype['type'] = undefined;
+/**
+ * The percentage of the tax, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%.
+ * @member {String} percentage
+ */
+exports.prototype['percentage'] = undefined;
+/**
+ * The amount of the money applied by the tax in an order.
+ * @member {module:model/Money} applied_money
+ */
+exports.prototype['applied_money'] = undefined;
+/**
+ * Indicates the level at which the tax applies. This field is set by the server. If set in a CreateOrder request, it will be ignored on write. See [OrderLineItemTaxScope](#type-orderlineitemtaxscope) for possible values
+ * @member {module:model/OrderReturnTax.ScopeEnum} scope
+ */
+exports.prototype['scope'] = undefined;
+
+
+ /**
+ * Allowed values for the type
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.TypeEnum = {
+ /**
+ * value: "UNKNOWN_TAX"
+ * @const
+ */
+ "UNKNOWN_TAX": "UNKNOWN_TAX",
+ /**
+ * value: "ADDITIVE"
+ * @const
+ */
+ "ADDITIVE": "ADDITIVE",
+ /**
+ * value: "INCLUSIVE"
+ * @const
+ */
+ "INCLUSIVE": "INCLUSIVE" };
+
+ /**
+ * Allowed values for the scope
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.ScopeEnum = {
+ /**
+ * value: "OTHER_TAX_SCOPE"
+ * @const
+ */
+ "OTHER_TAX_SCOPE": "OTHER_TAX_SCOPE",
+ /**
+ * value: "LINE_ITEM"
+ * @const
+ */
+ "LINE_ITEM": "LINE_ITEM",
+ /**
+ * value: "ORDER"
+ * @const
+ */
+ "ORDER": "ORDER" };
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/OrderRoundingAdjustment.js b/src/model/OrderRoundingAdjustment.js
new file mode 100644
index 0000000..2468501
--- /dev/null
+++ b/src/model/OrderRoundingAdjustment.js
@@ -0,0 +1,84 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var Money = require('./Money');
+
+
+
+
+/**
+ * The OrderRoundingAdjustment model module.
+ * @module model/OrderRoundingAdjustment
+ */
+
+/**
+ * Constructs a new OrderRoundingAdjustment
.
+ * A rounding adjustment of the money being returned. Commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency.
+ * @alias module:model/OrderRoundingAdjustment
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+};
+
+/**
+ * Constructs a OrderRoundingAdjustment
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/OrderRoundingAdjustment} obj Optional instance to populate.
+ * @return {module:model/OrderRoundingAdjustment} The populated OrderRoundingAdjustment
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('uid')) {
+ obj['uid'] = ApiClient.convertToType(data['uid'], 'String');
+ }
+ if (data.hasOwnProperty('name')) {
+ obj['name'] = ApiClient.convertToType(data['name'], 'String');
+ }
+ if (data.hasOwnProperty('amount_money')) {
+ obj['amount_money'] = Money.constructFromObject(data['amount_money']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * The rounding adjustment's Unique identifier, unique only within this order. This field is read-only.
+ * @member {String} uid
+ */
+exports.prototype['uid'] = undefined;
+/**
+ * The name of the rounding adjustment from the original sale Order.
+ * @member {String} name
+ */
+exports.prototype['name'] = undefined;
+/**
+ * Actual rounding adjustment amount.
+ * @member {module:model/Money} amount_money
+ */
+exports.prototype['amount_money'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/OrderSource.js b/src/model/OrderSource.js
index b578f7b..da7db1c 100644
--- a/src/model/OrderSource.js
+++ b/src/model/OrderSource.js
@@ -52,7 +52,7 @@ exports.constructFromObject = function(data, obj) {
}
/**
- * The name used to identify the place (physical or digital) that an order originates. If unset, the name defaults to the name of the application that created the order.
+ * The name used to identify the place (physical or digital) that an order originates. If unset, the name defaults to the name of the application that created the order.
* @member {String} name
*/
exports.prototype['name'] = undefined;
diff --git a/src/model/OrderState.js b/src/model/OrderState.js
new file mode 100644
index 0000000..8c2d4e8
--- /dev/null
+++ b/src/model/OrderState.js
@@ -0,0 +1,50 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+/**
+ * Enum class OrderState.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "OPEN"
+ * @const
+ */
+ "OPEN": "OPEN",
+ /**
+ * value: "COMPLETED"
+ * @const
+ */
+ "COMPLETED": "COMPLETED",
+ /**
+ * value: "CANCELED"
+ * @const
+ */
+ "CANCELED": "CANCELED"};
+
+/**
+ * Returns a OrderState
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/OrderState} The enum OrderState
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/SearchOrdersCustomerFilter.js b/src/model/SearchOrdersCustomerFilter.js
new file mode 100644
index 0000000..06bab38
--- /dev/null
+++ b/src/model/SearchOrdersCustomerFilter.js
@@ -0,0 +1,65 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The SearchOrdersCustomerFilter model module.
+ * @module model/SearchOrdersCustomerFilter
+ */
+
+/**
+ * Constructs a new SearchOrdersCustomerFilter
.
+ * Filter based on Order `customer_id` and any Tender `customer_id` associated with the Order. Does not filter based on the [FulfillmentRecipient](#type-orderfulfillmentrecipient) `customer_id`.
+ * @alias module:model/SearchOrdersCustomerFilter
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+};
+
+/**
+ * Constructs a SearchOrdersCustomerFilter
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/SearchOrdersCustomerFilter} obj Optional instance to populate.
+ * @return {module:model/SearchOrdersCustomerFilter} The populated SearchOrdersCustomerFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('customer_ids')) {
+ obj['customer_ids'] = ApiClient.convertToType(data['customer_ids'], ['String']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Filter by orders with any of the listed `customer_id`s. Max: 10 `customer_id`s.
+ * @member {Array.SearchOrdersDateTimeFilter
.
+ * Filter for `Order` objects based on whether their `CREATED_AT`, `CLOSED_AT` or `UPDATED_AT` timestamps fall within a specified time range. You can specify the time range and which timestamp to filter for. You can filter for only one time range at a time. For each time range, the start time and end time are inclusive. If the end time is absent, it defaults to the time of the first request for the cursor. __Important:__ If you use the DateTimeFilter to filter for `CLOSED_AT` or `UPDATED_AT`, you must also set the [OrdersSort](#type-searchorderordersort). The TimeRange used in DateTimeFilter must correspond to the `sort_field` in the [OrdersSort](#type-searchorderordersort) object.
+ * @alias module:model/SearchOrdersDateTimeFilter
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+};
+
+/**
+ * Constructs a SearchOrdersDateTimeFilter
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/SearchOrdersDateTimeFilter} obj Optional instance to populate.
+ * @return {module:model/SearchOrdersDateTimeFilter} The populated SearchOrdersDateTimeFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('created_at')) {
+ obj['created_at'] = TimeRange.constructFromObject(data['created_at']);
+ }
+ if (data.hasOwnProperty('updated_at')) {
+ obj['updated_at'] = TimeRange.constructFromObject(data['updated_at']);
+ }
+ if (data.hasOwnProperty('closed_at')) {
+ obj['closed_at'] = TimeRange.constructFromObject(data['closed_at']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Time range for filtering on the `created_at` timestamp.
+ * @member {module:model/TimeRange} created_at
+ */
+exports.prototype['created_at'] = undefined;
+/**
+ * Time range for filtering on the `updated_at` timestamp.
+ * @member {module:model/TimeRange} updated_at
+ */
+exports.prototype['updated_at'] = undefined;
+/**
+ * Time range for filtering on the `closed_at` timestamp.
+ * @member {module:model/TimeRange} closed_at
+ */
+exports.prototype['closed_at'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchOrdersFilter.js b/src/model/SearchOrdersFilter.js
new file mode 100644
index 0000000..afa8cc1
--- /dev/null
+++ b/src/model/SearchOrdersFilter.js
@@ -0,0 +1,106 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var SearchOrdersCustomerFilter = require('./SearchOrdersCustomerFilter');
+var SearchOrdersDateTimeFilter = require('./SearchOrdersDateTimeFilter');
+var SearchOrdersFulfillmentFilter = require('./SearchOrdersFulfillmentFilter');
+var SearchOrdersSourceFilter = require('./SearchOrdersSourceFilter');
+var SearchOrdersStateFilter = require('./SearchOrdersStateFilter');
+
+
+
+
+/**
+ * The SearchOrdersFilter model module.
+ * @module model/SearchOrdersFilter
+ */
+
+/**
+ * Constructs a new SearchOrdersFilter
.
+ * Filter options to use for a query. Multiple filters will be ANDed together.
+ * @alias module:model/SearchOrdersFilter
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a SearchOrdersFilter
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/SearchOrdersFilter} obj Optional instance to populate.
+ * @return {module:model/SearchOrdersFilter} The populated SearchOrdersFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('state_filter')) {
+ obj['state_filter'] = SearchOrdersStateFilter.constructFromObject(data['state_filter']);
+ }
+ if (data.hasOwnProperty('date_time_filter')) {
+ obj['date_time_filter'] = SearchOrdersDateTimeFilter.constructFromObject(data['date_time_filter']);
+ }
+ if (data.hasOwnProperty('fulfillment_filter')) {
+ obj['fulfillment_filter'] = SearchOrdersFulfillmentFilter.constructFromObject(data['fulfillment_filter']);
+ }
+ if (data.hasOwnProperty('source_filter')) {
+ obj['source_filter'] = SearchOrdersSourceFilter.constructFromObject(data['source_filter']);
+ }
+ if (data.hasOwnProperty('customer_filter')) {
+ obj['customer_filter'] = SearchOrdersCustomerFilter.constructFromObject(data['customer_filter']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Filter by [`OrderState`](#type-orderstate).
+ * @member {module:model/SearchOrdersStateFilter} state_filter
+ */
+exports.prototype['state_filter'] = undefined;
+/**
+ * Filter for results within a time range.
+ * @member {module:model/SearchOrdersDateTimeFilter} date_time_filter
+ */
+exports.prototype['date_time_filter'] = undefined;
+/**
+ * Filter by fulfillment type or state.
+ * @member {module:model/SearchOrdersFulfillmentFilter} fulfillment_filter
+ */
+exports.prototype['fulfillment_filter'] = undefined;
+/**
+ * Filter by source of order.
+ * @member {module:model/SearchOrdersSourceFilter} source_filter
+ */
+exports.prototype['source_filter'] = undefined;
+/**
+ * Filter by customers associated with the order.
+ * @member {module:model/SearchOrdersCustomerFilter} customer_filter
+ */
+exports.prototype['customer_filter'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchOrdersFulfillmentFilter.js b/src/model/SearchOrdersFulfillmentFilter.js
new file mode 100644
index 0000000..4208ef3
--- /dev/null
+++ b/src/model/SearchOrdersFulfillmentFilter.js
@@ -0,0 +1,124 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The SearchOrdersFulfillmentFilter model module.
+ * @module model/SearchOrdersFulfillmentFilter
+ */
+
+/**
+ * Constructs a new SearchOrdersFulfillmentFilter
.
+ * Filter based on [Order Fulfillment](#type-orderfulfillment) information.
+ * @alias module:model/SearchOrdersFulfillmentFilter
+ * @class
+ * @param fulfillmentTypes {Array.SearchOrdersFulfillmentFilter
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/SearchOrdersFulfillmentFilter} obj Optional instance to populate.
+ * @return {module:model/SearchOrdersFulfillmentFilter} The populated SearchOrdersFulfillmentFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('fulfillment_types')) {
+ obj['fulfillment_types'] = ApiClient.convertToType(data['fulfillment_types'], ['String']);
+ }
+ if (data.hasOwnProperty('fulfillment_states')) {
+ obj['fulfillment_states'] = ApiClient.convertToType(data['fulfillment_states'], ['String']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * List of [fulfillment types](#type-orderfulfillmenttype) to filter for. Will return orders if any of its fulfillments match any of the fulfillment types listed in this field. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values
+ * @member {Array.fulfillmentTypes
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.FulfillmentTypesEnum = {
+ /**
+ * value: "PICKUP"
+ * @const
+ */
+ "PICKUP": "PICKUP" };
+
+ /**
+ * Allowed values for the fulfillmentStates
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.FulfillmentStatesEnum = {
+ /**
+ * value: "PROPOSED"
+ * @const
+ */
+ "PROPOSED": "PROPOSED",
+ /**
+ * value: "RESERVED"
+ * @const
+ */
+ "RESERVED": "RESERVED",
+ /**
+ * value: "PREPARED"
+ * @const
+ */
+ "PREPARED": "PREPARED",
+ /**
+ * value: "COMPLETED"
+ * @const
+ */
+ "COMPLETED": "COMPLETED",
+ /**
+ * value: "CANCELED"
+ * @const
+ */
+ "CANCELED": "CANCELED",
+ /**
+ * value: "FAILED"
+ * @const
+ */
+ "FAILED": "FAILED" };
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchOrdersQuery.js b/src/model/SearchOrdersQuery.js
new file mode 100644
index 0000000..c918132
--- /dev/null
+++ b/src/model/SearchOrdersQuery.js
@@ -0,0 +1,76 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var SearchOrdersFilter = require('./SearchOrdersFilter');
+var SearchOrdersSort = require('./SearchOrdersSort');
+
+
+
+
+/**
+ * The SearchOrdersQuery model module.
+ * @module model/SearchOrdersQuery
+ */
+
+/**
+ * Constructs a new SearchOrdersQuery
.
+ * Contains query criteria for the search.
+ * @alias module:model/SearchOrdersQuery
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+};
+
+/**
+ * Constructs a SearchOrdersQuery
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/SearchOrdersQuery} obj Optional instance to populate.
+ * @return {module:model/SearchOrdersQuery} The populated SearchOrdersQuery
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('filter')) {
+ obj['filter'] = SearchOrdersFilter.constructFromObject(data['filter']);
+ }
+ if (data.hasOwnProperty('sort')) {
+ obj['sort'] = SearchOrdersSort.constructFromObject(data['sort']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Criteria to filter results by.
+ * @member {module:model/SearchOrdersFilter} filter
+ */
+exports.prototype['filter'] = undefined;
+/**
+ * Criteria to sort results by.
+ * @member {module:model/SearchOrdersSort} sort
+ */
+exports.prototype['sort'] = undefined;
+
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchOrdersRequest.js b/src/model/SearchOrdersRequest.js
new file mode 100644
index 0000000..73cab06
--- /dev/null
+++ b/src/model/SearchOrdersRequest.js
@@ -0,0 +1,102 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+var SearchOrdersQuery = require('./SearchOrdersQuery');
+
+
+
+
+/**
+ * The SearchOrdersRequest model module.
+ * @module model/SearchOrdersRequest
+ */
+
+/**
+ * Constructs a new SearchOrdersRequest
.
+ * The request does not have any required fields. When given no query criteria, 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.
+ * @alias module:model/SearchOrdersRequest
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a SearchOrdersRequest
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/SearchOrdersRequest} obj Optional instance to populate.
+ * @return {module:model/SearchOrdersRequest} The populated SearchOrdersRequest
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('location_ids')) {
+ obj['location_ids'] = ApiClient.convertToType(data['location_ids'], ['String']);
+ }
+ if (data.hasOwnProperty('cursor')) {
+ obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String');
+ }
+ if (data.hasOwnProperty('query')) {
+ obj['query'] = SearchOrdersQuery.constructFromObject(data['query']);
+ }
+ if (data.hasOwnProperty('limit')) {
+ obj['limit'] = ApiClient.convertToType(data['limit'], 'Number');
+ }
+ if (data.hasOwnProperty('return_entries')) {
+ obj['return_entries'] = ApiClient.convertToType(data['return_entries'], 'Boolean');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The location IDs for the orders to query. The caller must have access to all provided locations. Min: 1 `location_ids`. Max: 10 `location_ids`.
+ * @member {Array.SearchOrdersResponse
.
+ * Only one of `order_entries` or `orders` fields will be set, depending on whether `return_entries` was set on the [SearchOrdersRequest](#type-searchorderrequest).
+ * @alias module:model/SearchOrdersResponse
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+
+
+
+
+};
+
+/**
+ * Constructs a SearchOrdersResponse
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/SearchOrdersResponse} obj Optional instance to populate.
+ * @return {module:model/SearchOrdersResponse} The populated SearchOrdersResponse
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('order_entries')) {
+ obj['order_entries'] = ApiClient.convertToType(data['order_entries'], [OrderEntry]);
+ }
+ if (data.hasOwnProperty('orders')) {
+ obj['orders'] = ApiClient.convertToType(data['orders'], [Order]);
+ }
+ if (data.hasOwnProperty('cursor')) {
+ obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String');
+ }
+ if (data.hasOwnProperty('errors')) {
+ obj['errors'] = ApiClient.convertToType(data['errors'], [Error]);
+ }
+ if (data.hasOwnProperty('unconvertible_transaction_ids')) {
+ obj['unconvertible_transaction_ids'] = ApiClient.convertToType(data['unconvertible_transaction_ids'], ['String']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * List of [OrderEntries](#type-orderentry) that fit the query conditions. Populated only if `order_entries` was set to `true` in the request.
+ * @member {Array.SearchOrdersSort
.
+ * Sorting options for a query. Returned Orders will always be sorted on a timestamp.
+ * @alias module:model/SearchOrdersSort
+ * @class
+ * @param sortField {module:model/SearchOrdersSort.SortFieldEnum} The field to sort by. __Important:__ When using a [DateTimeFilter](#type-searchordersfilter), `sort_field` must match the set time range field. If this field does not match the time range field in `DateTimeFilter`, SearchOrder will return an error. Default: `CREATED_AT`. See [SearchOrdersSortField](#type-searchorderssortfield) for possible values
+ */
+var exports = function(sortField) {
+ var _this = this;
+
+ _this['sort_field'] = sortField;
+
+};
+
+/**
+ * Constructs a SearchOrdersSort
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/SearchOrdersSort} obj Optional instance to populate.
+ * @return {module:model/SearchOrdersSort} The populated SearchOrdersSort
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('sort_field')) {
+ obj['sort_field'] = ApiClient.convertToType(data['sort_field'], 'String');
+ }
+ if (data.hasOwnProperty('sort_order')) {
+ obj['sort_order'] = ApiClient.convertToType(data['sort_order'], 'String');
+ }
+ }
+ return obj;
+}
+
+/**
+ * The field to sort by. __Important:__ When using a [DateTimeFilter](#type-searchordersfilter), `sort_field` must match the set time range field. If this field does not match the time range field in `DateTimeFilter`, SearchOrder will return an error. Default: `CREATED_AT`. See [SearchOrdersSortField](#type-searchorderssortfield) for possible values
+ * @member {module:model/SearchOrdersSort.SortFieldEnum} sort_field
+ */
+exports.prototype['sort_field'] = undefined;
+/**
+ * The order in which results are returned. Defaults to `DESC`. See [SortOrder](#type-sortorder) for possible values
+ * @member {module:model/SearchOrdersSort.SortOrderEnum} sort_order
+ */
+exports.prototype['sort_order'] = undefined;
+
+
+ /**
+ * Allowed values for the sort_field
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.SortFieldEnum = {
+ /**
+ * value: "CREATED_AT"
+ * @const
+ */
+ "CREATED_AT": "CREATED_AT",
+ /**
+ * value: "UPDATED_AT"
+ * @const
+ */
+ "UPDATED_AT": "UPDATED_AT",
+ /**
+ * value: "CLOSED_AT"
+ * @const
+ */
+ "CLOSED_AT": "CLOSED_AT" };
+
+ /**
+ * Allowed values for the sort_order
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.SortOrderEnum = {
+ /**
+ * value: "DESC"
+ * @const
+ */
+ "DESC": "DESC",
+ /**
+ * value: "ASC"
+ * @const
+ */
+ "ASC": "ASC" };
+
+
+module.exports = exports;
+
+
+
diff --git a/src/model/SearchOrdersSortField.js b/src/model/SearchOrdersSortField.js
new file mode 100644
index 0000000..b9bd16d
--- /dev/null
+++ b/src/model/SearchOrdersSortField.js
@@ -0,0 +1,50 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+/**
+ * Enum class SearchOrdersSortField.
+ * @enum {}
+ * @readonly
+ */
+var exports = {
+ /**
+ * value: "CREATED_AT"
+ * @const
+ */
+ "CREATED_AT": "CREATED_AT",
+ /**
+ * value: "UPDATED_AT"
+ * @const
+ */
+ "UPDATED_AT": "UPDATED_AT",
+ /**
+ * value: "CLOSED_AT"
+ * @const
+ */
+ "CLOSED_AT": "CLOSED_AT"};
+
+/**
+ * Returns a SearchOrdersSortField
enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/SearchOrdersSortField} The enum SearchOrdersSortField
value.
+ */
+exports.constructFromObject = function(object) {
+ return object;
+}
+
+module.exports = exports;
+
+
diff --git a/src/model/SearchOrdersSourceFilter.js b/src/model/SearchOrdersSourceFilter.js
new file mode 100644
index 0000000..d934fa9
--- /dev/null
+++ b/src/model/SearchOrdersSourceFilter.js
@@ -0,0 +1,65 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+var ApiClient = require('../ApiClient');
+
+
+
+
+/**
+ * The SearchOrdersSourceFilter model module.
+ * @module model/SearchOrdersSourceFilter
+ */
+
+/**
+ * Constructs a new SearchOrdersSourceFilter
.
+ * Filter based on Order `source` information.
+ * @alias module:model/SearchOrdersSourceFilter
+ * @class
+ */
+var exports = function() {
+ var _this = this;
+
+
+};
+
+/**
+ * Constructs a SearchOrdersSourceFilter
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/SearchOrdersSourceFilter} obj Optional instance to populate.
+ * @return {module:model/SearchOrdersSourceFilter} The populated SearchOrdersSourceFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('source_names')) {
+ obj['source_names'] = ApiClient.convertToType(data['source_names'], ['String']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * Filters by [Source](#type-ordersource) `name`. Will return any orders with with `source.name`s that match any of the listed source names. Max: 10 `source_names`.
+ * @member {Array.SearchOrdersStateFilter
.
+ * Filter by current Order `state`.
+ * @alias module:model/SearchOrdersStateFilter
+ * @class
+ * @param states {Array.SearchOrdersStateFilter
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/SearchOrdersStateFilter} obj Optional instance to populate.
+ * @return {module:model/SearchOrdersStateFilter} The populated SearchOrdersStateFilter
instance.
+ */
+exports.constructFromObject = function(data, obj) {
+ if (data) {
+ obj = obj || new exports();
+
+ if (data.hasOwnProperty('states')) {
+ obj['states'] = ApiClient.convertToType(data['states'], ['String']);
+ }
+ }
+ return obj;
+}
+
+/**
+ * States to filter for. See [OrderState](#type-orderstate) for possible values
+ * @member {Array.states
property.
+ * @enum {String}
+ * @readonly
+ */
+ exports.StatesEnum = {
+ /**
+ * value: "OPEN"
+ * @const
+ */
+ "OPEN": "OPEN",
+ /**
+ * value: "COMPLETED"
+ * @const
+ */
+ "COMPLETED": "COMPLETED",
+ /**
+ * value: "CANCELED"
+ * @const
+ */
+ "CANCELED": "CANCELED" };
+
+
+module.exports = exports;
+
+
+
diff --git a/test/model/BusinessHours.spec.js b/test/model/BusinessHours.spec.js
new file mode 100644
index 0000000..45dcec9
--- /dev/null
+++ b/test/model/BusinessHours.spec.js
@@ -0,0 +1,32 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('BusinessHours', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.BusinessHours();
+ });
+
+ it('should create an instance of BusinessHours', function() {
+ // uncomment below and update the code to test BusinessHours
+ //var instane = new SquareConnect.BusinessHours();
+ //expect(instance).to.be.a(SquareConnect.BusinessHours);
+ });
+
+ it('should have the property periods (base name: "periods")', function() {
+ // uncomment below and update the code to test the property periods
+ //var instane = new SquareConnect.BusinessHours();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/BusinessHoursPeriod.spec.js b/test/model/BusinessHoursPeriod.spec.js
new file mode 100644
index 0000000..569763d
--- /dev/null
+++ b/test/model/BusinessHoursPeriod.spec.js
@@ -0,0 +1,42 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('BusinessHoursPeriod', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.BusinessHoursPeriod();
+ });
+
+ it('should create an instance of BusinessHoursPeriod', function() {
+ // uncomment below and update the code to test BusinessHoursPeriod
+ //var instane = new SquareConnect.BusinessHoursPeriod();
+ //expect(instance).to.be.a(SquareConnect.BusinessHoursPeriod);
+ });
+
+ it('should have the property dayOfWeek (base name: "day_of_week")', function() {
+ // uncomment below and update the code to test the property dayOfWeek
+ //var instane = new SquareConnect.BusinessHoursPeriod();
+ //expect(instance).to.be();
+ });
+ it('should have the property startLocalTime (base name: "start_local_time")', function() {
+ // uncomment below and update the code to test the property startLocalTime
+ //var instane = new SquareConnect.BusinessHoursPeriod();
+ //expect(instance).to.be();
+ });
+ it('should have the property endLocalTime (base name: "end_local_time")', function() {
+ // uncomment below and update the code to test the property endLocalTime
+ //var instane = new SquareConnect.BusinessHoursPeriod();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/DayOfWeek.spec.js b/test/model/DayOfWeek.spec.js
new file mode 100644
index 0000000..b476133
--- /dev/null
+++ b/test/model/DayOfWeek.spec.js
@@ -0,0 +1,26 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('DayOfWeek', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of DayOfWeek', function() {
+ // uncomment below and update the code to test DayOfWeek
+ //var instane = new SquareConnect.DayOfWeek();
+ //expect(instance).to.be.a(SquareConnect.DayOfWeek);
+ });
+
+});
diff --git a/test/model/MeasurementUnit.spec.js b/test/model/MeasurementUnit.spec.js
new file mode 100644
index 0000000..c76c7e9
--- /dev/null
+++ b/test/model/MeasurementUnit.spec.js
@@ -0,0 +1,52 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('MeasurementUnit', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.MeasurementUnit();
+ });
+
+ it('should create an instance of MeasurementUnit', function() {
+ // uncomment below and update the code to test MeasurementUnit
+ //var instane = new SquareConnect.MeasurementUnit();
+ //expect(instance).to.be.a(SquareConnect.MeasurementUnit);
+ });
+
+ it('should have the property customUnit (base name: "custom_unit")', function() {
+ // uncomment below and update the code to test the property customUnit
+ //var instane = new SquareConnect.MeasurementUnit();
+ //expect(instance).to.be();
+ });
+ it('should have the property areaUnit (base name: "area_unit")', function() {
+ // uncomment below and update the code to test the property areaUnit
+ //var instane = new SquareConnect.MeasurementUnit();
+ //expect(instance).to.be();
+ });
+ it('should have the property lengthUnit (base name: "length_unit")', function() {
+ // uncomment below and update the code to test the property lengthUnit
+ //var instane = new SquareConnect.MeasurementUnit();
+ //expect(instance).to.be();
+ });
+ it('should have the property volumeUnit (base name: "volume_unit")', function() {
+ // uncomment below and update the code to test the property volumeUnit
+ //var instane = new SquareConnect.MeasurementUnit();
+ //expect(instance).to.be();
+ });
+ it('should have the property weightUnit (base name: "weight_unit")', function() {
+ // uncomment below and update the code to test the property weightUnit
+ //var instane = new SquareConnect.MeasurementUnit();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/MeasurementUnitArea.spec.js b/test/model/MeasurementUnitArea.spec.js
new file mode 100644
index 0000000..56306b4
--- /dev/null
+++ b/test/model/MeasurementUnitArea.spec.js
@@ -0,0 +1,26 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('MeasurementUnitArea', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of MeasurementUnitArea', function() {
+ // uncomment below and update the code to test MeasurementUnitArea
+ //var instane = new SquareConnect.MeasurementUnitArea();
+ //expect(instance).to.be.a(SquareConnect.MeasurementUnitArea);
+ });
+
+});
diff --git a/test/model/MeasurementUnitCustom.spec.js b/test/model/MeasurementUnitCustom.spec.js
new file mode 100644
index 0000000..a2eaabb
--- /dev/null
+++ b/test/model/MeasurementUnitCustom.spec.js
@@ -0,0 +1,37 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('MeasurementUnitCustom', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.MeasurementUnitCustom();
+ });
+
+ it('should create an instance of MeasurementUnitCustom', function() {
+ // uncomment below and update the code to test MeasurementUnitCustom
+ //var instane = new SquareConnect.MeasurementUnitCustom();
+ //expect(instance).to.be.a(SquareConnect.MeasurementUnitCustom);
+ });
+
+ it('should have the property name (base name: "name")', function() {
+ // uncomment below and update the code to test the property name
+ //var instane = new SquareConnect.MeasurementUnitCustom();
+ //expect(instance).to.be();
+ });
+ it('should have the property abbreviation (base name: "abbreviation")', function() {
+ // uncomment below and update the code to test the property abbreviation
+ //var instane = new SquareConnect.MeasurementUnitCustom();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/MeasurementUnitLength.spec.js b/test/model/MeasurementUnitLength.spec.js
new file mode 100644
index 0000000..9e354b4
--- /dev/null
+++ b/test/model/MeasurementUnitLength.spec.js
@@ -0,0 +1,26 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('MeasurementUnitLength', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of MeasurementUnitLength', function() {
+ // uncomment below and update the code to test MeasurementUnitLength
+ //var instane = new SquareConnect.MeasurementUnitLength();
+ //expect(instance).to.be.a(SquareConnect.MeasurementUnitLength);
+ });
+
+});
diff --git a/test/model/MeasurementUnitVolume.spec.js b/test/model/MeasurementUnitVolume.spec.js
new file mode 100644
index 0000000..631138c
--- /dev/null
+++ b/test/model/MeasurementUnitVolume.spec.js
@@ -0,0 +1,26 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('MeasurementUnitVolume', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of MeasurementUnitVolume', function() {
+ // uncomment below and update the code to test MeasurementUnitVolume
+ //var instane = new SquareConnect.MeasurementUnitVolume();
+ //expect(instance).to.be.a(SquareConnect.MeasurementUnitVolume);
+ });
+
+});
diff --git a/test/model/MeasurementUnitWeight.spec.js b/test/model/MeasurementUnitWeight.spec.js
new file mode 100644
index 0000000..08e70b4
--- /dev/null
+++ b/test/model/MeasurementUnitWeight.spec.js
@@ -0,0 +1,26 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('MeasurementUnitWeight', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of MeasurementUnitWeight', function() {
+ // uncomment below and update the code to test MeasurementUnitWeight
+ //var instane = new SquareConnect.MeasurementUnitWeight();
+ //expect(instance).to.be.a(SquareConnect.MeasurementUnitWeight);
+ });
+
+});
diff --git a/test/model/OrderEntry.spec.js b/test/model/OrderEntry.spec.js
new file mode 100644
index 0000000..8fc9af2
--- /dev/null
+++ b/test/model/OrderEntry.spec.js
@@ -0,0 +1,37 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('OrderEntry', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.OrderEntry();
+ });
+
+ it('should create an instance of OrderEntry', function() {
+ // uncomment below and update the code to test OrderEntry
+ //var instane = new SquareConnect.OrderEntry();
+ //expect(instance).to.be.a(SquareConnect.OrderEntry);
+ });
+
+ it('should have the property orderId (base name: "order_id")', function() {
+ // uncomment below and update the code to test the property orderId
+ //var instane = new SquareConnect.OrderEntry();
+ //expect(instance).to.be();
+ });
+ it('should have the property locationId (base name: "location_id")', function() {
+ // uncomment below and update the code to test the property locationId
+ //var instane = new SquareConnect.OrderEntry();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/OrderMoneyAmounts.spec.js b/test/model/OrderMoneyAmounts.spec.js
new file mode 100644
index 0000000..fa03e90
--- /dev/null
+++ b/test/model/OrderMoneyAmounts.spec.js
@@ -0,0 +1,52 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('OrderMoneyAmounts', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.OrderMoneyAmounts();
+ });
+
+ it('should create an instance of OrderMoneyAmounts', function() {
+ // uncomment below and update the code to test OrderMoneyAmounts
+ //var instane = new SquareConnect.OrderMoneyAmounts();
+ //expect(instance).to.be.a(SquareConnect.OrderMoneyAmounts);
+ });
+
+ it('should have the property totalMoney (base name: "total_money")', function() {
+ // uncomment below and update the code to test the property totalMoney
+ //var instane = new SquareConnect.OrderMoneyAmounts();
+ //expect(instance).to.be();
+ });
+ it('should have the property taxMoney (base name: "tax_money")', function() {
+ // uncomment below and update the code to test the property taxMoney
+ //var instane = new SquareConnect.OrderMoneyAmounts();
+ //expect(instance).to.be();
+ });
+ it('should have the property discountMoney (base name: "discount_money")', function() {
+ // uncomment below and update the code to test the property discountMoney
+ //var instane = new SquareConnect.OrderMoneyAmounts();
+ //expect(instance).to.be();
+ });
+ it('should have the property tipMoney (base name: "tip_money")', function() {
+ // uncomment below and update the code to test the property tipMoney
+ //var instane = new SquareConnect.OrderMoneyAmounts();
+ //expect(instance).to.be();
+ });
+ it('should have the property serviceChargeMoney (base name: "service_charge_money")', function() {
+ // uncomment below and update the code to test the property serviceChargeMoney
+ //var instane = new SquareConnect.OrderMoneyAmounts();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/OrderQuantityUnit.spec.js b/test/model/OrderQuantityUnit.spec.js
new file mode 100644
index 0000000..66be594
--- /dev/null
+++ b/test/model/OrderQuantityUnit.spec.js
@@ -0,0 +1,37 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('OrderQuantityUnit', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.OrderQuantityUnit();
+ });
+
+ it('should create an instance of OrderQuantityUnit', function() {
+ // uncomment below and update the code to test OrderQuantityUnit
+ //var instane = new SquareConnect.OrderQuantityUnit();
+ //expect(instance).to.be.a(SquareConnect.OrderQuantityUnit);
+ });
+
+ it('should have the property measurementUnit (base name: "measurement_unit")', function() {
+ // uncomment below and update the code to test the property measurementUnit
+ //var instane = new SquareConnect.OrderQuantityUnit();
+ //expect(instance).to.be();
+ });
+ it('should have the property precision (base name: "precision")', function() {
+ // uncomment below and update the code to test the property precision
+ //var instane = new SquareConnect.OrderQuantityUnit();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/OrderReturn.spec.js b/test/model/OrderReturn.spec.js
new file mode 100644
index 0000000..74e1a8f
--- /dev/null
+++ b/test/model/OrderReturn.spec.js
@@ -0,0 +1,62 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('OrderReturn', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.OrderReturn();
+ });
+
+ it('should create an instance of OrderReturn', function() {
+ // uncomment below and update the code to test OrderReturn
+ //var instane = new SquareConnect.OrderReturn();
+ //expect(instance).to.be.a(SquareConnect.OrderReturn);
+ });
+
+ it('should have the property uid (base name: "uid")', function() {
+ // uncomment below and update the code to test the property uid
+ //var instane = new SquareConnect.OrderReturn();
+ //expect(instance).to.be();
+ });
+ it('should have the property sourceOrderId (base name: "source_order_id")', function() {
+ // uncomment below and update the code to test the property sourceOrderId
+ //var instane = new SquareConnect.OrderReturn();
+ //expect(instance).to.be();
+ });
+ it('should have the property returnLineItems (base name: "return_line_items")', function() {
+ // uncomment below and update the code to test the property returnLineItems
+ //var instane = new SquareConnect.OrderReturn();
+ //expect(instance).to.be();
+ });
+ it('should have the property returnTaxes (base name: "return_taxes")', function() {
+ // uncomment below and update the code to test the property returnTaxes
+ //var instane = new SquareConnect.OrderReturn();
+ //expect(instance).to.be();
+ });
+ it('should have the property returnDiscounts (base name: "return_discounts")', function() {
+ // uncomment below and update the code to test the property returnDiscounts
+ //var instane = new SquareConnect.OrderReturn();
+ //expect(instance).to.be();
+ });
+ it('should have the property roundingAdjustment (base name: "rounding_adjustment")', function() {
+ // uncomment below and update the code to test the property roundingAdjustment
+ //var instane = new SquareConnect.OrderReturn();
+ //expect(instance).to.be();
+ });
+ it('should have the property returnAmounts (base name: "return_amounts")', function() {
+ // uncomment below and update the code to test the property returnAmounts
+ //var instane = new SquareConnect.OrderReturn();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/OrderReturnDiscount.spec.js b/test/model/OrderReturnDiscount.spec.js
new file mode 100644
index 0000000..385ae2d
--- /dev/null
+++ b/test/model/OrderReturnDiscount.spec.js
@@ -0,0 +1,72 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('OrderReturnDiscount', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.OrderReturnDiscount();
+ });
+
+ it('should create an instance of OrderReturnDiscount', function() {
+ // uncomment below and update the code to test OrderReturnDiscount
+ //var instane = new SquareConnect.OrderReturnDiscount();
+ //expect(instance).to.be.a(SquareConnect.OrderReturnDiscount);
+ });
+
+ it('should have the property uid (base name: "uid")', function() {
+ // uncomment below and update the code to test the property uid
+ //var instane = new SquareConnect.OrderReturnDiscount();
+ //expect(instance).to.be();
+ });
+ it('should have the property sourceDiscountUid (base name: "source_discount_uid")', function() {
+ // uncomment below and update the code to test the property sourceDiscountUid
+ //var instane = new SquareConnect.OrderReturnDiscount();
+ //expect(instance).to.be();
+ });
+ it('should have the property catalogObjectId (base name: "catalog_object_id")', function() {
+ // uncomment below and update the code to test the property catalogObjectId
+ //var instane = new SquareConnect.OrderReturnDiscount();
+ //expect(instance).to.be();
+ });
+ it('should have the property name (base name: "name")', function() {
+ // uncomment below and update the code to test the property name
+ //var instane = new SquareConnect.OrderReturnDiscount();
+ //expect(instance).to.be();
+ });
+ it('should have the property type (base name: "type")', function() {
+ // uncomment below and update the code to test the property type
+ //var instane = new SquareConnect.OrderReturnDiscount();
+ //expect(instance).to.be();
+ });
+ it('should have the property percentage (base name: "percentage")', function() {
+ // uncomment below and update the code to test the property percentage
+ //var instane = new SquareConnect.OrderReturnDiscount();
+ //expect(instance).to.be();
+ });
+ it('should have the property amountMoney (base name: "amount_money")', function() {
+ // uncomment below and update the code to test the property amountMoney
+ //var instane = new SquareConnect.OrderReturnDiscount();
+ //expect(instance).to.be();
+ });
+ it('should have the property appliedMoney (base name: "applied_money")', function() {
+ // uncomment below and update the code to test the property appliedMoney
+ //var instane = new SquareConnect.OrderReturnDiscount();
+ //expect(instance).to.be();
+ });
+ it('should have the property scope (base name: "scope")', function() {
+ // uncomment below and update the code to test the property scope
+ //var instane = new SquareConnect.OrderReturnDiscount();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/OrderReturnLineItem.spec.js b/test/model/OrderReturnLineItem.spec.js
new file mode 100644
index 0000000..863b26e
--- /dev/null
+++ b/test/model/OrderReturnLineItem.spec.js
@@ -0,0 +1,112 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('OrderReturnLineItem', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.OrderReturnLineItem();
+ });
+
+ it('should create an instance of OrderReturnLineItem', function() {
+ // uncomment below and update the code to test OrderReturnLineItem
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be.a(SquareConnect.OrderReturnLineItem);
+ });
+
+ it('should have the property uid (base name: "uid")', function() {
+ // uncomment below and update the code to test the property uid
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property sourceLineItemUid (base name: "source_line_item_uid")', function() {
+ // uncomment below and update the code to test the property sourceLineItemUid
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property name (base name: "name")', function() {
+ // uncomment below and update the code to test the property name
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property quantity (base name: "quantity")', function() {
+ // uncomment below and update the code to test the property quantity
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property quantityUnit (base name: "quantity_unit")', function() {
+ // uncomment below and update the code to test the property quantityUnit
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property note (base name: "note")', function() {
+ // uncomment below and update the code to test the property note
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property catalogObjectId (base name: "catalog_object_id")', function() {
+ // uncomment below and update the code to test the property catalogObjectId
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property variationName (base name: "variation_name")', function() {
+ // uncomment below and update the code to test the property variationName
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property returnModifiers (base name: "return_modifiers")', function() {
+ // uncomment below and update the code to test the property returnModifiers
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property returnTaxes (base name: "return_taxes")', function() {
+ // uncomment below and update the code to test the property returnTaxes
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property returnDiscounts (base name: "return_discounts")', function() {
+ // uncomment below and update the code to test the property returnDiscounts
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property basePriceMoney (base name: "base_price_money")', function() {
+ // uncomment below and update the code to test the property basePriceMoney
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property variationTotalPriceMoney (base name: "variation_total_price_money")', function() {
+ // uncomment below and update the code to test the property variationTotalPriceMoney
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property grossReturnMoney (base name: "gross_return_money")', function() {
+ // uncomment below and update the code to test the property grossReturnMoney
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property totalTaxMoney (base name: "total_tax_money")', function() {
+ // uncomment below and update the code to test the property totalTaxMoney
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property totalDiscountMoney (base name: "total_discount_money")', function() {
+ // uncomment below and update the code to test the property totalDiscountMoney
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+ it('should have the property totalMoney (base name: "total_money")', function() {
+ // uncomment below and update the code to test the property totalMoney
+ //var instane = new SquareConnect.OrderReturnLineItem();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/OrderReturnLineItemModifier.spec.js b/test/model/OrderReturnLineItemModifier.spec.js
new file mode 100644
index 0000000..35aecab
--- /dev/null
+++ b/test/model/OrderReturnLineItemModifier.spec.js
@@ -0,0 +1,57 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('OrderReturnLineItemModifier', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.OrderReturnLineItemModifier();
+ });
+
+ it('should create an instance of OrderReturnLineItemModifier', function() {
+ // uncomment below and update the code to test OrderReturnLineItemModifier
+ //var instane = new SquareConnect.OrderReturnLineItemModifier();
+ //expect(instance).to.be.a(SquareConnect.OrderReturnLineItemModifier);
+ });
+
+ it('should have the property uid (base name: "uid")', function() {
+ // uncomment below and update the code to test the property uid
+ //var instane = new SquareConnect.OrderReturnLineItemModifier();
+ //expect(instance).to.be();
+ });
+ it('should have the property sourceModifierUid (base name: "source_modifier_uid")', function() {
+ // uncomment below and update the code to test the property sourceModifierUid
+ //var instane = new SquareConnect.OrderReturnLineItemModifier();
+ //expect(instance).to.be();
+ });
+ it('should have the property catalogObjectId (base name: "catalog_object_id")', function() {
+ // uncomment below and update the code to test the property catalogObjectId
+ //var instane = new SquareConnect.OrderReturnLineItemModifier();
+ //expect(instance).to.be();
+ });
+ it('should have the property name (base name: "name")', function() {
+ // uncomment below and update the code to test the property name
+ //var instane = new SquareConnect.OrderReturnLineItemModifier();
+ //expect(instance).to.be();
+ });
+ it('should have the property basePriceMoney (base name: "base_price_money")', function() {
+ // uncomment below and update the code to test the property basePriceMoney
+ //var instane = new SquareConnect.OrderReturnLineItemModifier();
+ //expect(instance).to.be();
+ });
+ it('should have the property totalPriceMoney (base name: "total_price_money")', function() {
+ // uncomment below and update the code to test the property totalPriceMoney
+ //var instane = new SquareConnect.OrderReturnLineItemModifier();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/OrderReturnTax.spec.js b/test/model/OrderReturnTax.spec.js
new file mode 100644
index 0000000..29e7c6c
--- /dev/null
+++ b/test/model/OrderReturnTax.spec.js
@@ -0,0 +1,67 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('OrderReturnTax', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.OrderReturnTax();
+ });
+
+ it('should create an instance of OrderReturnTax', function() {
+ // uncomment below and update the code to test OrderReturnTax
+ //var instane = new SquareConnect.OrderReturnTax();
+ //expect(instance).to.be.a(SquareConnect.OrderReturnTax);
+ });
+
+ it('should have the property uid (base name: "uid")', function() {
+ // uncomment below and update the code to test the property uid
+ //var instane = new SquareConnect.OrderReturnTax();
+ //expect(instance).to.be();
+ });
+ it('should have the property sourceTaxUid (base name: "source_tax_uid")', function() {
+ // uncomment below and update the code to test the property sourceTaxUid
+ //var instane = new SquareConnect.OrderReturnTax();
+ //expect(instance).to.be();
+ });
+ it('should have the property catalogObjectId (base name: "catalog_object_id")', function() {
+ // uncomment below and update the code to test the property catalogObjectId
+ //var instane = new SquareConnect.OrderReturnTax();
+ //expect(instance).to.be();
+ });
+ it('should have the property name (base name: "name")', function() {
+ // uncomment below and update the code to test the property name
+ //var instane = new SquareConnect.OrderReturnTax();
+ //expect(instance).to.be();
+ });
+ it('should have the property type (base name: "type")', function() {
+ // uncomment below and update the code to test the property type
+ //var instane = new SquareConnect.OrderReturnTax();
+ //expect(instance).to.be();
+ });
+ it('should have the property percentage (base name: "percentage")', function() {
+ // uncomment below and update the code to test the property percentage
+ //var instane = new SquareConnect.OrderReturnTax();
+ //expect(instance).to.be();
+ });
+ it('should have the property appliedMoney (base name: "applied_money")', function() {
+ // uncomment below and update the code to test the property appliedMoney
+ //var instane = new SquareConnect.OrderReturnTax();
+ //expect(instance).to.be();
+ });
+ it('should have the property scope (base name: "scope")', function() {
+ // uncomment below and update the code to test the property scope
+ //var instane = new SquareConnect.OrderReturnTax();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/OrderRoundingAdjustment.spec.js b/test/model/OrderRoundingAdjustment.spec.js
new file mode 100644
index 0000000..60c3ceb
--- /dev/null
+++ b/test/model/OrderRoundingAdjustment.spec.js
@@ -0,0 +1,42 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('OrderRoundingAdjustment', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.OrderRoundingAdjustment();
+ });
+
+ it('should create an instance of OrderRoundingAdjustment', function() {
+ // uncomment below and update the code to test OrderRoundingAdjustment
+ //var instane = new SquareConnect.OrderRoundingAdjustment();
+ //expect(instance).to.be.a(SquareConnect.OrderRoundingAdjustment);
+ });
+
+ it('should have the property uid (base name: "uid")', function() {
+ // uncomment below and update the code to test the property uid
+ //var instane = new SquareConnect.OrderRoundingAdjustment();
+ //expect(instance).to.be();
+ });
+ it('should have the property name (base name: "name")', function() {
+ // uncomment below and update the code to test the property name
+ //var instane = new SquareConnect.OrderRoundingAdjustment();
+ //expect(instance).to.be();
+ });
+ it('should have the property amountMoney (base name: "amount_money")', function() {
+ // uncomment below and update the code to test the property amountMoney
+ //var instane = new SquareConnect.OrderRoundingAdjustment();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/OrderState.spec.js b/test/model/OrderState.spec.js
new file mode 100644
index 0000000..6e967c4
--- /dev/null
+++ b/test/model/OrderState.spec.js
@@ -0,0 +1,26 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('OrderState', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of OrderState', function() {
+ // uncomment below and update the code to test OrderState
+ //var instane = new SquareConnect.OrderState();
+ //expect(instance).to.be.a(SquareConnect.OrderState);
+ });
+
+});
diff --git a/test/model/SearchOrdersCustomerFilter.spec.js b/test/model/SearchOrdersCustomerFilter.spec.js
new file mode 100644
index 0000000..dadccdc
--- /dev/null
+++ b/test/model/SearchOrdersCustomerFilter.spec.js
@@ -0,0 +1,32 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersCustomerFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchOrdersCustomerFilter();
+ });
+
+ it('should create an instance of SearchOrdersCustomerFilter', function() {
+ // uncomment below and update the code to test SearchOrdersCustomerFilter
+ //var instane = new SquareConnect.SearchOrdersCustomerFilter();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersCustomerFilter);
+ });
+
+ it('should have the property customerIds (base name: "customer_ids")', function() {
+ // uncomment below and update the code to test the property customerIds
+ //var instane = new SquareConnect.SearchOrdersCustomerFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchOrdersDateTimeFilter.spec.js b/test/model/SearchOrdersDateTimeFilter.spec.js
new file mode 100644
index 0000000..c598053
--- /dev/null
+++ b/test/model/SearchOrdersDateTimeFilter.spec.js
@@ -0,0 +1,42 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersDateTimeFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchOrdersDateTimeFilter();
+ });
+
+ it('should create an instance of SearchOrdersDateTimeFilter', function() {
+ // uncomment below and update the code to test SearchOrdersDateTimeFilter
+ //var instane = new SquareConnect.SearchOrdersDateTimeFilter();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersDateTimeFilter);
+ });
+
+ it('should have the property createdAt (base name: "created_at")', function() {
+ // uncomment below and update the code to test the property createdAt
+ //var instane = new SquareConnect.SearchOrdersDateTimeFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property updatedAt (base name: "updated_at")', function() {
+ // uncomment below and update the code to test the property updatedAt
+ //var instane = new SquareConnect.SearchOrdersDateTimeFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property closedAt (base name: "closed_at")', function() {
+ // uncomment below and update the code to test the property closedAt
+ //var instane = new SquareConnect.SearchOrdersDateTimeFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchOrdersFilter.spec.js b/test/model/SearchOrdersFilter.spec.js
new file mode 100644
index 0000000..79239be
--- /dev/null
+++ b/test/model/SearchOrdersFilter.spec.js
@@ -0,0 +1,52 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchOrdersFilter();
+ });
+
+ it('should create an instance of SearchOrdersFilter', function() {
+ // uncomment below and update the code to test SearchOrdersFilter
+ //var instane = new SquareConnect.SearchOrdersFilter();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersFilter);
+ });
+
+ it('should have the property stateFilter (base name: "state_filter")', function() {
+ // uncomment below and update the code to test the property stateFilter
+ //var instane = new SquareConnect.SearchOrdersFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property dateTimeFilter (base name: "date_time_filter")', function() {
+ // uncomment below and update the code to test the property dateTimeFilter
+ //var instane = new SquareConnect.SearchOrdersFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property fulfillmentFilter (base name: "fulfillment_filter")', function() {
+ // uncomment below and update the code to test the property fulfillmentFilter
+ //var instane = new SquareConnect.SearchOrdersFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property sourceFilter (base name: "source_filter")', function() {
+ // uncomment below and update the code to test the property sourceFilter
+ //var instane = new SquareConnect.SearchOrdersFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property customerFilter (base name: "customer_filter")', function() {
+ // uncomment below and update the code to test the property customerFilter
+ //var instane = new SquareConnect.SearchOrdersFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchOrdersFulfillmentFilter.spec.js b/test/model/SearchOrdersFulfillmentFilter.spec.js
new file mode 100644
index 0000000..3a507d5
--- /dev/null
+++ b/test/model/SearchOrdersFulfillmentFilter.spec.js
@@ -0,0 +1,37 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersFulfillmentFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchOrdersFulfillmentFilter();
+ });
+
+ it('should create an instance of SearchOrdersFulfillmentFilter', function() {
+ // uncomment below and update the code to test SearchOrdersFulfillmentFilter
+ //var instane = new SquareConnect.SearchOrdersFulfillmentFilter();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersFulfillmentFilter);
+ });
+
+ it('should have the property fulfillmentTypes (base name: "fulfillment_types")', function() {
+ // uncomment below and update the code to test the property fulfillmentTypes
+ //var instane = new SquareConnect.SearchOrdersFulfillmentFilter();
+ //expect(instance).to.be();
+ });
+ it('should have the property fulfillmentStates (base name: "fulfillment_states")', function() {
+ // uncomment below and update the code to test the property fulfillmentStates
+ //var instane = new SquareConnect.SearchOrdersFulfillmentFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchOrdersQuery.spec.js b/test/model/SearchOrdersQuery.spec.js
new file mode 100644
index 0000000..5cf1235
--- /dev/null
+++ b/test/model/SearchOrdersQuery.spec.js
@@ -0,0 +1,37 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersQuery', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchOrdersQuery();
+ });
+
+ it('should create an instance of SearchOrdersQuery', function() {
+ // uncomment below and update the code to test SearchOrdersQuery
+ //var instane = new SquareConnect.SearchOrdersQuery();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersQuery);
+ });
+
+ it('should have the property filter (base name: "filter")', function() {
+ // uncomment below and update the code to test the property filter
+ //var instane = new SquareConnect.SearchOrdersQuery();
+ //expect(instance).to.be();
+ });
+ it('should have the property sort (base name: "sort")', function() {
+ // uncomment below and update the code to test the property sort
+ //var instane = new SquareConnect.SearchOrdersQuery();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchOrdersRequest.spec.js b/test/model/SearchOrdersRequest.spec.js
new file mode 100644
index 0000000..ef1ebd2
--- /dev/null
+++ b/test/model/SearchOrdersRequest.spec.js
@@ -0,0 +1,52 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersRequest', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchOrdersRequest();
+ });
+
+ it('should create an instance of SearchOrdersRequest', function() {
+ // uncomment below and update the code to test SearchOrdersRequest
+ //var instane = new SquareConnect.SearchOrdersRequest();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersRequest);
+ });
+
+ it('should have the property locationIds (base name: "location_ids")', function() {
+ // uncomment below and update the code to test the property locationIds
+ //var instane = new SquareConnect.SearchOrdersRequest();
+ //expect(instance).to.be();
+ });
+ it('should have the property cursor (base name: "cursor")', function() {
+ // uncomment below and update the code to test the property cursor
+ //var instane = new SquareConnect.SearchOrdersRequest();
+ //expect(instance).to.be();
+ });
+ it('should have the property query (base name: "query")', function() {
+ // uncomment below and update the code to test the property query
+ //var instane = new SquareConnect.SearchOrdersRequest();
+ //expect(instance).to.be();
+ });
+ it('should have the property limit (base name: "limit")', function() {
+ // uncomment below and update the code to test the property limit
+ //var instane = new SquareConnect.SearchOrdersRequest();
+ //expect(instance).to.be();
+ });
+ it('should have the property returnEntries (base name: "return_entries")', function() {
+ // uncomment below and update the code to test the property returnEntries
+ //var instane = new SquareConnect.SearchOrdersRequest();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchOrdersResponse.spec.js b/test/model/SearchOrdersResponse.spec.js
new file mode 100644
index 0000000..80d9654
--- /dev/null
+++ b/test/model/SearchOrdersResponse.spec.js
@@ -0,0 +1,52 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersResponse', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchOrdersResponse();
+ });
+
+ it('should create an instance of SearchOrdersResponse', function() {
+ // uncomment below and update the code to test SearchOrdersResponse
+ //var instane = new SquareConnect.SearchOrdersResponse();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersResponse);
+ });
+
+ it('should have the property orderEntries (base name: "order_entries")', function() {
+ // uncomment below and update the code to test the property orderEntries
+ //var instane = new SquareConnect.SearchOrdersResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property orders (base name: "orders")', function() {
+ // uncomment below and update the code to test the property orders
+ //var instane = new SquareConnect.SearchOrdersResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property cursor (base name: "cursor")', function() {
+ // uncomment below and update the code to test the property cursor
+ //var instane = new SquareConnect.SearchOrdersResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property errors (base name: "errors")', function() {
+ // uncomment below and update the code to test the property errors
+ //var instane = new SquareConnect.SearchOrdersResponse();
+ //expect(instance).to.be();
+ });
+ it('should have the property unconvertibleTransactionIds (base name: "unconvertible_transaction_ids")', function() {
+ // uncomment below and update the code to test the property unconvertibleTransactionIds
+ //var instane = new SquareConnect.SearchOrdersResponse();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchOrdersSort.spec.js b/test/model/SearchOrdersSort.spec.js
new file mode 100644
index 0000000..ab72ae2
--- /dev/null
+++ b/test/model/SearchOrdersSort.spec.js
@@ -0,0 +1,37 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersSort', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchOrdersSort();
+ });
+
+ it('should create an instance of SearchOrdersSort', function() {
+ // uncomment below and update the code to test SearchOrdersSort
+ //var instane = new SquareConnect.SearchOrdersSort();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersSort);
+ });
+
+ it('should have the property sortField (base name: "sort_field")', function() {
+ // uncomment below and update the code to test the property sortField
+ //var instane = new SquareConnect.SearchOrdersSort();
+ //expect(instance).to.be();
+ });
+ it('should have the property sortOrder (base name: "sort_order")', function() {
+ // uncomment below and update the code to test the property sortOrder
+ //var instane = new SquareConnect.SearchOrdersSort();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchOrdersSortField.spec.js b/test/model/SearchOrdersSortField.spec.js
new file mode 100644
index 0000000..d24da66
--- /dev/null
+++ b/test/model/SearchOrdersSortField.spec.js
@@ -0,0 +1,26 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersSortField', function() {
+ beforeEach(function() {
+ });
+
+ it('should create an instance of SearchOrdersSortField', function() {
+ // uncomment below and update the code to test SearchOrdersSortField
+ //var instane = new SquareConnect.SearchOrdersSortField();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersSortField);
+ });
+
+});
diff --git a/test/model/SearchOrdersSourceFilter.spec.js b/test/model/SearchOrdersSourceFilter.spec.js
new file mode 100644
index 0000000..13bc08f
--- /dev/null
+++ b/test/model/SearchOrdersSourceFilter.spec.js
@@ -0,0 +1,32 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersSourceFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchOrdersSourceFilter();
+ });
+
+ it('should create an instance of SearchOrdersSourceFilter', function() {
+ // uncomment below and update the code to test SearchOrdersSourceFilter
+ //var instane = new SquareConnect.SearchOrdersSourceFilter();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersSourceFilter);
+ });
+
+ it('should have the property sourceNames (base name: "source_names")', function() {
+ // uncomment below and update the code to test the property sourceNames
+ //var instane = new SquareConnect.SearchOrdersSourceFilter();
+ //expect(instance).to.be();
+ });
+});
diff --git a/test/model/SearchOrdersStateFilter.spec.js b/test/model/SearchOrdersStateFilter.spec.js
new file mode 100644
index 0000000..69ba6e5
--- /dev/null
+++ b/test/model/SearchOrdersStateFilter.spec.js
@@ -0,0 +1,32 @@
+/**
+ * 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
+ *
+ * Swagger Codegen version: 2.3.0-SNAPSHOT
+ *
+ */
+const SquareConnect = require('../../src/index');
+
+describe('SearchOrdersStateFilter', function() {
+ beforeEach(function() {
+ this.api = new SquareConnect.SearchOrdersStateFilter();
+ });
+
+ it('should create an instance of SearchOrdersStateFilter', function() {
+ // uncomment below and update the code to test SearchOrdersStateFilter
+ //var instane = new SquareConnect.SearchOrdersStateFilter();
+ //expect(instance).to.be.a(SquareConnect.SearchOrdersStateFilter);
+ });
+
+ it('should have the property states (base name: "states")', function() {
+ // uncomment below and update the code to test the property states
+ //var instane = new SquareConnect.SearchOrdersStateFilter();
+ //expect(instance).to.be();
+ });
+});