cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
203 lines (172 loc) • 11.2 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/Ptsv2paymentsRecurringPaymentInformation', 'model/Ptsv2paymentsWatchlistScreeningInformation', 'model/Riskv1decisionsAcquirerInformation', 'model/Riskv1decisionsBuyerInformation', 'model/Riskv1decisionsClientReferenceInformation', 'model/Riskv1decisionsConsumerAuthenticationInformation', 'model/Riskv1decisionsDeviceInformation', 'model/Riskv1decisionsMerchantDefinedInformation', 'model/Riskv1decisionsMerchantInformation', 'model/Riskv1decisionsOrderInformation', 'model/Riskv1decisionsPaymentInformation', 'model/Riskv1decisionsProcessingInformation', 'model/Riskv1decisionsProcessorInformation', 'model/Riskv1decisionsRiskInformation', 'model/Riskv1decisionsTokenInformation', 'model/Riskv1decisionsTravelInformation'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Ptsv2paymentsRecurringPaymentInformation'), require('./Ptsv2paymentsWatchlistScreeningInformation'), require('./Riskv1decisionsAcquirerInformation'), require('./Riskv1decisionsBuyerInformation'), require('./Riskv1decisionsClientReferenceInformation'), require('./Riskv1decisionsConsumerAuthenticationInformation'), require('./Riskv1decisionsDeviceInformation'), require('./Riskv1decisionsMerchantDefinedInformation'), require('./Riskv1decisionsMerchantInformation'), require('./Riskv1decisionsOrderInformation'), require('./Riskv1decisionsPaymentInformation'), require('./Riskv1decisionsProcessingInformation'), require('./Riskv1decisionsProcessorInformation'), require('./Riskv1decisionsRiskInformation'), require('./Riskv1decisionsTokenInformation'), require('./Riskv1decisionsTravelInformation'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.CreateBundledDecisionManagerCaseRequest = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv2paymentsRecurringPaymentInformation, root.CyberSource.Ptsv2paymentsWatchlistScreeningInformation, root.CyberSource.Riskv1decisionsAcquirerInformation, root.CyberSource.Riskv1decisionsBuyerInformation, root.CyberSource.Riskv1decisionsClientReferenceInformation, root.CyberSource.Riskv1decisionsConsumerAuthenticationInformation, root.CyberSource.Riskv1decisionsDeviceInformation, root.CyberSource.Riskv1decisionsMerchantDefinedInformation, root.CyberSource.Riskv1decisionsMerchantInformation, root.CyberSource.Riskv1decisionsOrderInformation, root.CyberSource.Riskv1decisionsPaymentInformation, root.CyberSource.Riskv1decisionsProcessingInformation, root.CyberSource.Riskv1decisionsProcessorInformation, root.CyberSource.Riskv1decisionsRiskInformation, root.CyberSource.Riskv1decisionsTokenInformation, root.CyberSource.Riskv1decisionsTravelInformation);
}
}(this, function(ApiClient, Ptsv2paymentsRecurringPaymentInformation, Ptsv2paymentsWatchlistScreeningInformation, Riskv1decisionsAcquirerInformation, Riskv1decisionsBuyerInformation, Riskv1decisionsClientReferenceInformation, Riskv1decisionsConsumerAuthenticationInformation, Riskv1decisionsDeviceInformation, Riskv1decisionsMerchantDefinedInformation, Riskv1decisionsMerchantInformation, Riskv1decisionsOrderInformation, Riskv1decisionsPaymentInformation, Riskv1decisionsProcessingInformation, Riskv1decisionsProcessorInformation, Riskv1decisionsRiskInformation, Riskv1decisionsTokenInformation, Riskv1decisionsTravelInformation) {
'use strict';
/**
* The CreateBundledDecisionManagerCaseRequest model module.
* @module model/CreateBundledDecisionManagerCaseRequest
* @version 0.0.1
*/
/**
* Constructs a new <code>CreateBundledDecisionManagerCaseRequest</code>.
* @alias module:model/CreateBundledDecisionManagerCaseRequest
* @class
* @param orderInformation {module:model/Riskv1decisionsOrderInformation}
*/
var exports = function(orderInformation) {
var _this = this;
_this['orderInformation'] = orderInformation;
};
/**
* Constructs a <code>CreateBundledDecisionManagerCaseRequest</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/CreateBundledDecisionManagerCaseRequest} obj Optional instance to populate.
* @return {module:model/CreateBundledDecisionManagerCaseRequest} The populated <code>CreateBundledDecisionManagerCaseRequest</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('clientReferenceInformation')) {
obj['clientReferenceInformation'] = Riskv1decisionsClientReferenceInformation.constructFromObject(data['clientReferenceInformation']);
}
if (data.hasOwnProperty('processorInformation')) {
obj['processorInformation'] = Riskv1decisionsProcessorInformation.constructFromObject(data['processorInformation']);
}
if (data.hasOwnProperty('processingInformation')) {
obj['processingInformation'] = Riskv1decisionsProcessingInformation.constructFromObject(data['processingInformation']);
}
if (data.hasOwnProperty('paymentInformation')) {
obj['paymentInformation'] = Riskv1decisionsPaymentInformation.constructFromObject(data['paymentInformation']);
}
if (data.hasOwnProperty('orderInformation')) {
obj['orderInformation'] = Riskv1decisionsOrderInformation.constructFromObject(data['orderInformation']);
}
if (data.hasOwnProperty('buyerInformation')) {
obj['buyerInformation'] = Riskv1decisionsBuyerInformation.constructFromObject(data['buyerInformation']);
}
if (data.hasOwnProperty('deviceInformation')) {
obj['deviceInformation'] = Riskv1decisionsDeviceInformation.constructFromObject(data['deviceInformation']);
}
if (data.hasOwnProperty('riskInformation')) {
obj['riskInformation'] = Riskv1decisionsRiskInformation.constructFromObject(data['riskInformation']);
}
if (data.hasOwnProperty('travelInformation')) {
obj['travelInformation'] = Riskv1decisionsTravelInformation.constructFromObject(data['travelInformation']);
}
if (data.hasOwnProperty('merchantDefinedInformation')) {
obj['merchantDefinedInformation'] = ApiClient.convertToType(data['merchantDefinedInformation'], [Riskv1decisionsMerchantDefinedInformation]);
}
if (data.hasOwnProperty('merchantInformation')) {
obj['merchantInformation'] = Riskv1decisionsMerchantInformation.constructFromObject(data['merchantInformation']);
}
if (data.hasOwnProperty('acquirerInformation')) {
obj['acquirerInformation'] = Riskv1decisionsAcquirerInformation.constructFromObject(data['acquirerInformation']);
}
if (data.hasOwnProperty('recurringPaymentInformation')) {
obj['recurringPaymentInformation'] = Ptsv2paymentsRecurringPaymentInformation.constructFromObject(data['recurringPaymentInformation']);
}
if (data.hasOwnProperty('consumerAuthenticationInformation')) {
obj['consumerAuthenticationInformation'] = Riskv1decisionsConsumerAuthenticationInformation.constructFromObject(data['consumerAuthenticationInformation']);
}
if (data.hasOwnProperty('watchlistScreeningInformation')) {
obj['watchlistScreeningInformation'] = Ptsv2paymentsWatchlistScreeningInformation.constructFromObject(data['watchlistScreeningInformation']);
}
if (data.hasOwnProperty('tokenInformation')) {
obj['tokenInformation'] = Riskv1decisionsTokenInformation.constructFromObject(data['tokenInformation']);
}
}
return obj;
}
/**
* @member {module:model/Riskv1decisionsClientReferenceInformation} clientReferenceInformation
*/
exports.prototype['clientReferenceInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsProcessorInformation} processorInformation
*/
exports.prototype['processorInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsProcessingInformation} processingInformation
*/
exports.prototype['processingInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsPaymentInformation} paymentInformation
*/
exports.prototype['paymentInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsOrderInformation} orderInformation
*/
exports.prototype['orderInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsBuyerInformation} buyerInformation
*/
exports.prototype['buyerInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsDeviceInformation} deviceInformation
*/
exports.prototype['deviceInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsRiskInformation} riskInformation
*/
exports.prototype['riskInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsTravelInformation} travelInformation
*/
exports.prototype['travelInformation'] = undefined;
/**
* @member {Array.<module:model/Riskv1decisionsMerchantDefinedInformation>} merchantDefinedInformation
*/
exports.prototype['merchantDefinedInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsMerchantInformation} merchantInformation
*/
exports.prototype['merchantInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsAcquirerInformation} acquirerInformation
*/
exports.prototype['acquirerInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsRecurringPaymentInformation} recurringPaymentInformation
*/
exports.prototype['recurringPaymentInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsConsumerAuthenticationInformation} consumerAuthenticationInformation
*/
exports.prototype['consumerAuthenticationInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsWatchlistScreeningInformation} watchlistScreeningInformation
*/
exports.prototype['watchlistScreeningInformation'] = undefined;
/**
* @member {module:model/Riskv1decisionsTokenInformation} tokenInformation
*/
exports.prototype['tokenInformation'] = undefined;
return exports;
}));