cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
133 lines (110 loc) • 7.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/PtsV2PaymentsPost201ResponseProcessingInformationAuthorizationOptions', 'model/PtsV2PaymentsPost201ResponseProcessingInformationBankTransferOptions', 'model/PtsV2PaymentsPost201ResponseProcessingInformationCaptureOptions', 'model/PtsV2PaymentsPost201ResponseProcessingInformationPurchaseOptions'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./PtsV2PaymentsPost201ResponseProcessingInformationAuthorizationOptions'), require('./PtsV2PaymentsPost201ResponseProcessingInformationBankTransferOptions'), require('./PtsV2PaymentsPost201ResponseProcessingInformationCaptureOptions'), require('./PtsV2PaymentsPost201ResponseProcessingInformationPurchaseOptions'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.PtsV2PaymentsPost201ResponseProcessingInformation = factory(root.CyberSource.ApiClient, root.CyberSource.PtsV2PaymentsPost201ResponseProcessingInformationAuthorizationOptions, root.CyberSource.PtsV2PaymentsPost201ResponseProcessingInformationBankTransferOptions, root.CyberSource.PtsV2PaymentsPost201ResponseProcessingInformationCaptureOptions, root.CyberSource.PtsV2PaymentsPost201ResponseProcessingInformationPurchaseOptions);
}
}(this, function(ApiClient, PtsV2PaymentsPost201ResponseProcessingInformationAuthorizationOptions, PtsV2PaymentsPost201ResponseProcessingInformationBankTransferOptions, PtsV2PaymentsPost201ResponseProcessingInformationCaptureOptions, PtsV2PaymentsPost201ResponseProcessingInformationPurchaseOptions) {
'use strict';
/**
* The PtsV2PaymentsPost201ResponseProcessingInformation model module.
* @module model/PtsV2PaymentsPost201ResponseProcessingInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>PtsV2PaymentsPost201ResponseProcessingInformation</code>.
* @alias module:model/PtsV2PaymentsPost201ResponseProcessingInformation
* @class
*/
var exports = function() {
var _this = this;
};
/**
* Constructs a <code>PtsV2PaymentsPost201ResponseProcessingInformation</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/PtsV2PaymentsPost201ResponseProcessingInformation} obj Optional instance to populate.
* @return {module:model/PtsV2PaymentsPost201ResponseProcessingInformation} The populated <code>PtsV2PaymentsPost201ResponseProcessingInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('bankTransferOptions')) {
obj['bankTransferOptions'] = PtsV2PaymentsPost201ResponseProcessingInformationBankTransferOptions.constructFromObject(data['bankTransferOptions']);
}
if (data.hasOwnProperty('paymentSolution')) {
obj['paymentSolution'] = ApiClient.convertToType(data['paymentSolution'], 'String');
}
if (data.hasOwnProperty('enhancedDataEnabled')) {
obj['enhancedDataEnabled'] = ApiClient.convertToType(data['enhancedDataEnabled'], 'Boolean');
}
if (data.hasOwnProperty('digitalServiceIndicator')) {
obj['digitalServiceIndicator'] = ApiClient.convertToType(data['digitalServiceIndicator'], 'String');
}
if (data.hasOwnProperty('captureOptions')) {
obj['captureOptions'] = PtsV2PaymentsPost201ResponseProcessingInformationCaptureOptions.constructFromObject(data['captureOptions']);
}
if (data.hasOwnProperty('authorizationOptions')) {
obj['authorizationOptions'] = PtsV2PaymentsPost201ResponseProcessingInformationAuthorizationOptions.constructFromObject(data['authorizationOptions']);
}
if (data.hasOwnProperty('purchaseOptions')) {
obj['purchaseOptions'] = PtsV2PaymentsPost201ResponseProcessingInformationPurchaseOptions.constructFromObject(data['purchaseOptions']);
}
}
return obj;
}
/**
* @member {module:model/PtsV2PaymentsPost201ResponseProcessingInformationBankTransferOptions} bankTransferOptions
*/
exports.prototype['bankTransferOptions'] = undefined;
/**
* Type of digital payment solution for the transaction. Possible Values: - `visacheckout`: Visa Checkout. This value is required for Visa Checkout transactions. For details, see `payment_solution` field description in [Visa Checkout Using the REST API.](https://developer.cybersource.com/content/dam/docs/cybs/en-us/apifields/reference/all/rest/api-fields.pdf) - `001`: Apple Pay. - `004`: Cybersource In-App Solution. - `005`: Masterpass. This value is required for Masterpass transactions on OmniPay Direct. - `006`: Android Pay. - `007`: Chase Pay. - `008`: Samsung Pay. - `012`: Google Pay. - `013`: Cybersource P2PE Decryption - `014`: Mastercard credential on file (COF) payment network token. Returned in authorizations that use a payment network token associated with a TMS token. - `015`: Visa credential on file (COF) payment network token. Returned in authorizations that use a payment network token associated with a TMS token. - `027`: Click to Pay.
* @member {String} paymentSolution
*/
exports.prototype['paymentSolution'] = undefined;
/**
* The possible values for the reply field are: - `true` : the airline data was included in the request to the processor. - `false` : the airline data was not included in the request to the processor. Returned by authorization, capture, or credit services.
* @member {Boolean} enhancedDataEnabled
*/
exports.prototype['enhancedDataEnabled'] = undefined;
/**
* Mastercard Digital Enablement Service (MDES) digital service indicators received in the authorization response message for MDES transactions. This data is provided in the 0110 response in the Field 34—Acceptance Environment Data (TLV Format), Dataset ID 04—Additional Service Result Data, Tag DF1F—Mastercard Digital Enablement Service Indicator for Acquirer to acquirers. This field is in ANS, EBCDIC format and flows in Field 34, DSID 04 Tag DF1F, mapped to Mastercard Data Element DE119, Sub-element 004. This field is supported for all flavors of Authorization response only. #### Used by **Authorization Response** Response field only.
* @member {String} digitalServiceIndicator
*/
exports.prototype['digitalServiceIndicator'] = undefined;
/**
* @member {module:model/PtsV2PaymentsPost201ResponseProcessingInformationCaptureOptions} captureOptions
*/
exports.prototype['captureOptions'] = undefined;
/**
* @member {module:model/PtsV2PaymentsPost201ResponseProcessingInformationAuthorizationOptions} authorizationOptions
*/
exports.prototype['authorizationOptions'] = undefined;
/**
* @member {module:model/PtsV2PaymentsPost201ResponseProcessingInformationPurchaseOptions} purchaseOptions
*/
exports.prototype['purchaseOptions'] = undefined;
return exports;
}));