UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

84 lines (65 loc) 2.65 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 ListCatalogRequest model module. * @module model/ListCatalogRequest */ /** * Constructs a new <code>ListCatalogRequest</code>. * * @alias module:model/ListCatalogRequest * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>ListCatalogRequest</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/ListCatalogRequest} obj Optional instance to populate. * @return {module:model/ListCatalogRequest} The populated <code>ListCatalogRequest</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('cursor')) { obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); } if (data.hasOwnProperty('types')) { obj['types'] = ApiClient.convertToType(data['types'], 'String'); } if (data.hasOwnProperty('catalog_version')) { obj['catalog_version'] = ApiClient.convertToType(data['catalog_version'], 'Number'); } } return obj; } /** * The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. * @member {String} cursor */ exports.prototype['cursor'] = undefined; /** * An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the CatalogObjectType enum: `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. * @member {String} types */ exports.prototype['types'] = undefined; /** * The specific version of the catalog objects to be included in the response. This allows you to retrieve historical versions of objects. The specified version value is matched against the `CatalogObject`s' `version` attribute. * @member {Number} catalog_version */ exports.prototype['catalog_version'] = undefined; module.exports = exports;