Class: Ibandit::GermanDetailsConverter::Rule005200

Inherits:
BaseRule
  • Object
show all
Defined in:
lib/ibandit/german_details_converter.rb

Constant Summary collapse

PSEUDO_ACCOUNT_NUMBER_MAPPING =
{
  '67220020_5308810004' => '0002662604',
  '67220020_5308810000' => '0002659600',
  '67020020_5203145700' => '7496510994',
  '69421020_6208908100' => '7481501341',
  '66620020_4840404000' => '7498502663',
  '64120030_1201200100' => '7477501214',
  '64020030_1408050100' => '7469534505',
  '63020130_1112156300' => '0004475655',
  '62030050_7002703200' => '7406501175',
  '69220020_6402145400' => '7485500252'
}.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



1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
# File 'lib/ibandit/german_details_converter.rb', line 1059

def converted_details
   = .fetch(
    "#{@bank_code}_#{@account_number.rjust(10, '0')}",
    nil
  )

  if .nil?
    msg = "Bank code #{@bank_code} is not used for payment transactions"
    raise UnsupportedAccountDetails, msg
  end

  { bank_code: '60050101', account_number:  }
end