/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Copyright (c) 2020 Mobify Research & Development Inc. All rights reserved. */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* Shop API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 20.4
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
import ApiClient from '../ApiClient'
/**
* The OptionValue model module.
* @module models/OptionValue
* @version 20.4
*/
export default class OptionValue {
/**
* Constructs a new <code>OptionValue</code>.
* Document representing an option value.
* @alias module:models/OptionValue
* @class
* @param id {String} The id of the option value.
*/
constructor(id) {
this.id = id
}
/**
* Constructs a <code>OptionValue</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:models/OptionValue} obj Optional instance to populate.
* @return {module:models/OptionValue} The populated <code>OptionValue</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new OptionValue()
if (data.hasOwnProperty('default')) {
obj.default = ApiClient.convertToType(data.default, 'Boolean')
}
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('price')) {
obj.price = ApiClient.convertToType(data.price, 'Number')
}
}
return obj
}
/**
* A flag indicating whether this option value is the default one.
* @member {Boolean} default
*/
default = undefined;
/**
* The id of the option value.
* @member {String} id
*/
id = undefined;
/**
* The localized name of the option value.
* @member {String} name
*/
name = undefined;
/**
* The effective price of this option value.
* @member {Number} price
*/
price = undefined;
}