cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
170 lines (143 loc) • 7.67 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/Riskv1decisionsOrderInformationAmountDetails', 'model/Riskv1decisionsOrderInformationBillTo', 'model/Riskv1decisionsOrderInformationLineItems', 'model/Riskv1decisionsOrderInformationShipTo', 'model/Riskv1decisionsOrderInformationShippingDetails'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Riskv1decisionsOrderInformationAmountDetails'), require('./Riskv1decisionsOrderInformationBillTo'), require('./Riskv1decisionsOrderInformationLineItems'), require('./Riskv1decisionsOrderInformationShipTo'), require('./Riskv1decisionsOrderInformationShippingDetails'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Riskv1decisionsOrderInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Riskv1decisionsOrderInformationAmountDetails, root.CyberSource.Riskv1decisionsOrderInformationBillTo, root.CyberSource.Riskv1decisionsOrderInformationLineItems, root.CyberSource.Riskv1decisionsOrderInformationShipTo, root.CyberSource.Riskv1decisionsOrderInformationShippingDetails);
}
}(this, function(ApiClient, Riskv1decisionsOrderInformationAmountDetails, Riskv1decisionsOrderInformationBillTo, Riskv1decisionsOrderInformationLineItems, Riskv1decisionsOrderInformationShipTo, Riskv1decisionsOrderInformationShippingDetails) {
'use strict';
/**
* The Riskv1decisionsOrderInformation model module.
* @module model/Riskv1decisionsOrderInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>Riskv1decisionsOrderInformation</code>.
* Contains detailed order-level information.
* @alias module:model/Riskv1decisionsOrderInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>Riskv1decisionsOrderInformation</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/Riskv1decisionsOrderInformation} obj Optional instance to populate.
* @return {module:model/Riskv1decisionsOrderInformation} The populated <code>Riskv1decisionsOrderInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('amountDetails')) {
obj['amountDetails'] = Riskv1decisionsOrderInformationAmountDetails.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('cutoffDateTime')) {
obj['cutoffDateTime'] = ApiClient.convertToType(data['cutoffDateTime'], 'String');
}
if (data.hasOwnProperty('reordered')) {
obj['reordered'] = ApiClient.convertToType(data['reordered'], 'Boolean');
}
if (data.hasOwnProperty('shippingDetails')) {
obj['shippingDetails'] = Riskv1decisionsOrderInformationShippingDetails.constructFromObject(data['shippingDetails']);
}
if (data.hasOwnProperty('shipTo')) {
obj['shipTo'] = Riskv1decisionsOrderInformationShipTo.constructFromObject(data['shipTo']);
}
if (data.hasOwnProperty('returnsAccepted')) {
obj['returnsAccepted'] = ApiClient.convertToType(data['returnsAccepted'], 'Boolean');
}
if (data.hasOwnProperty('lineItems')) {
obj['lineItems'] = ApiClient.convertToType(data['lineItems'], [Riskv1decisionsOrderInformationLineItems]);
}
if (data.hasOwnProperty('billTo')) {
obj['billTo'] = Riskv1decisionsOrderInformationBillTo.constructFromObject(data['billTo']);
}
if (data.hasOwnProperty('totalOffersCount')) {
obj['totalOffersCount'] = ApiClient.convertToType(data['totalOffersCount'], 'String');
}
}
return obj;
}
/**
* @member {module:model/Riskv1decisionsOrderInformationAmountDetails} 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;
/**
* Starting date and time for an event or a journey that is independent of which transportation mechanism, in UTC. The cutoffDateTime will supersede travelInformation.departureTime if both are supplied in the request. Format: YYYY-MM-DDThh:mm:ssZ. Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC.
* @member {String} cutoffDateTime
*/
exports.prototype['cutoffDateTime'] = 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/Riskv1decisionsOrderInformationShippingDetails} shippingDetails
*/
exports.prototype['shippingDetails'] = undefined;
/**
* @member {module:model/Riskv1decisionsOrderInformationShipTo} shipTo
*/
exports.prototype['shipTo'] = undefined;
/**
* Boolean that indicates whether returns are accepted for this order. This field can contain one of the following values: - true: Returns are accepted for this order. - false: Returns are not accepted for this order.
* @member {Boolean} returnsAccepted
*/
exports.prototype['returnsAccepted'] = undefined;
/**
* This array contains detailed information about individual products in the order.
* @member {Array.<module:model/Riskv1decisionsOrderInformationLineItems>} lineItems
*/
exports.prototype['lineItems'] = undefined;
/**
* @member {module:model/Riskv1decisionsOrderInformationBillTo} 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;
}));