mindee 3.16.0 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/bin/mindee.rb +20 -2
- data/docs/code_samples/{international_id_v1_async.txt → driver_license_v1_async.txt} +1 -1
- data/docs/code_samples/french_healthcard_v1_async.txt +19 -0
- data/docs/code_samples/payslip_fra_v3_async.txt +19 -0
- data/docs/code_samples/workflow_execution.txt +29 -0
- data/docs/driver_license_v1.md +156 -0
- data/docs/{carte_vitale_v1.md → french_healthcard_v1.md} +14 -24
- data/docs/payslip_fra_v3.md +319 -0
- data/lib/mindee/client.rb +40 -0
- data/lib/mindee/http/workflow_endpoint.rb +90 -0
- data/lib/mindee/http.rb +1 -0
- data/lib/mindee/parsing/common/api_response.rb +22 -1
- data/lib/mindee/parsing/common/execution.rb +73 -0
- data/lib/mindee/parsing/common/execution_file.rb +24 -0
- data/lib/mindee/parsing/common/execution_priority.rb +30 -0
- data/lib/mindee/parsing/common.rb +3 -0
- data/lib/mindee/product/{international_id/international_id_v1.rb → driver_license/driver_license_v1.rb} +9 -9
- data/lib/mindee/product/driver_license/driver_license_v1_document.rb +91 -0
- data/lib/mindee/product/{international_id/international_id_v1_page.rb → driver_license/driver_license_v1_page.rb} +7 -7
- data/lib/mindee/product/fr/health_card/health_card_v1.rb +41 -0
- data/lib/mindee/product/fr/health_card/health_card_v1_document.rb +52 -0
- data/lib/mindee/product/fr/health_card/health_card_v1_page.rb +34 -0
- data/lib/mindee/product/fr/payslip/payslip_v3.rb +41 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_bank_account_detail.rb +54 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_document.rb +166 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_employee.rb +78 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_employer.rb +78 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_employment.rb +78 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_page.rb +34 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_paid_time_off.rb +89 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_pay_detail.rb +100 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_pay_period.rb +66 -0
- data/lib/mindee/product/fr/payslip/payslip_v3_salary_detail.rb +89 -0
- data/lib/mindee/product/resume/resume_v1_document.rb +1 -1
- data/lib/mindee/product/resume/resume_v1_page.rb +1 -1
- data/lib/mindee/product.rb +3 -1
- data/lib/mindee/version.rb +1 -1
- metadata +30 -10
- data/docs/eu_driver_license_v1.md +0 -227
- data/docs/proof_of_address_v1.md +0 -211
- data/docs/us_driver_license_v1.md +0 -272
- data/lib/mindee/product/international_id/international_id_v1_document.rb +0 -109
@@ -1,109 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../../parsing'
|
4
|
-
|
5
|
-
module Mindee
|
6
|
-
module Product
|
7
|
-
module InternationalId
|
8
|
-
# International ID V1 document prediction.
|
9
|
-
class InternationalIdV1Document < Mindee::Parsing::Common::Prediction
|
10
|
-
include Mindee::Parsing::Standard
|
11
|
-
# The physical location of the document holder's residence.
|
12
|
-
# @return [Mindee::Parsing::Standard::StringField]
|
13
|
-
attr_reader :address
|
14
|
-
# The date of birth of the document holder.
|
15
|
-
# @return [Mindee::Parsing::Standard::DateField]
|
16
|
-
attr_reader :birth_date
|
17
|
-
# The location where the document holder was born.
|
18
|
-
# @return [Mindee::Parsing::Standard::StringField]
|
19
|
-
attr_reader :birth_place
|
20
|
-
# The country that issued the identification document.
|
21
|
-
# @return [Mindee::Parsing::Standard::StringField]
|
22
|
-
attr_reader :country_of_issue
|
23
|
-
# The unique identifier assigned to the identification document.
|
24
|
-
# @return [Mindee::Parsing::Standard::StringField]
|
25
|
-
attr_reader :document_number
|
26
|
-
# The type of identification document being used.
|
27
|
-
# @return [Mindee::Parsing::Standard::ClassificationField]
|
28
|
-
attr_reader :document_type
|
29
|
-
# The date when the document will no longer be valid for use.
|
30
|
-
# @return [Mindee::Parsing::Standard::DateField]
|
31
|
-
attr_reader :expiry_date
|
32
|
-
# The first names or given names of the document holder.
|
33
|
-
# @return [Array<Mindee::Parsing::Standard::StringField>]
|
34
|
-
attr_reader :given_names
|
35
|
-
# The date when the document was issued.
|
36
|
-
# @return [Mindee::Parsing::Standard::DateField]
|
37
|
-
attr_reader :issue_date
|
38
|
-
# First line of information in a standardized format for easy machine reading and processing.
|
39
|
-
# @return [Mindee::Parsing::Standard::StringField]
|
40
|
-
attr_reader :mrz1
|
41
|
-
# Second line of information in a standardized format for easy machine reading and processing.
|
42
|
-
# @return [Mindee::Parsing::Standard::StringField]
|
43
|
-
attr_reader :mrz2
|
44
|
-
# Third line of information in a standardized format for easy machine reading and processing.
|
45
|
-
# @return [Mindee::Parsing::Standard::StringField]
|
46
|
-
attr_reader :mrz3
|
47
|
-
# Indicates the country of citizenship or nationality of the document holder.
|
48
|
-
# @return [Mindee::Parsing::Standard::StringField]
|
49
|
-
attr_reader :nationality
|
50
|
-
# The document holder's biological sex, such as male or female.
|
51
|
-
# @return [Mindee::Parsing::Standard::StringField]
|
52
|
-
attr_reader :sex
|
53
|
-
# The surnames of the document holder.
|
54
|
-
# @return [Array<Mindee::Parsing::Standard::StringField>]
|
55
|
-
attr_reader :surnames
|
56
|
-
|
57
|
-
# @param prediction [Hash]
|
58
|
-
# @param page_id [Integer, nil]
|
59
|
-
def initialize(prediction, page_id)
|
60
|
-
super()
|
61
|
-
@address = StringField.new(prediction['address'], page_id)
|
62
|
-
@birth_date = DateField.new(prediction['birth_date'], page_id)
|
63
|
-
@birth_place = StringField.new(prediction['birth_place'], page_id)
|
64
|
-
@country_of_issue = StringField.new(prediction['country_of_issue'], page_id)
|
65
|
-
@document_number = StringField.new(prediction['document_number'], page_id)
|
66
|
-
@document_type = ClassificationField.new(prediction['document_type'], page_id)
|
67
|
-
@expiry_date = DateField.new(prediction['expiry_date'], page_id)
|
68
|
-
@given_names = []
|
69
|
-
prediction['given_names'].each do |item|
|
70
|
-
@given_names.push(StringField.new(item, page_id))
|
71
|
-
end
|
72
|
-
@issue_date = DateField.new(prediction['issue_date'], page_id)
|
73
|
-
@mrz1 = StringField.new(prediction['mrz1'], page_id)
|
74
|
-
@mrz2 = StringField.new(prediction['mrz2'], page_id)
|
75
|
-
@mrz3 = StringField.new(prediction['mrz3'], page_id)
|
76
|
-
@nationality = StringField.new(prediction['nationality'], page_id)
|
77
|
-
@sex = StringField.new(prediction['sex'], page_id)
|
78
|
-
@surnames = []
|
79
|
-
prediction['surnames'].each do |item|
|
80
|
-
@surnames.push(StringField.new(item, page_id))
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
# @return [String]
|
85
|
-
def to_s
|
86
|
-
surnames = @surnames.join("\n #{' ' * 10}")
|
87
|
-
given_names = @given_names.join("\n #{' ' * 13}")
|
88
|
-
out_str = String.new
|
89
|
-
out_str << "\n:Document Type: #{@document_type}".rstrip
|
90
|
-
out_str << "\n:Document Number: #{@document_number}".rstrip
|
91
|
-
out_str << "\n:Country of Issue: #{@country_of_issue}".rstrip
|
92
|
-
out_str << "\n:Surnames: #{surnames}".rstrip
|
93
|
-
out_str << "\n:Given Names: #{given_names}".rstrip
|
94
|
-
out_str << "\n:Gender: #{@sex}".rstrip
|
95
|
-
out_str << "\n:Birth date: #{@birth_date}".rstrip
|
96
|
-
out_str << "\n:Birth Place: #{@birth_place}".rstrip
|
97
|
-
out_str << "\n:Nationality: #{@nationality}".rstrip
|
98
|
-
out_str << "\n:Issue Date: #{@issue_date}".rstrip
|
99
|
-
out_str << "\n:Expiry Date: #{@expiry_date}".rstrip
|
100
|
-
out_str << "\n:Address: #{@address}".rstrip
|
101
|
-
out_str << "\n:Machine Readable Zone Line 1: #{@mrz1}".rstrip
|
102
|
-
out_str << "\n:Machine Readable Zone Line 2: #{@mrz2}".rstrip
|
103
|
-
out_str << "\n:Machine Readable Zone Line 3: #{@mrz3}".rstrip
|
104
|
-
out_str[1..].to_s
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|