cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
162 lines (139 loc) • 8.65 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/Acpv1instructionsinstructionIdcredentialsAttachments', 'model/Acpv1instructionsinstructionIdcredentialsClientReferenceInformation', 'model/Acpv1instructionsinstructionIdcredentialsMandateReferenceData', 'model/Acpv1instructionsinstructionIdcredentialsMerchantInformation', 'model/Acpv1instructionsinstructionIdcredentialsOrderInformation', 'model/Acpv1instructionsinstructionIdcredentialsPaymentOptions'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Acpv1instructionsinstructionIdcredentialsAttachments'), require('./Acpv1instructionsinstructionIdcredentialsClientReferenceInformation'), require('./Acpv1instructionsinstructionIdcredentialsMandateReferenceData'), require('./Acpv1instructionsinstructionIdcredentialsMerchantInformation'), require('./Acpv1instructionsinstructionIdcredentialsOrderInformation'), require('./Acpv1instructionsinstructionIdcredentialsPaymentOptions'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Acpv1instructionsinstructionIdcredentialsTransactionData = factory(root.CyberSource.ApiClient, root.CyberSource.Acpv1instructionsinstructionIdcredentialsAttachments, root.CyberSource.Acpv1instructionsinstructionIdcredentialsClientReferenceInformation, root.CyberSource.Acpv1instructionsinstructionIdcredentialsMandateReferenceData, root.CyberSource.Acpv1instructionsinstructionIdcredentialsMerchantInformation, root.CyberSource.Acpv1instructionsinstructionIdcredentialsOrderInformation, root.CyberSource.Acpv1instructionsinstructionIdcredentialsPaymentOptions);
}
}(this, function(ApiClient, Acpv1instructionsinstructionIdcredentialsAttachments, Acpv1instructionsinstructionIdcredentialsClientReferenceInformation, Acpv1instructionsinstructionIdcredentialsMandateReferenceData, Acpv1instructionsinstructionIdcredentialsMerchantInformation, Acpv1instructionsinstructionIdcredentialsOrderInformation, Acpv1instructionsinstructionIdcredentialsPaymentOptions) {
'use strict';
/**
* The Acpv1instructionsinstructionIdcredentialsTransactionData model module.
* @module model/Acpv1instructionsinstructionIdcredentialsTransactionData
* @version 0.0.1
*/
/**
* Constructs a new <code>Acpv1instructionsinstructionIdcredentialsTransactionData</code>.
* @alias module:model/Acpv1instructionsinstructionIdcredentialsTransactionData
* @class
* @param clientReferenceInformation {module:model/Acpv1instructionsinstructionIdcredentialsClientReferenceInformation}
* @param orderInformation {module:model/Acpv1instructionsinstructionIdcredentialsOrderInformation}
* @param merchantInformation {module:model/Acpv1instructionsinstructionIdcredentialsMerchantInformation}
*/
var exports = function(clientReferenceInformation, orderInformation, merchantInformation) {
var _this = this;
_this['clientReferenceInformation'] = clientReferenceInformation;
_this['orderInformation'] = orderInformation;
_this['merchantInformation'] = merchantInformation;
};
/**
* Constructs a <code>Acpv1instructionsinstructionIdcredentialsTransactionData</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/Acpv1instructionsinstructionIdcredentialsTransactionData} obj Optional instance to populate.
* @return {module:model/Acpv1instructionsinstructionIdcredentialsTransactionData} The populated <code>Acpv1instructionsinstructionIdcredentialsTransactionData</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('clientReferenceInformation')) {
obj['clientReferenceInformation'] = Acpv1instructionsinstructionIdcredentialsClientReferenceInformation.constructFromObject(data['clientReferenceInformation']);
}
if (data.hasOwnProperty('mandateReferenceData')) {
obj['mandateReferenceData'] = ApiClient.convertToType(data['mandateReferenceData'], [Acpv1instructionsinstructionIdcredentialsMandateReferenceData]);
}
if (data.hasOwnProperty('type')) {
obj['type'] = ApiClient.convertToType(data['type'], 'String');
}
if (data.hasOwnProperty('orderInformation')) {
obj['orderInformation'] = Acpv1instructionsinstructionIdcredentialsOrderInformation.constructFromObject(data['orderInformation']);
}
if (data.hasOwnProperty('paymentServiceProviderUrl')) {
obj['paymentServiceProviderUrl'] = ApiClient.convertToType(data['paymentServiceProviderUrl'], 'String');
}
if (data.hasOwnProperty('paymentServiceProviderName')) {
obj['paymentServiceProviderName'] = ApiClient.convertToType(data['paymentServiceProviderName'], 'String');
}
if (data.hasOwnProperty('merchantOrderId')) {
obj['merchantOrderId'] = ApiClient.convertToType(data['merchantOrderId'], 'String');
}
if (data.hasOwnProperty('merchantInformation')) {
obj['merchantInformation'] = Acpv1instructionsinstructionIdcredentialsMerchantInformation.constructFromObject(data['merchantInformation']);
}
if (data.hasOwnProperty('paymentOptions')) {
obj['paymentOptions'] = Acpv1instructionsinstructionIdcredentialsPaymentOptions.constructFromObject(data['paymentOptions']);
}
if (data.hasOwnProperty('attachments')) {
obj['attachments'] = ApiClient.convertToType(data['attachments'], [Acpv1instructionsinstructionIdcredentialsAttachments]);
}
}
return obj;
}
/**
* @member {module:model/Acpv1instructionsinstructionIdcredentialsClientReferenceInformation} clientReferenceInformation
*/
exports.prototype['clientReferenceInformation'] = undefined;
/**
* Mandate Reference Data.
* @member {Array.<module:model/Acpv1instructionsinstructionIdcredentialsMandateReferenceData>} mandateReferenceData
*/
exports.prototype['mandateReferenceData'] = undefined;
/**
* (Conditional) Type of the transaction. This field is used to determine the type of transaction and the associated processing rules. Possible values: - `PURCHASE` (Default) - `BILL_PAYMENT` - `MONEY_TRANSFER` - `DISBURSEMENT` - `P2P`
* @member {String} type
*/
exports.prototype['type'] = undefined;
/**
* @member {module:model/Acpv1instructionsinstructionIdcredentialsOrderInformation} orderInformation
*/
exports.prototype['orderInformation'] = undefined;
/**
* (Conditional) URL of the payment service provider.
* @member {String} paymentServiceProviderUrl
*/
exports.prototype['paymentServiceProviderUrl'] = undefined;
/**
* (Conditional) Name of the payment service provider.
* @member {String} paymentServiceProviderName
*/
exports.prototype['paymentServiceProviderName'] = undefined;
/**
* (Conditional) Digital Payment Application generated order/invoice number corresponding to a Consumer purchase.
* @member {String} merchantOrderId
*/
exports.prototype['merchantOrderId'] = undefined;
/**
* @member {module:model/Acpv1instructionsinstructionIdcredentialsMerchantInformation} merchantInformation
*/
exports.prototype['merchantInformation'] = undefined;
/**
* @member {module:model/Acpv1instructionsinstructionIdcredentialsPaymentOptions} paymentOptions
*/
exports.prototype['paymentOptions'] = undefined;
/**
* @member {Array.<module:model/Acpv1instructionsinstructionIdcredentialsAttachments>} attachments
*/
exports.prototype['attachments'] = undefined;
return exports;
}));