Class: Mindee::Product::FR::BankAccountDetails::BankAccountDetailsV2Bban

Inherits:
Mindee::Parsing::Standard::FeatureField show all
Includes:
Mindee::Parsing::Standard
Defined in:
lib/mindee/product/fr/bank_account_details/bank_account_details_v2_bban.rb

Overview

Full extraction of BBAN, including: branch code, bank code, account and key.

Instance Attribute Summary collapse

Attributes inherited from Mindee::Parsing::Standard::AbstractField

#bounding_box, #confidence, #page_id, #polygon

Instance Method Summary collapse

Methods inherited from Mindee::Parsing::Standard::FeatureField

#format_for_display

Methods inherited from Mindee::Parsing::Standard::AbstractField

array_confidence, array_sum, float_to_string

Constructor Details

#initialize(prediction, page_id) ⇒ BankAccountDetailsV2Bban

Returns a new instance of BankAccountDetailsV2Bban.

Parameters:

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


27
28
29
30
31
32
33
34
# File 'lib/mindee/product/fr/bank_account_details/bank_account_details_v2_bban.rb', line 27

def initialize(prediction, page_id)
  super(prediction, page_id)
  @bban_bank_code = prediction['bban_bank_code']
  @bban_branch_code = prediction['bban_branch_code']
  @bban_key = prediction['bban_key']
  @bban_number = prediction['bban_number']
  @page_id = page_id
end

Instance Attribute Details

#bban_bank_codeString (readonly)

The BBAN bank code outputted as a string.

Returns:

  • (String)


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

def bban_bank_code
  @bban_bank_code
end

#bban_branch_codeString (readonly)

The BBAN branch code outputted as a string.

Returns:

  • (String)


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

def bban_branch_code
  @bban_branch_code
end

#bban_keyString (readonly)

The BBAN key outputted as a string.

Returns:

  • (String)


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

def bban_key
  @bban_key
end

#bban_numberString (readonly)

The BBAN Account number outputted as a string.

Returns:

  • (String)


23
24
25
# File 'lib/mindee/product/fr/bank_account_details/bank_account_details_v2_bban.rb', line 23

def bban_number
  @bban_number
end

Instance Method Details

#printable_valuesHash

Returns:

  • (Hash)


37
38
39
40
41
42
43
44
# File 'lib/mindee/product/fr/bank_account_details/bank_account_details_v2_bban.rb', line 37

def printable_values
  printable = {}
  printable[:bban_bank_code] = format_for_display(@bban_bank_code)
  printable[:bban_branch_code] = format_for_display(@bban_branch_code)
  printable[:bban_key] = format_for_display(@bban_key)
  printable[:bban_number] = format_for_display(@bban_number)
  printable
end

#to_sString

Returns:

  • (String)


47
48
49
50
51
52
53
54
55
# File 'lib/mindee/product/fr/bank_account_details/bank_account_details_v2_bban.rb', line 47

def to_s
  printable = printable_values
  out_str = String.new
  out_str << "\n  :Bank Code: #{printable[:bban_bank_code]}"
  out_str << "\n  :Branch Code: #{printable[:bban_branch_code]}"
  out_str << "\n  :Key: #{printable[:bban_key]}"
  out_str << "\n  :Account Number: #{printable[:bban_number]}"
  out_str
end