Class: Onfido::DocumentWithDriverVerificationReportAllOfProperties
- Inherits:
-
Object
- Object
- Onfido::DocumentWithDriverVerificationReportAllOfProperties
- Defined in:
- lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#address_lines ⇒ Object
Returns the value of attribute address_lines.
-
#alias_name ⇒ Object
Returns the value of attribute alias_name.
-
#barcode ⇒ Object
Returns the value of attribute barcode.
-
#categorisation ⇒ Object
Returns the value of attribute categorisation.
-
#civil_state ⇒ Object
Returns the value of attribute civil_state.
-
#date_of_birth ⇒ Object
Returns the value of attribute date_of_birth.
-
#date_of_expiry ⇒ Object
Returns the value of attribute date_of_expiry.
-
#document_classification ⇒ Object
Returns the value of attribute document_classification.
-
#document_numbers ⇒ Object
Returns the value of attribute document_numbers.
-
#document_subtype ⇒ Object
Returns the value of attribute document_subtype.
-
#document_type ⇒ Object
Returns the value of attribute document_type.
-
#drivers_licence ⇒ Object
True for non-restricted driving licences.
-
#driving_licence_information ⇒ Object
Returns the value of attribute driving_licence_information.
-
#expatriation ⇒ Object
Returns the value of attribute expatriation.
-
#extracted_data ⇒ Object
Returns the value of attribute extracted_data.
-
#father_name ⇒ Object
Returns the value of attribute father_name.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#has_issuance_confirmation ⇒ Object
Returns the value of attribute has_issuance_confirmation.
-
#issuing_authority ⇒ Object
Returns the value of attribute issuing_authority.
-
#issuing_country ⇒ Object
Returns the value of attribute issuing_country.
-
#issuing_date ⇒ Object
Returns the value of attribute issuing_date.
-
#issuing_state ⇒ Object
Returns the value of attribute issuing_state.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#middle_name ⇒ Object
Returns the value of attribute middle_name.
-
#mother_name ⇒ Object
Returns the value of attribute mother_name.
-
#mrz_line1 ⇒ Object
Returns the value of attribute mrz_line1.
-
#mrz_line2 ⇒ Object
Returns the value of attribute mrz_line2.
-
#mrz_line3 ⇒ Object
Returns the value of attribute mrz_line3.
-
#nationality ⇒ Object
Returns the value of attribute nationality.
-
#nfc ⇒ Object
Returns the value of attribute nfc.
-
#nist_identity_evidence_strength ⇒ Object
Returns the value of attribute nist_identity_evidence_strength.
-
#passenger_vehicle ⇒ Object
Returns the value of attribute passenger_vehicle.
-
#personal_number ⇒ Object
Returns the value of attribute personal_number.
-
#place_of_birth ⇒ Object
Returns the value of attribute place_of_birth.
-
#profession ⇒ Object
Returns the value of attribute profession.
-
#raw_licence_category ⇒ Object
Underlying, non-normalised, licence category (e.g. "Junior operators license").
-
#raw_vehicle_classes ⇒ Object
Comma-separated vehicle classes that the user is qualified for.
-
#real_id_compliance ⇒ Object
Returns the value of attribute real_id_compliance.
-
#religion ⇒ Object
Returns the value of attribute religion.
-
#remarks ⇒ Object
Returns the value of attribute remarks.
-
#restricted_licence ⇒ Object
True for limited/restricted driving license, including learner’s permits.
-
#security_document_number ⇒ Object
Returns the value of attribute security_document_number.
-
#security_tier ⇒ Object
Returns the value of attribute security_tier.
-
#spouse_name ⇒ Object
Returns the value of attribute spouse_name.
-
#tax_number ⇒ Object
Returns the value of attribute tax_number.
-
#type_of_permit ⇒ Object
Returns the value of attribute type_of_permit.
-
#vehicle_class_details ⇒ Object
Detailed classes/categories information.
-
#version_number ⇒ Object
Returns the value of attribute version_number.
-
#widow_name ⇒ Object
Returns the value of attribute widow_name.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ DocumentWithDriverVerificationReportAllOfProperties
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 = {}) ⇒ DocumentWithDriverVerificationReportAllOfProperties
Initializes the object
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 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 281 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DocumentWithDriverVerificationReportAllOfProperties` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::DocumentWithDriverVerificationReportAllOfProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'date_of_birth') self.date_of_birth = attributes[:'date_of_birth'] end if attributes.key?(:'date_of_expiry') self.date_of_expiry = attributes[:'date_of_expiry'] end if attributes.key?(:'personal_number') self.personal_number = attributes[:'personal_number'] end if attributes.key?(:'document_numbers') if (value = attributes[:'document_numbers']).is_a?(Array) self.document_numbers = value end end if attributes.key?(:'document_type') self.document_type = attributes[:'document_type'] end if attributes.key?(:'first_name') self.first_name = attributes[:'first_name'] end if attributes.key?(:'middle_name') self.middle_name = attributes[:'middle_name'] end if attributes.key?(:'last_name') self.last_name = attributes[:'last_name'] end if attributes.key?(:'gender') self.gender = attributes[:'gender'] end if attributes.key?(:'issuing_country') self.issuing_country = attributes[:'issuing_country'] end if attributes.key?(:'nationality') self.nationality = attributes[:'nationality'] end if attributes.key?(:'issuing_state') self.issuing_state = attributes[:'issuing_state'] end if attributes.key?(:'issuing_date') self.issuing_date = attributes[:'issuing_date'] end if attributes.key?(:'categorisation') self.categorisation = attributes[:'categorisation'] end if attributes.key?(:'mrz_line1') self.mrz_line1 = attributes[:'mrz_line1'] end if attributes.key?(:'mrz_line2') self.mrz_line2 = attributes[:'mrz_line2'] end if attributes.key?(:'mrz_line3') self.mrz_line3 = attributes[:'mrz_line3'] end if attributes.key?(:'address') self.address = attributes[:'address'] end if attributes.key?(:'place_of_birth') self.place_of_birth = attributes[:'place_of_birth'] end if attributes.key?(:'spouse_name') self.spouse_name = attributes[:'spouse_name'] end if attributes.key?(:'widow_name') self.widow_name = attributes[:'widow_name'] end if attributes.key?(:'alias_name') self.alias_name = attributes[:'alias_name'] end if attributes.key?(:'issuing_authority') self. = attributes[:'issuing_authority'] end if attributes.key?(:'remarks') self.remarks = attributes[:'remarks'] end if attributes.key?(:'civil_state') self.civil_state = attributes[:'civil_state'] end if attributes.key?(:'expatriation') self.expatriation = attributes[:'expatriation'] end if attributes.key?(:'father_name') self.father_name = attributes[:'father_name'] end if attributes.key?(:'mother_name') self.mother_name = attributes[:'mother_name'] end if attributes.key?(:'religion') self.religion = attributes[:'religion'] end if attributes.key?(:'type_of_permit') self.type_of_permit = attributes[:'type_of_permit'] end if attributes.key?(:'version_number') self.version_number = attributes[:'version_number'] end if attributes.key?(:'document_subtype') self.document_subtype = attributes[:'document_subtype'] end if attributes.key?(:'profession') self.profession = attributes[:'profession'] end if attributes.key?(:'security_document_number') self.security_document_number = attributes[:'security_document_number'] end if attributes.key?(:'tax_number') self.tax_number = attributes[:'tax_number'] end if attributes.key?(:'nist_identity_evidence_strength') self.nist_identity_evidence_strength = attributes[:'nist_identity_evidence_strength'] end if attributes.key?(:'has_issuance_confirmation') self.has_issuance_confirmation = attributes[:'has_issuance_confirmation'] end if attributes.key?(:'real_id_compliance') self.real_id_compliance = attributes[:'real_id_compliance'] end if attributes.key?(:'security_tier') self.security_tier = attributes[:'security_tier'] end if attributes.key?(:'address_lines') self.address_lines = attributes[:'address_lines'] end if attributes.key?(:'barcode') if (value = attributes[:'barcode']).is_a?(Array) self. = value end end if attributes.key?(:'nfc') self.nfc = attributes[:'nfc'] end if attributes.key?(:'driving_licence_information') self.driving_licence_information = attributes[:'driving_licence_information'] end if attributes.key?(:'document_classification') self.document_classification = attributes[:'document_classification'] end if attributes.key?(:'extracted_data') self.extracted_data = attributes[:'extracted_data'] end if attributes.key?(:'drivers_licence') self.drivers_licence = attributes[:'drivers_licence'] end if attributes.key?(:'restricted_licence') self.restricted_licence = attributes[:'restricted_licence'] end if attributes.key?(:'raw_licence_category') self.raw_licence_category = attributes[:'raw_licence_category'] end if attributes.key?(:'raw_vehicle_classes') self.raw_vehicle_classes = attributes[:'raw_vehicle_classes'] end if attributes.key?(:'vehicle_class_details') if (value = attributes[:'vehicle_class_details']).is_a?(Array) self.vehicle_class_details = value end end if attributes.key?(:'passenger_vehicle') self.passenger_vehicle = attributes[:'passenger_vehicle'] end end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
52 53 54 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 52 def address @address end |
#address_lines ⇒ Object
Returns the value of attribute address_lines.
96 97 98 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 96 def address_lines @address_lines end |
#alias_name ⇒ Object
Returns the value of attribute alias_name.
60 61 62 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 60 def alias_name @alias_name end |
#barcode ⇒ Object
Returns the value of attribute barcode.
98 99 100 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 98 def @barcode end |
#categorisation ⇒ Object
Returns the value of attribute categorisation.
44 45 46 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 44 def categorisation @categorisation end |
#civil_state ⇒ Object
Returns the value of attribute civil_state.
66 67 68 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 66 def civil_state @civil_state end |
#date_of_birth ⇒ Object
Returns the value of attribute date_of_birth.
18 19 20 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 18 def date_of_birth @date_of_birth end |
#date_of_expiry ⇒ Object
Returns the value of attribute date_of_expiry.
20 21 22 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 20 def date_of_expiry @date_of_expiry end |
#document_classification ⇒ Object
Returns the value of attribute document_classification.
104 105 106 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 104 def document_classification @document_classification end |
#document_numbers ⇒ Object
Returns the value of attribute document_numbers.
24 25 26 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 24 def document_numbers @document_numbers end |
#document_subtype ⇒ Object
Returns the value of attribute document_subtype.
80 81 82 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 80 def document_subtype @document_subtype end |
#document_type ⇒ Object
Returns the value of attribute document_type.
26 27 28 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 26 def document_type @document_type end |
#drivers_licence ⇒ Object
True for non-restricted driving licences
109 110 111 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 109 def drivers_licence @drivers_licence end |
#driving_licence_information ⇒ Object
Returns the value of attribute driving_licence_information.
102 103 104 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 102 def driving_licence_information @driving_licence_information end |
#expatriation ⇒ Object
Returns the value of attribute expatriation.
68 69 70 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 68 def expatriation @expatriation end |
#extracted_data ⇒ Object
Returns the value of attribute extracted_data.
106 107 108 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 106 def extracted_data @extracted_data end |
#father_name ⇒ Object
Returns the value of attribute father_name.
70 71 72 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 70 def father_name @father_name end |
#first_name ⇒ Object
Returns the value of attribute first_name.
28 29 30 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 28 def first_name @first_name end |
#gender ⇒ Object
Returns the value of attribute gender.
34 35 36 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 34 def gender @gender end |
#has_issuance_confirmation ⇒ Object
Returns the value of attribute has_issuance_confirmation.
90 91 92 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 90 def has_issuance_confirmation @has_issuance_confirmation end |
#issuing_authority ⇒ Object
Returns the value of attribute issuing_authority.
62 63 64 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 62 def @issuing_authority end |
#issuing_country ⇒ Object
Returns the value of attribute issuing_country.
36 37 38 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 36 def issuing_country @issuing_country end |
#issuing_date ⇒ Object
Returns the value of attribute issuing_date.
42 43 44 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 42 def issuing_date @issuing_date end |
#issuing_state ⇒ Object
Returns the value of attribute issuing_state.
40 41 42 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 40 def issuing_state @issuing_state end |
#last_name ⇒ Object
Returns the value of attribute last_name.
32 33 34 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 32 def last_name @last_name end |
#middle_name ⇒ Object
Returns the value of attribute middle_name.
30 31 32 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 30 def middle_name @middle_name end |
#mother_name ⇒ Object
Returns the value of attribute mother_name.
72 73 74 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 72 def mother_name @mother_name end |
#mrz_line1 ⇒ Object
Returns the value of attribute mrz_line1.
46 47 48 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 46 def mrz_line1 @mrz_line1 end |
#mrz_line2 ⇒ Object
Returns the value of attribute mrz_line2.
48 49 50 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 48 def mrz_line2 @mrz_line2 end |
#mrz_line3 ⇒ Object
Returns the value of attribute mrz_line3.
50 51 52 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 50 def mrz_line3 @mrz_line3 end |
#nationality ⇒ Object
Returns the value of attribute nationality.
38 39 40 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 38 def nationality @nationality end |
#nfc ⇒ Object
Returns the value of attribute nfc.
100 101 102 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 100 def nfc @nfc end |
#nist_identity_evidence_strength ⇒ Object
Returns the value of attribute nist_identity_evidence_strength.
88 89 90 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 88 def nist_identity_evidence_strength @nist_identity_evidence_strength end |
#passenger_vehicle ⇒ Object
Returns the value of attribute passenger_vehicle.
123 124 125 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 123 def passenger_vehicle @passenger_vehicle end |
#personal_number ⇒ Object
Returns the value of attribute personal_number.
22 23 24 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 22 def personal_number @personal_number end |
#place_of_birth ⇒ Object
Returns the value of attribute place_of_birth.
54 55 56 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 54 def place_of_birth @place_of_birth end |
#profession ⇒ Object
Returns the value of attribute profession.
82 83 84 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 82 def profession @profession end |
#raw_licence_category ⇒ Object
Underlying, non-normalised, licence category (e.g. "Junior operators license")
115 116 117 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 115 def raw_licence_category @raw_licence_category end |
#raw_vehicle_classes ⇒ Object
Comma-separated vehicle classes that the user is qualified for
118 119 120 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 118 def raw_vehicle_classes @raw_vehicle_classes end |
#real_id_compliance ⇒ Object
Returns the value of attribute real_id_compliance.
92 93 94 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 92 def real_id_compliance @real_id_compliance end |
#religion ⇒ Object
Returns the value of attribute religion.
74 75 76 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 74 def religion @religion end |
#remarks ⇒ Object
Returns the value of attribute remarks.
64 65 66 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 64 def remarks @remarks end |
#restricted_licence ⇒ Object
True for limited/restricted driving license, including learner’s permits
112 113 114 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 112 def restricted_licence @restricted_licence end |
#security_document_number ⇒ Object
Returns the value of attribute security_document_number.
84 85 86 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 84 def security_document_number @security_document_number end |
#security_tier ⇒ Object
Returns the value of attribute security_tier.
94 95 96 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 94 def security_tier @security_tier end |
#spouse_name ⇒ Object
Returns the value of attribute spouse_name.
56 57 58 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 56 def spouse_name @spouse_name end |
#tax_number ⇒ Object
Returns the value of attribute tax_number.
86 87 88 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 86 def tax_number @tax_number end |
#type_of_permit ⇒ Object
Returns the value of attribute type_of_permit.
76 77 78 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 76 def type_of_permit @type_of_permit end |
#vehicle_class_details ⇒ Object
Detailed classes/categories information
121 122 123 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 121 def vehicle_class_details @vehicle_class_details end |
#version_number ⇒ Object
Returns the value of attribute version_number.
78 79 80 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 78 def version_number @version_number end |
#widow_name ⇒ Object
Returns the value of attribute widow_name.
58 59 60 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 58 def widow_name @widow_name end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 653 def self._deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = Onfido.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
205 206 207 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 205 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
148 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 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 148 def self.attribute_map { :'date_of_birth' => :'date_of_birth', :'date_of_expiry' => :'date_of_expiry', :'personal_number' => :'personal_number', :'document_numbers' => :'document_numbers', :'document_type' => :'document_type', :'first_name' => :'first_name', :'middle_name' => :'middle_name', :'last_name' => :'last_name', :'gender' => :'gender', :'issuing_country' => :'issuing_country', :'nationality' => :'nationality', :'issuing_state' => :'issuing_state', :'issuing_date' => :'issuing_date', :'categorisation' => :'categorisation', :'mrz_line1' => :'mrz_line1', :'mrz_line2' => :'mrz_line2', :'mrz_line3' => :'mrz_line3', :'address' => :'address', :'place_of_birth' => :'place_of_birth', :'spouse_name' => :'spouse_name', :'widow_name' => :'widow_name', :'alias_name' => :'alias_name', :'issuing_authority' => :'issuing_authority', :'remarks' => :'remarks', :'civil_state' => :'civil_state', :'expatriation' => :'expatriation', :'father_name' => :'father_name', :'mother_name' => :'mother_name', :'religion' => :'religion', :'type_of_permit' => :'type_of_permit', :'version_number' => :'version_number', :'document_subtype' => :'document_subtype', :'profession' => :'profession', :'security_document_number' => :'security_document_number', :'tax_number' => :'tax_number', :'nist_identity_evidence_strength' => :'nist_identity_evidence_strength', :'has_issuance_confirmation' => :'has_issuance_confirmation', :'real_id_compliance' => :'real_id_compliance', :'security_tier' => :'security_tier', :'address_lines' => :'address_lines', :'barcode' => :'barcode', :'nfc' => :'nfc', :'driving_licence_information' => :'driving_licence_information', :'document_classification' => :'document_classification', :'extracted_data' => :'extracted_data', :'drivers_licence' => :'drivers_licence', :'restricted_licence' => :'restricted_licence', :'raw_licence_category' => :'raw_licence_category', :'raw_vehicle_classes' => :'raw_vehicle_classes', :'vehicle_class_details' => :'vehicle_class_details', :'passenger_vehicle' => :'passenger_vehicle' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 629 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
273 274 275 276 277 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 273 def self.openapi_all_of [ :'DocumentProperties' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
267 268 269 270 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 267 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 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 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 210 def self.openapi_types { :'date_of_birth' => :'Date', :'date_of_expiry' => :'Date', :'personal_number' => :'String', :'document_numbers' => :'Array<DocumentPropertiesDocumentNumbersInner>', :'document_type' => :'String', :'first_name' => :'String', :'middle_name' => :'String', :'last_name' => :'String', :'gender' => :'String', :'issuing_country' => :'String', :'nationality' => :'String', :'issuing_state' => :'String', :'issuing_date' => :'Date', :'categorisation' => :'String', :'mrz_line1' => :'String', :'mrz_line2' => :'String', :'mrz_line3' => :'String', :'address' => :'String', :'place_of_birth' => :'String', :'spouse_name' => :'String', :'widow_name' => :'String', :'alias_name' => :'String', :'issuing_authority' => :'String', :'remarks' => :'String', :'civil_state' => :'String', :'expatriation' => :'String', :'father_name' => :'String', :'mother_name' => :'String', :'religion' => :'String', :'type_of_permit' => :'String', :'version_number' => :'String', :'document_subtype' => :'String', :'profession' => :'String', :'security_document_number' => :'String', :'tax_number' => :'String', :'nist_identity_evidence_strength' => :'String', :'has_issuance_confirmation' => :'String', :'real_id_compliance' => :'Boolean', :'security_tier' => :'String', :'address_lines' => :'DocumentPropertiesAddressLines', :'barcode' => :'Array<DocumentPropertiesBarcodeInner>', :'nfc' => :'DocumentPropertiesNfc', :'driving_licence_information' => :'DocumentPropertiesDrivingLicenceInformation', :'document_classification' => :'DocumentPropertiesDocumentClassification', :'extracted_data' => :'DocumentPropertiesExtractedData', :'drivers_licence' => :'Boolean', :'restricted_licence' => :'Boolean', :'raw_licence_category' => :'String', :'raw_vehicle_classes' => :'String', :'vehicle_class_details' => :'Array<DocumentWithDriverVerificationReportAllOfPropertiesAllOfVehicleClassDetailsInner>', :'passenger_vehicle' => :'DocumentWithDriverVerificationReportAllOfPropertiesAllOfPassengerVehicle' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 558 def ==(o) return true if self.equal?(o) self.class == o.class && date_of_birth == o.date_of_birth && date_of_expiry == o.date_of_expiry && personal_number == o.personal_number && document_numbers == o.document_numbers && document_type == o.document_type && first_name == o.first_name && middle_name == o.middle_name && last_name == o.last_name && gender == o.gender && issuing_country == o.issuing_country && nationality == o.nationality && issuing_state == o.issuing_state && issuing_date == o.issuing_date && categorisation == o.categorisation && mrz_line1 == o.mrz_line1 && mrz_line2 == o.mrz_line2 && mrz_line3 == o.mrz_line3 && address == o.address && place_of_birth == o.place_of_birth && spouse_name == o.spouse_name && widow_name == o.widow_name && alias_name == o.alias_name && == o. && remarks == o.remarks && civil_state == o.civil_state && expatriation == o.expatriation && father_name == o.father_name && mother_name == o.mother_name && religion == o.religion && type_of_permit == o.type_of_permit && version_number == o.version_number && document_subtype == o.document_subtype && profession == o.profession && security_document_number == o.security_document_number && tax_number == o.tax_number && nist_identity_evidence_strength == o.nist_identity_evidence_strength && has_issuance_confirmation == o.has_issuance_confirmation && real_id_compliance == o.real_id_compliance && security_tier == o.security_tier && address_lines == o.address_lines && == o. && nfc == o.nfc && driving_licence_information == o.driving_licence_information && document_classification == o.document_classification && extracted_data == o.extracted_data && drivers_licence == o.drivers_licence && restricted_licence == o.restricted_licence && raw_licence_category == o.raw_licence_category && raw_vehicle_classes == o.raw_vehicle_classes && vehicle_class_details == o.vehicle_class_details && passenger_vehicle == o.passenger_vehicle end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
724 725 726 727 728 729 730 731 732 733 734 735 736 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 724 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 |
#eql?(o) ⇒ Boolean
616 617 618 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 616 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
622 623 624 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 622 def hash [date_of_birth, date_of_expiry, personal_number, document_numbers, document_type, first_name, middle_name, last_name, gender, issuing_country, nationality, issuing_state, issuing_date, categorisation, mrz_line1, mrz_line2, mrz_line3, address, place_of_birth, spouse_name, widow_name, alias_name, , remarks, civil_state, expatriation, father_name, mother_name, religion, type_of_permit, version_number, document_subtype, profession, security_document_number, tax_number, nist_identity_evidence_strength, has_issuance_confirmation, real_id_compliance, security_tier, address_lines, , nfc, driving_licence_information, document_classification, extracted_data, drivers_licence, restricted_licence, raw_licence_category, raw_vehicle_classes, vehicle_class_details, passenger_vehicle].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
507 508 509 510 511 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 507 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
700 701 702 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 700 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
706 707 708 709 710 711 712 713 714 715 716 717 718 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 706 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
694 695 696 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 694 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
515 516 517 518 519 520 521 522 523 524 |
# File 'lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb', line 515 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' nist_identity_evidence_strength_validator = EnumAttributeValidator.new('String', ["superior", "strong", "fair", "weak", "unacceptable", "unspecified_identity_evidence_strength", "unknown_default_open_api"]) return false unless nist_identity_evidence_strength_validator.valid?(@nist_identity_evidence_strength) has_issuance_confirmation_validator = EnumAttributeValidator.new('String', ["true", "false", "unspecified", "unknown_default_open_api"]) return false unless has_issuance_confirmation_validator.valid?(@has_issuance_confirmation) security_tier_validator = EnumAttributeValidator.new('String', ["tier_1", "tier_2", "tier_3", "tier_4", "tier_5", "unspecified_security_tier", "unknown_default_open_api"]) return false unless security_tier_validator.valid?(@security_tier) true end |