Class: Ibandit::GermanDetailsConverter::Rule004200
- Defined in:
- lib/ibandit/german_details_converter.rb
Direct Known Subclasses
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
945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 |
# File 'lib/ibandit/german_details_converter.rb', line 945 def converted_details unpadded_account_number = @account_number.gsub(/\A0+/, "") if @account_number.to_i.between?(50462000, 50463999) || @account_number.to_i.between?(50469000, 50469999) { bank_code: @bank_code, account_number: @account_number } elsif unpadded_account_number.size != 8 || unpadded_account_number[3] != "0" || %w[00000 00999].include?(unpadded_account_number.slice(3, 5)) msg = "Account does not support payment transactions" raise UnsupportedAccountDetails, msg else { bank_code: @bank_code, account_number: @account_number } end end |