Class: Mindee::Product::FR::BankAccountDetails::BankAccountDetailsV1Document

Inherits:
Mindee::Parsing::Common::Prediction show all
Includes:
Mindee::Parsing::Standard
Defined in:
lib/mindee/product/fr/bank_account_details/bank_account_details_v1_document.rb

Overview

Bank Account Details API version 1.0 document data.

Direct Known Subclasses

BankAccountDetailsV1PagePrediction

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prediction, page_id) ⇒ BankAccountDetailsV1Document

Returns a new instance of BankAccountDetailsV1Document.

Parameters:

  • prediction (Hash)
  • page_id (Integer, nil)


24
25
26
27
28
29
# File 'lib/mindee/product/fr/bank_account_details/bank_account_details_v1_document.rb', line 24

def initialize(prediction, page_id)
  super()
  @account_holder_name = StringField.new(prediction['account_holder_name'], page_id)
  @iban = StringField.new(prediction['iban'], page_id)
  @swift = StringField.new(prediction['swift'], page_id)
end

Instance Attribute Details

#account_holder_nameMindee::Parsing::Standard::StringField (readonly)

The name of the account holder as seen on the document.



14
15
16
# File 'lib/mindee/product/fr/bank_account_details/bank_account_details_v1_document.rb', line 14

def 
  @account_holder_name
end

#ibanMindee::Parsing::Standard::StringField (readonly)

The International Bank Account Number (IBAN).



17
18
19
# File 'lib/mindee/product/fr/bank_account_details/bank_account_details_v1_document.rb', line 17

def iban
  @iban
end

#swiftMindee::Parsing::Standard::StringField (readonly)

The bank's SWIFT Business Identifier Code (BIC).



20
21
22
# File 'lib/mindee/product/fr/bank_account_details/bank_account_details_v1_document.rb', line 20

def swift
  @swift
end

Instance Method Details

#to_sString

Returns:

  • (String)


32
33
34
35
36
37
38
# File 'lib/mindee/product/fr/bank_account_details/bank_account_details_v1_document.rb', line 32

def to_s
  out_str = String.new
  out_str << "\n:IBAN: #{@iban}".rstrip
  out_str << "\n:Account Holder's Name: #{@account_holder_name}".rstrip
  out_str << "\n:SWIFT Code: #{@swift}".rstrip
  out_str[1..].to_s
end