Class: CyberSource::UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation
- Inherits:
-
Object
- Object
- CyberSource::UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation
- Defined in:
- lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#birth_date ⇒ Object
Owner’s date of birth.
-
#due_diligence_required ⇒ Object
Indicates if due diligence checks should be run for this owner.
-
#email ⇒ Object
Email address for Owner.
-
#first_name ⇒ Object
Owner’s first name.
-
#has_significant_responsibility ⇒ Object
If not an owner, is the user a Control Person.
-
#id_country ⇒ Object
Country of the ID document.
-
#is_primary ⇒ Object
Primary Owner or Non-Primary Owner.
-
#job_title ⇒ Object
Owner’s Job Title.
-
#last_name ⇒ Object
Owner’s last name.
-
#middle_name ⇒ Object
Owner’s middle name.
-
#national_id ⇒ Object
Identification value from ID document.
-
#nationality ⇒ Object
Country of origin for the owner.
-
#owner_director ⇒ Object
Is the owner a Director as well?.
-
#ownership_percentage ⇒ Object
Percentage of the company that owner owns.
-
#passport_country ⇒ Object
Passport Country.
-
#passport_number ⇒ Object
Passport Number.
-
#phone_number ⇒ Object
Owner’s phone number.
-
#phone_number_country_code ⇒ Object
Phone number country.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ UnderwritingConfigurationOrganizationInformationBusinessInformationOwnerInformation
Initializes the object
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 149 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'firstName') self.first_name = attributes[:'firstName'] end if attributes.has_key?(:'middleName') self.middle_name = attributes[:'middleName'] end if attributes.has_key?(:'lastName') self.last_name = attributes[:'lastName'] end if attributes.has_key?(:'birthDate') self.birth_date = attributes[:'birthDate'] end if attributes.has_key?(:'isPrimary') self.is_primary = attributes[:'isPrimary'] end if attributes.has_key?(:'hasSignificantResponsibility') self.has_significant_responsibility = attributes[:'hasSignificantResponsibility'] end if attributes.has_key?(:'ownerDirector') self.owner_director = attributes[:'ownerDirector'] end if attributes.has_key?(:'nationalId') self.national_id = attributes[:'nationalId'] end if attributes.has_key?(:'idCountry') self.id_country = attributes[:'idCountry'] end if attributes.has_key?(:'passportNumber') self.passport_number = attributes[:'passportNumber'] end if attributes.has_key?(:'passportCountry') self.passport_country = attributes[:'passportCountry'] end if attributes.has_key?(:'jobTitle') self.job_title = attributes[:'jobTitle'] end if attributes.has_key?(:'ownershipPercentage') self.ownership_percentage = attributes[:'ownershipPercentage'] end if attributes.has_key?(:'nationality') self.nationality = attributes[:'nationality'] end if attributes.has_key?(:'dueDiligenceRequired') self.due_diligence_required = attributes[:'dueDiligenceRequired'] end if attributes.has_key?(:'phoneNumberCountryCode') self.phone_number_country_code = attributes[:'phoneNumberCountryCode'] end if attributes.has_key?(:'phoneNumber') self.phone_number = attributes[:'phoneNumber'] end if attributes.has_key?(:'email') self.email = attributes[:'email'] end if attributes.has_key?(:'address') self.address = attributes[:'address'] end end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
70 71 72 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 70 def address @address end |
#birth_date ⇒ Object
Owner’s date of birth. Format: YYYY-MM-DD Example 2016-08-11 equals August 11, 2016
26 27 28 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 26 def birth_date @birth_date end |
#due_diligence_required ⇒ Object
Indicates if due diligence checks should be run for this owner
59 60 61 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 59 def due_diligence_required @due_diligence_required end |
#email ⇒ Object
Email address for Owner
68 69 70 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 68 def email @email end |
#first_name ⇒ Object
Owner’s first name
17 18 19 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 17 def first_name @first_name end |
#has_significant_responsibility ⇒ Object
If not an owner, is the user a Control Person
32 33 34 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 32 def has_significant_responsibility @has_significant_responsibility end |
#id_country ⇒ Object
Country of the ID document. Two character country code, ISO 3166-1 alpha-2.
41 42 43 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 41 def id_country @id_country end |
#is_primary ⇒ Object
Primary Owner or Non-Primary Owner
29 30 31 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 29 def is_primary @is_primary end |
#job_title ⇒ Object
Owner’s Job Title
50 51 52 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 50 def job_title @job_title end |
#last_name ⇒ Object
Owner’s last name
23 24 25 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 23 def last_name @last_name end |
#middle_name ⇒ Object
Owner’s middle name
20 21 22 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 20 def middle_name @middle_name end |
#national_id ⇒ Object
Identification value from ID document
38 39 40 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 38 def national_id @national_id end |
#nationality ⇒ Object
Country of origin for the owner. Two character country code, ISO 3166-1 alpha-2.
56 57 58 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 56 def nationality @nationality end |
#owner_director ⇒ Object
Is the owner a Director as well?
35 36 37 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 35 def owner_director @owner_director end |
#ownership_percentage ⇒ Object
Percentage of the company that owner owns
53 54 55 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 53 def ownership_percentage @ownership_percentage end |
#passport_country ⇒ Object
Passport Country. Two character country code, ISO 3166-1 alpha-2.
47 48 49 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 47 def passport_country @passport_country end |
#passport_number ⇒ Object
Passport Number
44 45 46 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 44 def passport_number @passport_number end |
#phone_number ⇒ Object
Owner’s phone number
65 66 67 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 65 def phone_number @phone_number end |
#phone_number_country_code ⇒ Object
Phone number country. Two character country code, ISO 3166-1 alpha-2.
62 63 64 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 62 def phone_number_country_code @phone_number_country_code end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 73 def self.attribute_map { :'first_name' => :'firstName', :'middle_name' => :'middleName', :'last_name' => :'lastName', :'birth_date' => :'birthDate', :'is_primary' => :'isPrimary', :'has_significant_responsibility' => :'hasSignificantResponsibility', :'owner_director' => :'ownerDirector', :'national_id' => :'nationalId', :'id_country' => :'idCountry', :'passport_number' => :'passportNumber', :'passport_country' => :'passportCountry', :'job_title' => :'jobTitle', :'ownership_percentage' => :'ownershipPercentage', :'nationality' => :'nationality', :'due_diligence_required' => :'dueDiligenceRequired', :'phone_number_country_code' => :'phoneNumberCountryCode', :'phone_number' => :'phoneNumber', :'email' => :'email', :'address' => :'address' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 98 def self.json_map { :'first_name' => :'first_name', :'middle_name' => :'middle_name', :'last_name' => :'last_name', :'birth_date' => :'birth_date', :'is_primary' => :'is_primary', :'has_significant_responsibility' => :'has_significant_responsibility', :'owner_director' => :'owner_director', :'national_id' => :'national_id', :'id_country' => :'id_country', :'passport_number' => :'passport_number', :'passport_country' => :'passport_country', :'job_title' => :'job_title', :'ownership_percentage' => :'ownership_percentage', :'nationality' => :'nationality', :'due_diligence_required' => :'due_diligence_required', :'phone_number_country_code' => :'phone_number_country_code', :'phone_number' => :'phone_number', :'email' => :'email', :'address' => :'address' } end |
.swagger_types ⇒ Object
Attribute type mapping.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 123 def self.swagger_types { :'first_name' => :'String', :'middle_name' => :'String', :'last_name' => :'String', :'birth_date' => :'Date', :'is_primary' => :'BOOLEAN', :'has_significant_responsibility' => :'BOOLEAN', :'owner_director' => :'BOOLEAN', :'national_id' => :'String', :'id_country' => :'String', :'passport_number' => :'String', :'passport_country' => :'String', :'job_title' => :'String', :'ownership_percentage' => :'Float', :'nationality' => :'String', :'due_diligence_required' => :'BOOLEAN', :'phone_number_country_code' => :'String', :'phone_number' => :'String', :'email' => :'String', :'address' => :'UnderwritingConfigurationOrganizationInformationBusinessInformationAddress1' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 471 def ==(o) return true if self.equal?(o) self.class == o.class && first_name == o.first_name && middle_name == o.middle_name && last_name == o.last_name && birth_date == o.birth_date && is_primary == o.is_primary && has_significant_responsibility == o.has_significant_responsibility && owner_director == o.owner_director && national_id == o.national_id && id_country == o.id_country && passport_number == o.passport_number && passport_country == o.passport_country && job_title == o.job_title && ownership_percentage == o.ownership_percentage && nationality == o.nationality && due_diligence_required == o.due_diligence_required && phone_number_country_code == o.phone_number_country_code && phone_number == o.phone_number && email == o.email && address == o.address end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 531 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = CyberSource.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
597 598 599 600 601 602 603 604 605 606 607 608 609 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 597 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 510 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
497 498 499 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 497 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
503 504 505 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 503 def hash [first_name, middle_name, last_name, birth_date, is_primary, has_significant_responsibility, owner_director, national_id, id_country, passport_number, passport_country, job_title, ownership_percentage, nationality, due_diligence_required, phone_number_country_code, phone_number, email, address].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 234 def list_invalid_properties invalid_properties = Array.new if @first_name.nil? invalid_properties.push('invalid value for "first_name", first_name cannot be nil.') end if @last_name.nil? invalid_properties.push('invalid value for "last_name", last_name cannot be nil.') end if @birth_date.nil? invalid_properties.push('invalid value for "birth_date", birth_date cannot be nil.') end if @is_primary.nil? invalid_properties.push('invalid value for "is_primary", is_primary cannot be nil.') end if @has_significant_responsibility.nil? invalid_properties.push('invalid value for "has_significant_responsibility", has_significant_responsibility cannot be nil.') end if @national_id.nil? invalid_properties.push('invalid value for "national_id", national_id cannot be nil.') end #if !@id_country.nil? && @id_country !~ Regexp.new(/^[a-zA-Z]*$/) #invalid_properties.push('invalid value for "id_country", must conform to the pattern /^[a-zA-Z]*$/.') #end #if !@passport_country.nil? && @passport_country !~ Regexp.new(/^[a-zA-Z]*$/) #invalid_properties.push('invalid value for "passport_country", must conform to the pattern /^[a-zA-Z]*$/.') #end #if !@job_title.nil? && @job_title !~ Regexp.new(/^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$/) #invalid_properties.push('invalid value for "job_title", must conform to the pattern /^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$/.') #end if @ownership_percentage.nil? invalid_properties.push('invalid value for "ownership_percentage", ownership_percentage cannot be nil.') end if @nationality.nil? invalid_properties.push('invalid value for "nationality", nationality cannot be nil.') end #if @nationality !~ Regexp.new(/^[a-zA-Z]*$/) #invalid_properties.push('invalid value for "nationality", must conform to the pattern /^[a-zA-Z]*$/.') #end if @due_diligence_required.nil? invalid_properties.push('invalid value for "due_diligence_required", due_diligence_required cannot be nil.') end if @phone_number_country_code.nil? invalid_properties.push('invalid value for "phone_number_country_code", phone_number_country_code cannot be nil.') end #if @phone_number_country_code !~ Regexp.new(/^[a-zA-Z]*$/) #invalid_properties.push('invalid value for "phone_number_country_code", must conform to the pattern /^[a-zA-Z]*$/.') #end if @phone_number.nil? invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.') end #if @phone_number !~ Regexp.new(/^[0-9a-zA-Z\\\\+\\\\-]+$/) #invalid_properties.push('invalid value for "phone_number", must conform to the pattern /^[0-9a-zA-Z\\\\+\\\\-]+$/.') #end if @email.nil? invalid_properties.push('invalid value for "email", email cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
577 578 579 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 577 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
583 584 585 586 587 588 589 590 591 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 583 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
571 572 573 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 571 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/cybersource_rest_client/models/underwriting_configuration_organization_information_business_information_owner_information.rb', line 313 def valid? return false if @first_name.nil? return false if @last_name.nil? return false if @birth_date.nil? return false if @is_primary.nil? return false if @has_significant_responsibility.nil? return false if @national_id.nil? #return false if !@id_country.nil? && @id_country !~ Regexp.new(/^[a-zA-Z]*$/) #return false if !@passport_country.nil? && @passport_country !~ Regexp.new(/^[a-zA-Z]*$/) #return false if !@job_title.nil? && @job_title !~ Regexp.new(/^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$/) return false if @ownership_percentage.nil? return false if @nationality.nil? #return false if @nationality !~ Regexp.new(/^[a-zA-Z]*$/) return false if @due_diligence_required.nil? return false if @phone_number_country_code.nil? #return false if @phone_number_country_code !~ Regexp.new(/^[a-zA-Z]*$/) return false if @phone_number.nil? #return false if @phone_number !~ Regexp.new(/^[0-9a-zA-Z\\\\+\\\\-]+$/) return false if @email.nil? true end |