Class: Mindee::Parsing::Standard::PaymentDetailsField
- Inherits:
-
Field
show all
- Defined in:
- lib/mindee/parsing/standard/payment_details_field.rb
Overview
Represents payment details for invoices and receipts
Instance Attribute Summary collapse
Attributes inherited from Field
#reconstructed, #value
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary
collapse
array_confidence, array_sum, float_to_string
Constructor Details
#initialize(prediction, page_id, reconstructed: false) ⇒ PaymentDetailsField
Returns a new instance of PaymentDetailsField.
22
23
24
25
26
27
28
|
# File 'lib/mindee/parsing/standard/payment_details_field.rb', line 22
def initialize(prediction, page_id, reconstructed: false)
super
@account_number = prediction['account_number']
@iban = prediction['iban']
@routing_number = prediction['routing_number']
@swift = prediction['swift']
end
|
Instance Attribute Details
#account_number ⇒ String?
11
12
13
|
# File 'lib/mindee/parsing/standard/payment_details_field.rb', line 11
def account_number
@account_number
end
|
#iban ⇒ String?
13
14
15
|
# File 'lib/mindee/parsing/standard/payment_details_field.rb', line 13
def iban
@iban
end
|
#routing_number ⇒ String?
15
16
17
|
# File 'lib/mindee/parsing/standard/payment_details_field.rb', line 15
def routing_number
@routing_number
end
|
#swift ⇒ String?
17
18
19
|
# File 'lib/mindee/parsing/standard/payment_details_field.rb', line 17
def swift
@swift
end
|
Instance Method Details
#to_s ⇒ String
31
32
33
34
35
36
37
38
|
# File 'lib/mindee/parsing/standard/payment_details_field.rb', line 31
def to_s
out_str = String.new
out_str << "#{@account_number}; " if @account_number
out_str << "#{@iban}; " if @iban
out_str << "#{@routing_number}; " if @routing_number
out_str << "#{@swift}; " if @swift
out_str.strip
end
|