mindee 3.7.0 → 3.8.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 +7 -1
- data/docs/financial_document_v1.md +53 -8
- data/docs/invoices_v4.md +42 -6
- data/lib/mindee/product/barcode_reader/barcode_reader_v1.rb +1 -1
- data/lib/mindee/product/barcode_reader/barcode_reader_v1_document.rb +1 -1
- data/lib/mindee/product/barcode_reader/barcode_reader_v1_page.rb +1 -1
- data/lib/mindee/product/cropper/cropper_v1.rb +1 -1
- data/lib/mindee/product/cropper/cropper_v1_document.rb +1 -1
- data/lib/mindee/product/cropper/cropper_v1_page.rb +1 -1
- data/lib/mindee/product/eu/driver_license/driver_license_v1.rb +1 -1
- data/lib/mindee/product/eu/driver_license/driver_license_v1_document.rb +1 -1
- data/lib/mindee/product/eu/driver_license/driver_license_v1_page.rb +1 -1
- data/lib/mindee/product/eu/license_plate/license_plate_v1.rb +1 -1
- data/lib/mindee/product/eu/license_plate/license_plate_v1_document.rb +1 -1
- data/lib/mindee/product/eu/license_plate/license_plate_v1_page.rb +1 -1
- data/lib/mindee/product/financial_document/financial_document_v1.rb +1 -1
- data/lib/mindee/product/financial_document/financial_document_v1_document.rb +26 -1
- data/lib/mindee/product/financial_document/financial_document_v1_page.rb +1 -1
- data/lib/mindee/product/fr/bank_account_details/bank_account_details_v1.rb +1 -1
- data/lib/mindee/product/fr/bank_account_details/bank_account_details_v1_document.rb +1 -1
- data/lib/mindee/product/fr/bank_account_details/bank_account_details_v1_page.rb +1 -1
- data/lib/mindee/product/fr/bank_account_details/bank_account_details_v2.rb +1 -1
- data/lib/mindee/product/fr/bank_account_details/bank_account_details_v2_document.rb +1 -1
- data/lib/mindee/product/fr/bank_account_details/bank_account_details_v2_page.rb +1 -1
- data/lib/mindee/product/fr/carte_grise/carte_grise_v1.rb +1 -1
- data/lib/mindee/product/fr/carte_grise/carte_grise_v1_document.rb +1 -1
- data/lib/mindee/product/fr/carte_grise/carte_grise_v1_page.rb +1 -1
- data/lib/mindee/product/fr/carte_vitale/carte_vitale_v1.rb +1 -1
- data/lib/mindee/product/fr/carte_vitale/carte_vitale_v1_document.rb +1 -1
- data/lib/mindee/product/fr/carte_vitale/carte_vitale_v1_page.rb +1 -1
- data/lib/mindee/product/fr/id_card/id_card_v1.rb +1 -1
- data/lib/mindee/product/fr/id_card/id_card_v1_document.rb +1 -1
- data/lib/mindee/product/fr/id_card/id_card_v1_page.rb +1 -1
- data/lib/mindee/product/fr/id_card/id_card_v2.rb +1 -1
- data/lib/mindee/product/fr/id_card/id_card_v2_document.rb +1 -1
- data/lib/mindee/product/fr/id_card/id_card_v2_page.rb +1 -1
- data/lib/mindee/product/international_id/international_id_v2.rb +1 -1
- data/lib/mindee/product/international_id/international_id_v2_document.rb +1 -1
- data/lib/mindee/product/international_id/international_id_v2_page.rb +1 -1
- data/lib/mindee/product/invoice/invoice_v4.rb +1 -1
- data/lib/mindee/product/invoice/invoice_v4_document.rb +21 -1
- data/lib/mindee/product/invoice/invoice_v4_page.rb +1 -1
- data/lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1.rb +1 -1
- data/lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_document.rb +1 -1
- data/lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_page.rb +1 -1
- data/lib/mindee/product/passport/passport_v1.rb +1 -1
- data/lib/mindee/product/passport/passport_v1_document.rb +1 -1
- data/lib/mindee/product/passport/passport_v1_page.rb +1 -1
- data/lib/mindee/product/proof_of_address/proof_of_address_v1.rb +1 -1
- data/lib/mindee/product/proof_of_address/proof_of_address_v1_document.rb +1 -1
- data/lib/mindee/product/proof_of_address/proof_of_address_v1_page.rb +1 -1
- data/lib/mindee/product/receipt/receipt_v5.rb +1 -1
- data/lib/mindee/product/receipt/receipt_v5_document.rb +1 -1
- data/lib/mindee/product/receipt/receipt_v5_page.rb +1 -1
- data/lib/mindee/product/resume/resume_v1.rb +1 -1
- 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/us/bank_check/bank_check_v1.rb +1 -1
- data/lib/mindee/product/us/bank_check/bank_check_v1_document.rb +1 -1
- data/lib/mindee/product/us/bank_check/bank_check_v1_page.rb +1 -1
- data/lib/mindee/product/us/driver_license/driver_license_v1.rb +1 -1
- data/lib/mindee/product/us/driver_license/driver_license_v1_document.rb +1 -1
- data/lib/mindee/product/us/driver_license/driver_license_v1_page.rb +1 -1
- data/lib/mindee/product/us/w9/w9_v1.rb +1 -1
- data/lib/mindee/product/us/w9/w9_v1_document.rb +1 -1
- data/lib/mindee/product/us/w9/w9_v1_page.rb +1 -1
- data/lib/mindee/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d657be2dabdd3f93c49ead9299fa47fdad4d1afbc0115224668ffc43489b923e
|
|
4
|
+
data.tar.gz: 3f36429f4d0302573f0619818f0eb1f26177fbf839f9fbb47ed6b8d5a2abd067
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4457a03fac7ad60960fe271d4672b17615be5e2bedc34d4b679a17ded4a52afa01cdf1d70f01efae77ff34c6f9e5ebb107098c2e33bc2055d9a7275194a95c4e
|
|
7
|
+
data.tar.gz: b2671d071bbef4afc2764f9d56a7d8e60022b403ab77b845b0e74b0f33a3ed47a8b9968308baa3595b9db220516d675250d2c20231c9403a0c3f0e74e96fc5a9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# Mindee Ruby API Library Changelog
|
|
2
2
|
|
|
3
|
-
## v3.
|
|
3
|
+
## v3.8.0 - 2024-05-02
|
|
4
|
+
### Changes
|
|
5
|
+
* :recycle: update products to newer syntax
|
|
6
|
+
* :sparkles: update financial document to v1.6 & invoice to v4.6
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## v3.7.0 - 2024-03-28
|
|
4
10
|
### Changes
|
|
5
11
|
* :sparkles: update Invoice to v4.5
|
|
6
12
|
### Fixes
|
|
@@ -34,20 +34,20 @@ puts result.document
|
|
|
34
34
|
########
|
|
35
35
|
Document
|
|
36
36
|
########
|
|
37
|
-
:Mindee ID:
|
|
37
|
+
:Mindee ID: 503895c6-eced-42e2-a6fc-0292b7ccf680
|
|
38
38
|
:Filename: default_sample.jpg
|
|
39
39
|
|
|
40
40
|
Inference
|
|
41
41
|
#########
|
|
42
|
-
:Product: mindee/financial_document v1.
|
|
42
|
+
:Product: mindee/financial_document v1.6
|
|
43
43
|
:Rotation applied: Yes
|
|
44
44
|
|
|
45
45
|
Prediction
|
|
46
46
|
==========
|
|
47
|
-
:Locale: en;
|
|
47
|
+
:Locale: en; USD;
|
|
48
48
|
:Invoice Number: INT-001
|
|
49
49
|
:Reference Numbers: 2412/2019
|
|
50
|
-
:Purchase Date: 2019-02
|
|
50
|
+
:Purchase Date: 2019-11-02
|
|
51
51
|
:Due Date: 2019-02-26
|
|
52
52
|
:Total Net: 195.00
|
|
53
53
|
:Total Amount: 204.75
|
|
@@ -63,8 +63,13 @@ Prediction
|
|
|
63
63
|
:Supplier Address: 4490 Oak Drive Albany, NY 12210
|
|
64
64
|
:Supplier Phone Number:
|
|
65
65
|
:Customer Name: JESSIE M HORNE
|
|
66
|
+
:Supplier Website:
|
|
67
|
+
:Supplier Email:
|
|
66
68
|
:Customer Company Registrations:
|
|
67
69
|
:Customer Address: 2019 Redbud Drive New York, NY 10011
|
|
70
|
+
:Customer ID: 1234567890
|
|
71
|
+
:Shipping Address: 2019 Redbud Drive New York, NY 10011
|
|
72
|
+
:Billing Address: 4312 Wood Road New York, NY 10031
|
|
68
73
|
:Document Type: INVOICE
|
|
69
74
|
:Purchase Subcategory:
|
|
70
75
|
:Purchase Category: miscellaneous
|
|
@@ -79,7 +84,7 @@ Prediction
|
|
|
79
84
|
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
|
|
80
85
|
| New set of pedal arms | | 2.00 | | | 50.00 | 25.00 |
|
|
81
86
|
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
|
|
82
|
-
|
|
|
87
|
+
| Labor 3hrs | | 3.00 | | | 45.00 | 15.00 |
|
|
83
88
|
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
|
|
84
89
|
|
|
85
90
|
Page Predictions
|
|
@@ -87,10 +92,10 @@ Page Predictions
|
|
|
87
92
|
|
|
88
93
|
Page 0
|
|
89
94
|
------
|
|
90
|
-
:Locale: en;
|
|
95
|
+
:Locale: en; USD;
|
|
91
96
|
:Invoice Number: INT-001
|
|
92
97
|
:Reference Numbers: 2412/2019
|
|
93
|
-
:Purchase Date: 2019-02
|
|
98
|
+
:Purchase Date: 2019-11-02
|
|
94
99
|
:Due Date: 2019-02-26
|
|
95
100
|
:Total Net: 195.00
|
|
96
101
|
:Total Amount: 204.75
|
|
@@ -106,8 +111,13 @@ Page 0
|
|
|
106
111
|
:Supplier Address: 4490 Oak Drive Albany, NY 12210
|
|
107
112
|
:Supplier Phone Number:
|
|
108
113
|
:Customer Name: JESSIE M HORNE
|
|
114
|
+
:Supplier Website:
|
|
115
|
+
:Supplier Email:
|
|
109
116
|
:Customer Company Registrations:
|
|
110
117
|
:Customer Address: 2019 Redbud Drive New York, NY 10011
|
|
118
|
+
:Customer ID: 1234567890
|
|
119
|
+
:Shipping Address: 2019 Redbud Drive New York, NY 10011
|
|
120
|
+
:Billing Address: 4312 Wood Road New York, NY 10031
|
|
111
121
|
:Document Type: INVOICE
|
|
112
122
|
:Purchase Subcategory:
|
|
113
123
|
:Purchase Category: miscellaneous
|
|
@@ -122,7 +132,7 @@ Page 0
|
|
|
122
132
|
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
|
|
123
133
|
| New set of pedal arms | | 2.00 | | | 50.00 | 25.00 |
|
|
124
134
|
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
|
|
125
|
-
|
|
|
135
|
+
| Labor 3hrs | | 3.00 | | | 45.00 | 15.00 |
|
|
126
136
|
+--------------------------------------+--------------+----------+------------+--------------+--------------+------------+
|
|
127
137
|
```
|
|
128
138
|
|
|
@@ -215,6 +225,13 @@ A `FinancialDocumentV1LineItem` implements the following attributes:
|
|
|
215
225
|
# Attributes
|
|
216
226
|
The following fields are extracted for Financial Document V1:
|
|
217
227
|
|
|
228
|
+
## Billing Address
|
|
229
|
+
**billing_address** ([StringField](#string-field)): The customer's address used for billing.
|
|
230
|
+
|
|
231
|
+
```rb
|
|
232
|
+
puts result.document.inference.prediction.billing_address.value
|
|
233
|
+
```
|
|
234
|
+
|
|
218
235
|
## Purchase Category
|
|
219
236
|
**category** ([ClassificationField](#classification-field)): The purchase category among predefined classes.
|
|
220
237
|
|
|
@@ -238,6 +255,13 @@ for customer_company_registrations_elem in result.document.inference.prediction.
|
|
|
238
255
|
end
|
|
239
256
|
```
|
|
240
257
|
|
|
258
|
+
## Customer ID
|
|
259
|
+
**customer_id** ([StringField](#string-field)): The customer account number or identifier from the supplier.
|
|
260
|
+
|
|
261
|
+
```rb
|
|
262
|
+
puts result.document.inference.prediction.customer_id.value
|
|
263
|
+
```
|
|
264
|
+
|
|
241
265
|
## Customer Name
|
|
242
266
|
**customer_name** ([StringField](#string-field)): The name of the customer.
|
|
243
267
|
|
|
@@ -298,6 +322,13 @@ for reference_numbers_elem in result.document.inference.prediction.reference_num
|
|
|
298
322
|
end
|
|
299
323
|
```
|
|
300
324
|
|
|
325
|
+
## Shipping Address
|
|
326
|
+
**shipping_address** ([StringField](#string-field)): The customer's address used for shipping.
|
|
327
|
+
|
|
328
|
+
```rb
|
|
329
|
+
puts result.document.inference.prediction.shipping_address.value
|
|
330
|
+
```
|
|
331
|
+
|
|
301
332
|
## Purchase Subcategory
|
|
302
333
|
**subcategory** ([ClassificationField](#classification-field)): The purchase subcategory among predefined classes for transport and food.
|
|
303
334
|
|
|
@@ -321,6 +352,13 @@ for supplier_company_registrations_elem in result.document.inference.prediction.
|
|
|
321
352
|
end
|
|
322
353
|
```
|
|
323
354
|
|
|
355
|
+
## Supplier Email
|
|
356
|
+
**supplier_email** ([StringField](#string-field)): The email of the supplier or merchant.
|
|
357
|
+
|
|
358
|
+
```rb
|
|
359
|
+
puts result.document.inference.prediction.supplier_email.value
|
|
360
|
+
```
|
|
361
|
+
|
|
324
362
|
## Supplier Name
|
|
325
363
|
**supplier_name** ([StringField](#string-field)): The name of the supplier or merchant.
|
|
326
364
|
|
|
@@ -347,6 +385,13 @@ end
|
|
|
347
385
|
puts result.document.inference.prediction.supplier_phone_number.value
|
|
348
386
|
```
|
|
349
387
|
|
|
388
|
+
## Supplier Website
|
|
389
|
+
**supplier_website** ([StringField](#string-field)): The website URL of the supplier or merchant.
|
|
390
|
+
|
|
391
|
+
```rb
|
|
392
|
+
puts result.document.inference.prediction.supplier_website.value
|
|
393
|
+
```
|
|
394
|
+
|
|
350
395
|
## Taxes
|
|
351
396
|
**taxes** (Array<[TaxField](#taxes-field)>): List of tax lines information.
|
|
352
397
|
|
data/docs/invoices_v4.md
CHANGED
|
@@ -34,12 +34,12 @@ puts result.document
|
|
|
34
34
|
########
|
|
35
35
|
Document
|
|
36
36
|
########
|
|
37
|
-
:Mindee ID:
|
|
37
|
+
:Mindee ID: 5c0371d0-1433-43a4-b8fb-a3b11aaf9a0e
|
|
38
38
|
:Filename: default_sample.jpg
|
|
39
39
|
|
|
40
40
|
Inference
|
|
41
41
|
#########
|
|
42
|
-
:Product: mindee/invoices v4.
|
|
42
|
+
:Product: mindee/invoices v4.6
|
|
43
43
|
:Rotation applied: Yes
|
|
44
44
|
|
|
45
45
|
Prediction
|
|
@@ -48,7 +48,7 @@ Prediction
|
|
|
48
48
|
:Invoice Number: 14
|
|
49
49
|
:Reference Numbers: AD29094
|
|
50
50
|
:Purchase Date: 2018-09-25
|
|
51
|
-
:Due Date:
|
|
51
|
+
:Due Date:
|
|
52
52
|
:Total Net:
|
|
53
53
|
:Total Amount: 2608.20
|
|
54
54
|
:Total Tax: 193.20
|
|
@@ -61,10 +61,14 @@ Prediction
|
|
|
61
61
|
:Supplier Payment Details:
|
|
62
62
|
:Supplier Name: TURNPIKE DESIGNS
|
|
63
63
|
:Supplier Company Registrations:
|
|
64
|
-
:Supplier Address: 156 University Ave, Toronto ON, Canada M5H 2H7
|
|
64
|
+
:Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7
|
|
65
|
+
:Supplier Phone Number: 4165551212
|
|
66
|
+
:Supplier Website:
|
|
67
|
+
:Supplier Email: i_doi@example.com
|
|
65
68
|
:Customer Name: JIRO DOI
|
|
66
69
|
:Customer Company Registrations:
|
|
67
70
|
:Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
|
|
71
|
+
:Customer ID:
|
|
68
72
|
:Shipping Address:
|
|
69
73
|
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
|
|
70
74
|
:Document Type: INVOICE
|
|
@@ -88,7 +92,7 @@ Page 0
|
|
|
88
92
|
:Invoice Number: 14
|
|
89
93
|
:Reference Numbers: AD29094
|
|
90
94
|
:Purchase Date: 2018-09-25
|
|
91
|
-
:Due Date:
|
|
95
|
+
:Due Date:
|
|
92
96
|
:Total Net:
|
|
93
97
|
:Total Amount: 2608.20
|
|
94
98
|
:Total Tax: 193.20
|
|
@@ -101,10 +105,14 @@ Page 0
|
|
|
101
105
|
:Supplier Payment Details:
|
|
102
106
|
:Supplier Name: TURNPIKE DESIGNS
|
|
103
107
|
:Supplier Company Registrations:
|
|
104
|
-
:Supplier Address: 156 University Ave, Toronto ON, Canada M5H 2H7
|
|
108
|
+
:Supplier Address: 156 University Ave, Toronto ON, Canada, M5H 2H7
|
|
109
|
+
:Supplier Phone Number: 4165551212
|
|
110
|
+
:Supplier Website:
|
|
111
|
+
:Supplier Email: i_doi@example.com
|
|
105
112
|
:Customer Name: JIRO DOI
|
|
106
113
|
:Customer Company Registrations:
|
|
107
114
|
:Customer Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
|
|
115
|
+
:Customer ID:
|
|
108
116
|
:Shipping Address:
|
|
109
117
|
:Billing Address: 1954 Bloor Street West Toronto, ON, M6P 3K9 Canada
|
|
110
118
|
:Document Type: INVOICE
|
|
@@ -232,6 +240,13 @@ for customer_company_registrations_elem in result.document.inference.prediction.
|
|
|
232
240
|
end
|
|
233
241
|
```
|
|
234
242
|
|
|
243
|
+
## Customer ID
|
|
244
|
+
**customer_id** ([StringField](#string-field)): The customer account number or identifier from the supplier.
|
|
245
|
+
|
|
246
|
+
```rb
|
|
247
|
+
puts result.document.inference.prediction.customer_id.value
|
|
248
|
+
```
|
|
249
|
+
|
|
235
250
|
## Customer Name
|
|
236
251
|
**customer_name** ([StringField](#string-field)): The name of the customer or client.
|
|
237
252
|
|
|
@@ -315,6 +330,13 @@ for supplier_company_registrations_elem in result.document.inference.prediction.
|
|
|
315
330
|
end
|
|
316
331
|
```
|
|
317
332
|
|
|
333
|
+
## Supplier Email
|
|
334
|
+
**supplier_email** ([StringField](#string-field)): The email of the supplier or merchant.
|
|
335
|
+
|
|
336
|
+
```rb
|
|
337
|
+
puts result.document.inference.prediction.supplier_email.value
|
|
338
|
+
```
|
|
339
|
+
|
|
318
340
|
## Supplier Name
|
|
319
341
|
**supplier_name** ([StringField](#string-field)): The name of the supplier or merchant.
|
|
320
342
|
|
|
@@ -334,6 +356,20 @@ for supplier_payment_details_elem in result.document.inference.prediction.suppli
|
|
|
334
356
|
end
|
|
335
357
|
```
|
|
336
358
|
|
|
359
|
+
## Supplier Phone Number
|
|
360
|
+
**supplier_phone_number** ([StringField](#string-field)): The phone number of the supplier or merchant.
|
|
361
|
+
|
|
362
|
+
```rb
|
|
363
|
+
puts result.document.inference.prediction.supplier_phone_number.value
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
## Supplier Website
|
|
367
|
+
**supplier_website** ([StringField](#string-field)): The website URL of the supplier or merchant.
|
|
368
|
+
|
|
369
|
+
```rb
|
|
370
|
+
puts result.document.inference.prediction.supplier_website.value
|
|
371
|
+
```
|
|
372
|
+
|
|
337
373
|
## Taxes
|
|
338
374
|
**taxes** (Array<[TaxField](#taxes-field)>): List of tax line details.
|
|
339
375
|
|
|
@@ -8,7 +8,7 @@ module Mindee
|
|
|
8
8
|
module Product
|
|
9
9
|
# Barcode Reader module.
|
|
10
10
|
module BarcodeReader
|
|
11
|
-
# Barcode Reader
|
|
11
|
+
# Barcode Reader API version 1 inference prediction.
|
|
12
12
|
class BarcodeReaderV1 < Mindee::Parsing::Common::Inference
|
|
13
13
|
@endpoint_name = 'barcode_reader'
|
|
14
14
|
@endpoint_version = '1'
|
|
@@ -5,7 +5,7 @@ require_relative '../../parsing'
|
|
|
5
5
|
module Mindee
|
|
6
6
|
module Product
|
|
7
7
|
module BarcodeReader
|
|
8
|
-
# Barcode Reader
|
|
8
|
+
# Barcode Reader API version 1.0 document data.
|
|
9
9
|
class BarcodeReaderV1Document < Mindee::Parsing::Common::Prediction
|
|
10
10
|
include Mindee::Parsing::Standard
|
|
11
11
|
# List of decoded 1D barcodes.
|
|
@@ -6,7 +6,7 @@ require_relative 'barcode_reader_v1_document'
|
|
|
6
6
|
module Mindee
|
|
7
7
|
module Product
|
|
8
8
|
module BarcodeReader
|
|
9
|
-
# Barcode Reader
|
|
9
|
+
# Barcode Reader API version 1.0 page data.
|
|
10
10
|
class BarcodeReaderV1Page < Mindee::Parsing::Common::Page
|
|
11
11
|
# @param prediction [Hash]
|
|
12
12
|
def initialize(prediction)
|
|
@@ -8,7 +8,7 @@ module Mindee
|
|
|
8
8
|
module Product
|
|
9
9
|
# Cropper module.
|
|
10
10
|
module Cropper
|
|
11
|
-
# Cropper
|
|
11
|
+
# Cropper API version 1 inference prediction.
|
|
12
12
|
class CropperV1 < Mindee::Parsing::Common::Inference
|
|
13
13
|
@endpoint_name = 'cropper'
|
|
14
14
|
@endpoint_version = '1'
|
|
@@ -9,7 +9,7 @@ module Mindee
|
|
|
9
9
|
module EU
|
|
10
10
|
# Driver License module.
|
|
11
11
|
module DriverLicense
|
|
12
|
-
# Driver License
|
|
12
|
+
# Driver License API version 1 inference prediction.
|
|
13
13
|
class DriverLicenseV1 < Mindee::Parsing::Common::Inference
|
|
14
14
|
@endpoint_name = 'eu_driver_license'
|
|
15
15
|
@endpoint_version = '1'
|
|
@@ -6,7 +6,7 @@ module Mindee
|
|
|
6
6
|
module Product
|
|
7
7
|
module EU
|
|
8
8
|
module DriverLicense
|
|
9
|
-
# Driver License
|
|
9
|
+
# Driver License API version 1.0 document data.
|
|
10
10
|
class DriverLicenseV1Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# EU driver license holders address
|
|
@@ -9,7 +9,7 @@ module Mindee
|
|
|
9
9
|
module EU
|
|
10
10
|
# License Plate module.
|
|
11
11
|
module LicensePlate
|
|
12
|
-
# License Plate
|
|
12
|
+
# License Plate API version 1 inference prediction.
|
|
13
13
|
class LicensePlateV1 < Mindee::Parsing::Common::Inference
|
|
14
14
|
@endpoint_name = 'license_plates'
|
|
15
15
|
@endpoint_version = '1'
|
|
@@ -6,7 +6,7 @@ module Mindee
|
|
|
6
6
|
module Product
|
|
7
7
|
module EU
|
|
8
8
|
module LicensePlate
|
|
9
|
-
# License Plate
|
|
9
|
+
# License Plate API version 1.1 document data.
|
|
10
10
|
class LicensePlateV1Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# List of all license plates found in the image.
|
|
@@ -8,7 +8,7 @@ module Mindee
|
|
|
8
8
|
module Product
|
|
9
9
|
# Financial Document module.
|
|
10
10
|
module FinancialDocument
|
|
11
|
-
# Financial Document
|
|
11
|
+
# Financial Document API version 1 inference prediction.
|
|
12
12
|
class FinancialDocumentV1 < Mindee::Parsing::Common::Inference
|
|
13
13
|
@endpoint_name = 'financial_document'
|
|
14
14
|
@endpoint_version = '1'
|
|
@@ -6,9 +6,12 @@ require_relative 'financial_document_v1_line_item'
|
|
|
6
6
|
module Mindee
|
|
7
7
|
module Product
|
|
8
8
|
module FinancialDocument
|
|
9
|
-
# Financial Document
|
|
9
|
+
# Financial Document API version 1.6 document data.
|
|
10
10
|
class FinancialDocumentV1Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
|
+
# The customer's address used for billing.
|
|
13
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
|
14
|
+
attr_reader :billing_address
|
|
12
15
|
# The purchase category among predefined classes.
|
|
13
16
|
# @return [Mindee::Parsing::Standard::ClassificationField]
|
|
14
17
|
attr_reader :category
|
|
@@ -18,6 +21,9 @@ module Mindee
|
|
|
18
21
|
# List of company registrations associated to the customer.
|
|
19
22
|
# @return [Array<Mindee::Parsing::Standard::CompanyRegistrationField>]
|
|
20
23
|
attr_reader :customer_company_registrations
|
|
24
|
+
# The customer account number or identifier from the supplier.
|
|
25
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
|
26
|
+
attr_reader :customer_id
|
|
21
27
|
# The name of the customer.
|
|
22
28
|
# @return [Mindee::Parsing::Standard::StringField]
|
|
23
29
|
attr_reader :customer_name
|
|
@@ -42,6 +48,9 @@ module Mindee
|
|
|
42
48
|
# List of Reference numbers, including PO number.
|
|
43
49
|
# @return [Array<Mindee::Parsing::Standard::StringField>]
|
|
44
50
|
attr_reader :reference_numbers
|
|
51
|
+
# The customer's address used for shipping.
|
|
52
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
|
53
|
+
attr_reader :shipping_address
|
|
45
54
|
# The purchase subcategory among predefined classes for transport and food.
|
|
46
55
|
# @return [Mindee::Parsing::Standard::ClassificationField]
|
|
47
56
|
attr_reader :subcategory
|
|
@@ -51,6 +60,9 @@ module Mindee
|
|
|
51
60
|
# List of company registrations associated to the supplier.
|
|
52
61
|
# @return [Array<Mindee::Parsing::Standard::CompanyRegistrationField>]
|
|
53
62
|
attr_reader :supplier_company_registrations
|
|
63
|
+
# The email of the supplier or merchant.
|
|
64
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
|
65
|
+
attr_reader :supplier_email
|
|
54
66
|
# The name of the supplier or merchant.
|
|
55
67
|
# @return [Mindee::Parsing::Standard::StringField]
|
|
56
68
|
attr_reader :supplier_name
|
|
@@ -60,6 +72,9 @@ module Mindee
|
|
|
60
72
|
# The phone number of the supplier or merchant.
|
|
61
73
|
# @return [Mindee::Parsing::Standard::StringField]
|
|
62
74
|
attr_reader :supplier_phone_number
|
|
75
|
+
# The website URL of the supplier or merchant.
|
|
76
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
|
77
|
+
attr_reader :supplier_website
|
|
63
78
|
# List of tax lines information.
|
|
64
79
|
# @return [Mindee::Parsing::Standard::Taxes]
|
|
65
80
|
attr_reader :taxes
|
|
@@ -83,12 +98,14 @@ module Mindee
|
|
|
83
98
|
# @param page_id [Integer, nil]
|
|
84
99
|
def initialize(prediction, page_id)
|
|
85
100
|
super()
|
|
101
|
+
@billing_address = StringField.new(prediction['billing_address'], page_id)
|
|
86
102
|
@category = ClassificationField.new(prediction['category'], page_id)
|
|
87
103
|
@customer_address = StringField.new(prediction['customer_address'], page_id)
|
|
88
104
|
@customer_company_registrations = []
|
|
89
105
|
prediction['customer_company_registrations'].each do |item|
|
|
90
106
|
@customer_company_registrations.push(CompanyRegistrationField.new(item, page_id))
|
|
91
107
|
end
|
|
108
|
+
@customer_id = StringField.new(prediction['customer_id'], page_id)
|
|
92
109
|
@customer_name = StringField.new(prediction['customer_name'], page_id)
|
|
93
110
|
@date = DateField.new(prediction['date'], page_id)
|
|
94
111
|
@document_type = ClassificationField.new(prediction['document_type'], page_id)
|
|
@@ -103,18 +120,21 @@ module Mindee
|
|
|
103
120
|
prediction['reference_numbers'].each do |item|
|
|
104
121
|
@reference_numbers.push(StringField.new(item, page_id))
|
|
105
122
|
end
|
|
123
|
+
@shipping_address = StringField.new(prediction['shipping_address'], page_id)
|
|
106
124
|
@subcategory = ClassificationField.new(prediction['subcategory'], page_id)
|
|
107
125
|
@supplier_address = StringField.new(prediction['supplier_address'], page_id)
|
|
108
126
|
@supplier_company_registrations = []
|
|
109
127
|
prediction['supplier_company_registrations'].each do |item|
|
|
110
128
|
@supplier_company_registrations.push(CompanyRegistrationField.new(item, page_id))
|
|
111
129
|
end
|
|
130
|
+
@supplier_email = StringField.new(prediction['supplier_email'], page_id)
|
|
112
131
|
@supplier_name = StringField.new(prediction['supplier_name'], page_id)
|
|
113
132
|
@supplier_payment_details = []
|
|
114
133
|
prediction['supplier_payment_details'].each do |item|
|
|
115
134
|
@supplier_payment_details.push(PaymentDetailsField.new(item, page_id))
|
|
116
135
|
end
|
|
117
136
|
@supplier_phone_number = StringField.new(prediction['supplier_phone_number'], page_id)
|
|
137
|
+
@supplier_website = StringField.new(prediction['supplier_website'], page_id)
|
|
118
138
|
@taxes = Taxes.new(prediction['taxes'], page_id)
|
|
119
139
|
@time = StringField.new(prediction['time'], page_id)
|
|
120
140
|
@tip = AmountField.new(prediction['tip'], page_id)
|
|
@@ -145,8 +165,13 @@ module Mindee
|
|
|
145
165
|
out_str << "\n:Supplier Address: #{@supplier_address}".rstrip
|
|
146
166
|
out_str << "\n:Supplier Phone Number: #{@supplier_phone_number}".rstrip
|
|
147
167
|
out_str << "\n:Customer Name: #{@customer_name}".rstrip
|
|
168
|
+
out_str << "\n:Supplier Website: #{@supplier_website}".rstrip
|
|
169
|
+
out_str << "\n:Supplier Email: #{@supplier_email}".rstrip
|
|
148
170
|
out_str << "\n:Customer Company Registrations: #{customer_company_registrations}".rstrip
|
|
149
171
|
out_str << "\n:Customer Address: #{@customer_address}".rstrip
|
|
172
|
+
out_str << "\n:Customer ID: #{@customer_id}".rstrip
|
|
173
|
+
out_str << "\n:Shipping Address: #{@shipping_address}".rstrip
|
|
174
|
+
out_str << "\n:Billing Address: #{@billing_address}".rstrip
|
|
150
175
|
out_str << "\n:Document Type: #{@document_type}".rstrip
|
|
151
176
|
out_str << "\n:Purchase Subcategory: #{@subcategory}".rstrip
|
|
152
177
|
out_str << "\n:Purchase Category: #{@category}".rstrip
|
|
@@ -6,7 +6,7 @@ require_relative 'financial_document_v1_document'
|
|
|
6
6
|
module Mindee
|
|
7
7
|
module Product
|
|
8
8
|
module FinancialDocument
|
|
9
|
-
# Financial Document
|
|
9
|
+
# Financial Document API version 1.6 page data.
|
|
10
10
|
class FinancialDocumentV1Page < Mindee::Parsing::Common::Page
|
|
11
11
|
# @param prediction [Hash]
|
|
12
12
|
def initialize(prediction)
|
|
@@ -9,7 +9,7 @@ module Mindee
|
|
|
9
9
|
module FR
|
|
10
10
|
# Bank Account Details module.
|
|
11
11
|
module BankAccountDetails
|
|
12
|
-
# Bank Account Details
|
|
12
|
+
# Bank Account Details API version 1 inference prediction.
|
|
13
13
|
class BankAccountDetailsV1 < Mindee::Parsing::Common::Inference
|
|
14
14
|
@endpoint_name = 'bank_account_details'
|
|
15
15
|
@endpoint_version = '1'
|
|
@@ -6,7 +6,7 @@ module Mindee
|
|
|
6
6
|
module Product
|
|
7
7
|
module FR
|
|
8
8
|
module BankAccountDetails
|
|
9
|
-
# Bank Account Details
|
|
9
|
+
# Bank Account Details API version 1.0 document data.
|
|
10
10
|
class BankAccountDetailsV1Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# The name of the account holder as seen on the document.
|
|
@@ -7,7 +7,7 @@ module Mindee
|
|
|
7
7
|
module Product
|
|
8
8
|
module FR
|
|
9
9
|
module BankAccountDetails
|
|
10
|
-
# Bank Account Details
|
|
10
|
+
# Bank Account Details API version 1.0 page data.
|
|
11
11
|
class BankAccountDetailsV1Page < Mindee::Parsing::Common::Page
|
|
12
12
|
# @param prediction [Hash]
|
|
13
13
|
def initialize(prediction)
|
|
@@ -9,7 +9,7 @@ module Mindee
|
|
|
9
9
|
module FR
|
|
10
10
|
# Bank Account Details module.
|
|
11
11
|
module BankAccountDetails
|
|
12
|
-
# Bank Account Details
|
|
12
|
+
# Bank Account Details API version 2 inference prediction.
|
|
13
13
|
class BankAccountDetailsV2 < Mindee::Parsing::Common::Inference
|
|
14
14
|
@endpoint_name = 'bank_account_details'
|
|
15
15
|
@endpoint_version = '2'
|
|
@@ -7,7 +7,7 @@ module Mindee
|
|
|
7
7
|
module Product
|
|
8
8
|
module FR
|
|
9
9
|
module BankAccountDetails
|
|
10
|
-
# Bank Account Details
|
|
10
|
+
# Bank Account Details API version 2.0 document data.
|
|
11
11
|
class BankAccountDetailsV2Document < Mindee::Parsing::Common::Prediction
|
|
12
12
|
include Mindee::Parsing::Standard
|
|
13
13
|
# Full extraction of the account holders names.
|
|
@@ -7,7 +7,7 @@ module Mindee
|
|
|
7
7
|
module Product
|
|
8
8
|
module FR
|
|
9
9
|
module BankAccountDetails
|
|
10
|
-
# Bank Account Details
|
|
10
|
+
# Bank Account Details API version 2.0 page data.
|
|
11
11
|
class BankAccountDetailsV2Page < Mindee::Parsing::Common::Page
|
|
12
12
|
# @param prediction [Hash]
|
|
13
13
|
def initialize(prediction)
|
|
@@ -9,7 +9,7 @@ module Mindee
|
|
|
9
9
|
module FR
|
|
10
10
|
# Carte Grise module.
|
|
11
11
|
module CarteGrise
|
|
12
|
-
# Carte Grise
|
|
12
|
+
# Carte Grise API version 1 inference prediction.
|
|
13
13
|
class CarteGriseV1 < Mindee::Parsing::Common::Inference
|
|
14
14
|
@endpoint_name = 'carte_grise'
|
|
15
15
|
@endpoint_version = '1'
|
|
@@ -6,7 +6,7 @@ module Mindee
|
|
|
6
6
|
module Product
|
|
7
7
|
module FR
|
|
8
8
|
module CarteGrise
|
|
9
|
-
# Carte Grise
|
|
9
|
+
# Carte Grise API version 1.1 document data.
|
|
10
10
|
class CarteGriseV1Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# The vehicle's license plate number.
|
|
@@ -9,7 +9,7 @@ module Mindee
|
|
|
9
9
|
module FR
|
|
10
10
|
# Carte Vitale module.
|
|
11
11
|
module CarteVitale
|
|
12
|
-
# Carte Vitale
|
|
12
|
+
# Carte Vitale API version 1 inference prediction.
|
|
13
13
|
class CarteVitaleV1 < Mindee::Parsing::Common::Inference
|
|
14
14
|
@endpoint_name = 'carte_vitale'
|
|
15
15
|
@endpoint_version = '1'
|
|
@@ -6,7 +6,7 @@ module Mindee
|
|
|
6
6
|
module Product
|
|
7
7
|
module FR
|
|
8
8
|
module CarteVitale
|
|
9
|
-
# Carte Vitale
|
|
9
|
+
# Carte Vitale API version 1.1 document data.
|
|
10
10
|
class CarteVitaleV1Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# The given name(s) of the card holder.
|
|
@@ -9,7 +9,7 @@ module Mindee
|
|
|
9
9
|
module FR
|
|
10
10
|
# Carte Nationale d'Identité module.
|
|
11
11
|
module IdCard
|
|
12
|
-
# Carte Nationale d'Identité
|
|
12
|
+
# Carte Nationale d'Identité API version 1 inference prediction.
|
|
13
13
|
class IdCardV1 < Mindee::Parsing::Common::Inference
|
|
14
14
|
@endpoint_name = 'idcard_fr'
|
|
15
15
|
@endpoint_version = '1'
|
|
@@ -6,7 +6,7 @@ module Mindee
|
|
|
6
6
|
module Product
|
|
7
7
|
module FR
|
|
8
8
|
module IdCard
|
|
9
|
-
# Carte Nationale d'Identité
|
|
9
|
+
# Carte Nationale d'Identité API version 1.1 document data.
|
|
10
10
|
class IdCardV1Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# The name of the issuing authority.
|
|
@@ -7,7 +7,7 @@ module Mindee
|
|
|
7
7
|
module Product
|
|
8
8
|
module FR
|
|
9
9
|
module IdCard
|
|
10
|
-
# Carte Nationale d'Identité
|
|
10
|
+
# Carte Nationale d'Identité API version 1.1 page data.
|
|
11
11
|
class IdCardV1Page < Mindee::Parsing::Common::Page
|
|
12
12
|
# @param prediction [Hash]
|
|
13
13
|
def initialize(prediction)
|
|
@@ -9,7 +9,7 @@ module Mindee
|
|
|
9
9
|
module FR
|
|
10
10
|
# Carte Nationale d'Identité module.
|
|
11
11
|
module IdCard
|
|
12
|
-
# Carte Nationale d'Identité
|
|
12
|
+
# Carte Nationale d'Identité API version 2 inference prediction.
|
|
13
13
|
class IdCardV2 < Mindee::Parsing::Common::Inference
|
|
14
14
|
@endpoint_name = 'idcard_fr'
|
|
15
15
|
@endpoint_version = '2'
|
|
@@ -6,7 +6,7 @@ module Mindee
|
|
|
6
6
|
module Product
|
|
7
7
|
module FR
|
|
8
8
|
module IdCard
|
|
9
|
-
# Carte Nationale d'Identité
|
|
9
|
+
# Carte Nationale d'Identité API version 2.0 document data.
|
|
10
10
|
class IdCardV2Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# The alternate name of the card holder.
|
|
@@ -7,7 +7,7 @@ module Mindee
|
|
|
7
7
|
module Product
|
|
8
8
|
module FR
|
|
9
9
|
module IdCard
|
|
10
|
-
# Carte Nationale d'Identité
|
|
10
|
+
# Carte Nationale d'Identité API version 2.0 page data.
|
|
11
11
|
class IdCardV2Page < Mindee::Parsing::Common::Page
|
|
12
12
|
# @param prediction [Hash]
|
|
13
13
|
def initialize(prediction)
|
|
@@ -8,7 +8,7 @@ module Mindee
|
|
|
8
8
|
module Product
|
|
9
9
|
# International ID module.
|
|
10
10
|
module InternationalId
|
|
11
|
-
# International ID
|
|
11
|
+
# International ID API version 2 inference prediction.
|
|
12
12
|
class InternationalIdV2 < Mindee::Parsing::Common::Inference
|
|
13
13
|
@endpoint_name = 'international_id'
|
|
14
14
|
@endpoint_version = '2'
|
|
@@ -5,7 +5,7 @@ require_relative '../../parsing'
|
|
|
5
5
|
module Mindee
|
|
6
6
|
module Product
|
|
7
7
|
module InternationalId
|
|
8
|
-
# International ID
|
|
8
|
+
# International ID API version 2.0 document data.
|
|
9
9
|
class InternationalIdV2Document < Mindee::Parsing::Common::Prediction
|
|
10
10
|
include Mindee::Parsing::Standard
|
|
11
11
|
# The physical address of the document holder.
|
|
@@ -6,7 +6,7 @@ require_relative 'international_id_v2_document'
|
|
|
6
6
|
module Mindee
|
|
7
7
|
module Product
|
|
8
8
|
module InternationalId
|
|
9
|
-
# International ID
|
|
9
|
+
# International ID API version 2.0 page data.
|
|
10
10
|
class InternationalIdV2Page < Mindee::Parsing::Common::Page
|
|
11
11
|
# @param prediction [Hash]
|
|
12
12
|
def initialize(prediction)
|
|
@@ -8,7 +8,7 @@ module Mindee
|
|
|
8
8
|
module Product
|
|
9
9
|
# Invoice module.
|
|
10
10
|
module Invoice
|
|
11
|
-
# Invoice
|
|
11
|
+
# Invoice API version 4 inference prediction.
|
|
12
12
|
class InvoiceV4 < Mindee::Parsing::Common::Inference
|
|
13
13
|
@endpoint_name = 'invoices'
|
|
14
14
|
@endpoint_version = '4'
|
|
@@ -6,7 +6,7 @@ require_relative 'invoice_v4_line_item'
|
|
|
6
6
|
module Mindee
|
|
7
7
|
module Product
|
|
8
8
|
module Invoice
|
|
9
|
-
# Invoice
|
|
9
|
+
# Invoice API version 4.6 document data.
|
|
10
10
|
class InvoiceV4Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# The customer's address used for billing.
|
|
@@ -18,6 +18,9 @@ module Mindee
|
|
|
18
18
|
# List of company registrations associated to the customer.
|
|
19
19
|
# @return [Array<Mindee::Parsing::Standard::CompanyRegistrationField>]
|
|
20
20
|
attr_reader :customer_company_registrations
|
|
21
|
+
# The customer account number or identifier from the supplier.
|
|
22
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
|
23
|
+
attr_reader :customer_id
|
|
21
24
|
# The name of the customer or client.
|
|
22
25
|
# @return [Mindee::Parsing::Standard::StringField]
|
|
23
26
|
attr_reader :customer_name
|
|
@@ -51,12 +54,21 @@ module Mindee
|
|
|
51
54
|
# List of company registrations associated to the supplier.
|
|
52
55
|
# @return [Array<Mindee::Parsing::Standard::CompanyRegistrationField>]
|
|
53
56
|
attr_reader :supplier_company_registrations
|
|
57
|
+
# The email of the supplier or merchant.
|
|
58
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
|
59
|
+
attr_reader :supplier_email
|
|
54
60
|
# The name of the supplier or merchant.
|
|
55
61
|
# @return [Mindee::Parsing::Standard::StringField]
|
|
56
62
|
attr_reader :supplier_name
|
|
57
63
|
# List of payment details associated to the supplier.
|
|
58
64
|
# @return [Array<Mindee::Parsing::Standard::PaymentDetailsField>]
|
|
59
65
|
attr_reader :supplier_payment_details
|
|
66
|
+
# The phone number of the supplier or merchant.
|
|
67
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
|
68
|
+
attr_reader :supplier_phone_number
|
|
69
|
+
# The website URL of the supplier or merchant.
|
|
70
|
+
# @return [Mindee::Parsing::Standard::StringField]
|
|
71
|
+
attr_reader :supplier_website
|
|
60
72
|
# List of tax line details.
|
|
61
73
|
# @return [Mindee::Parsing::Standard::Taxes]
|
|
62
74
|
attr_reader :taxes
|
|
@@ -80,6 +92,7 @@ module Mindee
|
|
|
80
92
|
prediction['customer_company_registrations'].each do |item|
|
|
81
93
|
@customer_company_registrations.push(CompanyRegistrationField.new(item, page_id))
|
|
82
94
|
end
|
|
95
|
+
@customer_id = StringField.new(prediction['customer_id'], page_id)
|
|
83
96
|
@customer_name = StringField.new(prediction['customer_name'], page_id)
|
|
84
97
|
@date = DateField.new(prediction['date'], page_id)
|
|
85
98
|
@document_type = ClassificationField.new(prediction['document_type'], page_id)
|
|
@@ -100,11 +113,14 @@ module Mindee
|
|
|
100
113
|
prediction['supplier_company_registrations'].each do |item|
|
|
101
114
|
@supplier_company_registrations.push(CompanyRegistrationField.new(item, page_id))
|
|
102
115
|
end
|
|
116
|
+
@supplier_email = StringField.new(prediction['supplier_email'], page_id)
|
|
103
117
|
@supplier_name = StringField.new(prediction['supplier_name'], page_id)
|
|
104
118
|
@supplier_payment_details = []
|
|
105
119
|
prediction['supplier_payment_details'].each do |item|
|
|
106
120
|
@supplier_payment_details.push(PaymentDetailsField.new(item, page_id))
|
|
107
121
|
end
|
|
122
|
+
@supplier_phone_number = StringField.new(prediction['supplier_phone_number'], page_id)
|
|
123
|
+
@supplier_website = StringField.new(prediction['supplier_website'], page_id)
|
|
108
124
|
@taxes = Taxes.new(prediction['taxes'], page_id)
|
|
109
125
|
@total_amount = AmountField.new(prediction['total_amount'], page_id)
|
|
110
126
|
@total_net = AmountField.new(prediction['total_net'], page_id)
|
|
@@ -132,9 +148,13 @@ module Mindee
|
|
|
132
148
|
out_str << "\n:Supplier Name: #{@supplier_name}".rstrip
|
|
133
149
|
out_str << "\n:Supplier Company Registrations: #{supplier_company_registrations}".rstrip
|
|
134
150
|
out_str << "\n:Supplier Address: #{@supplier_address}".rstrip
|
|
151
|
+
out_str << "\n:Supplier Phone Number: #{@supplier_phone_number}".rstrip
|
|
152
|
+
out_str << "\n:Supplier Website: #{@supplier_website}".rstrip
|
|
153
|
+
out_str << "\n:Supplier Email: #{@supplier_email}".rstrip
|
|
135
154
|
out_str << "\n:Customer Name: #{@customer_name}".rstrip
|
|
136
155
|
out_str << "\n:Customer Company Registrations: #{customer_company_registrations}".rstrip
|
|
137
156
|
out_str << "\n:Customer Address: #{@customer_address}".rstrip
|
|
157
|
+
out_str << "\n:Customer ID: #{@customer_id}".rstrip
|
|
138
158
|
out_str << "\n:Shipping Address: #{@shipping_address}".rstrip
|
|
139
159
|
out_str << "\n:Billing Address: #{@billing_address}".rstrip
|
|
140
160
|
out_str << "\n:Document Type: #{@document_type}".rstrip
|
|
@@ -8,7 +8,7 @@ module Mindee
|
|
|
8
8
|
module Product
|
|
9
9
|
# Multi Receipts Detector module.
|
|
10
10
|
module MultiReceiptsDetector
|
|
11
|
-
# Multi Receipts Detector
|
|
11
|
+
# Multi Receipts Detector API version 1 inference prediction.
|
|
12
12
|
class MultiReceiptsDetectorV1 < Mindee::Parsing::Common::Inference
|
|
13
13
|
@endpoint_name = 'multi_receipts_detector'
|
|
14
14
|
@endpoint_version = '1'
|
|
@@ -5,7 +5,7 @@ require_relative '../../parsing'
|
|
|
5
5
|
module Mindee
|
|
6
6
|
module Product
|
|
7
7
|
module MultiReceiptsDetector
|
|
8
|
-
# Multi Receipts Detector
|
|
8
|
+
# Multi Receipts Detector API version 1.0 document data.
|
|
9
9
|
class MultiReceiptsDetectorV1Document < Mindee::Parsing::Common::Prediction
|
|
10
10
|
include Mindee::Parsing::Standard
|
|
11
11
|
# Positions of the receipts on the document.
|
|
@@ -6,7 +6,7 @@ require_relative 'multi_receipts_detector_v1_document'
|
|
|
6
6
|
module Mindee
|
|
7
7
|
module Product
|
|
8
8
|
module MultiReceiptsDetector
|
|
9
|
-
# Multi Receipts Detector
|
|
9
|
+
# Multi Receipts Detector API version 1.0 page data.
|
|
10
10
|
class MultiReceiptsDetectorV1Page < Mindee::Parsing::Common::Page
|
|
11
11
|
# @param prediction [Hash]
|
|
12
12
|
def initialize(prediction)
|
|
@@ -8,7 +8,7 @@ module Mindee
|
|
|
8
8
|
module Product
|
|
9
9
|
# Passport module.
|
|
10
10
|
module Passport
|
|
11
|
-
# Passport
|
|
11
|
+
# Passport API version 1 inference prediction.
|
|
12
12
|
class PassportV1 < Mindee::Parsing::Common::Inference
|
|
13
13
|
@endpoint_name = 'passport'
|
|
14
14
|
@endpoint_version = '1'
|
|
@@ -5,7 +5,7 @@ require_relative '../../parsing'
|
|
|
5
5
|
module Mindee
|
|
6
6
|
module Product
|
|
7
7
|
module Passport
|
|
8
|
-
# Passport
|
|
8
|
+
# Passport API version 1.1 document data.
|
|
9
9
|
class PassportV1Document < Mindee::Parsing::Common::Prediction
|
|
10
10
|
include Mindee::Parsing::Standard
|
|
11
11
|
# The date of birth of the passport holder.
|
|
@@ -6,7 +6,7 @@ require_relative 'passport_v1_document'
|
|
|
6
6
|
module Mindee
|
|
7
7
|
module Product
|
|
8
8
|
module Passport
|
|
9
|
-
# Passport
|
|
9
|
+
# Passport API version 1.1 page data.
|
|
10
10
|
class PassportV1Page < Mindee::Parsing::Common::Page
|
|
11
11
|
# @param prediction [Hash]
|
|
12
12
|
def initialize(prediction)
|
|
@@ -8,7 +8,7 @@ module Mindee
|
|
|
8
8
|
module Product
|
|
9
9
|
# Proof of Address module.
|
|
10
10
|
module ProofOfAddress
|
|
11
|
-
# Proof of Address
|
|
11
|
+
# Proof of Address API version 1 inference prediction.
|
|
12
12
|
class ProofOfAddressV1 < Mindee::Parsing::Common::Inference
|
|
13
13
|
@endpoint_name = 'proof_of_address'
|
|
14
14
|
@endpoint_version = '1'
|
|
@@ -5,7 +5,7 @@ require_relative '../../parsing'
|
|
|
5
5
|
module Mindee
|
|
6
6
|
module Product
|
|
7
7
|
module ProofOfAddress
|
|
8
|
-
# Proof of Address
|
|
8
|
+
# Proof of Address API version 1.1 document data.
|
|
9
9
|
class ProofOfAddressV1Document < Mindee::Parsing::Common::Prediction
|
|
10
10
|
include Mindee::Parsing::Standard
|
|
11
11
|
# The date the document was issued.
|
|
@@ -6,7 +6,7 @@ require_relative 'proof_of_address_v1_document'
|
|
|
6
6
|
module Mindee
|
|
7
7
|
module Product
|
|
8
8
|
module ProofOfAddress
|
|
9
|
-
# Proof of Address
|
|
9
|
+
# Proof of Address API version 1.1 page data.
|
|
10
10
|
class ProofOfAddressV1Page < Mindee::Parsing::Common::Page
|
|
11
11
|
# @param prediction [Hash]
|
|
12
12
|
def initialize(prediction)
|
|
@@ -8,7 +8,7 @@ module Mindee
|
|
|
8
8
|
module Product
|
|
9
9
|
# Receipt module.
|
|
10
10
|
module Receipt
|
|
11
|
-
# Receipt
|
|
11
|
+
# Receipt API version 5 inference prediction.
|
|
12
12
|
class ReceiptV5 < Mindee::Parsing::Common::Inference
|
|
13
13
|
@endpoint_name = 'expense_receipts'
|
|
14
14
|
@endpoint_version = '5'
|
|
@@ -6,7 +6,7 @@ require_relative 'receipt_v5_line_item'
|
|
|
6
6
|
module Mindee
|
|
7
7
|
module Product
|
|
8
8
|
module Receipt
|
|
9
|
-
# Receipt
|
|
9
|
+
# Receipt API version 5.1 document data.
|
|
10
10
|
class ReceiptV5Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# The purchase category among predefined classes.
|
|
@@ -10,7 +10,7 @@ require_relative 'resume_v1_certificate'
|
|
|
10
10
|
module Mindee
|
|
11
11
|
module Product
|
|
12
12
|
module Resume
|
|
13
|
-
# Resume
|
|
13
|
+
# Resume API version 1.0 document data.
|
|
14
14
|
class ResumeV1Document < Mindee::Parsing::Common::Prediction
|
|
15
15
|
include Mindee::Parsing::Standard
|
|
16
16
|
# The location information of the candidate, including city, state, and country.
|
|
@@ -9,7 +9,7 @@ module Mindee
|
|
|
9
9
|
module US
|
|
10
10
|
# Bank Check module.
|
|
11
11
|
module BankCheck
|
|
12
|
-
# Bank Check
|
|
12
|
+
# Bank Check API version 1 inference prediction.
|
|
13
13
|
class BankCheckV1 < Mindee::Parsing::Common::Inference
|
|
14
14
|
@endpoint_name = 'bank_check'
|
|
15
15
|
@endpoint_version = '1'
|
|
@@ -6,7 +6,7 @@ module Mindee
|
|
|
6
6
|
module Product
|
|
7
7
|
module US
|
|
8
8
|
module BankCheck
|
|
9
|
-
# Bank Check
|
|
9
|
+
# Bank Check API version 1.1 document data.
|
|
10
10
|
class BankCheckV1Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# The check payer's account number.
|
|
@@ -9,7 +9,7 @@ module Mindee
|
|
|
9
9
|
module US
|
|
10
10
|
# Driver License module.
|
|
11
11
|
module DriverLicense
|
|
12
|
-
# Driver License
|
|
12
|
+
# Driver License API version 1 inference prediction.
|
|
13
13
|
class DriverLicenseV1 < Mindee::Parsing::Common::Inference
|
|
14
14
|
@endpoint_name = 'us_driver_license'
|
|
15
15
|
@endpoint_version = '1'
|
|
@@ -6,7 +6,7 @@ module Mindee
|
|
|
6
6
|
module Product
|
|
7
7
|
module US
|
|
8
8
|
module DriverLicense
|
|
9
|
-
# Driver License
|
|
9
|
+
# Driver License API version 1.1 document data.
|
|
10
10
|
class DriverLicenseV1Document < Mindee::Parsing::Common::Prediction
|
|
11
11
|
include Mindee::Parsing::Standard
|
|
12
12
|
# US driver license holders address
|
data/lib/mindee/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mindee
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mindee, SA
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-05-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: marcel
|