cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
329 lines (282 loc) • 20.7 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/PtsV2PaymentsPost201ResponsePaymentInsightsInformation', 'model/Ptsv2paymentsHealthCareInformation', 'model/Ptsv2paymentsMerchantDefinedInformation', 'model/Ptsv2paymentsUnscheduledPaymentInformation', 'model/TssV2TransactionsGet200ResponseApplicationInformation', 'model/TssV2TransactionsGet200ResponseBankAccountValidation', 'model/TssV2TransactionsGet200ResponseBuyerInformation', 'model/TssV2TransactionsGet200ResponseClientReferenceInformation', 'model/TssV2TransactionsGet200ResponseConsumerAuthenticationInformation', 'model/TssV2TransactionsGet200ResponseDeviceInformation', 'model/TssV2TransactionsGet200ResponseErrorInformation', 'model/TssV2TransactionsGet200ResponseFraudMarkingInformation', 'model/TssV2TransactionsGet200ResponseInstallmentInformation', 'model/TssV2TransactionsGet200ResponseLinks', 'model/TssV2TransactionsGet200ResponseMerchantInformation', 'model/TssV2TransactionsGet200ResponseOrderInformation', 'model/TssV2TransactionsGet200ResponsePaymentInformation', 'model/TssV2TransactionsGet200ResponsePayoutOptions', 'model/TssV2TransactionsGet200ResponsePointOfSaleInformation', 'model/TssV2TransactionsGet200ResponseProcessingInformation', 'model/TssV2TransactionsGet200ResponseProcessorInformation', 'model/TssV2TransactionsGet200ResponseRecurringPaymentInformation', 'model/TssV2TransactionsGet200ResponseRiskInformation', 'model/TssV2TransactionsGet200ResponseSenderInformation', 'model/TssV2TransactionsGet200ResponseTokenInformation'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./PtsV2PaymentsPost201ResponsePaymentInsightsInformation'), require('./Ptsv2paymentsHealthCareInformation'), require('./Ptsv2paymentsMerchantDefinedInformation'), require('./Ptsv2paymentsUnscheduledPaymentInformation'), require('./TssV2TransactionsGet200ResponseApplicationInformation'), require('./TssV2TransactionsGet200ResponseBankAccountValidation'), require('./TssV2TransactionsGet200ResponseBuyerInformation'), require('./TssV2TransactionsGet200ResponseClientReferenceInformation'), require('./TssV2TransactionsGet200ResponseConsumerAuthenticationInformation'), require('./TssV2TransactionsGet200ResponseDeviceInformation'), require('./TssV2TransactionsGet200ResponseErrorInformation'), require('./TssV2TransactionsGet200ResponseFraudMarkingInformation'), require('./TssV2TransactionsGet200ResponseInstallmentInformation'), require('./TssV2TransactionsGet200ResponseLinks'), require('./TssV2TransactionsGet200ResponseMerchantInformation'), require('./TssV2TransactionsGet200ResponseOrderInformation'), require('./TssV2TransactionsGet200ResponsePaymentInformation'), require('./TssV2TransactionsGet200ResponsePayoutOptions'), require('./TssV2TransactionsGet200ResponsePointOfSaleInformation'), require('./TssV2TransactionsGet200ResponseProcessingInformation'), require('./TssV2TransactionsGet200ResponseProcessorInformation'), require('./TssV2TransactionsGet200ResponseRecurringPaymentInformation'), require('./TssV2TransactionsGet200ResponseRiskInformation'), require('./TssV2TransactionsGet200ResponseSenderInformation'), require('./TssV2TransactionsGet200ResponseTokenInformation'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.TssV2TransactionsGet200Response = factory(root.CyberSource.ApiClient, root.CyberSource.PtsV2PaymentsPost201ResponsePaymentInsightsInformation, root.CyberSource.Ptsv2paymentsHealthCareInformation, root.CyberSource.Ptsv2paymentsMerchantDefinedInformation, root.CyberSource.Ptsv2paymentsUnscheduledPaymentInformation, root.CyberSource.TssV2TransactionsGet200ResponseApplicationInformation, root.CyberSource.TssV2TransactionsGet200ResponseBankAccountValidation, root.CyberSource.TssV2TransactionsGet200ResponseBuyerInformation, root.CyberSource.TssV2TransactionsGet200ResponseClientReferenceInformation, root.CyberSource.TssV2TransactionsGet200ResponseConsumerAuthenticationInformation, root.CyberSource.TssV2TransactionsGet200ResponseDeviceInformation, root.CyberSource.TssV2TransactionsGet200ResponseErrorInformation, root.CyberSource.TssV2TransactionsGet200ResponseFraudMarkingInformation, root.CyberSource.TssV2TransactionsGet200ResponseInstallmentInformation, root.CyberSource.TssV2TransactionsGet200ResponseLinks, root.CyberSource.TssV2TransactionsGet200ResponseMerchantInformation, root.CyberSource.TssV2TransactionsGet200ResponseOrderInformation, root.CyberSource.TssV2TransactionsGet200ResponsePaymentInformation, root.CyberSource.TssV2TransactionsGet200ResponsePayoutOptions, root.CyberSource.TssV2TransactionsGet200ResponsePointOfSaleInformation, root.CyberSource.TssV2TransactionsGet200ResponseProcessingInformation, root.CyberSource.TssV2TransactionsGet200ResponseProcessorInformation, root.CyberSource.TssV2TransactionsGet200ResponseRecurringPaymentInformation, root.CyberSource.TssV2TransactionsGet200ResponseRiskInformation, root.CyberSource.TssV2TransactionsGet200ResponseSenderInformation, root.CyberSource.TssV2TransactionsGet200ResponseTokenInformation);
}
}(this, function(ApiClient, PtsV2PaymentsPost201ResponsePaymentInsightsInformation, Ptsv2paymentsHealthCareInformation, Ptsv2paymentsMerchantDefinedInformation, Ptsv2paymentsUnscheduledPaymentInformation, TssV2TransactionsGet200ResponseApplicationInformation, TssV2TransactionsGet200ResponseBankAccountValidation, TssV2TransactionsGet200ResponseBuyerInformation, TssV2TransactionsGet200ResponseClientReferenceInformation, TssV2TransactionsGet200ResponseConsumerAuthenticationInformation, TssV2TransactionsGet200ResponseDeviceInformation, TssV2TransactionsGet200ResponseErrorInformation, TssV2TransactionsGet200ResponseFraudMarkingInformation, TssV2TransactionsGet200ResponseInstallmentInformation, TssV2TransactionsGet200ResponseLinks, TssV2TransactionsGet200ResponseMerchantInformation, TssV2TransactionsGet200ResponseOrderInformation, TssV2TransactionsGet200ResponsePaymentInformation, TssV2TransactionsGet200ResponsePayoutOptions, TssV2TransactionsGet200ResponsePointOfSaleInformation, TssV2TransactionsGet200ResponseProcessingInformation, TssV2TransactionsGet200ResponseProcessorInformation, TssV2TransactionsGet200ResponseRecurringPaymentInformation, TssV2TransactionsGet200ResponseRiskInformation, TssV2TransactionsGet200ResponseSenderInformation, TssV2TransactionsGet200ResponseTokenInformation) {
'use strict';
/**
* The TssV2TransactionsGet200Response model module.
* @module model/TssV2TransactionsGet200Response
* @version 0.0.1
*/
/**
* Constructs a new <code>TssV2TransactionsGet200Response</code>.
* @alias module:model/TssV2TransactionsGet200Response
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>TssV2TransactionsGet200Response</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/TssV2TransactionsGet200Response} obj Optional instance to populate.
* @return {module:model/TssV2TransactionsGet200Response} The populated <code>TssV2TransactionsGet200Response</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
if (data.hasOwnProperty('rootId')) {
obj['rootId'] = ApiClient.convertToType(data['rootId'], 'String');
}
if (data.hasOwnProperty('reconciliationId')) {
obj['reconciliationId'] = ApiClient.convertToType(data['reconciliationId'], 'String');
}
if (data.hasOwnProperty('merchantId')) {
obj['merchantId'] = ApiClient.convertToType(data['merchantId'], 'String');
}
if (data.hasOwnProperty('submitTimeUTC')) {
obj['submitTimeUTC'] = ApiClient.convertToType(data['submitTimeUTC'], 'String');
}
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
}
if (data.hasOwnProperty('applicationInformation')) {
obj['applicationInformation'] = TssV2TransactionsGet200ResponseApplicationInformation.constructFromObject(data['applicationInformation']);
}
if (data.hasOwnProperty('bankAccountValidation')) {
obj['bankAccountValidation'] = TssV2TransactionsGet200ResponseBankAccountValidation.constructFromObject(data['bankAccountValidation']);
}
if (data.hasOwnProperty('buyerInformation')) {
obj['buyerInformation'] = TssV2TransactionsGet200ResponseBuyerInformation.constructFromObject(data['buyerInformation']);
}
if (data.hasOwnProperty('clientReferenceInformation')) {
obj['clientReferenceInformation'] = TssV2TransactionsGet200ResponseClientReferenceInformation.constructFromObject(data['clientReferenceInformation']);
}
if (data.hasOwnProperty('consumerAuthenticationInformation')) {
obj['consumerAuthenticationInformation'] = TssV2TransactionsGet200ResponseConsumerAuthenticationInformation.constructFromObject(data['consumerAuthenticationInformation']);
}
if (data.hasOwnProperty('deviceInformation')) {
obj['deviceInformation'] = TssV2TransactionsGet200ResponseDeviceInformation.constructFromObject(data['deviceInformation']);
}
if (data.hasOwnProperty('errorInformation')) {
obj['errorInformation'] = TssV2TransactionsGet200ResponseErrorInformation.constructFromObject(data['errorInformation']);
}
if (data.hasOwnProperty('installmentInformation')) {
obj['installmentInformation'] = TssV2TransactionsGet200ResponseInstallmentInformation.constructFromObject(data['installmentInformation']);
}
if (data.hasOwnProperty('fraudMarkingInformation')) {
obj['fraudMarkingInformation'] = TssV2TransactionsGet200ResponseFraudMarkingInformation.constructFromObject(data['fraudMarkingInformation']);
}
if (data.hasOwnProperty('healthCareInformation')) {
obj['healthCareInformation'] = Ptsv2paymentsHealthCareInformation.constructFromObject(data['healthCareInformation']);
}
if (data.hasOwnProperty('merchantDefinedInformation')) {
obj['merchantDefinedInformation'] = ApiClient.convertToType(data['merchantDefinedInformation'], [Ptsv2paymentsMerchantDefinedInformation]);
}
if (data.hasOwnProperty('merchantInformation')) {
obj['merchantInformation'] = TssV2TransactionsGet200ResponseMerchantInformation.constructFromObject(data['merchantInformation']);
}
if (data.hasOwnProperty('orderInformation')) {
obj['orderInformation'] = TssV2TransactionsGet200ResponseOrderInformation.constructFromObject(data['orderInformation']);
}
if (data.hasOwnProperty('paymentInformation')) {
obj['paymentInformation'] = TssV2TransactionsGet200ResponsePaymentInformation.constructFromObject(data['paymentInformation']);
}
if (data.hasOwnProperty('paymentInsightsInformation')) {
obj['paymentInsightsInformation'] = PtsV2PaymentsPost201ResponsePaymentInsightsInformation.constructFromObject(data['paymentInsightsInformation']);
}
if (data.hasOwnProperty('payoutOptions')) {
obj['payoutOptions'] = TssV2TransactionsGet200ResponsePayoutOptions.constructFromObject(data['payoutOptions']);
}
if (data.hasOwnProperty('unscheduledPaymentInformation')) {
obj['unscheduledPaymentInformation'] = Ptsv2paymentsUnscheduledPaymentInformation.constructFromObject(data['unscheduledPaymentInformation']);
}
if (data.hasOwnProperty('processingInformation')) {
obj['processingInformation'] = TssV2TransactionsGet200ResponseProcessingInformation.constructFromObject(data['processingInformation']);
}
if (data.hasOwnProperty('processorInformation')) {
obj['processorInformation'] = TssV2TransactionsGet200ResponseProcessorInformation.constructFromObject(data['processorInformation']);
}
if (data.hasOwnProperty('recurringPaymentInformation')) {
obj['recurringPaymentInformation'] = TssV2TransactionsGet200ResponseRecurringPaymentInformation.constructFromObject(data['recurringPaymentInformation']);
}
if (data.hasOwnProperty('pointOfSaleInformation')) {
obj['pointOfSaleInformation'] = TssV2TransactionsGet200ResponsePointOfSaleInformation.constructFromObject(data['pointOfSaleInformation']);
}
if (data.hasOwnProperty('riskInformation')) {
obj['riskInformation'] = TssV2TransactionsGet200ResponseRiskInformation.constructFromObject(data['riskInformation']);
}
if (data.hasOwnProperty('senderInformation')) {
obj['senderInformation'] = TssV2TransactionsGet200ResponseSenderInformation.constructFromObject(data['senderInformation']);
}
if (data.hasOwnProperty('tokenInformation')) {
obj['tokenInformation'] = TssV2TransactionsGet200ResponseTokenInformation.constructFromObject(data['tokenInformation']);
}
if (data.hasOwnProperty('_links')) {
obj['_links'] = TssV2TransactionsGet200ResponseLinks.constructFromObject(data['_links']);
}
}
return obj;
}
/**
* An unique identification number generated by Cybersource to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response.
* @member {String} id
*/
exports.prototype['id'] = undefined;
/**
* Contains the transaction identifier for the first transaction in the series of transactions. For example, you might send an authorization request for a payment, followed by a capture request for that payment, and then a refund request for that captured payment. Each of those requests, if successful, creates a resource that is assigned an identifier, which is returned in the response. The rootId identifies the first ID in the series, which in this case would be the ID of the original authorization.
* @member {String} rootId
*/
exports.prototype['rootId'] = undefined;
/**
* Reference number for the transaction. Depending on how your Cybersource account is configured, this value could either be provided in the API request or generated by CyberSource. The actual value used in the request to the processor is provided back to you by Cybersource in the response.
* @member {String} reconciliationId
*/
exports.prototype['reconciliationId'] = undefined;
/**
* Your CyberSource merchant ID.
* @member {String} merchantId
*/
exports.prototype['merchantId'] = undefined;
/**
* Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ` **Example** `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The `T` separates the date and the time. The `Z` indicates UTC. Returned by Cybersource for all services.
* @member {String} submitTimeUTC
*/
exports.prototype['submitTimeUTC'] = undefined;
/**
* The status of the submitted transaction.
* @member {String} status
*/
exports.prototype['status'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseApplicationInformation} applicationInformation
*/
exports.prototype['applicationInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseBankAccountValidation} bankAccountValidation
*/
exports.prototype['bankAccountValidation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseBuyerInformation} buyerInformation
*/
exports.prototype['buyerInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseClientReferenceInformation} clientReferenceInformation
*/
exports.prototype['clientReferenceInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseConsumerAuthenticationInformation} consumerAuthenticationInformation
*/
exports.prototype['consumerAuthenticationInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseDeviceInformation} deviceInformation
*/
exports.prototype['deviceInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseErrorInformation} errorInformation
*/
exports.prototype['errorInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseInstallmentInformation} installmentInformation
*/
exports.prototype['installmentInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseFraudMarkingInformation} fraudMarkingInformation
*/
exports.prototype['fraudMarkingInformation'] = undefined;
/**
* @member {module:model/Ptsv2paymentsHealthCareInformation} healthCareInformation
*/
exports.prototype['healthCareInformation'] = undefined;
/**
* The object containing the custom data that the merchant defines.
* @member {Array.<module:model/Ptsv2paymentsMerchantDefinedInformation>} merchantDefinedInformation
*/
exports.prototype['merchantDefinedInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseMerchantInformation} merchantInformation
*/
exports.prototype['merchantInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseOrderInformation} orderInformation
*/
exports.prototype['orderInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponsePaymentInformation} paymentInformation
*/
exports.prototype['paymentInformation'] = undefined;
/**
* @member {module:model/PtsV2PaymentsPost201ResponsePaymentInsightsInformation} paymentInsightsInformation
*/
exports.prototype['paymentInsightsInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponsePayoutOptions} payoutOptions
*/
exports.prototype['payoutOptions'] = undefined;
/**
* @member {module:model/Ptsv2paymentsUnscheduledPaymentInformation} unscheduledPaymentInformation
*/
exports.prototype['unscheduledPaymentInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseProcessingInformation} processingInformation
*/
exports.prototype['processingInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseProcessorInformation} processorInformation
*/
exports.prototype['processorInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseRecurringPaymentInformation} recurringPaymentInformation
*/
exports.prototype['recurringPaymentInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponsePointOfSaleInformation} pointOfSaleInformation
*/
exports.prototype['pointOfSaleInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseRiskInformation} riskInformation
*/
exports.prototype['riskInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseSenderInformation} senderInformation
*/
exports.prototype['senderInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseTokenInformation} tokenInformation
*/
exports.prototype['tokenInformation'] = undefined;
/**
* @member {module:model/TssV2TransactionsGet200ResponseLinks} _links
*/
exports.prototype['_links'] = undefined;
return exports;
}));