lib/ibandit/iban_assembler.rb in ibandit-0.5.0 vs lib/ibandit/iban_assembler.rb in ibandit-0.6.0
- old
+ new
@@ -1,9 +1,9 @@
module Ibandit
module IBANAssembler
SUPPORTED_COUNTRY_CODES = %w(AT BE CY DE EE ES FI FR GB GR IE IT LT LU LV MC
- MT NL PT SI SK SM).freeze
+ MT NL PT SE SI SK SM).freeze
EXCEPTION_COUNTRY_CODES = %w(IT SM BE).freeze
def self.assemble(local_details)
country_code = local_details[:country_code]
@@ -82,10 +82,10 @@
supplied.all? { |key| allowed.include?(key) }
end
def self.required_fields(country_code)
case country_code
- when 'AT', 'CY', 'DE', 'EE', 'FI', 'LT', 'LU', 'LV', 'NL', 'SI', 'SK'
+ when *%w(AT CY DE EE FI LT LU LV NL SE SI SK)
%i(bank_code account_number)
when 'BE'
%i(account_number)
else
%i(bank_code branch_code account_number)