UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

141 lines (122 loc) 5.36 kB
/** * 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/Acpv1tokensDeviceInformationDeviceData'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./Acpv1tokensDeviceInformationDeviceData')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.Acpv1tokensDeviceInformation = factory(root.CyberSource.ApiClient, root.CyberSource.Acpv1tokensDeviceInformationDeviceData); } }(this, function(ApiClient, Acpv1tokensDeviceInformationDeviceData) { 'use strict'; /** * The Acpv1tokensDeviceInformation model module. * @module model/Acpv1tokensDeviceInformation * @version 0.0.1 */ /** * Constructs a new <code>Acpv1tokensDeviceInformation</code>. * Device and Application instance data. Identifies the device and application from which the consumer is making the payment request. * @alias module:model/Acpv1tokensDeviceInformation * @class * @param applicationName {String} Name of the connecting client application. * @param fingerprintSessionId {String} Device Fingerprinting Session identifier. * @param deviceData {module:model/Acpv1tokensDeviceInformationDeviceData} * @param ipAddress {String} IP address of the consumer's device. */ var exports = function(applicationName, fingerprintSessionId, deviceData, ipAddress) { var _this = this; _this['applicationName'] = applicationName; _this['fingerprintSessionId'] = fingerprintSessionId; _this['deviceData'] = deviceData; _this['ipAddress'] = ipAddress; }; /** * Constructs a <code>Acpv1tokensDeviceInformation</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/Acpv1tokensDeviceInformation} obj Optional instance to populate. * @return {module:model/Acpv1tokensDeviceInformation} The populated <code>Acpv1tokensDeviceInformation</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('userAgent')) { obj['userAgent'] = ApiClient.convertToType(data['userAgent'], 'String'); } if (data.hasOwnProperty('applicationName')) { obj['applicationName'] = ApiClient.convertToType(data['applicationName'], 'String'); } if (data.hasOwnProperty('fingerprintSessionId')) { obj['fingerprintSessionId'] = ApiClient.convertToType(data['fingerprintSessionId'], 'String'); } if (data.hasOwnProperty('country')) { obj['country'] = ApiClient.convertToType(data['country'], 'String'); } if (data.hasOwnProperty('deviceData')) { obj['deviceData'] = Acpv1tokensDeviceInformationDeviceData.constructFromObject(data['deviceData']); } if (data.hasOwnProperty('ipAddress')) { obj['ipAddress'] = ApiClient.convertToType(data['ipAddress'], 'String'); } if (data.hasOwnProperty('clientDeviceId')) { obj['clientDeviceId'] = ApiClient.convertToType(data['clientDeviceId'], 'String'); } } return obj; } /** * Base64 Encoded userAgent string of the connecting client application, with no padding. User agent string of the connecting client application. Conditionality: - Required for browsers - Optional for non-browsers * @member {String} userAgent */ exports.prototype['userAgent'] = undefined; /** * Name of the connecting client application. * @member {String} applicationName */ exports.prototype['applicationName'] = undefined; /** * Device Fingerprinting Session identifier. * @member {String} fingerprintSessionId */ exports.prototype['fingerprintSessionId'] = undefined; /** * ISO 3166-1 alpha-2 country code. The country where the Consumer is accessing the service from. * @member {String} country */ exports.prototype['country'] = undefined; /** * @member {module:model/Acpv1tokensDeviceInformationDeviceData} deviceData */ exports.prototype['deviceData'] = undefined; /** * IP address of the consumer's device. * @member {String} ipAddress */ exports.prototype['ipAddress'] = undefined; /** * Unique identifier of the consumer's device. * @member {String} clientDeviceId */ exports.prototype['clientDeviceId'] = undefined; return exports; }));