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

Inherits:
Mindee::V1::Parsing::Standard::FeatureField show all
Includes:
Mindee::V1::Parsing::Standard
Defined in:
lib/mindee/v1/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::V1::Parsing::Standard::AbstractField

#bounding_box, #confidence, #page_id, #polygon

Instance Method Summary collapse

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

#format_for_display

Methods inherited from Mindee::V1::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)


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

def initialize(prediction, page_id)
  super
  @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)


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

def bban_bank_code
  @bban_bank_code
end

#bban_branch_codeString (readonly)

The BBAN branch code outputted as a string.

Returns:

  • (String)


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

def bban_branch_code
  @bban_branch_code
end

#bban_keyString (readonly)

The BBAN key outputted as a string.

Returns:

  • (String)


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

def bban_key
  @bban_key
end

#bban_numberString (readonly)

The BBAN Account number outputted as a string.

Returns:

  • (String)


25
26
27
# File 'lib/mindee/v1/product/fr/bank_account_details/bank_account_details_v2_bban.rb', line 25

def bban_number
  @bban_number
end

Instance Method Details

#printable_valuesHash

Returns:

  • (Hash)


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

def printable_values
  printable = {} # @type var printable: Hash[Symbol, String]
  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)


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

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