Class: Mindee::Product::Receipt::ReceiptV4
- Inherits:
-
Mindee::Parsing::Common::Inference
- Object
- Mindee::Parsing::Common::Inference
- Mindee::Product::Receipt::ReceiptV4
- Defined in:
- lib/mindee/product/receipt/receipt_v4.rb
Overview
Expense Receipt V4 prediction inference.
Class Attribute Summary collapse
-
.endpoint_name ⇒ String
readonly
Name of the endpoint for this product.
-
.endpoint_version ⇒ String
readonly
Version for this product.
Attributes inherited from Mindee::Parsing::Common::Inference
#is_rotation_applied, #pages, #prediction, #product
Instance Method Summary collapse
-
#initialize(prediction) ⇒ ReceiptV4
constructor
A new instance of ReceiptV4.
Methods inherited from Mindee::Parsing::Common::Inference
Constructor Details
#initialize(prediction) ⇒ ReceiptV4
Returns a new instance of ReceiptV4.
16 17 18 19 20 21 22 23 |
# File 'lib/mindee/product/receipt/receipt_v4.rb', line 16 def initialize(prediction) super @prediction = ReceiptV4Document.new(prediction['prediction'], nil) @pages = [] prediction['pages'].each do |page| @pages.push(ReceiptV4Page.new(page)) end end |
Class Attribute Details
.endpoint_name ⇒ String (readonly)
Name of the endpoint for this product.
28 29 30 |
# File 'lib/mindee/product/receipt/receipt_v4.rb', line 28 def endpoint_name @endpoint_name end |
.endpoint_version ⇒ String (readonly)
Version for this product.
31 32 33 |
# File 'lib/mindee/product/receipt/receipt_v4.rb', line 31 def endpoint_version @endpoint_version end |