Class: Mindee::V1::Parsing::Standard::PaymentDetailsField
- Inherits:
-
BaseField
show all
- Defined in:
- lib/mindee/v1/parsing/standard/payment_details_field.rb
Overview
Represents payment details for invoices and receipts
Instance Attribute Summary collapse
Attributes inherited from BaseField
#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.
23
24
25
26
27
28
29
|
# File 'lib/mindee/v1/parsing/standard/payment_details_field.rb', line 23
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?
12
13
14
|
# File 'lib/mindee/v1/parsing/standard/payment_details_field.rb', line 12
def account_number
@account_number
end
|
#iban ⇒ String?
14
15
16
|
# File 'lib/mindee/v1/parsing/standard/payment_details_field.rb', line 14
def iban
@iban
end
|
#routing_number ⇒ String?
16
17
18
|
# File 'lib/mindee/v1/parsing/standard/payment_details_field.rb', line 16
def routing_number
@routing_number
end
|
#swift ⇒ String?
18
19
20
|
# File 'lib/mindee/v1/parsing/standard/payment_details_field.rb', line 18
def swift
@swift
end
|
Instance Method Details
#to_s ⇒ String
32
33
34
35
36
37
38
39
|
# File 'lib/mindee/v1/parsing/standard/payment_details_field.rb', line 32
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
|