Skip to content

Commit baaf1ef

Browse files
sebastianMindeeianardee
authored andcommitted
✨ add support for Bank Account Details V2 & product refacto (#40)
- ♻️ refacto & add wrapper class for prediction pages - ♻️ uniformization of already existing prediction classes to match generated output - ♻️ updated tests to match new implementation - ✨ add support for bank_account_details v2
1 parent efc122f commit baaf1ef

File tree

81 files changed

+760
-505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+760
-505
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ require 'mindee'
3232
# Init a new client
3333
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
3434

35-
# Load a file from disk and parse it
35+
# Load a file from disk
3636
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
3737
result = mindee_client.parse(
3838
input_source,
@@ -50,7 +50,7 @@ require 'mindee'
5050
# Init a new client
5151
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
5252

53-
# Load a file from disk and parse it
53+
# Load a file from disk
5454
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
5555

5656
result = mindee_client.parse(
@@ -73,7 +73,7 @@ endpoint = mindee_client.create_endpoint(
7373
account_name: 'my-account'
7474
)
7575

76-
# Load a file from disk and parse it
76+
# Load a file from disk
7777
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
7878

7979
result = mindee_client.parse(
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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.parse(
11+
input_source,
12+
Mindee::Product::FR::BankAccountDetails::BankAccountDetailsV2
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

docs/code_samples/custom_v1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require 'mindee'
33
# Init a new client
44
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
55

6-
# Load a file from disk and parse it
6+
# Load a file from disk
77
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
88

99
# Initialize a custom endpoint for this product
@@ -12,7 +12,7 @@ custom_endpoint = mindee_client.create_endpoint(
1212
endpoint_name: 'my-endpoint'
1313
)
1414

15-
# Send our document
15+
# Parse the file
1616
result = mindee_client.parse(
1717
input_source,
1818
Mindee::Product::Custom::CustomV1,

docs/code_samples/expense_receipts_v4.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ require 'mindee'
33
# Init a new client
44
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
55

6-
# Load a file from disk and parse it
6+
# Load a file from disk
77
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
88

9-
# Send our document
9+
# Parse the file
1010
result = mindee_client.parse(
1111
input_source,
1212
Mindee::Product::Receipt::ReceiptV4

docs/code_samples/expense_receipts_v5.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ require 'mindee'
33
# Init a new client
44
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
55

6-
# Load a file from disk and parse it
6+
# Load a file from disk
77
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
88

9-
# Send our document
9+
# Parse the file
1010
result = mindee_client.parse(
1111
input_source,
1212
Mindee::Product::Receipt::ReceiptV5

docs/code_samples/financial_document_v1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ require 'mindee'
33
# Init a new client
44
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
55

6-
# Load a file from disk and parse it
6+
# Load a file from disk
77
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
88

9-
# Send our document
9+
# Parse the file
1010
result = mindee_client.parse(
1111
input_source,
1212
Mindee::Product::FinancialDocument::FinancialDocumentV1

docs/code_samples/idcard_fr_v1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ require 'mindee'
33
# Init a new client
44
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
55

6-
# Load a file from disk and parse it
6+
# Load a file from disk
77
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
88

9-
# Send our document
9+
# Parse the file
1010
result = mindee_client.parse(
1111
input_source,
1212
Mindee::Product::FR::IdCard::IdCardV1

docs/code_samples/invoices_v4.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ require 'mindee'
33
# Init a new client
44
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
55

6-
# Load a file from disk and parse it
6+
# Load a file from disk
77
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
88

9-
# Send our document
9+
# Parse the file
1010
result = mindee_client.parse(
1111
input_source,
1212
Mindee::Product::Invoice::InvoiceV4

docs/code_samples/license_plates_v1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ require 'mindee'
33
# Init a new client
44
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
55

6-
# Load a file from disk and parse it
6+
# Load a file from disk
77
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
88

9-
# Send our document
9+
# Parse the file
1010
result = mindee_client.parse(
1111
input_source,
1212
Mindee::Product::EU::LicensePlate::LicensePlateV1

docs/code_samples/passport_v1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ require 'mindee'
33
# Init a new client
44
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
55

6-
# Load a file from disk and parse it
6+
# Load a file from disk
77
input_source = mindee_client.source_from_path('/path/to/the/file.ext')
88

9-
# Send our document
9+
# Parse the file
1010
result = mindee_client.parse(
1111
input_source,
1212
Mindee::Product::Passport::PassportV1

0 commit comments

Comments
 (0)