UNPKG

square-connect

Version:

JavaScript client library for the Square Connect v2 API

77 lines (59 loc) 2.95 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 CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection = require('./CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection'); /** * The CatalogCustomAttributeDefinitionSelectionConfig model module. * Note: This model is in beta. * @module model/CatalogCustomAttributeDefinitionSelectionConfig */ /** * Constructs a new <code>CatalogCustomAttributeDefinitionSelectionConfig</code>. * Configuration associated with &#x60;SELECTION&#x60;-type custom attribute definitions. * @alias module:model/CatalogCustomAttributeDefinitionSelectionConfig * @class */ var exports = function() { var _this = this; }; /** * Constructs a <code>CatalogCustomAttributeDefinitionSelectionConfig</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/CatalogCustomAttributeDefinitionSelectionConfig} obj Optional instance to populate. * @return {module:model/CatalogCustomAttributeDefinitionSelectionConfig} The populated <code>CatalogCustomAttributeDefinitionSelectionConfig</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('max_allowed_selections')) { obj['max_allowed_selections'] = ApiClient.convertToType(data['max_allowed_selections'], 'Number'); } if (data.hasOwnProperty('allowed_selections')) { obj['allowed_selections'] = ApiClient.convertToType(data['allowed_selections'], [CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection]); } } return obj; } /** * The maximum number of selections that can be set. The maximum value for this attribute is 100. The default value is 1. The value can be modified, but changing the value will not affect existing custom attribute values on objects. Clients need to handle custom attributes with more selected values than allowed by this limit. * @member {Number} max_allowed_selections */ exports.prototype['max_allowed_selections'] = undefined; /** * The set of valid `CatalogCustomAttributeSelections`. Up to a maximum of 100 selections can be defined. Can be modified. * @member {Array.<module:model/CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection>} allowed_selections */ exports.prototype['allowed_selections'] = undefined; module.exports = exports;