Class: Ibandit::GermanDetailsConverter::Rule004900

Inherits:
BaseRule
  • Object
show all
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

#initialize

Constructor Details

This class inherits a constructor from Ibandit::GermanDetailsConverter::BaseRule

Instance Method Details

#converted_detailsObject



1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
# File 'lib/ibandit/german_details_converter.rb', line 1009

def converted_details
   = @account_number.rjust(10, '0')

   =
    if [4] == '9'
      "#{padded_account_number[4, 6]}#{padded_account_number[0, 4]}"
    else
      @account_number
    end

   = .fetch(
    .rjust(10, '0'),
    
  )

  { bank_code: @bank_code, account_number:  }
end