Class: Mindee::Product::US::DriverLicense::DriverLicenseV1Document
- Inherits:
-
Mindee::Parsing::Common::Prediction
- Object
- Mindee::Parsing::Common::Prediction
- Mindee::Product::US::DriverLicense::DriverLicenseV1Document
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/us/driver_license/driver_license_v1_document.rb
Overview
Driver License API version 1.1 document data.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#address ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders address.
-
#date_of_birth ⇒ Mindee::Parsing::Standard::DateField
readonly
US driver license holders date of birth.
-
#dd_number ⇒ Mindee::Parsing::Standard::StringField
readonly
Document Discriminator Number of the US Driver License.
-
#dl_class ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders class.
-
#driver_license_id ⇒ Mindee::Parsing::Standard::StringField
readonly
ID number of the US Driver License.
-
#endorsements ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders endorsements.
-
#expiry_date ⇒ Mindee::Parsing::Standard::DateField
readonly
Date on which the documents expires.
-
#eye_color ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders eye colour.
-
#first_name ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders first name(s).
-
#hair_color ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders hair colour.
-
#height ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders hight.
-
#issued_date ⇒ Mindee::Parsing::Standard::DateField
readonly
Date on which the documents was issued.
-
#last_name ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders last name.
-
#restrictions ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders restrictions.
-
#sex ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders gender.
-
#state ⇒ Mindee::Parsing::Standard::StringField
readonly
US State.
-
#weight ⇒ Mindee::Parsing::Standard::StringField
readonly
US driver license holders weight.
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ DriverLicenseV1Document
constructor
A new instance of DriverLicenseV1Document.
- #to_s ⇒ String
Constructor Details
#initialize(prediction, page_id) ⇒ DriverLicenseV1Document
Returns a new instance of DriverLicenseV1Document.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 66 def initialize(prediction, page_id) super() @address = StringField.new(prediction['address'], page_id) @date_of_birth = DateField.new(prediction['date_of_birth'], page_id) @dd_number = StringField.new(prediction['dd_number'], page_id) @dl_class = StringField.new(prediction['dl_class'], page_id) @driver_license_id = StringField.new(prediction['driver_license_id'], page_id) @endorsements = StringField.new(prediction['endorsements'], page_id) @expiry_date = DateField.new(prediction['expiry_date'], page_id) @eye_color = StringField.new(prediction['eye_color'], page_id) @first_name = StringField.new(prediction['first_name'], page_id) @hair_color = StringField.new(prediction['hair_color'], page_id) @height = StringField.new(prediction['height'], page_id) @issued_date = DateField.new(prediction['issued_date'], page_id) @last_name = StringField.new(prediction['last_name'], page_id) @restrictions = StringField.new(prediction['restrictions'], page_id) @sex = StringField.new(prediction['sex'], page_id) @state = StringField.new(prediction['state'], page_id) @weight = StringField.new(prediction['weight'], page_id) end |
Instance Attribute Details
#address ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders address
14 15 16 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 14 def address @address end |
#date_of_birth ⇒ Mindee::Parsing::Standard::DateField (readonly)
US driver license holders date of birth
17 18 19 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 17 def date_of_birth @date_of_birth end |
#dd_number ⇒ Mindee::Parsing::Standard::StringField (readonly)
Document Discriminator Number of the US Driver License
20 21 22 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 20 def dd_number @dd_number end |
#dl_class ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders class
23 24 25 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 23 def dl_class @dl_class end |
#driver_license_id ⇒ Mindee::Parsing::Standard::StringField (readonly)
ID number of the US Driver License.
26 27 28 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 26 def driver_license_id @driver_license_id end |
#endorsements ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders endorsements
29 30 31 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 29 def endorsements @endorsements end |
#expiry_date ⇒ Mindee::Parsing::Standard::DateField (readonly)
Date on which the documents expires.
32 33 34 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 32 def expiry_date @expiry_date end |
#eye_color ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders eye colour
35 36 37 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 35 def eye_color @eye_color end |
#first_name ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders first name(s)
38 39 40 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 38 def first_name @first_name end |
#hair_color ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders hair colour
41 42 43 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 41 def hair_color @hair_color end |
#height ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders hight
44 45 46 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 44 def height @height end |
#issued_date ⇒ Mindee::Parsing::Standard::DateField (readonly)
Date on which the documents was issued.
47 48 49 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 47 def issued_date @issued_date end |
#last_name ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders last name
50 51 52 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 50 def last_name @last_name end |
#restrictions ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders restrictions
53 54 55 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 53 def restrictions @restrictions end |
#sex ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders gender
56 57 58 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 56 def sex @sex end |
#state ⇒ Mindee::Parsing::Standard::StringField (readonly)
US State
59 60 61 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 59 def state @state end |
#weight ⇒ Mindee::Parsing::Standard::StringField (readonly)
US driver license holders weight
62 63 64 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 62 def weight @weight end |
Instance Method Details
#to_s ⇒ String
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/mindee/product/us/driver_license/driver_license_v1_document.rb', line 88 def to_s out_str = String.new out_str << "\n:State: #{@state}".rstrip out_str << "\n:Driver License ID: #{@driver_license_id}".rstrip out_str << "\n:Expiry Date: #{@expiry_date}".rstrip out_str << "\n:Date Of Issue: #{@issued_date}".rstrip out_str << "\n:Last Name: #{@last_name}".rstrip out_str << "\n:First Name: #{@first_name}".rstrip out_str << "\n:Address: #{@address}".rstrip out_str << "\n:Date Of Birth: #{@date_of_birth}".rstrip out_str << "\n:Restrictions: #{@restrictions}".rstrip out_str << "\n:Endorsements: #{@endorsements}".rstrip out_str << "\n:Driver License Class: #{@dl_class}".rstrip out_str << "\n:Sex: #{@sex}".rstrip out_str << "\n:Height: #{@height}".rstrip out_str << "\n:Weight: #{@weight}".rstrip out_str << "\n:Hair Color: #{@hair_color}".rstrip out_str << "\n:Eye Color: #{@eye_color}".rstrip out_str << "\n:Document Discriminator: #{@dd_number}".rstrip out_str[1..].to_s end |