UNPKG

xi_sdk_resellers

Version:

Ingram Micro - Xvantage Integration (XI) Node.Js Server-side SDK.

235 lines (218 loc) 11.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _ApiClient = _interopRequireDefault(require("../ApiClient")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; } function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /** * XI Sdk Resellers * For Resellers seeking to innovate with Ingram Micro's API solutions, automate your eCommerce experience with our array of API's and webhooks to craft a seamless journey for your customers. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. * */ /** * The DealsDetailsResponseProductsInner model module. * @module model/DealsDetailsResponseProductsInner * @version 1.0.0 */ var DealsDetailsResponseProductsInner = /*#__PURE__*/function () { /** * Constructs a new <code>DealsDetailsResponseProductsInner</code>. * @alias module:model/DealsDetailsResponseProductsInner */ function DealsDetailsResponseProductsInner() { _classCallCheck(this, DealsDetailsResponseProductsInner); DealsDetailsResponseProductsInner.initialize(this); } /** * Initializes the fields of this object. * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ return _createClass(DealsDetailsResponseProductsInner, null, [{ key: "initialize", value: function initialize(obj) {} /** * Constructs a <code>DealsDetailsResponseProductsInner</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/DealsDetailsResponseProductsInner} obj Optional instance to populate. * @return {module:model/DealsDetailsResponseProductsInner} The populated <code>DealsDetailsResponseProductsInner</code> instance. */ }, { key: "constructFromObject", value: function constructFromObject(data, obj) { if (data) { obj = obj || new DealsDetailsResponseProductsInner(); if (data.hasOwnProperty('ingramPartNumber')) { obj['ingramPartNumber'] = _ApiClient["default"].convertToType(data['ingramPartNumber'], 'String'); } if (data.hasOwnProperty('vendorPartNumber')) { obj['vendorPartNumber'] = _ApiClient["default"].convertToType(data['vendorPartNumber'], 'String'); } if (data.hasOwnProperty('upc')) { obj['upc'] = _ApiClient["default"].convertToType(data['upc'], 'String'); } if (data.hasOwnProperty('productDescription')) { obj['productDescription'] = _ApiClient["default"].convertToType(data['productDescription'], 'String'); } if (data.hasOwnProperty('msrp')) { obj['msrp'] = _ApiClient["default"].convertToType(data['msrp'], 'Number'); } if (data.hasOwnProperty('extendedMSRP')) { obj['extendedMSRP'] = _ApiClient["default"].convertToType(data['extendedMSRP'], 'Number'); } if (data.hasOwnProperty('standardPrice')) { obj['standardPrice'] = _ApiClient["default"].convertToType(data['standardPrice'], 'Number'); } if (data.hasOwnProperty('approvedQuantity')) { obj['approvedQuantity'] = _ApiClient["default"].convertToType(data['approvedQuantity'], 'Number'); } if (data.hasOwnProperty('remainingQuantity')) { obj['remainingQuantity'] = _ApiClient["default"].convertToType(data['remainingQuantity'], 'Number'); } if (data.hasOwnProperty('comments')) { obj['comments'] = _ApiClient["default"].convertToType(data['comments'], 'String'); } if (data.hasOwnProperty('specialConditions')) { obj['specialConditions'] = _ApiClient["default"].convertToType(data['specialConditions'], 'String'); } if (data.hasOwnProperty('startDate')) { obj['startDate'] = _ApiClient["default"].convertToType(data['startDate'], 'String'); } if (data.hasOwnProperty('expirationDate')) { obj['expirationDate'] = _ApiClient["default"].convertToType(data['expirationDate'], 'String'); } if (data.hasOwnProperty('daysRemaining')) { obj['daysRemaining'] = _ApiClient["default"].convertToType(data['daysRemaining'], 'Number'); } } return obj; } /** * Validates the JSON data with respect to <code>DealsDetailsResponseProductsInner</code>. * @param {Object} data The plain JavaScript object bearing properties of interest. * @return {boolean} to indicate whether the JSON data is valid with respect to <code>DealsDetailsResponseProductsInner</code>. */ }, { key: "validateJSON", value: function validateJSON(data) { // ensure the json data is a string if (data['ingramPartNumber'] && !(typeof data['ingramPartNumber'] === 'string' || data['ingramPartNumber'] instanceof String)) { throw new Error("Expected the field `ingramPartNumber` to be a primitive type in the JSON string but got " + data['ingramPartNumber']); } // ensure the json data is a string if (data['vendorPartNumber'] && !(typeof data['vendorPartNumber'] === 'string' || data['vendorPartNumber'] instanceof String)) { throw new Error("Expected the field `vendorPartNumber` to be a primitive type in the JSON string but got " + data['vendorPartNumber']); } // ensure the json data is a string if (data['upc'] && !(typeof data['upc'] === 'string' || data['upc'] instanceof String)) { throw new Error("Expected the field `upc` to be a primitive type in the JSON string but got " + data['upc']); } // ensure the json data is a string if (data['productDescription'] && !(typeof data['productDescription'] === 'string' || data['productDescription'] instanceof String)) { throw new Error("Expected the field `productDescription` to be a primitive type in the JSON string but got " + data['productDescription']); } // ensure the json data is a string if (data['comments'] && !(typeof data['comments'] === 'string' || data['comments'] instanceof String)) { throw new Error("Expected the field `comments` to be a primitive type in the JSON string but got " + data['comments']); } // ensure the json data is a string if (data['specialConditions'] && !(typeof data['specialConditions'] === 'string' || data['specialConditions'] instanceof String)) { throw new Error("Expected the field `specialConditions` to be a primitive type in the JSON string but got " + data['specialConditions']); } // ensure the json data is a string if (data['startDate'] && !(typeof data['startDate'] === 'string' || data['startDate'] instanceof String)) { throw new Error("Expected the field `startDate` to be a primitive type in the JSON string but got " + data['startDate']); } // ensure the json data is a string if (data['expirationDate'] && !(typeof data['expirationDate'] === 'string' || data['expirationDate'] instanceof String)) { throw new Error("Expected the field `expirationDate` to be a primitive type in the JSON string but got " + data['expirationDate']); } return true; } }]); }(); /** * Unique Ingram part number. * @member {String} ingramPartNumber */ DealsDetailsResponseProductsInner.prototype['ingramPartNumber'] = undefined; /** * Vendor Part number for the product. * @member {String} vendorPartNumber */ DealsDetailsResponseProductsInner.prototype['vendorPartNumber'] = undefined; /** * The UPC code for the product. Consists of 12 numeric digits that are uniquely assigned to each trade item. * @member {String} upc */ DealsDetailsResponseProductsInner.prototype['upc'] = undefined; /** * Description of the product. * @member {String} productDescription */ DealsDetailsResponseProductsInner.prototype['productDescription'] = undefined; /** * Manufacturer Suggested Retail Price. * @member {Number} msrp */ DealsDetailsResponseProductsInner.prototype['msrp'] = undefined; /** * Extended MSRP - Manufacturer Suggested Retail Price X Quantity. * @member {Number} extendedMSRP */ DealsDetailsResponseProductsInner.prototype['extendedMSRP'] = undefined; /** * Standard price of the line item. * @member {Number} standardPrice */ DealsDetailsResponseProductsInner.prototype['standardPrice'] = undefined; /** * Total quantity approved for the deal. * @member {Number} approvedQuantity */ DealsDetailsResponseProductsInner.prototype['approvedQuantity'] = undefined; /** * The quantity remaining as part of the deal for the customer to order. * @member {Number} remainingQuantity */ DealsDetailsResponseProductsInner.prototype['remainingQuantity'] = undefined; /** * Comments of the deal. * @member {String} comments */ DealsDetailsResponseProductsInner.prototype['comments'] = undefined; /** * Special conditions of the deal. * @member {String} specialConditions */ DealsDetailsResponseProductsInner.prototype['specialConditions'] = undefined; /** * Start Date. * @member {String} startDate */ DealsDetailsResponseProductsInner.prototype['startDate'] = undefined; /** * Expiration date. * @member {String} expirationDate */ DealsDetailsResponseProductsInner.prototype['expirationDate'] = undefined; /** * Number of days remaining before the deal expires. * @member {Number} daysRemaining */ DealsDetailsResponseProductsInner.prototype['daysRemaining'] = undefined; var _default = exports["default"] = DealsDetailsResponseProductsInner;