|
| 1 | +/* * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
| 2 | +/* Copyright (c) 2017 Mobify Research & Development Inc. All rights reserved. */ |
| 3 | +/* * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
| 4 | + |
| 5 | +/* eslint-disable dot-notation */ |
| 6 | +/** |
| 7 | + * Shop API |
| 8 | + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
| 9 | + * |
| 10 | + * OpenAPI spec version: 17.8 |
| 11 | + * |
| 12 | + * |
| 13 | + * NOTE: This class is auto generated by the swagger code generator program. |
| 14 | + * https://github.com/swagger-api/swagger-codegen.git |
| 15 | + * Do not edit the class manually. |
| 16 | + * |
| 17 | + */ |
| 18 | +import ApiClient from '../ApiClient' |
| 19 | + |
| 20 | +/** |
| 21 | +* The ProductRef model module. |
| 22 | +* @module models/ProductRef |
| 23 | +* @version 17.8 |
| 24 | +*/ |
| 25 | +export default class ProductRef { |
| 26 | + /** |
| 27 | + * Constructs a new <code>ProductRef</code>. |
| 28 | + * Document representing a product reference. |
| 29 | + * @alias module:models/ProductRef |
| 30 | + * @class |
| 31 | + * @param id {String} The ID of the product reference. |
| 32 | + */ |
| 33 | + constructor(id) { |
| 34 | + /** |
| 35 | + * The ID of the product reference. |
| 36 | + * @member {String} id |
| 37 | + */ |
| 38 | + this.id = id |
| 39 | + |
| 40 | + /** |
| 41 | + * The link to the product reference. |
| 42 | + * @member {String} link |
| 43 | + */ |
| 44 | + this.link = undefined |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * Constructs a <code>ProductRef</code> from a plain JavaScript object, optionally creating a new instance. |
| 49 | + * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. |
| 50 | + * @param {Object} data The plain JavaScript object bearing properties of interest. |
| 51 | + * @param {module:models/ProductRef} obj Optional instance to populate. |
| 52 | + * @return {module:models/ProductRef} The populated <code>ProductRef</code> instance. |
| 53 | + */ |
| 54 | + static constructFromObject(data, obj) { |
| 55 | + if (data) { |
| 56 | + obj = obj || new ProductRef() |
| 57 | + |
| 58 | + if (data.hasOwnProperty('id')) { |
| 59 | + obj['id'] = ApiClient.convertToType(data['id'], 'String') |
| 60 | + } |
| 61 | + if (data.hasOwnProperty('link')) { |
| 62 | + obj['link'] = ApiClient.convertToType(data['link'], 'String') |
| 63 | + } |
| 64 | + } |
| 65 | + |
| 66 | + return obj |
| 67 | + } |
| 68 | +} |
0 commit comments