From ed2910aecd18a0f121fcf04c815bcf72efe8f18d Mon Sep 17 00:00:00 2001 From: sebastianMindee Date: Fri, 14 Mar 2025 16:33:31 +0100 Subject: [PATCH] :memo: update documentation & description on some products --- docs/extras/guide/expense_receipts_v5.md | 49 +++++++------- docs/extras/guide/financial_document_v1.md | 65 ++++++++++--------- docs/extras/guide/idcard_fr_v2.md | 10 +-- docs/extras/guide/ind_passport_v1.md | 8 +-- docs/extras/guide/international_id_v2.md | 12 ++-- docs/extras/guide/invoice_splitter_v1.md | 22 +++---- docs/extras/guide/invoices_v4.md | 36 +++++----- docs/extras/guide/resume_v1.md | 6 +- .../delivery_note_v1_document.py | 2 +- .../financial_document_v1_document.py | 31 +++++---- .../financial_document_v1_line_item.py | 2 +- mindee/product/invoice/invoice_v4_document.py | 28 ++++---- .../product/invoice/invoice_v4_line_item.py | 4 +- mindee/product/receipt/receipt_v5_document.py | 16 ++--- .../product/receipt/receipt_v5_line_item.py | 2 +- 15 files changed, 146 insertions(+), 147 deletions(-) diff --git a/docs/extras/guide/expense_receipts_v5.md b/docs/extras/guide/expense_receipts_v5.md index 3e5ae023..b8b58d0c 100644 --- a/docs/extras/guide/expense_receipts_v5.md +++ b/docs/extras/guide/expense_receipts_v5.md @@ -200,7 +200,7 @@ The `Taxes` field represents a list-like collection of `TaxField` objects. As it Fields which are specific to this product; they are not used in any other product. ### Line Items Field -List of line item details. +List of all line items on the receipt. A `ReceiptV5LineItem` implements the following attributes: @@ -213,17 +213,17 @@ A `ReceiptV5LineItem` implements the following attributes: The following fields are extracted for Receipt V5: ## Purchase Category -**category** ([ClassificationField](#classificationfield)): The purchase category among predefined classes. +**category** ([ClassificationField](#classificationfield)): The purchase category of the receipt. #### Possible values include: - - toll - - food - - parking - - transport - - accommodation - - gasoline - - telecom - - miscellaneous + - 'toll' + - 'food' + - 'parking' + - 'transport' + - 'accommodation' + - 'gasoline' + - 'telecom' + - 'miscellaneous' ```py print(result.document.inference.prediction.category.value) @@ -237,18 +237,18 @@ print(result.document.inference.prediction.date.value) ``` ## Document Type -**document_type** ([ClassificationField](#classificationfield)): One of: 'CREDIT CARD RECEIPT', 'EXPENSE RECEIPT'. +**document_type** ([ClassificationField](#classificationfield)): The type of receipt: EXPENSE RECEIPT or CREDIT CARD RECEIPT. #### Possible values include: - - expense_receipt - - credit_card_receipt + - 'EXPENSE RECEIPT' + - 'CREDIT CARD RECEIPT' ```py print(result.document.inference.prediction.document_type.value) ``` ## Line Items -**line_items** (List[[ReceiptV5LineItem](#line-items-field)]): List of line item details. +**line_items** (List[[ReceiptV5LineItem](#line-items-field)]): List of all line items on the receipt. ```py for line_items_elem in result.document.inference.prediction.line_items: @@ -256,7 +256,7 @@ for line_items_elem in result.document.inference.prediction.line_items: ``` ## Expense Locale -**locale** ([LocaleField](#localefield)): The locale detected on the document. +**locale** ([LocaleField](#localefield)): The locale of the document. ```py print(result.document.inference.prediction.locale.value) @@ -270,14 +270,15 @@ print(result.document.inference.prediction.receipt_number.value) ``` ## Purchase Subcategory -**subcategory** ([ClassificationField](#classificationfield)): The purchase subcategory among predefined classes for transport and food. +**subcategory** ([ClassificationField](#classificationfield)): The purchase subcategory of the receipt for transport and food. #### Possible values include: - - plane - - taxi - - train - - restaurant - - shopping + - 'plane' + - 'taxi' + - 'train' + - 'restaurant' + - 'shopping' + - None ```py print(result.document.inference.prediction.subcategory.value) @@ -291,7 +292,7 @@ print(result.document.inference.prediction.supplier_address.value) ``` ## Supplier Company Registrations -**supplier_company_registrations** (List[[CompanyRegistrationField](#companyregistrationfield)]): List of company registrations associated to the supplier. +**supplier_company_registrations** (List[[CompanyRegistrationField](#companyregistrationfield)]): List of company registration numbers associated to the supplier. ```py for supplier_company_registrations_elem in result.document.inference.prediction.supplier_company_registrations: @@ -313,7 +314,7 @@ print(result.document.inference.prediction.supplier_phone_number.value) ``` ## Taxes -**taxes** (List[[TaxField](#taxes)]): List of tax lines information. +**taxes** (List[[TaxField](#taxes)]): The list of taxes present on the receipt. ```py for taxes_elem in result.document.inference.prediction.taxes: @@ -349,7 +350,7 @@ print(result.document.inference.prediction.total_net.value) ``` ## Total Tax -**total_tax** ([AmountField](#amountfield)): The total amount of taxes. +**total_tax** ([AmountField](#amountfield)): The sum of all taxes. ```py print(result.document.inference.prediction.total_tax.value) diff --git a/docs/extras/guide/financial_document_v1.md b/docs/extras/guide/financial_document_v1.md index 28f623d5..79f20a33 100644 --- a/docs/extras/guide/financial_document_v1.md +++ b/docs/extras/guide/financial_document_v1.md @@ -244,7 +244,7 @@ The `Taxes` field represents a list-like collection of `TaxField` objects. As it Fields which are specific to this product; they are not used in any other product. ### Line Items Field -List of line item details. +List of line item present on the document. A `FinancialDocumentV1LineItem` implements the following attributes: @@ -268,17 +268,17 @@ print(result.document.inference.prediction.billing_address.value) ``` ## Purchase Category -**category** ([ClassificationField](#classificationfield)): The purchase category among predefined classes. +**category** ([ClassificationField](#classificationfield)): The purchase category, only for receipts. #### Possible values include: - - toll - - food - - parking - - transport - - accommodation - - gasoline - - telecom - - miscellaneous + - 'toll' + - 'food' + - 'parking' + - 'transport' + - 'accommodation' + - 'gasoline' + - 'telecom' + - 'miscellaneous' ```py print(result.document.inference.prediction.category.value) @@ -292,7 +292,7 @@ print(result.document.inference.prediction.customer_address.value) ``` ## Customer Company Registrations -**customer_company_registrations** (List[[CompanyRegistrationField](#companyregistrationfield)]): List of company registrations associated to the customer. +**customer_company_registrations** (List[[CompanyRegistrationField](#companyregistrationfield)]): List of company registration numbers associated to the customer. ```py for customer_company_registrations_elem in result.document.inference.prediction.customer_company_registrations: @@ -321,20 +321,20 @@ print(result.document.inference.prediction.date.value) ``` ## Document Number -**document_number** ([StringField](#stringfield)): The document number or identifier. +**document_number** ([StringField](#stringfield)): The document number or identifier (invoice number or receipt number). ```py print(result.document.inference.prediction.document_number.value) ``` ## Document Type -**document_type** ([ClassificationField](#classificationfield)): One of: 'INVOICE', 'CREDIT NOTE', 'CREDIT CARD RECEIPT', 'EXPENSE RECEIPT'. +**document_type** ([ClassificationField](#classificationfield)): The type of the document: INVOICE or CREDIT NOTE if it is an invoice, CREDIT CARD RECEIPT or EXPENSE RECEIPT if it is a receipt. #### Possible values include: - - INVOICE - - CREDIT NOTE - - CREDIT CARD RECEIPT - - EXPENSE RECEIPT + - 'INVOICE' + - 'CREDIT NOTE' + - 'CREDIT CARD RECEIPT' + - 'EXPENSE RECEIPT' ```py print(result.document.inference.prediction.document_type.value) @@ -355,7 +355,7 @@ print(result.document.inference.prediction.invoice_number.value) ``` ## Line Items -**line_items** (List[[FinancialDocumentV1LineItem](#line-items-field)]): List of line item details. +**line_items** (List[[FinancialDocumentV1LineItem](#line-items-field)]): List of line item present on the document. ```py for line_items_elem in result.document.inference.prediction.line_items: @@ -363,7 +363,7 @@ for line_items_elem in result.document.inference.prediction.line_items: ``` ## Locale -**locale** ([LocaleField](#localefield)): The locale detected on the document. +**locale** ([LocaleField](#localefield)): The locale of the document. ```py print(result.document.inference.prediction.locale.value) @@ -377,7 +377,7 @@ print(result.document.inference.prediction.payment_date.value) ``` ## Purchase Order Number -**po_number** ([StringField](#stringfield)): The purchase order number. +**po_number** ([StringField](#stringfield)): The purchase order number, only if the document is an invoice. ```py print(result.document.inference.prediction.po_number.value) @@ -391,7 +391,7 @@ print(result.document.inference.prediction.receipt_number.value) ``` ## Reference Numbers -**reference_numbers** (List[[StringField](#stringfield)]): List of Reference numbers, including PO number. +**reference_numbers** (List[[StringField](#stringfield)]): List of Reference numbers, including PO number, only if the document is an invoice. ```py for reference_numbers_elem in result.document.inference.prediction.reference_numbers: @@ -406,14 +406,15 @@ print(result.document.inference.prediction.shipping_address.value) ``` ## Purchase Subcategory -**subcategory** ([ClassificationField](#classificationfield)): The purchase subcategory among predefined classes for transport and food. +**subcategory** ([ClassificationField](#classificationfield)): The purchase subcategory for transport and food, only for receipts. #### Possible values include: - - plane - - taxi - - train - - restaurant - - shopping + - 'plane' + - 'taxi' + - 'train' + - 'restaurant' + - 'shopping' + - None ```py print(result.document.inference.prediction.subcategory.value) @@ -427,7 +428,7 @@ print(result.document.inference.prediction.supplier_address.value) ``` ## Supplier Company Registrations -**supplier_company_registrations** (List[[CompanyRegistrationField](#companyregistrationfield)]): List of company registrations associated to the supplier. +**supplier_company_registrations** (List[[CompanyRegistrationField](#companyregistrationfield)]): List of company registration numbers associated to the supplier. ```py for supplier_company_registrations_elem in result.document.inference.prediction.supplier_company_registrations: @@ -449,7 +450,7 @@ print(result.document.inference.prediction.supplier_name.value) ``` ## Supplier Payment Details -**supplier_payment_details** (List[[PaymentDetailsField](#paymentdetailsfield)]): List of payment details associated to the supplier. +**supplier_payment_details** (List[[PaymentDetailsField](#paymentdetailsfield)]): List of payment details associated to the supplier (only for invoices). ```py for supplier_payment_details_elem in result.document.inference.prediction.supplier_payment_details: @@ -471,7 +472,7 @@ print(result.document.inference.prediction.supplier_website.value) ``` ## Taxes -**taxes** (List[[TaxField](#taxes)]): List of tax lines information. +**taxes** (List[[TaxField](#taxes)]): List of all taxes on the document. ```py for taxes_elem in result.document.inference.prediction.taxes: @@ -479,7 +480,7 @@ for taxes_elem in result.document.inference.prediction.taxes: ``` ## Purchase Time -**time** ([StringField](#stringfield)): The time the purchase was made. +**time** ([StringField](#stringfield)): The time the purchase was made (only for receipts). ```py print(result.document.inference.prediction.time.value) @@ -507,7 +508,7 @@ print(result.document.inference.prediction.total_net.value) ``` ## Total Tax -**total_tax** ([AmountField](#amountfield)): The total amount of taxes. +**total_tax** ([AmountField](#amountfield)): The sum of all taxes present on the document. ```py print(result.document.inference.prediction.total_tax.value) diff --git a/docs/extras/guide/idcard_fr_v2.md b/docs/extras/guide/idcard_fr_v2.md index 1ef7eed1..4b38b671 100644 --- a/docs/extras/guide/idcard_fr_v2.md +++ b/docs/extras/guide/idcard_fr_v2.md @@ -174,9 +174,9 @@ print(result.document.inference.prediction.document_number.value) [📄](#page-level-fields "This field is only present on individual pages.")**document_side** ([ClassificationField](#classificationfield)): The sides of the document which are visible. #### Possible values include: - - RECTO - - VERSO - - RECTO & VERSO + - 'RECTO' + - 'VERSO' + - 'RECTO & VERSO' ```py for document_side_elem in result.document.document_side: @@ -187,8 +187,8 @@ for document_side_elem in result.document.document_side: [📄](#page-level-fields "This field is only present on individual pages.")**document_type** ([ClassificationField](#classificationfield)): The document type or format. #### Possible values include: - - NEW - - OLD + - 'NEW' + - 'OLD' ```py for document_type_elem in result.document.document_type: diff --git a/docs/extras/guide/ind_passport_v1.md b/docs/extras/guide/ind_passport_v1.md index 40aa8fd4..927d2e69 100644 --- a/docs/extras/guide/ind_passport_v1.md +++ b/docs/extras/guide/ind_passport_v1.md @@ -167,8 +167,8 @@ print(result.document.inference.prediction.file_number.value) **gender** ([ClassificationField](#classificationfield)): The gender of the passport holder. #### Possible values include: - - M - - F + - 'M' + - 'F' ```py print(result.document.inference.prediction.gender.value) @@ -262,8 +262,8 @@ print(result.document.inference.prediction.old_passport_place_of_issue.value) **page_number** ([ClassificationField](#classificationfield)): The page number of the passport document. #### Possible values include: - - 1 - - 2 + - '1' + - '2' ```py print(result.document.inference.prediction.page_number.value) diff --git a/docs/extras/guide/international_id_v2.md b/docs/extras/guide/international_id_v2.md index 81b005ef..d4e2bb62 100644 --- a/docs/extras/guide/international_id_v2.md +++ b/docs/extras/guide/international_id_v2.md @@ -141,12 +141,12 @@ print(result.document.inference.prediction.document_number.value) **document_type** ([ClassificationField](#classificationfield)): The type of personal identification document. #### Possible values include: - - IDENTIFICATION_CARD - - PASSPORT - - DRIVER_LICENSE - - VISA - - RESIDENCY_CARD - - VOTER_REGISTRATION + - 'IDENTIFICATION_CARD' + - 'PASSPORT' + - 'DRIVER_LICENSE' + - 'VISA' + - 'RESIDENCY_CARD' + - 'VOTER_REGISTRATION' ```py print(result.document.inference.prediction.document_type.value) diff --git a/docs/extras/guide/invoice_splitter_v1.md b/docs/extras/guide/invoice_splitter_v1.md index 5f462f53..6fb548d9 100644 --- a/docs/extras/guide/invoice_splitter_v1.md +++ b/docs/extras/guide/invoice_splitter_v1.md @@ -40,25 +40,19 @@ Document Inference ######### -:Product: mindee/invoice_splitter v1.1 +:Product: mindee/invoice_splitter v1.2 :Rotation applied: No Prediction ========== :Invoice Page Groups: - :Page indexes: 0 - :Page indexes: 1 - -Page Predictions -================ - -Page 0 ------- -:Invoice Page Groups: - -Page 1 ------- -:Invoice Page Groups: + +--------------------------------------------------------------------------+ + | Page Indexes | + +==========================================================================+ + | 0 | + +--------------------------------------------------------------------------+ + | 1 | + +--------------------------------------------------------------------------+ ``` # Field Types diff --git a/docs/extras/guide/invoices_v4.md b/docs/extras/guide/invoices_v4.md index 5760c433..63c7e484 100644 --- a/docs/extras/guide/invoices_v4.md +++ b/docs/extras/guide/invoices_v4.md @@ -232,12 +232,12 @@ The `Taxes` field represents a list-like collection of `TaxField` objects. As it Fields which are specific to this product; they are not used in any other product. ### Line Items Field -List of line item details. +List of all the line items present on the invoice. A `InvoiceV4LineItem` implements the following attributes: * **description** (`str`): The item description. -* **product_code** (`str`): The product code referring to the item. +* **product_code** (`str`): The product code of the item. * **quantity** (`float`): The item quantity * **tax_amount** (`float`): The item tax amount. * **tax_rate** (`float`): The item tax rate in percentage. @@ -249,7 +249,7 @@ A `InvoiceV4LineItem` implements the following attributes: The following fields are extracted for Invoice V4: ## Billing Address -**billing_address** ([StringField](#stringfield)): The customer's address used for billing. +**billing_address** ([StringField](#stringfield)): The customer billing address. ```py print(result.document.inference.prediction.billing_address.value) @@ -263,7 +263,7 @@ print(result.document.inference.prediction.customer_address.value) ``` ## Customer Company Registrations -**customer_company_registrations** (List[[CompanyRegistrationField](#companyregistrationfield)]): List of company registrations associated to the customer. +**customer_company_registrations** (List[[CompanyRegistrationField](#companyregistrationfield)]): List of company registration numbers associated to the customer. ```py for customer_company_registrations_elem in result.document.inference.prediction.customer_company_registrations: @@ -292,11 +292,11 @@ print(result.document.inference.prediction.date.value) ``` ## Document Type -**document_type** ([ClassificationField](#classificationfield)): One of: 'INVOICE', 'CREDIT NOTE'. +**document_type** ([ClassificationField](#classificationfield)): Document type: INVOICE or CREDIT NOTE. #### Possible values include: - - INVOICE - - CREDIT NOTE + - 'INVOICE' + - 'CREDIT NOTE' ```py print(result.document.inference.prediction.document_type.value) @@ -317,7 +317,7 @@ print(result.document.inference.prediction.invoice_number.value) ``` ## Line Items -**line_items** (List[[InvoiceV4LineItem](#line-items-field)]): List of line item details. +**line_items** (List[[InvoiceV4LineItem](#line-items-field)]): List of all the line items present on the invoice. ```py for line_items_elem in result.document.inference.prediction.line_items: @@ -325,14 +325,14 @@ for line_items_elem in result.document.inference.prediction.line_items: ``` ## Locale -**locale** ([LocaleField](#localefield)): The locale detected on the document. +**locale** ([LocaleField](#localefield)): The locale of the document. ```py print(result.document.inference.prediction.locale.value) ``` ## Payment Date -**payment_date** ([DateField](#datefield)): The date on which the payment is due/ was full-filled. +**payment_date** ([DateField](#datefield)): The date on which the payment is due / was full-filled. ```py print(result.document.inference.prediction.payment_date.value) @@ -346,7 +346,7 @@ print(result.document.inference.prediction.po_number.value) ``` ## Reference Numbers -**reference_numbers** (List[[StringField](#stringfield)]): List of Reference numbers, including PO number. +**reference_numbers** (List[[StringField](#stringfield)]): List of all reference numbers on the invoice, including the purchase order number. ```py for reference_numbers_elem in result.document.inference.prediction.reference_numbers: @@ -368,7 +368,7 @@ print(result.document.inference.prediction.supplier_address.value) ``` ## Supplier Company Registrations -**supplier_company_registrations** (List[[CompanyRegistrationField](#companyregistrationfield)]): List of company registrations associated to the supplier. +**supplier_company_registrations** (List[[CompanyRegistrationField](#companyregistrationfield)]): List of company registration numbers associated to the supplier. ```py for supplier_company_registrations_elem in result.document.inference.prediction.supplier_company_registrations: @@ -376,7 +376,7 @@ for supplier_company_registrations_elem in result.document.inference.prediction. ``` ## Supplier Email -**supplier_email** ([StringField](#stringfield)): The email of the supplier or merchant. +**supplier_email** ([StringField](#stringfield)): The email address of the supplier or merchant. ```py print(result.document.inference.prediction.supplier_email.value) @@ -390,7 +390,7 @@ print(result.document.inference.prediction.supplier_name.value) ``` ## Supplier Payment Details -**supplier_payment_details** (List[[PaymentDetailsField](#paymentdetailsfield)]): List of payment details associated to the supplier. +**supplier_payment_details** (List[[PaymentDetailsField](#paymentdetailsfield)]): List of payment details associated to the supplier of the invoice. ```py for supplier_payment_details_elem in result.document.inference.prediction.supplier_payment_details: @@ -412,7 +412,7 @@ print(result.document.inference.prediction.supplier_website.value) ``` ## Taxes -**taxes** (List[[TaxField](#taxes)]): List of tax line details. +**taxes** (List[[TaxField](#taxes)]): List of taxes. Each item contains the detail of the tax. ```py for taxes_elem in result.document.inference.prediction.taxes: @@ -420,21 +420,21 @@ for taxes_elem in result.document.inference.prediction.taxes: ``` ## Total Amount -**total_amount** ([AmountField](#amountfield)): The total amount paid: includes taxes, tips, fees, and other charges. +**total_amount** ([AmountField](#amountfield)): The total amount of the invoice: includes taxes, tips, fees, and other charges. ```py print(result.document.inference.prediction.total_amount.value) ``` ## Total Net -**total_net** ([AmountField](#amountfield)): The net amount paid: does not include taxes, fees, and discounts. +**total_net** ([AmountField](#amountfield)): The net amount of the invoice: does not include taxes, fees, and discounts. ```py print(result.document.inference.prediction.total_net.value) ``` ## Total Tax -**total_tax** ([AmountField](#amountfield)): The total tax: includes all the taxes paid for this invoice. +**total_tax** ([AmountField](#amountfield)): The total tax: the sum of all the taxes for this invoice. ```py print(result.document.inference.prediction.total_tax.value) diff --git a/docs/extras/guide/resume_v1.md b/docs/extras/guide/resume_v1.md index 8186aedd..61bdb414 100644 --- a/docs/extras/guide/resume_v1.md +++ b/docs/extras/guide/resume_v1.md @@ -237,9 +237,9 @@ print(result.document.inference.prediction.document_language.value) **document_type** ([ClassificationField](#classificationfield)): The type of the document sent. #### Possible values include: - - RESUME - - MOTIVATION_LETTER - - RECOMMENDATION_LETTER + - 'RESUME' + - 'MOTIVATION_LETTER' + - 'RECOMMENDATION_LETTER' ```py print(result.document.inference.prediction.document_type.value) diff --git a/mindee/product/delivery_note/delivery_note_v1_document.py b/mindee/product/delivery_note/delivery_note_v1_document.py index 0b42de9c..c58c61d5 100644 --- a/mindee/product/delivery_note/delivery_note_v1_document.py +++ b/mindee/product/delivery_note/delivery_note_v1_document.py @@ -9,7 +9,7 @@ class DeliveryNoteV1Document(Prediction): - """Delivery note API version 1.1 document data.""" + """Delivery note API version 1.2 document data.""" customer_address: StringField """The address of the customer receiving the goods.""" diff --git a/mindee/product/financial_document/financial_document_v1_document.py b/mindee/product/financial_document/financial_document_v1_document.py index c4a4dccb..fa9c95bf 100644 --- a/mindee/product/financial_document/financial_document_v1_document.py +++ b/mindee/product/financial_document/financial_document_v1_document.py @@ -22,11 +22,11 @@ class FinancialDocumentV1Document(Prediction): billing_address: StringField """The customer's address used for billing.""" category: ClassificationField - """The purchase category among predefined classes.""" + """The purchase category, only for receipts.""" customer_address: StringField """The address of the customer.""" customer_company_registrations: List[CompanyRegistrationField] - """List of company registrations associated to the customer.""" + """List of company registration numbers associated to the customer.""" customer_id: StringField """The customer account number or identifier from the supplier.""" customer_name: StringField @@ -34,47 +34,50 @@ class FinancialDocumentV1Document(Prediction): date: DateField """The date the purchase was made.""" document_number: StringField - """The document number or identifier.""" + """The document number or identifier (invoice number or receipt number).""" document_type: ClassificationField - """One of: 'INVOICE', 'CREDIT NOTE', 'CREDIT CARD RECEIPT', 'EXPENSE RECEIPT'.""" + """ + The type of the document: INVOICE or CREDIT NOTE if it is an invoice, CREDIT CARD RECEIPT or EXPENSE + RECEIPT if it is a receipt. + """ due_date: DateField """The date on which the payment is due.""" invoice_number: StringField """The invoice number or identifier only if document is an invoice.""" line_items: List[FinancialDocumentV1LineItem] - """List of line item details.""" + """List of line item present on the document.""" locale: LocaleField - """The locale detected on the document.""" + """The locale of the document.""" payment_date: DateField """The date on which the payment is due / fullfilled.""" po_number: StringField - """The purchase order number.""" + """The purchase order number, only if the document is an invoice.""" receipt_number: StringField """The receipt number or identifier only if document is a receipt.""" reference_numbers: List[StringField] - """List of Reference numbers, including PO number.""" + """List of Reference numbers, including PO number, only if the document is an invoice.""" shipping_address: StringField """The customer's address used for shipping.""" subcategory: ClassificationField - """The purchase subcategory among predefined classes for transport and food.""" + """The purchase subcategory for transport and food, only for receipts.""" supplier_address: StringField """The address of the supplier or merchant.""" supplier_company_registrations: List[CompanyRegistrationField] - """List of company registrations associated to the supplier.""" + """List of company registration numbers associated to the supplier.""" supplier_email: StringField """The email of the supplier or merchant.""" supplier_name: StringField """The name of the supplier or merchant.""" supplier_payment_details: List[PaymentDetailsField] - """List of payment details associated to the supplier.""" + """List of payment details associated to the supplier (only for invoices).""" supplier_phone_number: StringField """The phone number of the supplier or merchant.""" supplier_website: StringField """The website URL of the supplier or merchant.""" taxes: Taxes - """List of tax lines information.""" + """List of all taxes on the document.""" time: StringField - """The time the purchase was made.""" + """The time the purchase was made (only for receipts).""" tip: AmountField """The total amount of tip and gratuity""" total_amount: AmountField @@ -82,7 +85,7 @@ class FinancialDocumentV1Document(Prediction): total_net: AmountField """The net amount paid: does not include taxes, fees, and discounts.""" total_tax: AmountField - """The total amount of taxes.""" + """The sum of all taxes present on the document.""" def __init__( self, diff --git a/mindee/product/financial_document/financial_document_v1_line_item.py b/mindee/product/financial_document/financial_document_v1_line_item.py index 90065406..7ab4206d 100644 --- a/mindee/product/financial_document/financial_document_v1_line_item.py +++ b/mindee/product/financial_document/financial_document_v1_line_item.py @@ -11,7 +11,7 @@ class FinancialDocumentV1LineItem(FieldPositionMixin, FieldConfidenceMixin): - """List of line item details.""" + """List of line item present on the document.""" description: Optional[str] """The item description.""" diff --git a/mindee/product/invoice/invoice_v4_document.py b/mindee/product/invoice/invoice_v4_document.py index ed2cfbf2..3a8a2764 100644 --- a/mindee/product/invoice/invoice_v4_document.py +++ b/mindee/product/invoice/invoice_v4_document.py @@ -18,11 +18,11 @@ class InvoiceV4Document(Prediction): """Invoice API version 4.9 document data.""" billing_address: StringField - """The customer's address used for billing.""" + """The customer billing address.""" customer_address: StringField """The address of the customer.""" customer_company_registrations: List[CompanyRegistrationField] - """List of company registrations associated to the customer.""" + """List of company registration numbers associated to the customer.""" customer_id: StringField """The customer account number or identifier from the supplier.""" customer_name: StringField @@ -30,45 +30,45 @@ class InvoiceV4Document(Prediction): date: DateField """The date the purchase was made.""" document_type: ClassificationField - """One of: 'INVOICE', 'CREDIT NOTE'.""" + """Document type: INVOICE or CREDIT NOTE.""" due_date: DateField """The date on which the payment is due.""" invoice_number: StringField """The invoice number or identifier.""" line_items: List[InvoiceV4LineItem] - """List of line item details.""" + """List of all the line items present on the invoice.""" locale: LocaleField - """The locale detected on the document.""" + """The locale of the document.""" payment_date: DateField - """The date on which the payment is due/ was full-filled.""" + """The date on which the payment is due / was full-filled.""" po_number: StringField """The purchase order number.""" reference_numbers: List[StringField] - """List of Reference numbers, including PO number.""" + """List of all reference numbers on the invoice, including the purchase order number.""" shipping_address: StringField """Customer's delivery address.""" supplier_address: StringField """The address of the supplier or merchant.""" supplier_company_registrations: List[CompanyRegistrationField] - """List of company registrations associated to the supplier.""" + """List of company registration numbers associated to the supplier.""" supplier_email: StringField - """The email of the supplier or merchant.""" + """The email address of the supplier or merchant.""" supplier_name: StringField """The name of the supplier or merchant.""" supplier_payment_details: List[PaymentDetailsField] - """List of payment details associated to the supplier.""" + """List of payment details associated to the supplier of the invoice.""" supplier_phone_number: StringField """The phone number of the supplier or merchant.""" supplier_website: StringField """The website URL of the supplier or merchant.""" taxes: Taxes - """List of tax line details.""" + """List of taxes. Each item contains the detail of the tax.""" total_amount: AmountField - """The total amount paid: includes taxes, tips, fees, and other charges.""" + """The total amount of the invoice: includes taxes, tips, fees, and other charges.""" total_net: AmountField - """The net amount paid: does not include taxes, fees, and discounts.""" + """The net amount of the invoice: does not include taxes, fees, and discounts.""" total_tax: AmountField - """The total tax: includes all the taxes paid for this invoice.""" + """The total tax: the sum of all the taxes for this invoice.""" def __init__( self, diff --git a/mindee/product/invoice/invoice_v4_line_item.py b/mindee/product/invoice/invoice_v4_line_item.py index 68ee439f..84c3b843 100644 --- a/mindee/product/invoice/invoice_v4_line_item.py +++ b/mindee/product/invoice/invoice_v4_line_item.py @@ -11,12 +11,12 @@ class InvoiceV4LineItem(FieldPositionMixin, FieldConfidenceMixin): - """List of line item details.""" + """List of all the line items present on the invoice.""" description: Optional[str] """The item description.""" product_code: Optional[str] - """The product code referring to the item.""" + """The product code of the item.""" quantity: Optional[float] """The item quantity""" tax_amount: Optional[float] diff --git a/mindee/product/receipt/receipt_v5_document.py b/mindee/product/receipt/receipt_v5_document.py index 6d6db0fd..89fb08ef 100644 --- a/mindee/product/receipt/receipt_v5_document.py +++ b/mindee/product/receipt/receipt_v5_document.py @@ -17,29 +17,29 @@ class ReceiptV5Document(Prediction): """Receipt API version 5.3 document data.""" category: ClassificationField - """The purchase category among predefined classes.""" + """The purchase category of the receipt.""" date: DateField """The date the purchase was made.""" document_type: ClassificationField - """One of: 'CREDIT CARD RECEIPT', 'EXPENSE RECEIPT'.""" + """The type of receipt: EXPENSE RECEIPT or CREDIT CARD RECEIPT.""" line_items: List[ReceiptV5LineItem] - """List of line item details.""" + """List of all line items on the receipt.""" locale: LocaleField - """The locale detected on the document.""" + """The locale of the document.""" receipt_number: StringField """The receipt number or identifier.""" subcategory: ClassificationField - """The purchase subcategory among predefined classes for transport and food.""" + """The purchase subcategory of the receipt for transport and food.""" supplier_address: StringField """The address of the supplier or merchant.""" supplier_company_registrations: List[CompanyRegistrationField] - """List of company registrations associated to the supplier.""" + """List of company registration numbers associated to the supplier.""" supplier_name: StringField """The name of the supplier or merchant.""" supplier_phone_number: StringField """The phone number of the supplier or merchant.""" taxes: Taxes - """List of tax lines information.""" + """The list of taxes present on the receipt.""" time: StringField """The time the purchase was made.""" tip: AmountField @@ -49,7 +49,7 @@ class ReceiptV5Document(Prediction): total_net: AmountField """The net amount paid: does not include taxes, fees, and discounts.""" total_tax: AmountField - """The total amount of taxes.""" + """The sum of all taxes.""" def __init__( self, diff --git a/mindee/product/receipt/receipt_v5_line_item.py b/mindee/product/receipt/receipt_v5_line_item.py index d2fbbf7e..c5f87f5f 100644 --- a/mindee/product/receipt/receipt_v5_line_item.py +++ b/mindee/product/receipt/receipt_v5_line_item.py @@ -11,7 +11,7 @@ class ReceiptV5LineItem(FieldPositionMixin, FieldConfidenceMixin): - """List of line item details.""" + """List of all line items on the receipt.""" description: Optional[str] """The item description."""