cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
202 lines (171 loc) • 9.94 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/PtsV2PaymentsPost201ResponseProcessorInformationCardVerification', 'model/PtsV2PayoutsPost201ResponseProcessorInformationAvs', 'model/PtsV2PayoutsPost201ResponseProcessorInformationCustomer', 'model/PtsV2PayoutsPost201ResponseProcessorInformationElectronicVerificationResults', 'model/PushFunds201ResponseProcessorInformationMerchantAdvice', 'model/PushFunds201ResponseProcessorInformationRouting', 'model/PushFunds201ResponseProcessorInformationSettlement'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./PtsV2PaymentsPost201ResponseProcessorInformationCardVerification'), require('./PtsV2PayoutsPost201ResponseProcessorInformationAvs'), require('./PtsV2PayoutsPost201ResponseProcessorInformationCustomer'), require('./PtsV2PayoutsPost201ResponseProcessorInformationElectronicVerificationResults'), require('./PushFunds201ResponseProcessorInformationMerchantAdvice'), require('./PushFunds201ResponseProcessorInformationRouting'), require('./PushFunds201ResponseProcessorInformationSettlement'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.PushFunds201ResponseProcessorInformation = factory(root.CyberSource.ApiClient, root.CyberSource.PtsV2PaymentsPost201ResponseProcessorInformationCardVerification, root.CyberSource.PtsV2PayoutsPost201ResponseProcessorInformationAvs, root.CyberSource.PtsV2PayoutsPost201ResponseProcessorInformationCustomer, root.CyberSource.PtsV2PayoutsPost201ResponseProcessorInformationElectronicVerificationResults, root.CyberSource.PushFunds201ResponseProcessorInformationMerchantAdvice, root.CyberSource.PushFunds201ResponseProcessorInformationRouting, root.CyberSource.PushFunds201ResponseProcessorInformationSettlement);
}
}(this, function(ApiClient, PtsV2PaymentsPost201ResponseProcessorInformationCardVerification, PtsV2PayoutsPost201ResponseProcessorInformationAvs, PtsV2PayoutsPost201ResponseProcessorInformationCustomer, PtsV2PayoutsPost201ResponseProcessorInformationElectronicVerificationResults, PushFunds201ResponseProcessorInformationMerchantAdvice, PushFunds201ResponseProcessorInformationRouting, PushFunds201ResponseProcessorInformationSettlement) {
'use strict';
/**
* The PushFunds201ResponseProcessorInformation model module.
* @module model/PushFunds201ResponseProcessorInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>PushFunds201ResponseProcessorInformation</code>.
* @alias module:model/PushFunds201ResponseProcessorInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>PushFunds201ResponseProcessorInformation</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/PushFunds201ResponseProcessorInformation} obj Optional instance to populate.
* @return {module:model/PushFunds201ResponseProcessorInformation} The populated <code>PushFunds201ResponseProcessorInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('transactionId')) {
obj['transactionId'] = ApiClient.convertToType(data['transactionId'], 'Number');
}
if (data.hasOwnProperty('responseCode')) {
obj['responseCode'] = ApiClient.convertToType(data['responseCode'], 'String');
}
if (data.hasOwnProperty('systemTraceAuditNumber')) {
obj['systemTraceAuditNumber'] = ApiClient.convertToType(data['systemTraceAuditNumber'], 'String');
}
if (data.hasOwnProperty('retrievalReferenceNumber')) {
obj['retrievalReferenceNumber'] = ApiClient.convertToType(data['retrievalReferenceNumber'], 'String');
}
if (data.hasOwnProperty('actionCode')) {
obj['actionCode'] = ApiClient.convertToType(data['actionCode'], 'String');
}
if (data.hasOwnProperty('approvalCode')) {
obj['approvalCode'] = ApiClient.convertToType(data['approvalCode'], 'String');
}
if (data.hasOwnProperty('feeProgramIndicator')) {
obj['feeProgramIndicator'] = ApiClient.convertToType(data['feeProgramIndicator'], 'String');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('routing')) {
obj['routing'] = PushFunds201ResponseProcessorInformationRouting.constructFromObject(data['routing']);
}
if (data.hasOwnProperty('settlement')) {
obj['settlement'] = PushFunds201ResponseProcessorInformationSettlement.constructFromObject(data['settlement']);
}
if (data.hasOwnProperty('merchantAdvice')) {
obj['merchantAdvice'] = PushFunds201ResponseProcessorInformationMerchantAdvice.constructFromObject(data['merchantAdvice']);
}
if (data.hasOwnProperty('avs')) {
obj['avs'] = PtsV2PayoutsPost201ResponseProcessorInformationAvs.constructFromObject(data['avs']);
}
if (data.hasOwnProperty('customer')) {
obj['customer'] = PtsV2PayoutsPost201ResponseProcessorInformationCustomer.constructFromObject(data['customer']);
}
if (data.hasOwnProperty('electronicVerificationResults')) {
obj['electronicVerificationResults'] = PtsV2PayoutsPost201ResponseProcessorInformationElectronicVerificationResults.constructFromObject(data['electronicVerificationResults']);
}
if (data.hasOwnProperty('cardVerification')) {
obj['cardVerification'] = PtsV2PaymentsPost201ResponseProcessorInformationCardVerification.constructFromObject(data['cardVerification']);
}
}
return obj;
}
/**
* Network transaction identifier (TID). This value can be used to identify a specific transaction when you are discussing the transaction with your processor.
* @member {Number} transactionId
*/
exports.prototype['transactionId'] = undefined;
/**
* Transaction status from the processor.
* @member {String} responseCode
*/
exports.prototype['responseCode'] = undefined;
/**
* This field is returned by authorization and incremental authorization services. System trace number that must be printed on the customer's receipt.
* @member {String} systemTraceAuditNumber
*/
exports.prototype['systemTraceAuditNumber'] = undefined;
/**
* This field contains a number that is used with other data elements as a key to identify and track all messages related to a given cardholder transaction; that is, to a given transaction set. Recommended format: ydddhhnnnnnn Positions 1-4: The yddd equivalent of the date, where y = 0-9 and ddd = 001 – 366. Positions 5-12: A unique identification number generated by the merchant or assigned by Cybersource.
* @member {String} retrievalReferenceNumber
*/
exports.prototype['retrievalReferenceNumber'] = undefined;
/**
* The results of the transaction request Note: The VisaNet Response Code for the transaction
* @member {String} actionCode
*/
exports.prototype['actionCode'] = undefined;
/**
* Issuer-generated approval code for the transaction.
* @member {String} approvalCode
*/
exports.prototype['approvalCode'] = undefined;
/**
* This field identifies the interchange fee program applicable to each financial transaction. Fee program indicator (FPI) values correspond to the fee descriptor and rate for each existing fee program.
* @member {String} feeProgramIndicator
*/
exports.prototype['feeProgramIndicator'] = undefined;
/**
* Name of the processor.
* @member {String} name
*/
exports.prototype['name'] = undefined;
/**
* @member {module:model/PushFunds201ResponseProcessorInformationRouting} routing
*/
exports.prototype['routing'] = undefined;
/**
* @member {module:model/PushFunds201ResponseProcessorInformationSettlement} settlement
*/
exports.prototype['settlement'] = undefined;
/**
* @member {module:model/PushFunds201ResponseProcessorInformationMerchantAdvice} merchantAdvice
*/
exports.prototype['merchantAdvice'] = undefined;
/**
* @member {module:model/PtsV2PayoutsPost201ResponseProcessorInformationAvs} avs
*/
exports.prototype['avs'] = undefined;
/**
* @member {module:model/PtsV2PayoutsPost201ResponseProcessorInformationCustomer} customer
*/
exports.prototype['customer'] = undefined;
/**
* @member {module:model/PtsV2PayoutsPost201ResponseProcessorInformationElectronicVerificationResults} electronicVerificationResults
*/
exports.prototype['electronicVerificationResults'] = undefined;
/**
* @member {module:model/PtsV2PaymentsPost201ResponseProcessorInformationCardVerification} cardVerification
*/
exports.prototype['cardVerification'] = undefined;
return exports;
}));