cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
171 lines (143 loc) • 8.98 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/Ptsv2paymentsMerchantDefinedInformation', 'model/Ptsv2paymentsPromotionInformation', 'model/Ptsv2paymentsTravelInformation', 'model/Ptsv2paymentsidcapturesAggregatorInformation', 'model/Ptsv2paymentsidcapturesBuyerInformation', 'model/Ptsv2paymentsidcapturesDeviceInformation', 'model/Ptsv2paymentsidrefundsClientReferenceInformation', 'model/Ptsv2paymentsidrefundsMerchantInformation', 'model/Ptsv2paymentsidrefundsOrderInformation', 'model/Ptsv2paymentsidrefundsPaymentInformation', 'model/Ptsv2paymentsidrefundsPointOfSaleInformation', 'model/Ptsv2paymentsidrefundsProcessingInformation'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Ptsv2paymentsMerchantDefinedInformation'), require('./Ptsv2paymentsPromotionInformation'), require('./Ptsv2paymentsTravelInformation'), require('./Ptsv2paymentsidcapturesAggregatorInformation'), require('./Ptsv2paymentsidcapturesBuyerInformation'), require('./Ptsv2paymentsidcapturesDeviceInformation'), require('./Ptsv2paymentsidrefundsClientReferenceInformation'), require('./Ptsv2paymentsidrefundsMerchantInformation'), require('./Ptsv2paymentsidrefundsOrderInformation'), require('./Ptsv2paymentsidrefundsPaymentInformation'), require('./Ptsv2paymentsidrefundsPointOfSaleInformation'), require('./Ptsv2paymentsidrefundsProcessingInformation'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.RefundCaptureRequest = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv2paymentsMerchantDefinedInformation, root.CyberSource.Ptsv2paymentsPromotionInformation, root.CyberSource.Ptsv2paymentsTravelInformation, root.CyberSource.Ptsv2paymentsidcapturesAggregatorInformation, root.CyberSource.Ptsv2paymentsidcapturesBuyerInformation, root.CyberSource.Ptsv2paymentsidcapturesDeviceInformation, root.CyberSource.Ptsv2paymentsidrefundsClientReferenceInformation, root.CyberSource.Ptsv2paymentsidrefundsMerchantInformation, root.CyberSource.Ptsv2paymentsidrefundsOrderInformation, root.CyberSource.Ptsv2paymentsidrefundsPaymentInformation, root.CyberSource.Ptsv2paymentsidrefundsPointOfSaleInformation, root.CyberSource.Ptsv2paymentsidrefundsProcessingInformation);
}
}(this, function(ApiClient, Ptsv2paymentsMerchantDefinedInformation, Ptsv2paymentsPromotionInformation, Ptsv2paymentsTravelInformation, Ptsv2paymentsidcapturesAggregatorInformation, Ptsv2paymentsidcapturesBuyerInformation, Ptsv2paymentsidcapturesDeviceInformation, Ptsv2paymentsidrefundsClientReferenceInformation, Ptsv2paymentsidrefundsMerchantInformation, Ptsv2paymentsidrefundsOrderInformation, Ptsv2paymentsidrefundsPaymentInformation, Ptsv2paymentsidrefundsPointOfSaleInformation, Ptsv2paymentsidrefundsProcessingInformation) {
'use strict';
/**
* The RefundCaptureRequest model module.
* @module model/RefundCaptureRequest
* @version 0.0.1
*/
/**
* Constructs a new <code>RefundCaptureRequest</code>.
* @alias module:model/RefundCaptureRequest
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>RefundCaptureRequest</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/RefundCaptureRequest} obj Optional instance to populate.
* @return {module:model/RefundCaptureRequest} The populated <code>RefundCaptureRequest</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('clientReferenceInformation')) {
obj['clientReferenceInformation'] = Ptsv2paymentsidrefundsClientReferenceInformation.constructFromObject(data['clientReferenceInformation']);
}
if (data.hasOwnProperty('processingInformation')) {
obj['processingInformation'] = Ptsv2paymentsidrefundsProcessingInformation.constructFromObject(data['processingInformation']);
}
if (data.hasOwnProperty('paymentInformation')) {
obj['paymentInformation'] = Ptsv2paymentsidrefundsPaymentInformation.constructFromObject(data['paymentInformation']);
}
if (data.hasOwnProperty('orderInformation')) {
obj['orderInformation'] = Ptsv2paymentsidrefundsOrderInformation.constructFromObject(data['orderInformation']);
}
if (data.hasOwnProperty('buyerInformation')) {
obj['buyerInformation'] = Ptsv2paymentsidcapturesBuyerInformation.constructFromObject(data['buyerInformation']);
}
if (data.hasOwnProperty('deviceInformation')) {
obj['deviceInformation'] = Ptsv2paymentsidcapturesDeviceInformation.constructFromObject(data['deviceInformation']);
}
if (data.hasOwnProperty('merchantInformation')) {
obj['merchantInformation'] = Ptsv2paymentsidrefundsMerchantInformation.constructFromObject(data['merchantInformation']);
}
if (data.hasOwnProperty('aggregatorInformation')) {
obj['aggregatorInformation'] = Ptsv2paymentsidcapturesAggregatorInformation.constructFromObject(data['aggregatorInformation']);
}
if (data.hasOwnProperty('pointOfSaleInformation')) {
obj['pointOfSaleInformation'] = Ptsv2paymentsidrefundsPointOfSaleInformation.constructFromObject(data['pointOfSaleInformation']);
}
if (data.hasOwnProperty('merchantDefinedInformation')) {
obj['merchantDefinedInformation'] = ApiClient.convertToType(data['merchantDefinedInformation'], [Ptsv2paymentsMerchantDefinedInformation]);
}
if (data.hasOwnProperty('travelInformation')) {
obj['travelInformation'] = Ptsv2paymentsTravelInformation.constructFromObject(data['travelInformation']);
}
if (data.hasOwnProperty('promotionInformation')) {
obj['promotionInformation'] = Ptsv2paymentsPromotionInformation.constructFromObject(data['promotionInformation']);
}
}
return obj;
}
/**
* @member {module:model/Ptsv2paymentsidrefundsClientReferenceInformation} clientReferenceInformation
*/
exports.prototype['clientReferenceInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsidrefundsProcessingInformation} processingInformation
*/
exports.prototype['processingInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsidrefundsPaymentInformation} paymentInformation
*/
exports.prototype['paymentInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsidrefundsOrderInformation} orderInformation
*/
exports.prototype['orderInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsidcapturesBuyerInformation} buyerInformation
*/
exports.prototype['buyerInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsidcapturesDeviceInformation} deviceInformation
*/
exports.prototype['deviceInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsidrefundsMerchantInformation} merchantInformation
*/
exports.prototype['merchantInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsidcapturesAggregatorInformation} aggregatorInformation
*/
exports.prototype['aggregatorInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsidrefundsPointOfSaleInformation} pointOfSaleInformation
*/
exports.prototype['pointOfSaleInformation'] = undefined;
/**
* The object containing the custom data that the merchant defines.
* @member {Array.<module:model/Ptsv2paymentsMerchantDefinedInformation>} merchantDefinedInformation
*/
exports.prototype['merchantDefinedInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsTravelInformation} travelInformation
*/
exports.prototype['travelInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsPromotionInformation} promotionInformation
*/
exports.prototype['promotionInformation'] = undefined;
return exports;
}));