Skip to content

Commit 655ff23

Browse files
✨ add support for Findoc V1.12, Invoices V4.10, US Healthcare Cards V1.2
1 parent 65fb6d9 commit 655ff23

File tree

12 files changed

+91
-15
lines changed

12 files changed

+91
-15
lines changed

docs/global_products/financial_document_v1.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The Ruby Client Library supports the [Financial Document API](https://platform.m
1212
> | Specification | Details |
1313
> | ------------------------------ | -------------------------------------------------- |
1414
> | Endpoint Name | `financial_document` |
15-
> | Recommended Version | `v1.11` |
15+
> | Recommended Version | `v1.12` |
1616
> | Supports Polling/Webhooks | ✔️ Yes |
1717
> | Support Synchronous HTTP Calls | ✔️ Yes |
1818
> | Geography | 🌐 Global |
@@ -93,7 +93,7 @@ puts result.document
9393
########
9494
Document
9595
########
96-
:Mindee ID: f469a24d-3875-4a83-ad43-e0d5aa9da604
96+
:Mindee ID: a80ac0ee-26f6-4e2e-988a-960b240d5ba7
9797
:Filename: default_sample.jpg
9898
9999
Inference
@@ -118,7 +118,7 @@ Prediction
118118
+---------------+--------+----------+---------------+
119119
| Base | Code | Rate (%) | Amount |
120120
+===============+========+==========+===============+
121-
| | | 5.00 | 9.75 |
121+
| 195.00 | | 5.00 | 9.75 |
122122
+---------------+--------+----------+---------------+
123123
:Supplier Payment Details:
124124
:Supplier Name: JOHN SMITH
@@ -170,7 +170,7 @@ Page 0
170170
+---------------+--------+----------+---------------+
171171
| Base | Code | Rate (%) | Amount |
172172
+===============+========+==========+===============+
173-
| | | 5.00 | 9.75 |
173+
| 195.00 | | 5.00 | 9.75 |
174174
+---------------+--------+----------+---------------+
175175
:Supplier Payment Details:
176176
:Supplier Name: JOHN SMITH
@@ -382,6 +382,24 @@ puts result.document.inference.prediction.document_number.value
382382
puts result.document.inference.prediction.document_type.value
383383
```
384384

385+
## Document Type Extended
386+
**document_type_extended** ([ClassificationField](#classification-field)): Document type extended.
387+
388+
#### Possible values include:
389+
- 'CREDIT NOTE'
390+
- 'INVOICE'
391+
- 'OTHER'
392+
- 'OTHER_FINANCIAL'
393+
- 'PAYSLIP'
394+
- 'PURCHASE ORDER'
395+
- 'QUOTE'
396+
- 'RECEIPT'
397+
- 'STATEMENT'
398+
399+
```rb
400+
puts result.document.inference.prediction.document_type_extended.value
401+
```
402+
385403
## Due Date
386404
**due_date** ([DateField](#date-field)): The date on which the payment is due.
387405

docs/global_products/invoices_v4.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The Ruby Client Library supports the [Invoice API](https://platform.mindee.com/m
1212
> | Specification | Details |
1313
> | ------------------------------ | -------------------------------------------------- |
1414
> | Endpoint Name | `invoices` |
15-
> | Recommended Version | `v4.9` |
15+
> | Recommended Version | `v4.10` |
1616
> | Supports Polling/Webhooks | ✔️ Yes |
1717
> | Support Synchronous HTTP Calls | ✔️ Yes |
1818
> | Geography | 🌐 Global |
@@ -93,7 +93,7 @@ puts result.document
9393
########
9494
Document
9595
########
96-
:Mindee ID: 86b1833f-138b-4a01-8387-860204b0e631
96+
:Mindee ID: b55db8f9-ae3b-4f05-b2f1-ec0ced5e5b70
9797
:Filename: default_sample.jpg
9898
9999
Inference
@@ -117,7 +117,7 @@ Prediction
117117
+---------------+--------+----------+---------------+
118118
| Base | Code | Rate (%) | Amount |
119119
+===============+========+==========+===============+
120-
| | | 8.00 | 193.20 |
120+
| 2145.00 | | 8.00 | 193.20 |
121121
+---------------+--------+----------+---------------+
122122
:Supplier Payment Details:
123123
:Supplier Name: TURNPIKE DESIGNS
@@ -163,7 +163,7 @@ Page 0
163163
+---------------+--------+----------+---------------+
164164
| Base | Code | Rate (%) | Amount |
165165
+===============+========+==========+===============+
166-
| | | 8.00 | 193.20 |
166+
| 2145.00 | | 8.00 | 193.20 |
167167
+---------------+--------+----------+---------------+
168168
:Supplier Payment Details:
169169
:Supplier Name: TURNPIKE DESIGNS
@@ -344,6 +344,24 @@ puts result.document.inference.prediction.date.value
344344
puts result.document.inference.prediction.document_type.value
345345
```
346346

347+
## Document Type Extended
348+
**document_type_extended** ([ClassificationField](#classification-field)): Document type extended.
349+
350+
#### Possible values include:
351+
- 'CREDIT NOTE'
352+
- 'INVOICE'
353+
- 'OTHER'
354+
- 'OTHER_FINANCIAL'
355+
- 'PAYSLIP'
356+
- 'PURCHASE ORDER'
357+
- 'QUOTE'
358+
- 'RECEIPT'
359+
- 'STATEMENT'
360+
361+
```rb
362+
puts result.document.inference.prediction.document_type_extended.value
363+
```
364+
347365
## Due Date
348366
**due_date** ([DateField](#date-field)): The date on which the payment is due.
349367

docs/localized_products/us_healthcare_cards_v1.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The Ruby Client Library supports the [Healthcare Card API](https://platform.mind
1212
> | Specification | Details |
1313
> | ------------------------------ | -------------------------------------------------- |
1414
> | Endpoint Name | `us_healthcare_cards` |
15-
> | Recommended Version | `v1.1` |
15+
> | Recommended Version | `v1.2` |
1616
> | Supports Polling/Webhooks | ✔️ Yes |
1717
> | Support Synchronous HTTP Calls | ❌ No |
1818
> | Geography | 🇺🇸 United States |
@@ -138,6 +138,15 @@ A `HealthcareCardV1Copay` implements the following attributes:
138138
* `service_fees` (Float): The price of service.
139139
* `service_name` (String): The name of service of the copay.
140140

141+
#### Possible values include:
142+
- primary_care
143+
- emergency_room
144+
- urgent_care
145+
- specialist
146+
- office_visit
147+
- prescription
148+
149+
141150
# Attributes
142151
The following fields are extracted for Healthcare Card V1:
143152

@@ -222,6 +231,13 @@ puts result.document.inference.prediction.rx_bin.value
222231
puts result.document.inference.prediction.rx_grp.value
223232
```
224233

234+
## RX ID
235+
**rx_id** ([StringField](#string-field)): The ID number for prescription drug coverage.
236+
237+
```rb
238+
puts result.document.inference.prediction.rx_id.value
239+
```
240+
225241
## RX PCN
226242
**rx_pcn** ([StringField](#string-field)): The PCN number for prescription drug coverage.
227243

lib/mindee/product/financial_document/financial_document_v1_document.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module Mindee
77
module Product
88
module FinancialDocument
9-
# Financial Document API version 1.11 document data.
9+
# Financial Document API version 1.12 document data.
1010
class FinancialDocumentV1Document < Mindee::Parsing::Common::Prediction
1111
include Mindee::Parsing::Standard
1212
# The customer's address used for billing.
@@ -37,6 +37,9 @@ class FinancialDocumentV1Document < Mindee::Parsing::Common::Prediction
3737
# RECEIPT if it is a receipt.
3838
# @return [Mindee::Parsing::Standard::ClassificationField]
3939
attr_reader :document_type
40+
# Document type extended.
41+
# @return [Mindee::Parsing::Standard::ClassificationField]
42+
attr_reader :document_type_extended
4043
# The date on which the payment is due.
4144
# @return [Mindee::Parsing::Standard::DateField]
4245
attr_reader :due_date
@@ -144,6 +147,10 @@ def initialize(prediction, page_id)
144147
prediction['document_type'],
145148
page_id
146149
)
150+
@document_type_extended = Parsing::Standard::ClassificationField.new(
151+
prediction['document_type_extended'],
152+
page_id
153+
)
147154
@due_date = Parsing::Standard::DateField.new(
148155
prediction['due_date'],
149156
page_id
@@ -262,6 +269,7 @@ def to_s
262269
out_str << "\n:Shipping Address: #{@shipping_address}".rstrip
263270
out_str << "\n:Billing Address: #{@billing_address}".rstrip
264271
out_str << "\n:Document Type: #{@document_type}".rstrip
272+
out_str << "\n:Document Type Extended: #{@document_type_extended}".rstrip
265273
out_str << "\n:Purchase Subcategory: #{@subcategory}".rstrip
266274
out_str << "\n:Purchase Category: #{@category}".rstrip
267275
out_str << "\n:Total Tax: #{@total_tax}".rstrip

lib/mindee/product/financial_document/financial_document_v1_page.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module Mindee
77
module Product
88
module FinancialDocument
9-
# Financial Document API version 1.11 page data.
9+
# Financial Document API version 1.12 page data.
1010
class FinancialDocumentV1Page < Mindee::Parsing::Common::Page
1111
# @param prediction [Hash]
1212
def initialize(prediction)

lib/mindee/product/invoice/invoice_v4_document.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module Mindee
77
module Product
88
module Invoice
9-
# Invoice API version 4.9 document data.
9+
# Invoice API version 4.10 document data.
1010
class InvoiceV4Document < Mindee::Parsing::Common::Prediction
1111
include Mindee::Parsing::Standard
1212
# The customer billing address.
@@ -30,6 +30,9 @@ class InvoiceV4Document < Mindee::Parsing::Common::Prediction
3030
# Document type: INVOICE or CREDIT NOTE.
3131
# @return [Mindee::Parsing::Standard::ClassificationField]
3232
attr_reader :document_type
33+
# Document type extended.
34+
# @return [Mindee::Parsing::Standard::ClassificationField]
35+
attr_reader :document_type_extended
3336
# The date on which the payment is due.
3437
# @return [Mindee::Parsing::Standard::DateField]
3538
attr_reader :due_date
@@ -117,6 +120,10 @@ def initialize(prediction, page_id)
117120
prediction['document_type'],
118121
page_id
119122
)
123+
@document_type_extended = Parsing::Standard::ClassificationField.new(
124+
prediction['document_type_extended'],
125+
page_id
126+
)
120127
@due_date = Parsing::Standard::DateField.new(
121128
prediction['due_date'],
122129
page_id
@@ -222,6 +229,7 @@ def to_s
222229
out_str << "\n:Shipping Address: #{@shipping_address}".rstrip
223230
out_str << "\n:Billing Address: #{@billing_address}".rstrip
224231
out_str << "\n:Document Type: #{@document_type}".rstrip
232+
out_str << "\n:Document Type Extended: #{@document_type_extended}".rstrip
225233
out_str << "\n:Line Items:"
226234
out_str << line_items
227235
out_str[1..].to_s

lib/mindee/product/invoice/invoice_v4_page.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module Mindee
77
module Product
88
module Invoice
9-
# Invoice API version 4.9 page data.
9+
# Invoice API version 4.10 page data.
1010
class InvoiceV4Page < Mindee::Parsing::Common::Page
1111
# @param prediction [Hash]
1212
def initialize(prediction)

lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Mindee
77
module Product
88
module US
99
module HealthcareCard
10-
# Healthcare Card API version 1.1 document data.
10+
# Healthcare Card API version 1.2 document data.
1111
class HealthcareCardV1Document < Mindee::Parsing::Common::Prediction
1212
include Mindee::Parsing::Standard
1313
# The name of the company that provides the healthcare plan.
@@ -43,6 +43,9 @@ class HealthcareCardV1Document < Mindee::Parsing::Common::Prediction
4343
# The group number for prescription drug coverage.
4444
# @return [Mindee::Parsing::Standard::StringField]
4545
attr_reader :rx_grp
46+
# The ID number for prescription drug coverage.
47+
# @return [Mindee::Parsing::Standard::StringField]
48+
attr_reader :rx_id
4649
# The PCN number for prescription drug coverage.
4750
# @return [Mindee::Parsing::Standard::StringField]
4851
attr_reader :rx_pcn
@@ -92,6 +95,7 @@ def initialize(prediction, page_id)
9295
prediction['rx_grp'],
9396
page_id
9497
)
98+
@rx_id = Parsing::Standard::StringField.new(prediction['rx_id'], page_id)
9599
@rx_pcn = Parsing::Standard::StringField.new(
96100
prediction['rx_pcn'],
97101
page_id
@@ -111,6 +115,7 @@ def to_s
111115
out_str << "\n:Group Number: #{@group_number}".rstrip
112116
out_str << "\n:Payer ID: #{@payer_id}".rstrip
113117
out_str << "\n:RX BIN: #{@rx_bin}".rstrip
118+
out_str << "\n:RX ID: #{@rx_id}".rstrip
114119
out_str << "\n:RX GRP: #{@rx_grp}".rstrip
115120
out_str << "\n:RX PCN: #{@rx_pcn}".rstrip
116121
out_str << "\n:copays:"

lib/mindee/product/us/healthcare_card/healthcare_card_v1_page.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Mindee
77
module Product
88
module US
99
module HealthcareCard
10-
# Healthcare Card API version 1.1 page data.
10+
# Healthcare Card API version 1.2 page data.
1111
class HealthcareCardV1Page < Mindee::Parsing::Common::Page
1212
# @param prediction [Hash]
1313
def initialize(prediction)

sig/mindee/product/financial_document/financial_document_v1_document.rbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module Mindee
1414
def date: -> (Parsing::Standard::DateField)
1515
def document_number: -> (Parsing::Standard::StringField)
1616
def document_type: -> (Parsing::Standard::ClassificationField)
17+
def document_type_extended: -> (Parsing::Standard::ClassificationField)
1718
def due_date: -> (Parsing::Standard::DateField)
1819
def invoice_number: -> (Parsing::Standard::StringField)
1920
def line_items: -> (Product::FinancialDocument::FinancialDocumentV1LineItems)

sig/mindee/product/invoice/invoice_v4_document.rbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module Mindee
1212
def customer_name: -> (Parsing::Standard::StringField)
1313
def date: -> (Parsing::Standard::DateField)
1414
def document_type: -> (Parsing::Standard::ClassificationField)
15+
def document_type_extended: -> (Parsing::Standard::ClassificationField)
1516
def due_date: -> (Parsing::Standard::DateField)
1617
def invoice_number: -> (Parsing::Standard::StringField)
1718
def line_items: -> (Product::Invoice::InvoiceV4LineItems)

sig/mindee/product/us/healthcare_card/healthcare_card_v1_document.rbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module Mindee
1717
def payer_id: -> (Parsing::Standard::StringField)
1818
def rx_bin: -> (Parsing::Standard::StringField)
1919
def rx_grp: -> (Parsing::Standard::StringField)
20+
def rx_id: -> (Parsing::Standard::StringField)
2021
def rx_pcn: -> (Parsing::Standard::StringField)
2122
def copays_separator: (String) -> String
2223
def copays_to_s: -> String

0 commit comments

Comments
 (0)