xi_sdk_resellers
Version:
Ingram Micro - Xvantage Integration (XI) Node.Js Server-side SDK.
294 lines (274 loc) • 15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
var _QuoteSearchResponseQuotesInnerLinks = _interopRequireDefault(require("./QuoteSearchResponseQuotesInnerLinks"));
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 QuoteSearchResponseQuotesInner model module.
* @module model/QuoteSearchResponseQuotesInner
* @version 1.0.0
*/
var QuoteSearchResponseQuotesInner = /*#__PURE__*/function () {
/**
* Constructs a new <code>QuoteSearchResponseQuotesInner</code>.
* @alias module:model/QuoteSearchResponseQuotesInner
*/
function QuoteSearchResponseQuotesInner() {
_classCallCheck(this, QuoteSearchResponseQuotesInner);
QuoteSearchResponseQuotesInner.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(QuoteSearchResponseQuotesInner, null, [{
key: "initialize",
value: function initialize(obj) {}
/**
* Constructs a <code>QuoteSearchResponseQuotesInner</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/QuoteSearchResponseQuotesInner} obj Optional instance to populate.
* @return {module:model/QuoteSearchResponseQuotesInner} The populated <code>QuoteSearchResponseQuotesInner</code> instance.
*/
}, {
key: "constructFromObject",
value: function constructFromObject(data, obj) {
if (data) {
obj = obj || new QuoteSearchResponseQuotesInner();
if (data.hasOwnProperty('quoteGuid')) {
obj['quoteGuid'] = _ApiClient["default"].convertToType(data['quoteGuid'], 'String');
}
if (data.hasOwnProperty('quoteName')) {
obj['quoteName'] = _ApiClient["default"].convertToType(data['quoteName'], 'String');
}
if (data.hasOwnProperty('quoteNumber')) {
obj['quoteNumber'] = _ApiClient["default"].convertToType(data['quoteNumber'], 'String');
}
if (data.hasOwnProperty('revision')) {
obj['revision'] = _ApiClient["default"].convertToType(data['revision'], 'String');
}
if (data.hasOwnProperty('currencyCode')) {
obj['currencyCode'] = _ApiClient["default"].convertToType(data['currencyCode'], 'String');
}
if (data.hasOwnProperty('endUserContact')) {
obj['endUserContact'] = _ApiClient["default"].convertToType(data['endUserContact'], 'String');
}
if (data.hasOwnProperty('specialBidNumber')) {
obj['specialBidNumber'] = _ApiClient["default"].convertToType(data['specialBidNumber'], 'String');
}
if (data.hasOwnProperty('quoteTotal')) {
obj['quoteTotal'] = _ApiClient["default"].convertToType(data['quoteTotal'], 'Number');
}
if (data.hasOwnProperty('quoteStatus')) {
obj['quoteStatus'] = _ApiClient["default"].convertToType(data['quoteStatus'], 'String');
}
if (data.hasOwnProperty('ingramQuoteDate')) {
obj['ingramQuoteDate'] = _ApiClient["default"].convertToType(data['ingramQuoteDate'], 'String');
}
if (data.hasOwnProperty('lastModifiedDate')) {
obj['lastModifiedDate'] = _ApiClient["default"].convertToType(data['lastModifiedDate'], 'String');
}
if (data.hasOwnProperty('ingramQuoteExpiryDate')) {
obj['ingramQuoteExpiryDate'] = _ApiClient["default"].convertToType(data['ingramQuoteExpiryDate'], 'String');
}
if (data.hasOwnProperty('endUserName')) {
obj['endUserName'] = _ApiClient["default"].convertToType(data['endUserName'], 'String');
}
if (data.hasOwnProperty('vendor')) {
obj['vendor'] = _ApiClient["default"].convertToType(data['vendor'], 'String');
}
if (data.hasOwnProperty('createdBy')) {
obj['createdBy'] = _ApiClient["default"].convertToType(data['createdBy'], 'String');
}
if (data.hasOwnProperty('quoteType')) {
obj['quoteType'] = _ApiClient["default"].convertToType(data['quoteType'], 'String');
}
if (data.hasOwnProperty('links')) {
obj['links'] = _QuoteSearchResponseQuotesInnerLinks["default"].constructFromObject(data['links']);
}
}
return obj;
}
/**
* Validates the JSON data with respect to <code>QuoteSearchResponseQuotesInner</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>QuoteSearchResponseQuotesInner</code>.
*/
}, {
key: "validateJSON",
value: function validateJSON(data) {
// ensure the json data is a string
if (data['quoteGuid'] && !(typeof data['quoteGuid'] === 'string' || data['quoteGuid'] instanceof String)) {
throw new Error("Expected the field `quoteGuid` to be a primitive type in the JSON string but got " + data['quoteGuid']);
}
// ensure the json data is a string
if (data['quoteName'] && !(typeof data['quoteName'] === 'string' || data['quoteName'] instanceof String)) {
throw new Error("Expected the field `quoteName` to be a primitive type in the JSON string but got " + data['quoteName']);
}
// ensure the json data is a string
if (data['quoteNumber'] && !(typeof data['quoteNumber'] === 'string' || data['quoteNumber'] instanceof String)) {
throw new Error("Expected the field `quoteNumber` to be a primitive type in the JSON string but got " + data['quoteNumber']);
}
// ensure the json data is a string
if (data['revision'] && !(typeof data['revision'] === 'string' || data['revision'] instanceof String)) {
throw new Error("Expected the field `revision` to be a primitive type in the JSON string but got " + data['revision']);
}
// ensure the json data is a string
if (data['currencyCode'] && !(typeof data['currencyCode'] === 'string' || data['currencyCode'] instanceof String)) {
throw new Error("Expected the field `currencyCode` to be a primitive type in the JSON string but got " + data['currencyCode']);
}
// ensure the json data is a string
if (data['endUserContact'] && !(typeof data['endUserContact'] === 'string' || data['endUserContact'] instanceof String)) {
throw new Error("Expected the field `endUserContact` to be a primitive type in the JSON string but got " + data['endUserContact']);
}
// ensure the json data is a string
if (data['specialBidNumber'] && !(typeof data['specialBidNumber'] === 'string' || data['specialBidNumber'] instanceof String)) {
throw new Error("Expected the field `specialBidNumber` to be a primitive type in the JSON string but got " + data['specialBidNumber']);
}
// ensure the json data is a string
if (data['quoteStatus'] && !(typeof data['quoteStatus'] === 'string' || data['quoteStatus'] instanceof String)) {
throw new Error("Expected the field `quoteStatus` to be a primitive type in the JSON string but got " + data['quoteStatus']);
}
// ensure the json data is a string
if (data['ingramQuoteDate'] && !(typeof data['ingramQuoteDate'] === 'string' || data['ingramQuoteDate'] instanceof String)) {
throw new Error("Expected the field `ingramQuoteDate` to be a primitive type in the JSON string but got " + data['ingramQuoteDate']);
}
// ensure the json data is a string
if (data['lastModifiedDate'] && !(typeof data['lastModifiedDate'] === 'string' || data['lastModifiedDate'] instanceof String)) {
throw new Error("Expected the field `lastModifiedDate` to be a primitive type in the JSON string but got " + data['lastModifiedDate']);
}
// ensure the json data is a string
if (data['ingramQuoteExpiryDate'] && !(typeof data['ingramQuoteExpiryDate'] === 'string' || data['ingramQuoteExpiryDate'] instanceof String)) {
throw new Error("Expected the field `ingramQuoteExpiryDate` to be a primitive type in the JSON string but got " + data['ingramQuoteExpiryDate']);
}
// ensure the json data is a string
if (data['endUserName'] && !(typeof data['endUserName'] === 'string' || data['endUserName'] instanceof String)) {
throw new Error("Expected the field `endUserName` to be a primitive type in the JSON string but got " + data['endUserName']);
}
// ensure the json data is a string
if (data['vendor'] && !(typeof data['vendor'] === 'string' || data['vendor'] instanceof String)) {
throw new Error("Expected the field `vendor` to be a primitive type in the JSON string but got " + data['vendor']);
}
// ensure the json data is a string
if (data['createdBy'] && !(typeof data['createdBy'] === 'string' || data['createdBy'] instanceof String)) {
throw new Error("Expected the field `createdBy` to be a primitive type in the JSON string but got " + data['createdBy']);
}
// ensure the json data is a string
if (data['quoteType'] && !(typeof data['quoteType'] === 'string' || data['quoteType'] instanceof String)) {
throw new Error("Expected the field `quoteType` to be a primitive type in the JSON string but got " + data['quoteType']);
}
// validate the optional field `links`
if (data['links']) {
// data not null
_QuoteSearchResponseQuotesInnerLinks["default"].validateJSON(data['links']);
}
return true;
}
}]);
}();
/**
* @member {String} quoteGuid
*/
QuoteSearchResponseQuotesInner.prototype['quoteGuid'] = undefined;
/**
* Quote Name given to quote by sales team or system generated. Generally used as a reference to identify the quote.
* @member {String} quoteName
*/
QuoteSearchResponseQuotesInner.prototype['quoteName'] = undefined;
/**
* Unique identifier generated by Ingram Micros CRM specific to each quote. When applying a filter to the quoteNumber and including a partial quote number in the filter, all quotes containing any information included in the filter can be retrieved as a subset of all available customer quotes.
* @member {String} quoteNumber
*/
QuoteSearchResponseQuotesInner.prototype['quoteNumber'] = undefined;
/**
* When a quote has been revised and updated, the quote number remains the same throughout the lifecycle of the quote, however, a Revision number is updated for each revision of the quote. The revision numbers is associated with the Unique Quote Number.
* @member {String} revision
*/
QuoteSearchResponseQuotesInner.prototype['revision'] = undefined;
/**
* The country-specific three digit ISO 4217 currency code for the order.
* @member {String} currencyCode
*/
QuoteSearchResponseQuotesInner.prototype['currencyCode'] = undefined;
/**
* End User Name is the end customer name that is associated with a quote in Ingram Micros CRM.
* @member {String} endUserContact
*/
QuoteSearchResponseQuotesInner.prototype['endUserContact'] = undefined;
/**
* Special Pricing Bid Number, also refers to as Dart Number relates to a unique pricing deal associated with a vendor for the quote.
* @member {String} specialBidNumber
*/
QuoteSearchResponseQuotesInner.prototype['specialBidNumber'] = undefined;
/**
* Total amount of quoted price for all products in the quote.
* @member {Number} quoteTotal
*/
QuoteSearchResponseQuotesInner.prototype['quoteTotal'] = undefined;
/**
* This refers to the primary status of the quote.
* @member {String} quoteStatus
*/
QuoteSearchResponseQuotesInner.prototype['quoteStatus'] = undefined;
/**
* Date the Quote was initially Created.
* @member {String} ingramQuoteDate
*/
QuoteSearchResponseQuotesInner.prototype['ingramQuoteDate'] = undefined;
/**
* Date the Quote was last updated or modified.
* @member {String} lastModifiedDate
*/
QuoteSearchResponseQuotesInner.prototype['lastModifiedDate'] = undefined;
/**
* Date when the Quote Expires.
* @member {String} ingramQuoteExpiryDate
*/
QuoteSearchResponseQuotesInner.prototype['ingramQuoteExpiryDate'] = undefined;
/**
* End User Name
* @member {String} endUserName
*/
QuoteSearchResponseQuotesInner.prototype['endUserName'] = undefined;
/**
* Name of the vendor.
* @member {String} vendor
*/
QuoteSearchResponseQuotesInner.prototype['vendor'] = undefined;
/**
* Name of the end user/customer who created a quote.
* @member {String} createdBy
*/
QuoteSearchResponseQuotesInner.prototype['createdBy'] = undefined;
/**
* Type of quote
* @member {String} quoteType
*/
QuoteSearchResponseQuotesInner.prototype['quoteType'] = undefined;
/**
* @member {module:model/QuoteSearchResponseQuotesInnerLinks} links
*/
QuoteSearchResponseQuotesInner.prototype['links'] = undefined;
var _default = exports["default"] = QuoteSearchResponseQuotesInner;