xi_sdk_resellers
Version:
Ingram Micro - Xvantage Integration (XI) Node.Js Server-side SDK.
460 lines (447 loc) • 31.5 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
var _ErrorResponseDTO = _interopRequireDefault(require("../model/ErrorResponseDTO"));
var _OrderCreateRequest = _interopRequireDefault(require("../model/OrderCreateRequest"));
var _OrderCreateResponse = _interopRequireDefault(require("../model/OrderCreateResponse"));
var _OrderCreateV7Request = _interopRequireDefault(require("../model/OrderCreateV7Request"));
var _OrderCreateV7Response = _interopRequireDefault(require("../model/OrderCreateV7Response"));
var _OrderCreateV7Response2 = _interopRequireDefault(require("../model/OrderCreateV7Response201"));
var _OrderDetailB2B = _interopRequireDefault(require("../model/OrderDetailB2B"));
var _OrderModifyRequest = _interopRequireDefault(require("../model/OrderModifyRequest"));
var _OrderModifyResponse = _interopRequireDefault(require("../model/OrderModifyResponse"));
var _OrderSearchResponse = _interopRequireDefault(require("../model/OrderSearchResponse"));
var _PostCreateorderV7400Response = _interopRequireDefault(require("../model/PostCreateorderV7400Response"));
var _PostCreateorderV7500Response = _interopRequireDefault(require("../model/PostCreateorderV7500Response"));
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.
*
*/
/**
* Orders service.
* @module api/OrdersApi
* @version 1.0.0
*/
var OrdersApi = exports["default"] = /*#__PURE__*/function () {
/**
* Constructs a new OrdersApi.
* @alias module:api/OrdersApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
function OrdersApi(apiClient) {
_classCallCheck(this, OrdersApi);
this.apiClient = apiClient || _ApiClient["default"].instance;
}
/**
* Callback function to receive the result of the deleteOrdercancel operation.
* @callback module:api/OrdersApi~deleteOrdercancelCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Cancel your Order
* This call must be submitted before the order is released to Ingram Micro’s warehouse. The order cannot be canceled once it is released to the warehouse. Order should be on customer hold to delete any order from Ingram system.
* @param {String} orderNumber Ingram Micro sales order number.
* @param {String} iMCustomerNumber Your unique Ingram Micro customer number.
* @param {String} iMCountryCode Two-character ISO country code.
* @param {String} iMCorrelationID Unique transaction number to identify each transaction accross all the systems.
* @param {Object} opts Optional parameters
* @param {String} [regionCode] Region code for sandbox testing - Not for use in production.
* @param {String} [iMSenderID] Unique value used to identify the sender of the transaction. Example: MyCompany
* @param {module:api/OrdersApi~deleteOrdercancelCallback} callback The callback function, accepting three arguments: error, data, response
*/
return _createClass(OrdersApi, [{
key: "deleteOrdercancel",
value: function deleteOrdercancel(orderNumber, iMCustomerNumber, iMCountryCode, iMCorrelationID, opts, callback) {
opts = opts || {};
var postBody = null;
// verify the required parameter 'orderNumber' is set
if (orderNumber === undefined || orderNumber === null) {
throw new Error("Missing the required parameter 'orderNumber' when calling deleteOrdercancel");
}
// verify the required parameter 'iMCustomerNumber' is set
if (iMCustomerNumber === undefined || iMCustomerNumber === null) {
throw new Error("Missing the required parameter 'iMCustomerNumber' when calling deleteOrdercancel");
}
// verify the required parameter 'iMCountryCode' is set
if (iMCountryCode === undefined || iMCountryCode === null) {
throw new Error("Missing the required parameter 'iMCountryCode' when calling deleteOrdercancel");
}
// verify the required parameter 'iMCorrelationID' is set
if (iMCorrelationID === undefined || iMCorrelationID === null) {
throw new Error("Missing the required parameter 'iMCorrelationID' when calling deleteOrdercancel");
}
var pathParams = {
'OrderNumber': orderNumber
};
var queryParams = {
'regionCode': opts['regionCode']
};
var headerParams = {
'IM-CustomerNumber': iMCustomerNumber,
'IM-CountryCode': iMCountryCode,
'IM-CorrelationID': iMCorrelationID,
'IM-SenderID': opts['iMSenderID']
};
var formParams = {};
var authNames = ['application'];
var contentTypes = [];
var accepts = ['application/json'];
var returnType = null;
return this.apiClient.callApi('/resellers/v6/orders/{OrderNumber}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
}
/**
* Callback function to receive the result of the getOrderdetailsV61 operation.
* @callback module:api/OrdersApi~getOrderdetailsV61Callback
* @param {String} error Error message, if any.
* @param {module:model/OrderDetailB2B} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Get Order Details v6.1
* The Orders details API endpoint allows a customer to retrieve their Ingram Micro orders details by using the Ingram Micro sales order number as a path parameter. The sales order number, IM-CustomerNumber, IM-CountryCode, and IM-CorrelationID are required parameters.<br><br>*Service contracts, subscriptions, and license information are unavailable at the moment, this information will be available in the future. <br><br> Recent bug fixes: - Fixed duplication of serial numbers in the API response. - Fixed API time-out issues - Fixed missing tracking information. - Implemented enhanced order status.
* @param {String} ordernumber The Ingram Micro sales order number.
* @param {String} iMCustomerNumber Your unique Ingram Micro customer number.
* @param {String} iMCountryCode Two-character ISO country code.
* @param {String} iMCorrelationID Unique transaction number to identify each transaction accross all the systems.
* @param {Object} opts Optional parameters
* @param {String} [iMSenderID] Unique value used to identify the sender of the transaction. Example: MyCompany.
* @param {Date} [ingramOrderDate] The date and time in UTC format that the order was created.
* @param {String} [vendorNumber] Vendor Number.
* @param {module:model/String} [simulateStatus] Order response for various order statuses. Not for use in production.
* @param {Boolean} [isIml] True/False only for IML customers.
* @param {String} [regionCode] Region code for sandbox testing - Not for use in production.
* @param {module:api/OrdersApi~getOrderdetailsV61Callback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OrderDetailB2B}
*/
}, {
key: "getOrderdetailsV61",
value: function getOrderdetailsV61(ordernumber, iMCustomerNumber, iMCountryCode, iMCorrelationID, opts, callback) {
opts = opts || {};
var postBody = null;
// verify the required parameter 'ordernumber' is set
if (ordernumber === undefined || ordernumber === null) {
throw new Error("Missing the required parameter 'ordernumber' when calling getOrderdetailsV61");
}
// verify the required parameter 'iMCustomerNumber' is set
if (iMCustomerNumber === undefined || iMCustomerNumber === null) {
throw new Error("Missing the required parameter 'iMCustomerNumber' when calling getOrderdetailsV61");
}
// verify the required parameter 'iMCountryCode' is set
if (iMCountryCode === undefined || iMCountryCode === null) {
throw new Error("Missing the required parameter 'iMCountryCode' when calling getOrderdetailsV61");
}
// verify the required parameter 'iMCorrelationID' is set
if (iMCorrelationID === undefined || iMCorrelationID === null) {
throw new Error("Missing the required parameter 'iMCorrelationID' when calling getOrderdetailsV61");
}
var pathParams = {
'ordernumber': ordernumber
};
var queryParams = {
'ingramOrderDate': opts['ingramOrderDate'],
'vendorNumber': opts['vendorNumber'],
'simulateStatus': opts['simulateStatus'],
'isIml': opts['isIml'],
'regionCode': opts['regionCode']
};
var headerParams = {
'IM-CustomerNumber': iMCustomerNumber,
'IM-CountryCode': iMCountryCode,
'IM-CorrelationID': iMCorrelationID,
'IM-SenderID': opts['iMSenderID']
};
var formParams = {};
var authNames = ['application'];
var contentTypes = [];
var accepts = ['application/json'];
var returnType = _OrderDetailB2B["default"];
return this.apiClient.callApi('/resellers/v6.1/orders/{ordernumber}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
}
/**
* Callback function to receive the result of the getResellersV6Ordersearch operation.
* @callback module:api/OrdersApi~getResellersV6OrdersearchCallback
* @param {String} error Error message, if any.
* @param {module:model/OrderSearchResponse} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Search your Orders
* The Orders Search API endpoint allows a customer to search their Ingram Micro orders by using any of the available query string parameters, customer can search their order by using single query string parameters or combining them together. This endpoint supports the pagination of results.
* @param {String} iMCustomerNumber Your unique Ingram Micro customer number.
* @param {String} iMCountryCode Two-character ISO country code.
* @param {String} iMCorrelationID Unique transaction number to identify each transaction accross all the systems.
* @param {Object} opts Optional parameters
* @param {String} [ingramOrderNumber] The Ingram Micro order number.
* @param {module:model/String} [orderStatus] Ingram Micro order status.
* @param {Array.<String>} [orderStatusIn] Ingram Micro order status(can use it for multiple entries).
* @param {String} [ingramOrderDate] Search by Order date(yyyy-MM-dd).
* @param {Array.<String>} [ingramOrderDateBt] Search with the start and end date(only 2 entries allowed).
* @param {String} [iMSenderID] Unique value used to identify the sender of the transaction. Example: MyCompany
* @param {String} [customerOrderNumber] Search using your PO/Order number.
* @param {Number} [pageSize] The number of records required in the call - max records 100 per page.
* @param {Number} [pageNumber] The page number reference.
* @param {String} [endCustomerOrderNumber] End customer/user purchase order number.
* @param {Array.<String>} [invoiceDateBt] Invoice date of order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia.
* @param {Array.<String>} [shipDateBt] Shipment date of order, search with the start and end date(only 2 entries allowed).
* @param {Array.<String>} [deliveryDateBt] The delivery date of the order, search with the start and end date(only 2 entries allowed).*Currently, this feature is not available in Australia
* @param {String} [ingramPartNumber] Ingram Micro unique part number for the product.
* @param {String} [vendorPartNumber] Vendor’s part number for the product.
* @param {String} [serialNumber] A serial number of the product.
* @param {String} [trackingNumber] The tracking number of the order.*Currently, this feature is not available in Australia
* @param {String} [vendorName] Name of the vendor.
* @param {String} [specialBidNumber] The bid number provided to the reseller by the vendor for special pricing and discounts. Line-level bid numbers take precedence over header-level bid numbers.*Currently, this feature is not available in Australia
* @param {module:api/OrdersApi~getResellersV6OrdersearchCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OrderSearchResponse}
*/
}, {
key: "getResellersV6Ordersearch",
value: function getResellersV6Ordersearch(iMCustomerNumber, iMCountryCode, iMCorrelationID, opts, callback) {
opts = opts || {};
var postBody = null;
// verify the required parameter 'iMCustomerNumber' is set
if (iMCustomerNumber === undefined || iMCustomerNumber === null) {
throw new Error("Missing the required parameter 'iMCustomerNumber' when calling getResellersV6Ordersearch");
}
// verify the required parameter 'iMCountryCode' is set
if (iMCountryCode === undefined || iMCountryCode === null) {
throw new Error("Missing the required parameter 'iMCountryCode' when calling getResellersV6Ordersearch");
}
// verify the required parameter 'iMCorrelationID' is set
if (iMCorrelationID === undefined || iMCorrelationID === null) {
throw new Error("Missing the required parameter 'iMCorrelationID' when calling getResellersV6Ordersearch");
}
var pathParams = {};
var queryParams = {
'ingramOrderNumber': opts['ingramOrderNumber'],
'orderStatus': opts['orderStatus'],
'orderStatus-in': this.apiClient.buildCollectionParam(opts['orderStatusIn'], 'multi'),
'ingramOrderDate': opts['ingramOrderDate'],
'ingramOrderDate-bt': this.apiClient.buildCollectionParam(opts['ingramOrderDateBt'], 'multi'),
'customerOrderNumber': opts['customerOrderNumber'],
'pageSize': opts['pageSize'],
'pageNumber': opts['pageNumber'],
'endCustomerOrderNumber': opts['endCustomerOrderNumber'],
'invoiceDate_bt': this.apiClient.buildCollectionParam(opts['invoiceDateBt'], 'multi'),
'shipDate_bt': this.apiClient.buildCollectionParam(opts['shipDateBt'], 'multi'),
'deliveryDate_bt': this.apiClient.buildCollectionParam(opts['deliveryDateBt'], 'multi'),
'ingramPartNumber': opts['ingramPartNumber'],
'vendorPartNumber': opts['vendorPartNumber'],
'serialNumber': opts['serialNumber'],
'trackingNumber': opts['trackingNumber'],
'vendorName': opts['vendorName'],
'specialBidNumber': opts['specialBidNumber']
};
var headerParams = {
'IM-CustomerNumber': iMCustomerNumber,
'IM-CountryCode': iMCountryCode,
'IM-CorrelationID': iMCorrelationID,
'IM-SenderID': opts['iMSenderID']
};
var formParams = {};
var authNames = ['application'];
var contentTypes = [];
var accepts = ['application/json'];
var returnType = _OrderSearchResponse["default"];
return this.apiClient.callApi('/resellers/v6/orders/search', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
}
/**
* Callback function to receive the result of the postCreateorderV6 operation.
* @callback module:api/OrdersApi~postCreateorderV6Callback
* @param {String} error Error message, if any.
* @param {module:model/OrderCreateResponse} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Create your Order
* Instantly create and place orders. The POST API supports stocked SKUs as well as licensing and warranties SKUs. IM-CustomerNumber, IM-CountryCode, IM-SenderID and IM-CorrelationID are required parameters. Ingram Micro recommends that you provide the ingrampartnumber for each SKU contained in each order. NOTE: You must have net terms to use the Ingram Micro Order Create API. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net-30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering.
* @param {String} iMCustomerNumber Your unique Ingram Micro customer number.
* @param {String} iMCountryCode Two-character ISO country code.
* @param {String} iMCorrelationID Unique transaction number to identify each transaction accross all the systems.
* @param {module:model/OrderCreateRequest} orderCreateRequest
* @param {Object} opts Optional parameters
* @param {String} [iMSenderID] Unique value used to identify the sender of the transaction. Example: MyCompany
* @param {module:api/OrdersApi~postCreateorderV6Callback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OrderCreateResponse}
*/
}, {
key: "postCreateorderV6",
value: function postCreateorderV6(iMCustomerNumber, iMCountryCode, iMCorrelationID, orderCreateRequest, opts, callback) {
opts = opts || {};
var postBody = orderCreateRequest;
// verify the required parameter 'iMCustomerNumber' is set
if (iMCustomerNumber === undefined || iMCustomerNumber === null) {
throw new Error("Missing the required parameter 'iMCustomerNumber' when calling postCreateorderV6");
}
// verify the required parameter 'iMCountryCode' is set
if (iMCountryCode === undefined || iMCountryCode === null) {
throw new Error("Missing the required parameter 'iMCountryCode' when calling postCreateorderV6");
}
// verify the required parameter 'iMCorrelationID' is set
if (iMCorrelationID === undefined || iMCorrelationID === null) {
throw new Error("Missing the required parameter 'iMCorrelationID' when calling postCreateorderV6");
}
// verify the required parameter 'orderCreateRequest' is set
if (orderCreateRequest === undefined || orderCreateRequest === null) {
throw new Error("Missing the required parameter 'orderCreateRequest' when calling postCreateorderV6");
}
var pathParams = {};
var queryParams = {};
var headerParams = {
'IM-CustomerNumber': iMCustomerNumber,
'IM-CountryCode': iMCountryCode,
'IM-SenderID': opts['iMSenderID'],
'IM-CorrelationID': iMCorrelationID
};
var formParams = {};
var authNames = ['application'];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = _OrderCreateResponse["default"];
return this.apiClient.callApi('/resellers/v6/orders', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
}
/**
* Callback function to receive the result of the postCreateorderV7 operation.
* @callback module:api/OrdersApi~postCreateorderV7Callback
* @param {String} error Error message, if any.
* @param {module:model/OrderCreateV7Response201} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Create your Order v7
* The Order Create v7 allows our customers to create orders asynchronously. The customer can create either standard orders using stocked SKUs and/or create a “Quote to Order” using the existing quote which is in “Ready to Order” status, or the customer can create an order using the “Configure to order” (CTO) quote. Upon successful submission of the order create request, a confirmation message will be returned as an API response. <br > <br > Once the order is processed, Ingram Micro will notify customers via webhook using a pre-defined callback URL as an HTTP post regarding the updates related to the order. Upon successful order creation, a notification will be sent via webhook regarding the order details, in the event of any error occurring during the order creation process, an error message will be delivered via webhook. Nightly system unavailability will delay response Async response. <br > <br > The key differentiator between standard ordering and “Quote To Order” is the optional input field in the request body which is “quoteNumber”. If a customer passes the quote number in the request body, the order will be processed as a “Quote To Order” using the details from the quote. Any SKUs, quantity, or price information that are passed in the lines object within the request will be ignored in the case of “Quote To Order”.<br > <br > **Prerequisite:** Pre-defined callback URL <br > <br > **Standard ordering::**<br><br>Ingram Micro recommends that you provide the ingramPartNumber for each SKU contained in each order. NOTE: You must have net terms to use the Ingram Micro Order Create API. Ingram Micro offers trade credit when using our APIs, and repayment is based on net terms. For example, if your net terms agreement is net 30, you will have 30 days to make a full payment. Ingram Micro does not allow credit card transactions for API ordering. <br><br>[**Key differences between v6 and v7 Migration**](https://developer.ingrammicro.com/reseller/page/v6-and-v7-migration) <br><br> <br><br>**Quote to Order / Configure to Order:**<br><br>If customers are planning to use Quote to Order or Configure to Order Quotes, it’s recommended to validate the quote using the “Validate Quote” endpoint before creating an order using the quote. Validate Quote endpoint will not only validate the quote but also outline all the mandatory fields required by the vendor at a header level and at the line level which a customer needs to pass to the Quote to Order endpoint request. For a detailed understanding of the “Validate Quote” endpoint, review the “Validate Quote” endpoint documentation. <br><br> **How it works:**<br><br>- The customer validates the quote with a quote number from the Validate Quote endpoint.<br>- The customer copies all the mandatory fields required by the vendor and adds them to the QTO request body.<br>- The customer provides all the values for Vendor mandatory fields along with other required information for QTO to create an order.<br>- After the order creation request receipt acknowledgment from the QTO endpoint, all further order creation updates will be provided via webhook push notification.
* @param {String} iMCustomerNumber Your unique Ingram Micro customer number.
* @param {String} iMCountryCode Two-character ISO country code.
* @param {String} iMCorrelationID Unique transaction number to identify each transaction across all the systems.
* @param {module:model/OrderCreateV7Request} orderCreateV7Request
* @param {Object} opts Optional parameters
* @param {String} [iMSenderID] Unique value used to identify the sender of the transaction. Example: MyCompany
* @param {module:api/OrdersApi~postCreateorderV7Callback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OrderCreateV7Response201}
*/
}, {
key: "postCreateorderV7",
value: function postCreateorderV7(iMCustomerNumber, iMCountryCode, iMCorrelationID, orderCreateV7Request, opts, callback) {
opts = opts || {};
var postBody = orderCreateV7Request;
// verify the required parameter 'iMCustomerNumber' is set
if (iMCustomerNumber === undefined || iMCustomerNumber === null) {
throw new Error("Missing the required parameter 'iMCustomerNumber' when calling postCreateorderV7");
}
// verify the required parameter 'iMCountryCode' is set
if (iMCountryCode === undefined || iMCountryCode === null) {
throw new Error("Missing the required parameter 'iMCountryCode' when calling postCreateorderV7");
}
// verify the required parameter 'iMCorrelationID' is set
if (iMCorrelationID === undefined || iMCorrelationID === null) {
throw new Error("Missing the required parameter 'iMCorrelationID' when calling postCreateorderV7");
}
// verify the required parameter 'orderCreateV7Request' is set
if (orderCreateV7Request === undefined || orderCreateV7Request === null) {
throw new Error("Missing the required parameter 'orderCreateV7Request' when calling postCreateorderV7");
}
var pathParams = {};
var queryParams = {};
var headerParams = {
'IM-CustomerNumber': iMCustomerNumber,
'IM-CountryCode': iMCountryCode,
'IM-SenderID': opts['iMSenderID'],
'IM-CorrelationID': iMCorrelationID
};
var formParams = {};
var authNames = ['application'];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = _OrderCreateV7Response2["default"];
return this.apiClient.callApi('/resellers/v7/orders', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
}
/**
* Callback function to receive the result of the putOrdermodify operation.
* @callback module:api/OrdersApi~putOrdermodifyCallback
* @param {String} error Error message, if any.
* @param {module:model/OrderModifyResponse} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Modify your Order
* The Order Modify API endpoint allows for changes to be made to an order after the order creation process as long as the order was created with the customer hold flag. * Orders can be modified within 24hrs of being placed with the customer hold flag, after 24hrs they are voided if they are not released by the customer. * Modifying orders that were placed without the customer hold flag is not possible
* @param {String} orderNumber Ingram sales order number.
* @param {String} iMCustomerNumber Your unique Ingram Micro customer number.
* @param {String} iMCountryCode Two-character ISO country code.
* @param {String} iMCorrelationID Unique transaction number to identify each transaction across all the systems.
* @param {module:model/OrderModifyRequest} orderModifyRequest
* @param {Object} opts Optional parameters
* @param {String} [actionCode] Action code to be used for order release.
* @param {String} [regionCode] Region code paramter to be used only for order release functionality.Region code is only for sandbox not for production
* @param {String} [iMSenderID] Unique value used to identify the sender of the transaction. Example: MyCompany
* @param {module:api/OrdersApi~putOrdermodifyCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OrderModifyResponse}
*/
}, {
key: "putOrdermodify",
value: function putOrdermodify(orderNumber, iMCustomerNumber, iMCountryCode, iMCorrelationID, orderModifyRequest, opts, callback) {
opts = opts || {};
var postBody = orderModifyRequest;
// verify the required parameter 'orderNumber' is set
if (orderNumber === undefined || orderNumber === null) {
throw new Error("Missing the required parameter 'orderNumber' when calling putOrdermodify");
}
// verify the required parameter 'iMCustomerNumber' is set
if (iMCustomerNumber === undefined || iMCustomerNumber === null) {
throw new Error("Missing the required parameter 'iMCustomerNumber' when calling putOrdermodify");
}
// verify the required parameter 'iMCountryCode' is set
if (iMCountryCode === undefined || iMCountryCode === null) {
throw new Error("Missing the required parameter 'iMCountryCode' when calling putOrdermodify");
}
// verify the required parameter 'iMCorrelationID' is set
if (iMCorrelationID === undefined || iMCorrelationID === null) {
throw new Error("Missing the required parameter 'iMCorrelationID' when calling putOrdermodify");
}
// verify the required parameter 'orderModifyRequest' is set
if (orderModifyRequest === undefined || orderModifyRequest === null) {
throw new Error("Missing the required parameter 'orderModifyRequest' when calling putOrdermodify");
}
var pathParams = {
'orderNumber': orderNumber
};
var queryParams = {
'actionCode': opts['actionCode'],
'regionCode': opts['regionCode']
};
var headerParams = {
'IM-CustomerNumber': iMCustomerNumber,
'IM-CountryCode': iMCountryCode,
'IM-CorrelationID': iMCorrelationID,
'IM-SenderID': opts['iMSenderID']
};
var formParams = {};
var authNames = ['application'];
var contentTypes = ['application/json'];
var accepts = ['application/json'];
var returnType = _OrderModifyResponse["default"];
return this.apiClient.callApi('/resellers/v6/orders/{orderNumber}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
}
}]);
}();