Source: models/ProductRef.js

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
/* 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 ProductRef model module.
* @module models/ProductRef
* @version 20.4
*/
export default class ProductRef {
    /**
    * Constructs a new <code>ProductRef</code>.
    * Document representing a product reference.
    * @alias module:models/ProductRef
    * @class
    * @param id {String} The ID of the product reference.
    * @param link {String} The link to the product reference.
    */

    constructor(id, link) {





        this.id = id; this.link = link


    }

    /**
    * Constructs a <code>ProductRef</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/ProductRef} obj Optional instance to populate.
    * @return {module:models/ProductRef} The populated <code>ProductRef</code> instance.
    */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new ProductRef()





            if (data.hasOwnProperty('id')) {
                obj.id = ApiClient.convertToType(data.id, 'String')
            }
            if (data.hasOwnProperty('link')) {
                obj.link = ApiClient.convertToType(data.link, 'String')
            }
        }
        return obj
    }

    /**
    * The ID of the product reference.
    * @member {String} id
    */
    id = undefined;
    /**
    * The link to the product reference.
    * @member {String} link
    */
    link = undefined;








}