Class: Ibandit::GermanDetailsConverter::Rule004900
- Defined in:
- lib/ibandit/german_details_converter.rb
Constant Summary collapse
- PSEUDO_ACCOUNT_NUMBER_MAPPING =
{ "0000000036" => "0002310113", "0000000936" => "0002310113", "0000000999" => "0001310113", "0000006060" => "0000160602", }.freeze
Instance Method Summary collapse
Methods inherited from BaseRule
Constructor Details
This class inherits a constructor from Ibandit::GermanDetailsConverter::BaseRule
Instance Method Details
#converted_details ⇒ Object
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 |
# File 'lib/ibandit/german_details_converter.rb', line 1031 def converted_details padded_account_number = @account_number.rjust(10, "0") updated_account_number = if padded_account_number[4] == "9" "#{padded_account_number[4, 6]}#{padded_account_number[0, 4]}" else @account_number end updated_account_number = PSEUDO_ACCOUNT_NUMBER_MAPPING.fetch( updated_account_number.rjust(10, "0"), updated_account_number, ) { bank_code: @bank_code, account_number: updated_account_number } end |