cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
143 lines (119 loc) • 6.06 kB
JavaScript
/**
* CyberSource Merged Spec
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
*
* OpenAPI spec version: 0.0.1
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.4.38
*
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/Riskv1authenticationsOrderInformationAmountDetails', 'model/Riskv1authenticationsOrderInformationBillTo', 'model/Riskv1authenticationsOrderInformationLineItems', 'model/Riskv1decisionsOrderInformationShipTo'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Riskv1authenticationsOrderInformationAmountDetails'), require('./Riskv1authenticationsOrderInformationBillTo'), require('./Riskv1authenticationsOrderInformationLineItems'), require('./Riskv1decisionsOrderInformationShipTo'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Riskv1authenticationsOrderInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Riskv1authenticationsOrderInformationAmountDetails, root.CyberSource.Riskv1authenticationsOrderInformationBillTo, root.CyberSource.Riskv1authenticationsOrderInformationLineItems, root.CyberSource.Riskv1decisionsOrderInformationShipTo);
}
}(this, function(ApiClient, Riskv1authenticationsOrderInformationAmountDetails, Riskv1authenticationsOrderInformationBillTo, Riskv1authenticationsOrderInformationLineItems, Riskv1decisionsOrderInformationShipTo) {
'use strict';
/**
* The Riskv1authenticationsOrderInformation model module.
* @module model/Riskv1authenticationsOrderInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>Riskv1authenticationsOrderInformation</code>.
* @alias module:model/Riskv1authenticationsOrderInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Riskv1authenticationsOrderInformation</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/Riskv1authenticationsOrderInformation} obj Optional instance to populate.
* @return {module:model/Riskv1authenticationsOrderInformation} The populated <code>Riskv1authenticationsOrderInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('amountDetails')) {
obj['amountDetails'] = Riskv1authenticationsOrderInformationAmountDetails.constructFromObject(data['amountDetails']);
}
if (data.hasOwnProperty('preOrder')) {
obj['preOrder'] = ApiClient.convertToType(data['preOrder'], 'String');
}
if (data.hasOwnProperty('preOrderDate')) {
obj['preOrderDate'] = ApiClient.convertToType(data['preOrderDate'], 'String');
}
if (data.hasOwnProperty('reordered')) {
obj['reordered'] = ApiClient.convertToType(data['reordered'], 'Boolean');
}
if (data.hasOwnProperty('shipTo')) {
obj['shipTo'] = Riskv1decisionsOrderInformationShipTo.constructFromObject(data['shipTo']);
}
if (data.hasOwnProperty('lineItems')) {
obj['lineItems'] = ApiClient.convertToType(data['lineItems'], [Riskv1authenticationsOrderInformationLineItems]);
}
if (data.hasOwnProperty('billTo')) {
obj['billTo'] = Riskv1authenticationsOrderInformationBillTo.constructFromObject(data['billTo']);
}
if (data.hasOwnProperty('totalOffersCount')) {
obj['totalOffersCount'] = ApiClient.convertToType(data['totalOffersCount'], 'String');
}
}
return obj;
}
/**
* @member {module:model/Riskv1authenticationsOrderInformationAmountDetails} amountDetails
*/
exports.prototype['amountDetails'] = undefined;
/**
* Indicates whether cardholder is placing an order with a future availability or release date. This field can contain one of these values: - MERCHANDISE_AVAILABLE: Merchandise available - FUTURE_AVAILABILITY: Future availability
* @member {String} preOrder
*/
exports.prototype['preOrder'] = undefined;
/**
* Expected date that a pre-ordered purchase will be available. Format: YYYYMMDD
* @member {String} preOrderDate
*/
exports.prototype['preOrderDate'] = undefined;
/**
* Indicates whether the cardholder is reordering previously purchased merchandise. This field can contain one of these values: - false: First time ordered - true: Reordered
* @member {Boolean} reordered
*/
exports.prototype['reordered'] = undefined;
/**
* @member {module:model/Riskv1decisionsOrderInformationShipTo} shipTo
*/
exports.prototype['shipTo'] = undefined;
/**
* This array contains detailed information about individual products in the order.
* @member {Array.<module:model/Riskv1authenticationsOrderInformationLineItems>} lineItems
*/
exports.prototype['lineItems'] = undefined;
/**
* @member {module:model/Riskv1authenticationsOrderInformationBillTo} billTo
*/
exports.prototype['billTo'] = undefined;
/**
* Total number of articles/items in the order as a numeric decimal count. Possible values: 00 - 99
* @member {String} totalOffersCount
*/
exports.prototype['totalOffersCount'] = undefined;
return exports;
}));