UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

120 lines (97 loc) 4.35 kB
/** * 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 BatchRetrieveInventoryChangesRequest model module. * @module model/BatchRetrieveInventoryChangesRequest */ /** * Constructs a new <code>BatchRetrieveInventoryChangesRequest</code>. * * @alias module:model/BatchRetrieveInventoryChangesRequest * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>BatchRetrieveInventoryChangesRequest</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:model/BatchRetrieveInventoryChangesRequest} obj Optional instance to populate. * @return {module:model/BatchRetrieveInventoryChangesRequest} The populated <code>BatchRetrieveInventoryChangesRequest</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('catalog_object_ids')) { obj['catalog_object_ids'] = ApiClient.convertToType(data['catalog_object_ids'], ['String']); } if (data.hasOwnProperty('location_ids')) { obj['location_ids'] = ApiClient.convertToType(data['location_ids'], ['String']); } if (data.hasOwnProperty('types')) { obj['types'] = ApiClient.convertToType(data['types'], ['String']); } if (data.hasOwnProperty('states')) { obj['states'] = ApiClient.convertToType(data['states'], ['String']); } if (data.hasOwnProperty('updated_after')) { obj['updated_after'] = ApiClient.convertToType(data['updated_after'], 'String'); } if (data.hasOwnProperty('updated_before')) { obj['updated_before'] = ApiClient.convertToType(data['updated_before'], 'String'); } if (data.hasOwnProperty('cursor')) { obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); } } return obj; } /** * The filter to return results by `CatalogObject` ID. The filter is only applicable when set. The default value is null. * @member {Array.<String>} catalog_object_ids */ exports.prototype['catalog_object_ids'] = undefined; /** * The filter to return results by `Location` ID. The filter is only applicable when set. The default value is null. * @member {Array.<String>} location_ids */ exports.prototype['location_ids'] = undefined; /** * The filter to return results by `InventoryChangeType` values other than `TRANSFER`. The default value is `[PHYSICAL_COUNT, ADJUSTMENT]`. See [InventoryChangeType](#type-inventorychangetype) for possible values * @member {Array.<String>} types */ exports.prototype['types'] = undefined; /** * The filter to return `ADJUSTMENT` query results by `InventoryState`. This filter is only applied when set. The default value is null. See [InventoryState](#type-inventorystate) for possible values * @member {Array.<String>} states */ exports.prototype['states'] = undefined; /** * The filter to return results with their `calculated_at` value after the given time as specified in an RFC 3339 timestamp. The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). * @member {String} updated_after */ exports.prototype['updated_after'] = undefined; /** * The filter to return results with their `created_at` or `calculated_at` value strictly before the given time as specified in an RFC 3339 timestamp. The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). * @member {String} updated_before */ exports.prototype['updated_before'] = undefined; /** * A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query. See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. * @member {String} cursor */ exports.prototype['cursor'] = undefined; module.exports = exports;