From 707310858ab0ae4f6a79c28927dfc569e18cb9fd Mon Sep 17 00:00:00 2001
From: Connect API Specification Generator
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();
+ });
+});