text: /* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
  /* Copyright (c) 2017 Mobify Research & Development Inc. All rights reserved. */
  /* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
  
  /* eslint-disable dot-notation */
  /**
   * Shop API
   * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
   *
   * OpenAPI spec version: 17.8
   *
   *
   * 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 Variant model module.
  * @module models/Variant
  * @version 17.8
  */
  export default class Variant {
      /**
      * Constructs a new <code>Variant</code>.
      * Document representing a product variation.
      * @alias module:models/Variant
      * @class
      * @param link {String} The URL addressing the product.
      * @param productId {String} The id (SKU) of the variant.
      */
      constructor(link, productId) {
          /**
          * The URL addressing the product.
          * @member {String} link
          */
          this.link = link
  
          /**
          * A flag indicating whether the variant is orderable.
          * @member {Boolean} orderable
          */
          this.orderable = undefined
  
          /**
          * The sales price of the variant.
          * @member {Number} price
          */
          this.price = undefined
  
          /**
          * The id (SKU) of the variant.
          * @member {String} product_id
          */
          this.product_id = productId
  
          /**
          * The actual variation attribute id - value pairs.
          * @member {Object.<String, String>} variation_values
          */
          this.variation_values = undefined
      }
  
      /**
      * Constructs a <code>Variant</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/Variant} obj Optional instance to populate.
      * @return {module:models/Variant} The populated <code>Variant</code> instance.
      */
      static constructFromObject(data, obj) {
          if (data) {
              obj = obj || new Variant()
  
              if (data.hasOwnProperty('link')) {
                  obj['link'] = ApiClient.convertToType(data['link'], 'String')
              }
              if (data.hasOwnProperty('orderable')) {
                  obj['orderable'] = ApiClient.convertToType(data['orderable'], 'Boolean')
              }
              if (data.hasOwnProperty('price')) {
                  obj['price'] = ApiClient.convertToType(data['price'], 'Number')
              }
              if (data.hasOwnProperty('product_id')) {
                  obj['product_id'] = ApiClient.convertToType(data['product_id'], 'String')
              }
              if (data.hasOwnProperty('variation_values')) {
                  obj['variation_values'] = ApiClient.convertToType(data['variation_values'], {String: 'String'})
              }
          }
          return obj
      }
  }
  