UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

86 lines (67 loc) 2.44 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'); var BreakType = require('./BreakType'); var Error = require('./Error'); /** * The ListBreakTypesResponse model module. * @module model/ListBreakTypesResponse */ /** * Constructs a new <code>ListBreakTypesResponse</code>. * The response to a request for a set of &#x60;BreakTypes&#x60;. Contains the requested &#x60;BreakType&#x60; objects. May contain a set of &#x60;Error&#x60; objects if the request resulted in errors. * @alias module:model/ListBreakTypesResponse * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>ListBreakTypesResponse</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/ListBreakTypesResponse} obj Optional instance to populate. * @return {module:model/ListBreakTypesResponse} The populated <code>ListBreakTypesResponse</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('break_types')) { obj['break_types'] = ApiClient.convertToType(data['break_types'], [BreakType]); } if (data.hasOwnProperty('cursor')) { obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); } if (data.hasOwnProperty('errors')) { obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); } } return obj; } /** * A page of `BreakType` results. * @member {Array.<module:model/BreakType>} break_types */ exports.prototype['break_types'] = undefined; /** * Value supplied in the subsequent request to fetch the next next page of Break Type results. * @member {String} cursor */ exports.prototype['cursor'] = undefined; /** * Any errors that occurred during the request. * @member {Array.<module:model/Error>} errors */ exports.prototype['errors'] = undefined; module.exports = exports;