mindee 3.15.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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/bin/mindee.rb +20 -2
  4. data/docs/business_card_v1.md +169 -0
  5. data/docs/code_samples/{international_id_v1_async.txt → business_card_v1_async.txt} +1 -1
  6. data/docs/code_samples/delivery_notes_v1_async.txt +19 -0
  7. data/docs/code_samples/driver_license_v1_async.txt +19 -0
  8. data/docs/code_samples/expense_receipts_v5_async.txt +19 -0
  9. data/docs/code_samples/french_healthcard_v1_async.txt +19 -0
  10. data/docs/code_samples/ind_passport_v1_async.txt +19 -0
  11. data/docs/code_samples/payslip_fra_v3_async.txt +19 -0
  12. data/docs/code_samples/workflow_execution.txt +29 -0
  13. data/docs/delivery_notes_v1.md +143 -0
  14. data/docs/driver_license_v1.md +156 -0
  15. data/docs/energy_bill_fra_v1.md +2 -2
  16. data/docs/expense_receipts_v5.md +27 -2
  17. data/docs/financial_document_v1.md +8 -4
  18. data/docs/{carte_vitale_v1.md → french_healthcard_v1.md} +14 -24
  19. data/docs/ind_passport_v1.md +281 -0
  20. data/docs/invoices_v4.md +12 -8
  21. data/docs/payslip_fra_v3.md +319 -0
  22. data/docs/resume_v1.md +17 -16
  23. data/lib/mindee/client.rb +48 -8
  24. data/lib/mindee/http/workflow_endpoint.rb +90 -0
  25. data/lib/mindee/http.rb +1 -0
  26. data/lib/mindee/parsing/common/api_response.rb +22 -1
  27. data/lib/mindee/parsing/common/execution.rb +73 -0
  28. data/lib/mindee/parsing/common/execution_file.rb +24 -0
  29. data/lib/mindee/parsing/common/execution_priority.rb +30 -0
  30. data/lib/mindee/parsing/common.rb +3 -0
  31. data/lib/mindee/product/{international_id/international_id_v1.rb → business_card/business_card_v1.rb} +9 -9
  32. data/lib/mindee/product/business_card/business_card_v1_document.rb +85 -0
  33. data/lib/mindee/product/{international_id/international_id_v1_page.rb → business_card/business_card_v1_page.rb} +7 -7
  34. data/lib/mindee/product/delivery_note/delivery_note_v1.rb +39 -0
  35. data/lib/mindee/product/delivery_note/delivery_note_v1_document.rb +61 -0
  36. data/lib/mindee/product/delivery_note/delivery_note_v1_page.rb +32 -0
  37. data/lib/mindee/product/driver_license/driver_license_v1.rb +39 -0
  38. data/lib/mindee/product/driver_license/driver_license_v1_document.rb +91 -0
  39. data/lib/mindee/product/driver_license/driver_license_v1_page.rb +32 -0
  40. data/lib/mindee/product/financial_document/financial_document_v1_document.rb +1 -1
  41. data/lib/mindee/product/financial_document/financial_document_v1_page.rb +1 -1
  42. data/lib/mindee/product/fr/health_card/health_card_v1.rb +41 -0
  43. data/lib/mindee/product/fr/health_card/health_card_v1_document.rb +52 -0
  44. data/lib/mindee/product/fr/health_card/health_card_v1_page.rb +34 -0
  45. data/lib/mindee/product/fr/payslip/payslip_v3.rb +41 -0
  46. data/lib/mindee/product/fr/payslip/payslip_v3_bank_account_detail.rb +54 -0
  47. data/lib/mindee/product/fr/payslip/payslip_v3_document.rb +166 -0
  48. data/lib/mindee/product/fr/payslip/payslip_v3_employee.rb +78 -0
  49. data/lib/mindee/product/fr/payslip/payslip_v3_employer.rb +78 -0
  50. data/lib/mindee/product/fr/payslip/payslip_v3_employment.rb +78 -0
  51. data/lib/mindee/product/fr/payslip/payslip_v3_page.rb +34 -0
  52. data/lib/mindee/product/fr/payslip/payslip_v3_paid_time_off.rb +89 -0
  53. data/lib/mindee/product/fr/payslip/payslip_v3_pay_detail.rb +100 -0
  54. data/lib/mindee/product/fr/payslip/payslip_v3_pay_period.rb +66 -0
  55. data/lib/mindee/product/fr/payslip/payslip_v3_salary_detail.rb +89 -0
  56. data/lib/mindee/product/ind/indian_passport/indian_passport_v1.rb +41 -0
  57. data/lib/mindee/product/ind/indian_passport/indian_passport_v1_document.rb +143 -0
  58. data/lib/mindee/product/ind/indian_passport/indian_passport_v1_page.rb +34 -0
  59. data/lib/mindee/product/invoice/invoice_v4_document.rb +1 -1
  60. data/lib/mindee/product/invoice/invoice_v4_page.rb +1 -1
  61. data/lib/mindee/product/resume/resume_v1_document.rb +3 -1
  62. data/lib/mindee/product/resume/resume_v1_page.rb +1 -1
  63. data/lib/mindee/product/resume/resume_v1_professional_experience.rb +8 -0
  64. data/lib/mindee/product.rb +13 -8
  65. data/lib/mindee/version.rb +1 -1
  66. metadata +46 -10
  67. data/docs/eu_driver_license_v1.md +0 -227
  68. data/docs/proof_of_address_v1.md +0 -211
  69. data/docs/us_driver_license_v1.md +0 -272
  70. data/lib/mindee/product/international_id/international_id_v1_document.rb +0 -109
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d356c6733d8a7d00973b219dbae06199040ca8d4bece4eb3906c8ec873aebf0
4
- data.tar.gz: ab240a95c8538891aa4a3ef48285903daa06cebaf13f9578eff1a9675258d3bb
3
+ metadata.gz: 12e0bc8339961d2e6be4c5dfdc9537d34ab63f449c435275324b95c031299764
4
+ data.tar.gz: 24021ef9d0175075365efc9e056d67f3d553b1ad7b95a5a2876d29fcff15031c
5
5
  SHA512:
6
- metadata.gz: ec71145b9604ba30c77a842a33c89c1ad4ab4c70301c3eed2292bc95803dd112ee99c964289ca88c16ddffcb6a37f63130b30a23326b4359929791d0dcef4214
7
- data.tar.gz: 0c20c191f6abe4166075a1745860ba500a488294bcb59e2a28e0b61a3bcee07a25be2adfef113d045727eeaf10f935278271a7d259f78d63e580bf8eda3833f3
6
+ metadata.gz: df5dc07d28d67b0e1fe1c64c3123aeb3f9c8926264aed396fdd64858f8b06d6d2485745c61d15c35e0ae3f92ee6773eaacbdc86ba3256cefd7349fb0ff90533a
7
+ data.tar.gz: e07e7b776f21398ce3a9197fb54afef57361ffda29c198564da9ffa1fa0eea85830c7d1601177c241219bea60c61cbb9cbcec66ad0c80d55ffcc7aab0e8cfe4f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Mindee Ruby API Library Changelog
2
2
 
3
+ ## v3.17.0 - 2024-11-28
4
+ ### Changes
5
+ * :sparkles: add support for workflows
6
+ * :sparkles: add support for French Health Card V1
7
+ * :sparkles: add support for Driver License V1
8
+ * :sparkles: add support for Payslip FR V3
9
+ * :coffin: remove support for international ID V1
10
+
11
+ ## v3.16.0 - 2024-11-14
12
+ ### Changes
13
+ * :sparkles: add support for business cards V1
14
+ * :sparkles: add support for delivery note V1.1
15
+ * :sparkles: add support for indian passport V1
16
+ * :sparkles: add support for resume V1.1
17
+ ### Fixes
18
+ * :recycle: adjust default values for async delays
19
+
20
+
3
21
  ## v3.15.0 - 2024-10-29
4
22
  ### Changes
5
23
  * :sparkles: add support for image compression
data/bin/mindee.rb CHANGED
@@ -41,7 +41,7 @@ DOCUMENTS = {
41
41
  description: 'Invoice',
42
42
  doc_class: Mindee::Product::Invoice::InvoiceV4,
43
43
  sync: true,
44
- async: false,
44
+ async: true,
45
45
  },
46
46
  "international-id" => {
47
47
  description: 'International Id',
@@ -53,7 +53,13 @@ DOCUMENTS = {
53
53
  description: "Expense Receipt",
54
54
  doc_class: Mindee::Product::Receipt::ReceiptV5,
55
55
  sync: true,
56
- async: false,
56
+ async: true,
57
+ },
58
+ "driver-license" => {
59
+ description: "Driver License",
60
+ doc_class: Mindee::Product::DriverLicense::DriverLicenseV1,
61
+ sync: false,
62
+ async: true,
57
63
  },
58
64
  "resume" => {
59
65
  description: "Resume",
@@ -103,6 +109,18 @@ DOCUMENTS = {
103
109
  sync: true,
104
110
  async: false,
105
111
  },
112
+ "fr-health-card" => {
113
+ description: "FR Health Card",
114
+ doc_class: Mindee::Product::FR::HealthCard::HealthCardV1,
115
+ sync: false,
116
+ async: true,
117
+ },
118
+ "fr-payslip" => {
119
+ description: "FR Payslip",
120
+ doc_class: Mindee::Product::FR::Payslip::PayslipV3,
121
+ sync: false,
122
+ async: true,
123
+ },
106
124
  "us-bank-check" => {
107
125
  description: "US Bank Check",
108
126
  doc_class: Mindee::Product::US::BankCheck::BankCheckV1,
@@ -0,0 +1,169 @@
1
+ ---
2
+ title: Business Card OCR Ruby
3
+ category: 622b805aaec68102ea7fcbc2
4
+ slug: ruby-business-card-ocr
5
+ parentDoc: 6294d97ee723f1008d2ab28e
6
+ ---
7
+ The Ruby OCR SDK supports the [Business Card API](https://platform.mindee.com/mindee/business_card).
8
+
9
+ Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/business_card/default_sample.jpg), we are going to illustrate how to extract the data that we want using the OCR SDK.
10
+ ![Business Card sample](https://github.com/mindee/client-lib-test-data/blob/main/products/business_card/default_sample.jpg?raw=true)
11
+
12
+ # Quick-Start
13
+ ```rb
14
+ require 'mindee'
15
+
16
+ # Init a new client
17
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
18
+
19
+ # Load a file from disk
20
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
21
+
22
+ # Parse the file
23
+ result = mindee_client.enqueue_and_parse(
24
+ input_source,
25
+ Mindee::Product::BusinessCard::BusinessCardV1
26
+ )
27
+
28
+ # Print a full summary of the parsed data in RST format
29
+ puts result.document
30
+
31
+ # Print the document-level parsed data
32
+ # puts result.document.inference.prediction
33
+
34
+ ```
35
+
36
+ **Output (RST):**
37
+ ```rst
38
+ ########
39
+ Document
40
+ ########
41
+ :Mindee ID: 6f9a261f-7609-4687-9af0-46a45156566e
42
+ :Filename: default_sample.jpg
43
+
44
+ Inference
45
+ #########
46
+ :Product: mindee/business_card v1.0
47
+ :Rotation applied: Yes
48
+
49
+ Prediction
50
+ ==========
51
+ :Firstname: Andrew
52
+ :Lastname: Morin
53
+ :Job Title: Founder & CEO
54
+ :Company: RemoteGlobal
55
+ :Email: amorin@remoteglobalconsulting.com
56
+ :Phone Number: +14015555555
57
+ :Mobile Number: +13015555555
58
+ :Fax Number: +14015555556
59
+ :Address: 178 Main Avenue, Providence, RI 02111
60
+ :Website: www.remoteglobalconsulting.com
61
+ :Social Media: https://www.linkedin.com/in/johndoe
62
+ https://twitter.com/johndoe
63
+ ```
64
+
65
+ # Field Types
66
+ ## Standard Fields
67
+ These fields are generic and used in several products.
68
+
69
+ ### Basic Field
70
+ Each prediction object contains a set of fields that inherit from the generic `Field` class.
71
+ A typical `Field` object will have the following attributes:
72
+
73
+ * **value** (`String`, `Float`, `Integer`, `Boolean`): corresponds to the field value. Can be `nil` if no value was extracted.
74
+ * **confidence** (Float, nil): the confidence score of the field prediction.
75
+ * **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
76
+ * **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
77
+ * **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
78
+ * **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
79
+
80
+
81
+ Aside from the previous attributes, all basic fields have access to a `to_s` method that can be used to print their value as a string.
82
+
83
+ ### String Field
84
+ The text field `StringField` only has one constraint: it's **value** is a `String` (or `nil`).
85
+
86
+ # Attributes
87
+ The following fields are extracted for Business Card V1:
88
+
89
+ ## Address
90
+ **address** ([StringField](#string-field)): The address of the person.
91
+
92
+ ```rb
93
+ puts result.document.inference.prediction.address.value
94
+ ```
95
+
96
+ ## Company
97
+ **company** ([StringField](#string-field)): The company the person works for.
98
+
99
+ ```rb
100
+ puts result.document.inference.prediction.company.value
101
+ ```
102
+
103
+ ## Email
104
+ **email** ([StringField](#string-field)): The email address of the person.
105
+
106
+ ```rb
107
+ puts result.document.inference.prediction.email.value
108
+ ```
109
+
110
+ ## Fax Number
111
+ **fax_number** ([StringField](#string-field)): The Fax number of the person.
112
+
113
+ ```rb
114
+ puts result.document.inference.prediction.fax_number.value
115
+ ```
116
+
117
+ ## Firstname
118
+ **firstname** ([StringField](#string-field)): The given name of the person.
119
+
120
+ ```rb
121
+ puts result.document.inference.prediction.firstname.value
122
+ ```
123
+
124
+ ## Job Title
125
+ **job_title** ([StringField](#string-field)): The job title of the person.
126
+
127
+ ```rb
128
+ puts result.document.inference.prediction.job_title.value
129
+ ```
130
+
131
+ ## Lastname
132
+ **lastname** ([StringField](#string-field)): The lastname of the person.
133
+
134
+ ```rb
135
+ puts result.document.inference.prediction.lastname.value
136
+ ```
137
+
138
+ ## Mobile Number
139
+ **mobile_number** ([StringField](#string-field)): The mobile number of the person.
140
+
141
+ ```rb
142
+ puts result.document.inference.prediction.mobile_number.value
143
+ ```
144
+
145
+ ## Phone Number
146
+ **phone_number** ([StringField](#string-field)): The phone number of the person.
147
+
148
+ ```rb
149
+ puts result.document.inference.prediction.phone_number.value
150
+ ```
151
+
152
+ ## Social Media
153
+ **social_media** (Array<[StringField](#string-field)>): The social media profiles of the person or company.
154
+
155
+ ```rb
156
+ for social_media_elem in result.document.inference.prediction.social_media do
157
+ puts social_media_elem.value
158
+ end
159
+ ```
160
+
161
+ ## Website
162
+ **website** ([StringField](#string-field)): The website of the person or company.
163
+
164
+ ```rb
165
+ puts result.document.inference.prediction.website.value
166
+ ```
167
+
168
+ # Questions?
169
+ [Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)
@@ -9,7 +9,7 @@ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
9
9
  # Parse the file
10
10
  result = mindee_client.enqueue_and_parse(
11
11
  input_source,
12
- Mindee::Product::InternationalId::InternationalIdV1
12
+ Mindee::Product::BusinessCard::BusinessCardV1
13
13
  )
14
14
 
15
15
  # Print a full summary of the parsed data in RST format
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::DeliveryNote::DeliveryNoteV1
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::DriverLicense::DriverLicenseV1
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::Receipt::ReceiptV5
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::FR::HealthCard::HealthCardV1
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::IND::IndianPassport::IndianPassportV1
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,19 @@
1
+ require 'mindee'
2
+
3
+ # Init a new client
4
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5
+
6
+ # Load a file from disk
7
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
8
+
9
+ # Parse the file
10
+ result = mindee_client.enqueue_and_parse(
11
+ input_source,
12
+ Mindee::Product::FR::Payslip::PayslipV3
13
+ )
14
+
15
+ # Print a full summary of the parsed data in RST format
16
+ puts result.document
17
+
18
+ # Print the document-level parsed data
19
+ # puts result.document.inference.prediction
@@ -0,0 +1,29 @@
1
+ require 'mindee'
2
+
3
+ workflow_id = 'workflow-id'
4
+
5
+ # Init a new client
6
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
7
+
8
+ # Load a file from disk
9
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
10
+
11
+ # Send the file to the workflow
12
+ result = mindee_client.execute_workflow(
13
+ input_source,
14
+ workflow_id
15
+ )
16
+
17
+ # Alternatively, set an alias & a priority for the execution.
18
+ # result = mindee_client.execute_workflow(
19
+ # input_source,
20
+ # workflow_id,
21
+ # document_alias: "my-alias",
22
+ # priority: Mindee::Parsing::Common::ExecutionPriority::LOW
23
+ # )
24
+
25
+ # Print the execution's ID to make sure it worked
26
+ puts result.execution.id
27
+
28
+ # Print the inference, if present
29
+ # puts result.document.inference
@@ -0,0 +1,143 @@
1
+ ---
2
+ title: Delivery note OCR Ruby
3
+ category: 622b805aaec68102ea7fcbc2
4
+ slug: ruby-delivery-note-ocr
5
+ parentDoc: 6294d97ee723f1008d2ab28e
6
+ ---
7
+ The Ruby OCR SDK supports the [Delivery note API](https://platform.mindee.com/mindee/delivery_notes).
8
+
9
+ Using the [sample below](https://github.com/mindee/client-lib-test-data/blob/main/products/delivery_notes/default_sample.jpg), we are going to illustrate how to extract the data that we want using the OCR SDK.
10
+ ![Delivery note sample](https://github.com/mindee/client-lib-test-data/blob/main/products/delivery_notes/default_sample.jpg?raw=true)
11
+
12
+ # Quick-Start
13
+ ```rb
14
+ require 'mindee'
15
+
16
+ # Init a new client
17
+ mindee_client = Mindee::Client.new(api_key: 'my-api-key')
18
+
19
+ # Load a file from disk
20
+ input_source = mindee_client.source_from_path('/path/to/the/file.ext')
21
+
22
+ # Parse the file
23
+ result = mindee_client.enqueue_and_parse(
24
+ input_source,
25
+ Mindee::Product::DeliveryNote::DeliveryNoteV1
26
+ )
27
+
28
+ # Print a full summary of the parsed data in RST format
29
+ puts result.document
30
+
31
+ # Print the document-level parsed data
32
+ # puts result.document.inference.prediction
33
+
34
+ ```
35
+
36
+ **Output (RST):**
37
+ ```rst
38
+ ########
39
+ Document
40
+ ########
41
+ :Mindee ID: d5ead821-edec-4d31-a69a-cf3998d9a506
42
+ :Filename: default_sample.jpg
43
+
44
+ Inference
45
+ #########
46
+ :Product: mindee/delivery_notes v1.0
47
+ :Rotation applied: Yes
48
+
49
+ Prediction
50
+ ==========
51
+ :Delivery Date: 2019-10-02
52
+ :Delivery Number: INT-001
53
+ :Supplier Name: John Smith
54
+ :Supplier Address: 4490 Oak Drive, Albany, NY 12210
55
+ :Customer Name: Jessie M Horne
56
+ :Customer Address: 4312 Wood Road, New York, NY 10031
57
+ :Total Amount: 204.75
58
+ ```
59
+
60
+ # Field Types
61
+ ## Standard Fields
62
+ These fields are generic and used in several products.
63
+
64
+ ### Basic Field
65
+ Each prediction object contains a set of fields that inherit from the generic `Field` class.
66
+ A typical `Field` object will have the following attributes:
67
+
68
+ * **value** (`String`, `Float`, `Integer`, `Boolean`): corresponds to the field value. Can be `nil` if no value was extracted.
69
+ * **confidence** (Float, nil): the confidence score of the field prediction.
70
+ * **bounding_box** (`Mindee::Geometry::Quadrilateral`, `nil`): contains exactly 4 relative vertices (points) coordinates of a right rectangle containing the field in the document.
71
+ * **polygon** (`Mindee::Geometry::Polygon`, `nil`): contains the relative vertices coordinates (`Point`) of a polygon containing the field in the image.
72
+ * **page_id** (`Integer`, `nil`): the ID of the page, always `nil` when at document-level.
73
+ * **reconstructed** (`Boolean`): indicates whether an object was reconstructed (not extracted as the API gave it).
74
+
75
+
76
+ Aside from the previous attributes, all basic fields have access to a `to_s` method that can be used to print their value as a string.
77
+
78
+
79
+ ### Amount Field
80
+ The amount field `AmountField` only has one constraint: its **value** is a `Float` (or `nil`).
81
+
82
+ ### Date Field
83
+ Aside from the basic `Field` attributes, the date field `DateField` also implements the following:
84
+
85
+ * **date_object** (`Date`): an accessible representation of the value as a JavaScript object.
86
+
87
+ ### String Field
88
+ The text field `StringField` only has one constraint: it's **value** is a `String` (or `nil`).
89
+
90
+ # Attributes
91
+ The following fields are extracted for Delivery note V1:
92
+
93
+ ## Customer Address
94
+ **customer_address** ([StringField](#string-field)): The address of the customer receiving the goods.
95
+
96
+ ```rb
97
+ puts result.document.inference.prediction.customer_address.value
98
+ ```
99
+
100
+ ## Customer Name
101
+ **customer_name** ([StringField](#string-field)): The name of the customer receiving the goods.
102
+
103
+ ```rb
104
+ puts result.document.inference.prediction.customer_name.value
105
+ ```
106
+
107
+ ## Delivery Date
108
+ **delivery_date** ([DateField](#date-field)): The date on which the delivery is scheduled to arrive.
109
+
110
+ ```rb
111
+ puts result.document.inference.prediction.delivery_date.value
112
+ ```
113
+
114
+ ## Delivery Number
115
+ **delivery_number** ([StringField](#string-field)): A unique identifier for the delivery note.
116
+
117
+ ```rb
118
+ puts result.document.inference.prediction.delivery_number.value
119
+ ```
120
+
121
+ ## Supplier Address
122
+ **supplier_address** ([StringField](#string-field)): The address of the supplier providing the goods.
123
+
124
+ ```rb
125
+ puts result.document.inference.prediction.supplier_address.value
126
+ ```
127
+
128
+ ## Supplier Name
129
+ **supplier_name** ([StringField](#string-field)): The name of the supplier providing the goods.
130
+
131
+ ```rb
132
+ puts result.document.inference.prediction.supplier_name.value
133
+ ```
134
+
135
+ ## Total Amount
136
+ **total_amount** ([AmountField](#amount-field)): The total monetary value of the goods being delivered.
137
+
138
+ ```rb
139
+ puts result.document.inference.prediction.total_amount.value
140
+ ```
141
+
142
+ # Questions?
143
+ [Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)