cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
157 lines (135 loc) • 7.15 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/Acpv1tokensAuthenticatedIdentities', 'model/Acpv1tokensAuthenticationContext'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Acpv1tokensAuthenticatedIdentities'), require('./Acpv1tokensAuthenticationContext'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Acpv1tokensAssuranceData = factory(root.CyberSource.ApiClient, root.CyberSource.Acpv1tokensAuthenticatedIdentities, root.CyberSource.Acpv1tokensAuthenticationContext);
}
}(this, function(ApiClient, Acpv1tokensAuthenticatedIdentities, Acpv1tokensAuthenticationContext) {
'use strict';
/**
* The Acpv1tokensAssuranceData model module.
* @module model/Acpv1tokensAssuranceData
* @version 0.0.1
*/
/**
* Constructs a new <code>Acpv1tokensAssuranceData</code>.
* Assurance data. Contains identity verification details that prove the consumer or device has been authenticated before the payment operation.
* @alias module:model/Acpv1tokensAssuranceData
* @class
* @param verificationMethod {String} Required. Method of the verification. Possible values: - `02` - App-based authentication - `04` - One-time passcode - `21` - Visa Token Service step-up: Device binding - `22` - Visa Token Service step-up: Cardholder verification - `23` - FIDO2
* @param verificationResults {String} Required. Result of the verification. Possible values: - `01` - Verified - `02` - Not Verified - `03` - Not performed - `04` - Not required - `21` - Not allowed
* @param verificationTimestamp {String} Required. Date and time the verification occurred. UTC time in Unix epoch format.
*/
var exports = function(verificationMethod, verificationResults, verificationTimestamp) {
var _this = this;
_this['verificationMethod'] = verificationMethod;
_this['verificationResults'] = verificationResults;
_this['verificationTimestamp'] = verificationTimestamp;
};
/**
* Constructs a <code>Acpv1tokensAssuranceData</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/Acpv1tokensAssuranceData} obj Optional instance to populate.
* @return {module:model/Acpv1tokensAssuranceData} The populated <code>Acpv1tokensAssuranceData</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('verificationType')) {
obj['verificationType'] = ApiClient.convertToType(data['verificationType'], 'String');
}
if (data.hasOwnProperty('verificationEntity')) {
obj['verificationEntity'] = ApiClient.convertToType(data['verificationEntity'], 'String');
}
if (data.hasOwnProperty('verificationEvents')) {
obj['verificationEvents'] = ApiClient.convertToType(data['verificationEvents'], ['String']);
}
if (data.hasOwnProperty('verificationMethod')) {
obj['verificationMethod'] = ApiClient.convertToType(data['verificationMethod'], 'String');
}
if (data.hasOwnProperty('verificationResults')) {
obj['verificationResults'] = ApiClient.convertToType(data['verificationResults'], 'String');
}
if (data.hasOwnProperty('verificationTimestamp')) {
obj['verificationTimestamp'] = ApiClient.convertToType(data['verificationTimestamp'], 'String');
}
if (data.hasOwnProperty('authenticationContext')) {
obj['authenticationContext'] = Acpv1tokensAuthenticationContext.constructFromObject(data['authenticationContext']);
}
if (data.hasOwnProperty('authenticatedIdentities')) {
obj['authenticatedIdentities'] = Acpv1tokensAuthenticatedIdentities.constructFromObject(data['authenticatedIdentities']);
}
if (data.hasOwnProperty('additionalData')) {
obj['additionalData'] = ApiClient.convertToType(data['additionalData'], 'String');
}
}
return obj;
}
/**
* Optional. Type of the verification data. Possible values: - `CARDHOLDER` (Default) - `DEVICE`
* @member {String} verificationType
*/
exports.prototype['verificationType'] = undefined;
/**
* Optional. Entity performing the verification. Possible value: - `10` - VISA (Default)
* @member {String} verificationEntity
*/
exports.prototype['verificationEntity'] = undefined;
/**
* Optional. Event where the verification occurred. Possible values: - `01` - Payment transaction - `02` - Add card/Card enrollment - `03` - Profile access - `04` - Account verification
* @member {Array.<String>} verificationEvents
*/
exports.prototype['verificationEvents'] = undefined;
/**
* Required. Method of the verification. Possible values: - `02` - App-based authentication - `04` - One-time passcode - `21` - Visa Token Service step-up: Device binding - `22` - Visa Token Service step-up: Cardholder verification - `23` - FIDO2
* @member {String} verificationMethod
*/
exports.prototype['verificationMethod'] = undefined;
/**
* Required. Result of the verification. Possible values: - `01` - Verified - `02` - Not Verified - `03` - Not performed - `04` - Not required - `21` - Not allowed
* @member {String} verificationResults
*/
exports.prototype['verificationResults'] = undefined;
/**
* Required. Date and time the verification occurred. UTC time in Unix epoch format.
* @member {String} verificationTimestamp
*/
exports.prototype['verificationTimestamp'] = undefined;
/**
* @member {module:model/Acpv1tokensAuthenticationContext} authenticationContext
*/
exports.prototype['authenticationContext'] = undefined;
/**
* @member {module:model/Acpv1tokensAuthenticatedIdentities} authenticatedIdentities
*/
exports.prototype['authenticatedIdentities'] = undefined;
/**
* Additional data related to assurance.
* @member {String} additionalData
*/
exports.prototype['additionalData'] = undefined;
return exports;
}));