Class: Mindee::Product::MultiReceiptsDetector::MultiReceiptsDetectorV1Page

Inherits:
Mindee::Parsing::Common::Page show all
Defined in:
lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_page.rb

Overview

Multi Receipts Detector API version 1.1 page data.

Instance Attribute Summary

Attributes inherited from Mindee::Parsing::Common::Page

#extras, #orientation, #page_id, #prediction

Instance Method Summary collapse

Methods inherited from Mindee::Parsing::Common::Page

#to_s

Constructor Details

#initialize(prediction) ⇒ MultiReceiptsDetectorV1Page

Returns a new instance of MultiReceiptsDetectorV1Page.

Parameters:

  • prediction (Hash)


12
13
14
15
16
17
18
19
20
21
22
# File 'lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_page.rb', line 12

def initialize(prediction)
  super
  @prediction = if prediction['prediction'].empty?
                  nil
                else
                  MultiReceiptsDetectorV1PagePrediction.new(
                    prediction['prediction'],
                    prediction['id']
                  )
                end
end