square-connect
Version:
JavaScript client library for the Square Connect v2 API
76 lines (58 loc) • 2.42 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');
/**
* The CatalogItemOptionValueForItemVariation model module.
* Note: This model is in beta.
* @module model/CatalogItemOptionValueForItemVariation
*/
/**
* Constructs a new <code>CatalogItemOptionValueForItemVariation</code>.
* A `CatalogItemOptionValue` links an item variation to an item option as an item option value. For example, a t-shirt item may offer a color option and a size option. An item option value would represent each variation of t-shirt: For example, \"Color:Red, Size:Small\" or \"Color:Blue, Size:Medium\".
* @alias module:model/CatalogItemOptionValueForItemVariation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>CatalogItemOptionValueForItemVariation</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/CatalogItemOptionValueForItemVariation} obj Optional instance to populate.
* @return {module:model/CatalogItemOptionValueForItemVariation} The populated <code>CatalogItemOptionValueForItemVariation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('item_option_id')) {
obj['item_option_id'] = ApiClient.convertToType(data['item_option_id'], 'String');
}
if (data.hasOwnProperty('item_option_value_id')) {
obj['item_option_value_id'] = ApiClient.convertToType(data['item_option_value_id'], 'String');
}
}
return obj;
}
/**
* The unique id of an item option.
* @member {String} item_option_id
*/
exports.prototype['item_option_id'] = undefined;
/**
* The unique id of the selected value for the item option.
* @member {String} item_option_value_id
*/
exports.prototype['item_option_value_id'] = undefined;
module.exports = exports;