UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

77 lines (60 loc) 2.36 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 InvoiceFilter model module. * Note: This model is in beta. * @module model/InvoiceFilter */ /** * Constructs a new <code>InvoiceFilter</code>. * Describes query filters to apply. * @alias module:model/InvoiceFilter * @class * @param locationIds {Array.<String>} Limits the search to the specified locations. A location is required. In the current implementation, only one location can be specified. */ var exports = function(locationIds) { var _this = this; _this['location_ids'] = locationIds; }; /** * Constructs a <code>InvoiceFilter</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/InvoiceFilter} obj Optional instance to populate. * @return {module:model/InvoiceFilter} The populated <code>InvoiceFilter</code> 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('customer_ids')) { obj['customer_ids'] = ApiClient.convertToType(data['customer_ids'], ['String']); } } return obj; } /** * Limits the search to the specified locations. A location is required. In the current implementation, only one location can be specified. * @member {Array.<String>} location_ids */ exports.prototype['location_ids'] = undefined; /** * Limits the search to the specified customers, within the specified locations. Specifying a customer is optional. In the current implementation, a maximum of one customer can be specified. * @member {Array.<String>} customer_ids */ exports.prototype['customer_ids'] = undefined; module.exports = exports;