Class: Ibandit::GermanDetailsConverter::Rule002002

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

Defined Under Namespace

Classes: Check63

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



512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# File 'lib/ibandit/german_details_converter.rb', line 512

def converted_details
   = @account_number.gsub(/\A0+/, "")

  if  == "9999" && @bank_code == "50070010"
    return { bank_code: "50070010", account_number: "92777202" }
  end

   =
    case .size
    when 5, 6 then  + "00"
    when 7
      if Check63.new( + "00").valid?
         + "00"
      else
        
      end
    when 8, 9 then 
    else
      msg = "Account does not support payment transactions"
      raise UnsupportedAccountDetails, msg
    end

  { bank_code: @bank_code, account_number:  }
end