lib/ibandit/local_details_cleaner.rb in ibandit-0.11.23 vs lib/ibandit/local_details_cleaner.rb in ibandit-0.11.24
- old
+ new
@@ -85,10 +85,19 @@
end
def self.clean_ca_details(local_details)
return {} if local_details[:account_number].length < 7 # minimum length
- { account_number: local_details[:account_number].rjust(12, "0") }
+ bank_code = if local_details[:bank_code].length == 3
+ local_details[:bank_code].rjust(4, "0")
+ else
+ local_details[:bank_code]
+ end
+
+ {
+ account_number: local_details[:account_number].rjust(12, "0"),
+ bank_code: bank_code,
+ }
end
def self.clean_bg_details(local_details)
# Bulgarian national bank details were replaced with IBANs in 2006.
local_details