Module: Ibandit

Defined in:
lib/ibandit/german_details_converter.rb,
lib/ibandit.rb,
lib/ibandit/iban.rb,
lib/ibandit/errors.rb,
lib/ibandit/version.rb,
lib/ibandit/check_digit.rb,
lib/ibandit/iban_splitter.rb,
lib/ibandit/iban_assembler.rb,
lib/ibandit/local_details_cleaner.rb,
lib/ibandit/swedish_details_converter.rb

Overview

German bank details don’t map directly to IBANs in the same way as in other countries - each bank has idiosyncracies for translating its cusomers’ bank details. These idiosyncracies are described in a document from the Bundesbank: www.bundesbank.de/Navigation/DE/Aufgaben/Unbarer_Zahlungsverkehr/IBAN_Regeln/iban_regeln.html

Defined Under Namespace

Modules: CheckDigit, GermanDetailsConverter, IBANAssembler, IBANSplitter, LocalDetailsCleaner, SwedishDetailsConverter Classes: IBAN, InvalidCharacterError, UnsupportedAccountDetails

Constant Summary collapse

VERSION =
'0.6.1'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.bic_finderObject

Returns the value of attribute bic_finder.



17
18
19
# File 'lib/ibandit.rb', line 17

def bic_finder
  @bic_finder
end

.modulus_checkerObject

Returns the value of attribute modulus_checker.



17
18
19
# File 'lib/ibandit.rb', line 17

def modulus_checker
  @modulus_checker
end

Class Method Details

.find_bic(country_code, national_id) ⇒ Object

Raises:

  • (NotImplementedError)


19
20
21
22
# File 'lib/ibandit.rb', line 19

def find_bic(country_code, national_id)
  raise NotImplementedError, 'BIC finder is not defined' unless @bic_finder
  @bic_finder.call(country_code, national_id)
end

.structuresObject



24
25
26
27
28
# File 'lib/ibandit.rb', line 24

def structures
  @structures ||= YAML.load_file(
    File.expand_path('../../data/structures.yml', __FILE__)
  )
end

.translate(key, options = {}) ⇒ Object



30
31
32
# File 'lib/ibandit.rb', line 30

def translate(key, options = {})
  I18n.translate(key, { scope: [:ibandit] }.merge(options))
end