UNPKG

cybersource-rest-client

Version:

Node.js SDK for the CyberSource REST API

256 lines (233 loc) 10.5 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/UnderwritingConfigurationOrganizationInformationBusinessInformationAddress1'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./UnderwritingConfigurationOrganizationInformationBusinessInformationAddress1')); } else { // Browser globals (root is window) if (!root.CyberSource) { root.CyberSource = {}; } root.CyberSource.UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation = factory(root.CyberSource.ApiClient, root.CyberSource.UnderwritingConfigurationOrganizationInformationBusinessInformationAddress1); } }(this, function(ApiClient, UnderwritingConfigurationOrganizationInformationBusinessInformationAddress1) { 'use strict'; /** * The UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation model module. * @module model/UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation * @version 0.0.1 */ /** * Constructs a new <code>UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation</code>. * @alias module:model/UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation * @class * @param firstName {String} Owner's first name * @param lastName {String} Owner's last name * @param birthDate {Date} Owner's date of birth. Format: YYYY-MM-DD Example 2016-08-11 equals August 11, 2016 * @param isPrimary {Boolean} Primary Owner or Non-Primary Owner * @param hasSignificantResponsibility {Boolean} If not an owner, is the user a Control Person * @param nationalId {String} Identification value from ID document * @param ownershipPercentage {Number} Percentage of the company that owner owns * @param nationality {String} Country of origin for the owner. Two character country code, ISO 3166-1 alpha-2. * @param dueDiligenceRequired {Boolean} Indicates if due diligence checks should be run for this owner * @param phoneNumberCountryCode {String} Phone number country. Two character country code, ISO 3166-1 alpha-2. * @param phoneNumber {String} Owner's phone number * @param email {String} Email address for Owner */ var exports = function(firstName, lastName, birthDate, isPrimary, hasSignificantResponsibility, nationalId, ownershipPercentage, nationality, dueDiligenceRequired, phoneNumberCountryCode, phoneNumber, email) { var _this = this; _this['firstName'] = firstName; _this['lastName'] = lastName; _this['birthDate'] = birthDate; _this['isPrimary'] = isPrimary; _this['hasSignificantResponsibility'] = hasSignificantResponsibility; _this['nationalId'] = nationalId; _this['ownershipPercentage'] = ownershipPercentage; _this['nationality'] = nationality; _this['dueDiligenceRequired'] = dueDiligenceRequired; _this['phoneNumberCountryCode'] = phoneNumberCountryCode; _this['phoneNumber'] = phoneNumber; _this['email'] = email; }; /** * Constructs a <code>UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation</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/UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation} obj Optional instance to populate. * @return {module:model/UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation} The populated <code>UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('firstName')) { obj['firstName'] = ApiClient.convertToType(data['firstName'], 'String'); } if (data.hasOwnProperty('middleName')) { obj['middleName'] = ApiClient.convertToType(data['middleName'], 'String'); } if (data.hasOwnProperty('lastName')) { obj['lastName'] = ApiClient.convertToType(data['lastName'], 'String'); } if (data.hasOwnProperty('birthDate')) { obj['birthDate'] = ApiClient.convertToType(data['birthDate'], 'Date'); } if (data.hasOwnProperty('isPrimary')) { obj['isPrimary'] = ApiClient.convertToType(data['isPrimary'], 'Boolean'); } if (data.hasOwnProperty('hasSignificantResponsibility')) { obj['hasSignificantResponsibility'] = ApiClient.convertToType(data['hasSignificantResponsibility'], 'Boolean'); } if (data.hasOwnProperty('ownerDirector')) { obj['ownerDirector'] = ApiClient.convertToType(data['ownerDirector'], 'Boolean'); } if (data.hasOwnProperty('nationalId')) { obj['nationalId'] = ApiClient.convertToType(data['nationalId'], 'String'); } if (data.hasOwnProperty('idCountry')) { obj['idCountry'] = ApiClient.convertToType(data['idCountry'], 'String'); } if (data.hasOwnProperty('passportNumber')) { obj['passportNumber'] = ApiClient.convertToType(data['passportNumber'], 'String'); } if (data.hasOwnProperty('passportCountry')) { obj['passportCountry'] = ApiClient.convertToType(data['passportCountry'], 'String'); } if (data.hasOwnProperty('jobTitle')) { obj['jobTitle'] = ApiClient.convertToType(data['jobTitle'], 'String'); } if (data.hasOwnProperty('ownershipPercentage')) { obj['ownershipPercentage'] = ApiClient.convertToType(data['ownershipPercentage'], 'Number'); } if (data.hasOwnProperty('nationality')) { obj['nationality'] = ApiClient.convertToType(data['nationality'], 'String'); } if (data.hasOwnProperty('dueDiligenceRequired')) { obj['dueDiligenceRequired'] = ApiClient.convertToType(data['dueDiligenceRequired'], 'Boolean'); } if (data.hasOwnProperty('phoneNumberCountryCode')) { obj['phoneNumberCountryCode'] = ApiClient.convertToType(data['phoneNumberCountryCode'], 'String'); } if (data.hasOwnProperty('phoneNumber')) { obj['phoneNumber'] = ApiClient.convertToType(data['phoneNumber'], 'String'); } if (data.hasOwnProperty('email')) { obj['email'] = ApiClient.convertToType(data['email'], 'String'); } if (data.hasOwnProperty('address')) { obj['address'] = UnderwritingConfigurationOrganizationInformationBusinessInformationAddress1.constructFromObject(data['address']); } } return obj; } /** * Owner's first name * @member {String} firstName */ exports.prototype['firstName'] = undefined; /** * Owner's middle name * @member {String} middleName */ exports.prototype['middleName'] = undefined; /** * Owner's last name * @member {String} lastName */ exports.prototype['lastName'] = undefined; /** * Owner's date of birth. Format: YYYY-MM-DD Example 2016-08-11 equals August 11, 2016 * @member {Date} birthDate */ exports.prototype['birthDate'] = undefined; /** * Primary Owner or Non-Primary Owner * @member {Boolean} isPrimary */ exports.prototype['isPrimary'] = undefined; /** * If not an owner, is the user a Control Person * @member {Boolean} hasSignificantResponsibility */ exports.prototype['hasSignificantResponsibility'] = undefined; /** * Is the owner a Director as well? * @member {Boolean} ownerDirector */ exports.prototype['ownerDirector'] = undefined; /** * Identification value from ID document * @member {String} nationalId */ exports.prototype['nationalId'] = undefined; /** * Country of the ID document. Two character country code, ISO 3166-1 alpha-2. * @member {String} idCountry */ exports.prototype['idCountry'] = undefined; /** * Passport Number * @member {String} passportNumber */ exports.prototype['passportNumber'] = undefined; /** * Passport Country. Two character country code, ISO 3166-1 alpha-2. * @member {String} passportCountry */ exports.prototype['passportCountry'] = undefined; /** * Owner's Job Title * @member {String} jobTitle */ exports.prototype['jobTitle'] = undefined; /** * Percentage of the company that owner owns * @member {Number} ownershipPercentage */ exports.prototype['ownershipPercentage'] = undefined; /** * Country of origin for the owner. Two character country code, ISO 3166-1 alpha-2. * @member {String} nationality */ exports.prototype['nationality'] = undefined; /** * Indicates if due diligence checks should be run for this owner * @member {Boolean} dueDiligenceRequired */ exports.prototype['dueDiligenceRequired'] = undefined; /** * Phone number country. Two character country code, ISO 3166-1 alpha-2. * @member {String} phoneNumberCountryCode */ exports.prototype['phoneNumberCountryCode'] = undefined; /** * Owner's phone number * @member {String} phoneNumber */ exports.prototype['phoneNumber'] = undefined; /** * Email address for Owner * @member {String} email */ exports.prototype['email'] = undefined; /** * @member {module:model/UnderwritingConfigurationOrganizationInformationBusinessInformationAddress1} address */ exports.prototype['address'] = undefined; return exports; }));