square-connect
Version:
JavaScript client library for the Square Connect v2 API
104 lines (83 loc) • 2.87 kB
JavaScript
/**
* 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 V1ModifierOption = require('./V1ModifierOption');
/**
* @deprecated
* The V1ModifierList model module.
* @module model/V1ModifierList
*/
/**
* Constructs a new <code>V1ModifierList</code>.
* V1ModifierList
* @alias module:model/V1ModifierList
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>V1ModifierList</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/V1ModifierList} obj Optional instance to populate.
* @return {module:model/V1ModifierList} The populated <code>V1ModifierList</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('selection_type')) {
obj['selection_type'] = ApiClient.convertToType(data['selection_type'], 'String');
}
if (data.hasOwnProperty('modifier_options')) {
obj['modifier_options'] = ApiClient.convertToType(data['modifier_options'], [V1ModifierOption]);
}
if (data.hasOwnProperty('v2_id')) {
obj['v2_id'] = ApiClient.convertToType(data['v2_id'], 'String');
}
}
return obj;
}
/**
* The modifier list's unique ID.
* @member {String} id
*/
exports.prototype['id'] = undefined;
/**
* The modifier list's name.
* @member {String} name
*/
exports.prototype['name'] = undefined;
/**
* Indicates whether MULTIPLE options or a SINGLE option from the modifier list can be applied to a single item. See [V1ModifierListSelectionType](#type-v1modifierlistselectiontype) for possible values
* @member {String} selection_type
*/
exports.prototype['selection_type'] = undefined;
/**
* The options included in the modifier list.
* @member {Array.<module:model/V1ModifierOption>} modifier_options
*/
exports.prototype['modifier_options'] = undefined;
/**
* The ID of the CatalogObject in the Connect v2 API. Objects that are shared across multiple locations share the same v2 ID.
* @member {String} v2_id
*/
exports.prototype['v2_id'] = undefined;
module.exports = exports;