UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

87 lines (69 loc) 2.88 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 CatalogQuickAmount = require('./CatalogQuickAmount'); /** * The CatalogQuickAmountsSettings model module. * Note: This model is in beta. * @module model/CatalogQuickAmountsSettings */ /** * Constructs a new <code>CatalogQuickAmountsSettings</code>. * A parent Catalog Object model represents a set of Quick Amounts and the settings control the amounts. * @alias module:model/CatalogQuickAmountsSettings * @class * @param option {String} Represents the option seller currently uses on Quick Amounts. See [CatalogQuickAmountsSettingsOption](#type-catalogquickamountssettingsoption) for possible values */ var exports = function(option) { var _this = this; _this['option'] = option; }; /** * Constructs a <code>CatalogQuickAmountsSettings</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/CatalogQuickAmountsSettings} obj Optional instance to populate. * @return {module:model/CatalogQuickAmountsSettings} The populated <code>CatalogQuickAmountsSettings</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('option')) { obj['option'] = ApiClient.convertToType(data['option'], 'String'); } if (data.hasOwnProperty('eligible_for_auto_amounts')) { obj['eligible_for_auto_amounts'] = ApiClient.convertToType(data['eligible_for_auto_amounts'], 'Boolean'); } if (data.hasOwnProperty('amounts')) { obj['amounts'] = ApiClient.convertToType(data['amounts'], [CatalogQuickAmount]); } } return obj; } /** * Represents the option seller currently uses on Quick Amounts. See [CatalogQuickAmountsSettingsOption](#type-catalogquickamountssettingsoption) for possible values * @member {String} option */ exports.prototype['option'] = undefined; /** * Represents location's eligibility for auto amounts The boolean should be consistent with whether there are AUTO amounts in the `amounts`. * @member {Boolean} eligible_for_auto_amounts */ exports.prototype['eligible_for_auto_amounts'] = undefined; /** * Represents a set of Quick Amounts at this location. * @member {Array.<module:model/CatalogQuickAmount>} amounts */ exports.prototype['amounts'] = undefined; module.exports = exports;