Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/_publish-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Publish to Rubygems
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Publish Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Run Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_test-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- "4.0"
runs-on: ${{ matrix.os_config.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_test-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- "3.0"
- "4.0"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_test-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- "3.4"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_test-units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- "3.4"
- "4.0"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

Expand Down
4 changes: 2 additions & 2 deletions bin/v1/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def init_product_parser
# @param product_command [String]
# @param endpoint_name [String, nil]
# @param options [Hash]
# @return [Mindee::Parsing::Common::ApiResponse]
# @return [Mindee::V1::Parsing::Common::ApiResponse]
def send(product_command, endpoint_name, options)
mindee_client = Mindee::Client.new(api_key: options[:api_key])
mindee_client = Mindee::V1::Client.new(api_key: options[:api_key])
doc_class = V1_PRODUCTS[product_command][:doc_class]
input_source = setup_input_source(mindee_client, options)
custom_endpoint = setup_endpoint(mindee_client, product_command, endpoint_name, options)
Expand Down
54 changes: 27 additions & 27 deletions bin/v1/products.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,163 +3,163 @@
V1_PRODUCTS = {
'universal' => {
description: 'Universal document type from API builder',
doc_class: Mindee::Product::Universal::Universal,
doc_class: Mindee::V1::Product::Universal::Universal,
sync: true,
async: true,
},
'barcode-reader' => {
description: 'Barcode Reader',
doc_class: Mindee::Product::BarcodeReader::BarcodeReaderV1,
doc_class: Mindee::V1::Product::BarcodeReader::BarcodeReaderV1,
sync: true,
async: false,
},
'bill-of-lading' => {
description: 'Bill of Lading',
doc_class: Mindee::Product::BillOfLading::BillOfLadingV1,
doc_class: Mindee::V1::Product::BillOfLading::BillOfLadingV1,
sync: false,
async: true,
},
'business-card' => {
description: 'Business Card',
doc_class: Mindee::Product::BusinessCard::BusinessCardV1,
doc_class: Mindee::V1::Product::BusinessCard::BusinessCardV1,
sync: false,
async: true,
},
'cropper' => {
description: 'Cropper',
doc_class: Mindee::Product::Cropper::CropperV1,
doc_class: Mindee::V1::Product::Cropper::CropperV1,
sync: true,
async: false,
},
'delivery-note' => {
description: 'Delivery note',
doc_class: Mindee::Product::DeliveryNote::DeliveryNoteV1,
doc_class: Mindee::V1::Product::DeliveryNote::DeliveryNoteV1,
sync: false,
async: true,
},
'driver-license' => {
description: 'Driver License',
doc_class: Mindee::Product::DriverLicense::DriverLicenseV1,
doc_class: Mindee::V1::Product::DriverLicense::DriverLicenseV1,
sync: false,
async: true,
},
'financial-document' => {
description: 'Financial Document',
doc_class: Mindee::Product::FinancialDocument::FinancialDocumentV1,
doc_class: Mindee::V1::Product::FinancialDocument::FinancialDocumentV1,
sync: true,
async: true,
},
'fr-bank-account-details' => {
description: 'Bank Account Details',
doc_class: Mindee::Product::FR::BankAccountDetails::BankAccountDetailsV2,
doc_class: Mindee::V1::Product::FR::BankAccountDetails::BankAccountDetailsV2,
sync: true,
async: false,
},
'fr-bank-statement' => {
description: 'Bank Statement',
doc_class: Mindee::Product::FR::BankStatement::BankStatementV2,
doc_class: Mindee::V1::Product::FR::BankStatement::BankStatementV2,
sync: false,
async: true,
},
'fr-carte-grise' => {
description: 'Carte Grise',
doc_class: Mindee::Product::FR::CarteGrise::CarteGriseV1,
doc_class: Mindee::V1::Product::FR::CarteGrise::CarteGriseV1,
sync: true,
async: false,
},
'fr-energy-bill' => {
description: 'Energy Bill',
doc_class: Mindee::Product::FR::EnergyBill::EnergyBillV1,
doc_class: Mindee::V1::Product::FR::EnergyBill::EnergyBillV1,
sync: false,
async: true,
},
'fr-health-card' => {
description: 'Health Card',
doc_class: Mindee::Product::FR::HealthCard::HealthCardV1,
doc_class: Mindee::V1::Product::FR::HealthCard::HealthCardV1,
sync: false,
async: true,
},
'fr-carte-nationale-d-identite' => {
description: "Carte Nationale d'Identité",
doc_class: Mindee::Product::FR::IdCard::IdCardV2,
doc_class: Mindee::V1::Product::FR::IdCard::IdCardV2,
sync: true,
async: false,
},
'fr-payslip' => {
description: 'Payslip',
doc_class: Mindee::Product::FR::Payslip::PayslipV3,
doc_class: Mindee::V1::Product::FR::Payslip::PayslipV3,
sync: false,
async: true,
},
'ind-passport-india' => {
description: 'Passport - India',
doc_class: Mindee::Product::IND::IndianPassport::IndianPassportV1,
doc_class: Mindee::V1::Product::IND::IndianPassport::IndianPassportV1,
sync: false,
async: true,
},
'international-id' => {
description: 'International ID',
doc_class: Mindee::Product::InternationalId::InternationalIdV2,
doc_class: Mindee::V1::Product::InternationalId::InternationalIdV2,
sync: false,
async: true,
},
'invoice' => {
description: 'Invoice',
doc_class: Mindee::Product::Invoice::InvoiceV4,
doc_class: Mindee::V1::Product::Invoice::InvoiceV4,
sync: true,
async: true,
},
'invoice-splitter' => {
description: 'Invoice Splitter',
doc_class: Mindee::Product::InvoiceSplitter::InvoiceSplitterV1,
doc_class: Mindee::V1::Product::InvoiceSplitter::InvoiceSplitterV1,
sync: false,
async: true,
},
'multi-receipts-detector' => {
description: 'Multi Receipts Detector',
doc_class: Mindee::Product::MultiReceiptsDetector::MultiReceiptsDetectorV1,
doc_class: Mindee::V1::Product::MultiReceiptsDetector::MultiReceiptsDetectorV1,
sync: true,
async: false,
},
'nutrition-facts-label' => {
description: 'Nutrition Facts Label',
doc_class: Mindee::Product::NutritionFactsLabel::NutritionFactsLabelV1,
doc_class: Mindee::V1::Product::NutritionFactsLabel::NutritionFactsLabelV1,
sync: false,
async: true,
},
'passport' => {
description: 'Passport',
doc_class: Mindee::Product::Passport::PassportV1,
doc_class: Mindee::V1::Product::Passport::PassportV1,
sync: true,
async: false,
},
'receipt' => {
description: 'Receipt',
doc_class: Mindee::Product::Receipt::ReceiptV5,
doc_class: Mindee::V1::Product::Receipt::ReceiptV5,
sync: true,
async: true,
},
'resume' => {
description: 'Resume',
doc_class: Mindee::Product::Resume::ResumeV1,
doc_class: Mindee::V1::Product::Resume::ResumeV1,
sync: false,
async: true,
},
'us-bank-check' => {
description: 'Bank Check',
doc_class: Mindee::Product::US::BankCheck::BankCheckV1,
doc_class: Mindee::V1::Product::US::BankCheck::BankCheckV1,
sync: true,
async: false,
},
'us-healthcare-card' => {
description: 'Healthcare Card',
doc_class: Mindee::Product::US::HealthcareCard::HealthcareCardV1,
doc_class: Mindee::V1::Product::US::HealthcareCard::HealthcareCardV1,
sync: false,
async: true,
},
'us-us-mail' => {
description: 'US Mail',
doc_class: Mindee::Product::US::UsMail::UsMailV3,
doc_class: Mindee::V1::Product::US::UsMail::UsMailV3,
sync: false,
async: true,
},
Expand Down
6 changes: 3 additions & 3 deletions bin/v2/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ def setup_product_params

# @param product_command [String]
# @param options [Hash]
# @return [Mindee::Parsing::Common::ApiResponse]
# @return [Mindee::V1::Parsing::Common::ApiResponse]
def send(product_command, options)
mindee_client = Mindee::ClientV2.new(api_key: options[:api_key])
mindee_client = Mindee::V2::Client.new(api_key: options[:api_key])
response_class = V2_PRODUCTS[product_command][:response_class]
input_source = setup_input_source(options)
params = setup_product_params
Expand All @@ -202,7 +202,7 @@ def send(product_command, options)
# @param options [Hash]
# @return [Mindee::V2::Parsing::Search::SearchResponse]
def search(options)
mindee_client = Mindee::ClientV2.new(api_key: options[:api_key])
mindee_client = Mindee::V2::Client.new(api_key: options[:api_key])
mindee_client.search_models(options[:model_name], options[:model_type])
end

Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/bank_account_details_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
require 'mindee'

# Init a new client
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
input_source,
Mindee::Product::FR::BankAccountDetails::BankAccountDetailsV1
Mindee::V1::Product::FR::BankAccountDetails::BankAccountDetailsV1
)

# Print a full summary of the parsed data in RST format
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/bank_account_details_v2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
require 'mindee'

# Init a new client
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
input_source,
Mindee::Product::FR::BankAccountDetails::BankAccountDetailsV2
Mindee::V1::Product::FR::BankAccountDetails::BankAccountDetailsV2
)

# Print a full summary of the parsed data in RST format
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/bank_check_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
require 'mindee'

# Init a new client
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
input_source,
Mindee::Product::US::BankCheck::BankCheckV1
Mindee::V1::Product::US::BankCheck::BankCheckV1
)

# Print a full summary of the parsed data in RST format
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/bank_statement_fr_v2_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
require 'mindee'

# Init a new client
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
input_source,
Mindee::Product::FR::BankStatement::BankStatementV2
Mindee::V1::Product::FR::BankStatement::BankStatementV2
)

# Print a full summary of the parsed data in RST format
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/barcode_reader_v1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
require 'mindee'

# Init a new client
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
input_source,
Mindee::Product::BarcodeReader::BarcodeReaderV1
Mindee::V1::Product::BarcodeReader::BarcodeReaderV1
)

# Print a full summary of the parsed data in RST format
Expand Down
4 changes: 2 additions & 2 deletions docs/code_samples/bill_of_lading_v1_async.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
require 'mindee'

# Init a new client
mindee_client = Mindee::Client.new(api_key: 'my-api-key')
mindee_client = Mindee::V1::Client.new(api_key: 'my-api-key')

# Load a file from disk
input_source = mindee_client.source_from_path('/path/to/the/file.ext')

# Parse the file
result = mindee_client.parse(
input_source,
Mindee::Product::BillOfLading::BillOfLadingV1
Mindee::V1::Product::BillOfLading::BillOfLadingV1
)

# Print a full summary of the parsed data in RST format
Expand Down
Loading