cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
189 lines (169 loc) • 9.39 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/Ptsv2paymentsDeviceInformationRawData'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('./Ptsv2paymentsDeviceInformationRawData'));
} else {
// Browser globals (root is window)
if (!root.CyberSource) {
root.CyberSource = {};
}
root.CyberSource.Riskv1authenticationsDeviceInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Ptsv2paymentsDeviceInformationRawData);
}
}(this, function(ApiClient, Ptsv2paymentsDeviceInformationRawData) {
'use strict';
/**
* The Riskv1authenticationsDeviceInformation model module.
* @module model/Riskv1authenticationsDeviceInformation
* @version 0.0.1
*/
/**
* Constructs a new <code>Riskv1authenticationsDeviceInformation</code>.
* @alias module:model/Riskv1authenticationsDeviceInformation
* @class
* @param httpAcceptContent {String} The exact content of the HTTP accept header.
* @param httpBrowserLanguage {String} Value represents the browser language as defined in IETF BCP47. Example:en-US, refer https://en.wikipedia.org/wiki/IETF_language_tag for more details.
* @param httpBrowserJavaEnabled {Boolean} A Boolean value that represents the ability of the cardholder browser to execute Java. Value is returned from the navigator.javaEnabled property. Possible Values:True/False
* @param httpBrowserColorDepth {String} Value represents the bit depth of the color palette for displaying images, in bits per pixel. Example : 24, refer https://en.wikipedia.org/wiki/Color_depth for more details
* @param httpBrowserScreenHeight {String} Total height of the Cardholder's scree in pixels, example: 864.
* @param httpBrowserScreenWidth {String} Total width of the cardholder's screen in pixels. Example: 1536.
* @param httpBrowserTimeDifference {String} Time difference between UTC time and the cardholder browser local time, in minutes, Example:300
* @param userAgentBrowserValue {String} Value of the User-Agent header sent by the customer's web browser. Note If the customer's browser provides a value, you must include it in your request.
*/
var exports = function(httpAcceptContent, httpBrowserLanguage, httpBrowserJavaEnabled, httpBrowserColorDepth, httpBrowserScreenHeight, httpBrowserScreenWidth, httpBrowserTimeDifference, userAgentBrowserValue) {
var _this = this;
_this['httpAcceptContent'] = httpAcceptContent;
_this['httpBrowserLanguage'] = httpBrowserLanguage;
_this['httpBrowserJavaEnabled'] = httpBrowserJavaEnabled;
_this['httpBrowserColorDepth'] = httpBrowserColorDepth;
_this['httpBrowserScreenHeight'] = httpBrowserScreenHeight;
_this['httpBrowserScreenWidth'] = httpBrowserScreenWidth;
_this['httpBrowserTimeDifference'] = httpBrowserTimeDifference;
_this['userAgentBrowserValue'] = userAgentBrowserValue;
};
/**
* Constructs a <code>Riskv1authenticationsDeviceInformation</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/Riskv1authenticationsDeviceInformation} obj Optional instance to populate.
* @return {module:model/Riskv1authenticationsDeviceInformation} The populated <code>Riskv1authenticationsDeviceInformation</code> instance.
*/
exports.constructFromObject = function(data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('ipAddress')) {
obj['ipAddress'] = ApiClient.convertToType(data['ipAddress'], 'String');
}
if (data.hasOwnProperty('rawData')) {
obj['rawData'] = ApiClient.convertToType(data['rawData'], [Ptsv2paymentsDeviceInformationRawData]);
}
if (data.hasOwnProperty('httpAcceptBrowserValue')) {
obj['httpAcceptBrowserValue'] = ApiClient.convertToType(data['httpAcceptBrowserValue'], 'String');
}
if (data.hasOwnProperty('httpAcceptContent')) {
obj['httpAcceptContent'] = ApiClient.convertToType(data['httpAcceptContent'], 'String');
}
if (data.hasOwnProperty('httpBrowserLanguage')) {
obj['httpBrowserLanguage'] = ApiClient.convertToType(data['httpBrowserLanguage'], 'String');
}
if (data.hasOwnProperty('httpBrowserJavaEnabled')) {
obj['httpBrowserJavaEnabled'] = ApiClient.convertToType(data['httpBrowserJavaEnabled'], 'Boolean');
}
if (data.hasOwnProperty('httpBrowserJavaScriptEnabled')) {
obj['httpBrowserJavaScriptEnabled'] = ApiClient.convertToType(data['httpBrowserJavaScriptEnabled'], 'Boolean');
}
if (data.hasOwnProperty('httpBrowserColorDepth')) {
obj['httpBrowserColorDepth'] = ApiClient.convertToType(data['httpBrowserColorDepth'], 'String');
}
if (data.hasOwnProperty('httpBrowserScreenHeight')) {
obj['httpBrowserScreenHeight'] = ApiClient.convertToType(data['httpBrowserScreenHeight'], 'String');
}
if (data.hasOwnProperty('httpBrowserScreenWidth')) {
obj['httpBrowserScreenWidth'] = ApiClient.convertToType(data['httpBrowserScreenWidth'], 'String');
}
if (data.hasOwnProperty('httpBrowserTimeDifference')) {
obj['httpBrowserTimeDifference'] = ApiClient.convertToType(data['httpBrowserTimeDifference'], 'String');
}
if (data.hasOwnProperty('userAgentBrowserValue')) {
obj['userAgentBrowserValue'] = ApiClient.convertToType(data['userAgentBrowserValue'], 'String');
}
}
return obj;
}
/**
* IP address of the customer. #### Used by **Authorization, Capture, and Credit** Optional field.
* @member {String} ipAddress
*/
exports.prototype['ipAddress'] = undefined;
/**
* @member {Array.<module:model/Ptsv2paymentsDeviceInformationRawData>} rawData
*/
exports.prototype['rawData'] = undefined;
/**
* Value of the Accept header sent by the customer's web browser. **Note** If the customer's browser provides a value, you must include it in your request.
* @member {String} httpAcceptBrowserValue
*/
exports.prototype['httpAcceptBrowserValue'] = undefined;
/**
* The exact content of the HTTP accept header.
* @member {String} httpAcceptContent
*/
exports.prototype['httpAcceptContent'] = undefined;
/**
* Value represents the browser language as defined in IETF BCP47. Example:en-US, refer https://en.wikipedia.org/wiki/IETF_language_tag for more details.
* @member {String} httpBrowserLanguage
*/
exports.prototype['httpBrowserLanguage'] = undefined;
/**
* A Boolean value that represents the ability of the cardholder browser to execute Java. Value is returned from the navigator.javaEnabled property. Possible Values:True/False
* @member {Boolean} httpBrowserJavaEnabled
*/
exports.prototype['httpBrowserJavaEnabled'] = undefined;
/**
* A Boolean value that represents the ability of the cardholder browser to execute JavaScript. Possible Values:True/False. **Note**: Merchants should be able to know the values from fingerprint details of cardholder's browser.
* @member {Boolean} httpBrowserJavaScriptEnabled
*/
exports.prototype['httpBrowserJavaScriptEnabled'] = undefined;
/**
* Value represents the bit depth of the color palette for displaying images, in bits per pixel. Example : 24, refer https://en.wikipedia.org/wiki/Color_depth for more details
* @member {String} httpBrowserColorDepth
*/
exports.prototype['httpBrowserColorDepth'] = undefined;
/**
* Total height of the Cardholder's scree in pixels, example: 864.
* @member {String} httpBrowserScreenHeight
*/
exports.prototype['httpBrowserScreenHeight'] = undefined;
/**
* Total width of the cardholder's screen in pixels. Example: 1536.
* @member {String} httpBrowserScreenWidth
*/
exports.prototype['httpBrowserScreenWidth'] = undefined;
/**
* Time difference between UTC time and the cardholder browser local time, in minutes, Example:300
* @member {String} httpBrowserTimeDifference
*/
exports.prototype['httpBrowserTimeDifference'] = undefined;
/**
* Value of the User-Agent header sent by the customer's web browser. Note If the customer's browser provides a value, you must include it in your request.
* @member {String} userAgentBrowserValue
*/
exports.prototype['userAgentBrowserValue'] = undefined;
return exports;
}));