src/ruby/bank.rb in ifsc-1.4.10 vs src/ruby/bank.rb in ifsc-1.5.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module Razorpay
module IFSC
module Bank
AACX = :AACX
ABBL = :ABBL
@@ -50,10 +52,11 @@
ALWX = :ALWX
AMAX = :AMAX
AMBX = :AMBX
AMCB = :AMCB
AMCX = :AMCX
+ AMDN = :AMDN
AMMX = :AMMX
AMNX = :AMNX
AMRX = :AMRX
AMSB = :AMSB
AMSX = :AMSX
@@ -80,10 +83,11 @@
ARYX = :ARYX
ASBL = :ASBL
ASBX = :ASBX
ASHX = :ASHX
ASKX = :ASKX
+ ASNX = :ASNX
ASOX = :ASOX
ASSX = :ASSX
AUBL = :AUBL
AUBX = :AUBX
AUCB = :AUCB
@@ -637,10 +641,11 @@
KSTX = :KSTX
KSUX = :KSUX
KTBX = :KTBX
KTCX = :KTCX
KTDX = :KTDX
+ KTTX = :KTTX
KUBX = :KUBX
KUCB = :KUCB
KUCX = :KUCX
KUKX = :KUKX
KULX = :KULX
@@ -728,19 +733,21 @@
MHNX = :MHNX
MHSX = :MHSX
MHUX = :MHUX
MIZX = :MIZX
MJCX = :MJCX
+ MKPB = :MKPB
MKUX = :MKUX
MKYX = :MKYX
MLDX = :MLDX
MMCX = :MMCX
MMMX = :MMMX
MNBX = :MNBX
MNCX = :MNCX
MNSX = :MNSX
MOGX = :MOGX
+ MOUX = :MOUX
MPCX = :MPCX
MPDX = :MPDX
MPRX = :MPRX
MRBX = :MRBX
MRTX = :MRTX
@@ -782,10 +789,11 @@
NAVX = :NAVX
NAWX = :NAWX
NBAD = :NBAD
NBBX = :NBBX
NBCX = :NBCX
+ NBMX = :NBMX
NBRD = :NBRD
NCBL = :NCBL
NCBX = :NCBX
NCCX = :NCCX
NCOX = :NCOX
@@ -945,10 +953,11 @@
RATN = :RATN
RAUX = :RAUX
RBBX = :RBBX
RBCX = :RBCX
RBIS = :RBIS
+ RBIH = :RBIH
RCBX = :RCBX
RCCX = :RCCX
RCDX = :RCDX
RCMX = :RCMX
RCUX = :RCUX
@@ -1262,10 +1271,12 @@
TSDX = :TSDX
TSIX = :TSIX
TSMX = :TSMX
TSNX = :TSNX
TSPX = :TSPX
+ TSSB = :TSSB
+ TSSX = :TSSX
TSUX = :TSUX
TTBX = :TTBX
TTCB = :TTCB
TTCX = :TTCX
TTGX = :TTGX
@@ -1335,10 +1346,11 @@
VAUX = :VAUX
VCAX = :VCAX
VCBX = :VCBX
VCCX = :VCCX
VCNB = :VCNB
+ VCOB = :VCOB
VCOX = :VCOX
VDCX = :VDCX
VDYX = :VDYX
VEDX = :VEDX
VERX = :VERX
@@ -1411,8 +1423,25 @@
ZSHX = :ZSHX
ZSJX = :ZSJX
ZSKX = :ZSKX
ZSLX = :ZSLX
ZSMX = :ZSMX
+
+ class << self
+ def get_details(code)
+ h = data[code]
+ h[:bank_code] = (h[:micr][3..5] if h.key? :micr)
+ h
+ end
+
+ def parse_json_file(file)
+ file = "../#{file}.json"
+ JSON.parse(File.read(File.join(__dir__, file)), symbolize_names: true)
+ end
+
+ def data
+ @data ||= parse_json_file 'banks'
+ end
+ end
end
end
end