cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
144 lines (120 loc) • 7.01 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/PtsV2PaymentsPost201Response1ProcessorInformationAvs', 'model/PtsV2PaymentsPost201ResponseProcessorInformationSellerProtection'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./PtsV2PaymentsPost201Response1ProcessorInformationAvs'), require('./PtsV2PaymentsPost201ResponseProcessorInformationSellerProtection'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.PtsV2PaymentsPost201Response1ProcessorInformation = factory(root.CyberSource.ApiClient, root.CyberSource.PtsV2PaymentsPost201Response1ProcessorInformationAvs, root.CyberSource.PtsV2PaymentsPost201ResponseProcessorInformationSellerProtection);
}
}(this, function(ApiClient, PtsV2PaymentsPost201Response1ProcessorInformationAvs, PtsV2PaymentsPost201ResponseProcessorInformationSellerProtection) {
'use strict';
/**
* The PtsV2PaymentsPost201Response1ProcessorInformation model module.
* @module model/PtsV2PaymentsPost201Response1ProcessorInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>PtsV2PaymentsPost201Response1ProcessorInformation</code>.
* @alias module:model/PtsV2PaymentsPost201Response1ProcessorInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>PtsV2PaymentsPost201Response1ProcessorInformation</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/PtsV2PaymentsPost201Response1ProcessorInformation} obj Optional instance to populate.
* @return {module:model/PtsV2PaymentsPost201Response1ProcessorInformation} The populated <code>PtsV2PaymentsPost201Response1ProcessorInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('transactionId')) {
obj['transactionId'] = ApiClient.convertToType(data['transactionId'], 'String');
}
if (data.hasOwnProperty('tradeNumber')) {
obj['tradeNumber'] = ApiClient.convertToType(data['tradeNumber'], 'String');
}
if (data.hasOwnProperty('rawResponse')) {
obj['rawResponse'] = ApiClient.convertToType(data['rawResponse'], 'String');
}
if (data.hasOwnProperty('rawResponseLocal')) {
obj['rawResponseLocal'] = ApiClient.convertToType(data['rawResponseLocal'], 'String');
}
if (data.hasOwnProperty('responseDetails')) {
obj['responseDetails'] = ApiClient.convertToType(data['responseDetails'], 'String');
}
if (data.hasOwnProperty('responseCode')) {
obj['responseCode'] = ApiClient.convertToType(data['responseCode'], 'String');
}
if (data.hasOwnProperty('sellerProtection')) {
obj['sellerProtection'] = PtsV2PaymentsPost201ResponseProcessorInformationSellerProtection.constructFromObject(data['sellerProtection']);
}
if (data.hasOwnProperty('avs')) {
obj['avs'] = PtsV2PaymentsPost201Response1ProcessorInformationAvs.constructFromObject(data['avs']);
}
}
return obj;
}
/**
* Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. Returned by the authorization service. #### PIN debit Transaction identifier generated by the processor. Returned by PIN debit credit. #### GPX Processor transaction ID. #### Cielo For Cielo, this value is the non-sequential unit (NSU) and is supported for all transactions. The value is generated by Cielo or the issuing bank. #### Comercio Latino For Comercio Latino, this value is the proof of sale or non-sequential unit (NSU) number generated by the acquirers Cielo and Rede, or the issuing bank. #### CyberSource through VisaNet and GPN For details about this value for CyberSource through VisaNet and GPN, see \"processorInformation.networkTransactionId\" in [REST API Fields](https://developer.cybersource.com/content/dam/docs/cybs/en-us/apifields/reference/all/rest/api-fields.pdf) #### Moneris This value identifies the transaction on a host system. It contains the following information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. **Example** For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003
* @member {String} transactionId
*/
exports.prototype['transactionId'] = undefined;
/**
* The description for this field is not available.
* @member {String} tradeNumber
*/
exports.prototype['tradeNumber'] = undefined;
/**
* This field is set to the value of failure reason returned by the processor.
* @member {String} rawResponse
*/
exports.prototype['rawResponse'] = undefined;
/**
* This field is set to the value of failure reason returned by the processor in the local language of the processor.
* @member {String} rawResponseLocal
*/
exports.prototype['rawResponseLocal'] = undefined;
/**
* This field might contain information about a decline.
* @member {String} responseDetails
*/
exports.prototype['responseDetails'] = undefined;
/**
* This field is set to the value of response code returned by the processor.
* @member {String} responseCode
*/
exports.prototype['responseCode'] = undefined;
/**
* @member {module:model/PtsV2PaymentsPost201ResponseProcessorInformationSellerProtection} sellerProtection
*/
exports.prototype['sellerProtection'] = undefined;
/**
* @member {module:model/PtsV2PaymentsPost201Response1ProcessorInformationAvs} avs
*/
exports.prototype['avs'] = undefined;
return exports;
}));