SingaporeBankCodes 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +36 -0
- data/Rakefile +1 -0
- data/SingaporeBankCodes.gemspec +25 -0
- data/lib/SingaporeBankCodes/version.rb +3 -0
- data/lib/SingaporeBankCodes.rb +41 -0
- data/lib/banks/bank_account.rb +29 -0
- data/lib/banks/citibank.rb +78 -0
- data/lib/banks/dbs.rb +229 -0
- data/lib/banks/hsbc.rb +55 -0
- data/lib/banks/malayan_banking_berhad.rb +36 -0
- data/lib/banks/ocbc.rb +199 -0
- data/lib/banks/posb.rb +17 -0
- data/lib/banks/posb_plus.rb +6 -0
- data/lib/banks/standard_chartered.rb +74 -0
- data/lib/banks/uob/uob.rb +19 -0
- data/lib/banks/uob/uob_branch_codes.rb +343 -0
- data/spec/bank_code_resolver_spec.rb +16 -0
- data/spec/banks/citibank_spec.rb +12 -0
- data/spec/banks/dbs_spec.rb +12 -0
- data/spec/banks/hsbc_spec.rb +12 -0
- data/spec/banks/malayan_banking_berhad_spec.rb +12 -0
- data/spec/banks/ocbc_spec.rb +12 -0
- data/spec/banks/posb_spec.rb +12 -0
- data/spec/banks/standard_charted_spec.rb +12 -0
- data/spec/banks/uob_spec.rb +18 -0
- data/spec/spec_helper.rb +2 -0
- metadata +139 -0
data/lib/banks/ocbc.rb
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
class OCBC < SingaporeBankCode::BankAccount
|
|
2
|
+
def bank_code
|
|
3
|
+
'7339'
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def resolved_number
|
|
7
|
+
@number[3..-1]
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def reference_hash_collection
|
|
11
|
+
{
|
|
12
|
+
'501' => 'OCBC Centre',
|
|
13
|
+
'503' => 'North',
|
|
14
|
+
'504' => 'OCBC Centre (504)',
|
|
15
|
+
'506' => 'Jalan Besar (506)',
|
|
16
|
+
'507' => 'Marine Parade (507)',
|
|
17
|
+
'508' => 'Orchard Gateway',
|
|
18
|
+
'509' => 'Geylang',
|
|
19
|
+
'510' => 'Tampines (510)',
|
|
20
|
+
'511' => 'Upper Serangoon (511)',
|
|
21
|
+
'512' => 'Katong (512)',
|
|
22
|
+
'514' => 'Bukit Batok BBC',
|
|
23
|
+
'515' => 'Jalan Sultan',
|
|
24
|
+
'516' => 'Balestier Road',
|
|
25
|
+
'517' => 'OCBC Centre (517)',
|
|
26
|
+
'518' => 'Bukit Timah',
|
|
27
|
+
'519' => 'Ang Mo Kio Central (519)',
|
|
28
|
+
'520' => 'Bedok',
|
|
29
|
+
'521' => 'Jalan Besar',
|
|
30
|
+
'522' => 'Clementi (522)',
|
|
31
|
+
'524' => 'Alexandra Village',
|
|
32
|
+
'525' => 'Paya Lebar Square',
|
|
33
|
+
'526' => 'Toa Payoh Central (526)',
|
|
34
|
+
'527' => 'Jurong East',
|
|
35
|
+
'528' => 'Ang Mo Kio Central',
|
|
36
|
+
'529' => 'Marina Bay Financial Centre (529)',
|
|
37
|
+
'530' => 'Yishun',
|
|
38
|
+
'531' => 'Thomson (531)',
|
|
39
|
+
'532' => 'Upper Serangoon (532)',
|
|
40
|
+
'533' => 'Bukit Batok',
|
|
41
|
+
'534' => 'Tampines',
|
|
42
|
+
'535' => 'Jurong West',
|
|
43
|
+
'536' => 'Upper Serangoon',
|
|
44
|
+
'537' => 'Nanyang Technological University',
|
|
45
|
+
'538' => 'Bishan',
|
|
46
|
+
'539' => 'Toa Payoh Central (539)',
|
|
47
|
+
'540' => 'Lucky Plaza (540)',
|
|
48
|
+
'541' => 'OCBC Centre (541)',
|
|
49
|
+
'542' => 'Bukit Timah (542)',
|
|
50
|
+
'543' => 'Hougang Mall (543)',
|
|
51
|
+
'544' => 'Clementi (544)',
|
|
52
|
+
'545' => 'Bukit Panjang',
|
|
53
|
+
'546' => 'Tampines (546)',
|
|
54
|
+
'547' => 'Serangoon Garden (547)',
|
|
55
|
+
'548' => 'Tampines (548)',
|
|
56
|
+
'549' => 'Marine Parade (549)',
|
|
57
|
+
'550' => 'Northpoint',
|
|
58
|
+
'551' => 'Serangoon Garden',
|
|
59
|
+
'552' => 'Clementi (552)',
|
|
60
|
+
'553' => 'Jurong Point',
|
|
61
|
+
'554' => 'Bukit Timah (554)',
|
|
62
|
+
'555' => 'White Sands',
|
|
63
|
+
'556' => 'Hougang Mall',
|
|
64
|
+
'557' => 'Causeway Point',
|
|
65
|
+
'558' => 'Sun Plaza',
|
|
66
|
+
'560' => 'EastPoint Mall',
|
|
67
|
+
'561' => 'Hougang Mall (561)',
|
|
68
|
+
'562' => 'CityLink Mall',
|
|
69
|
+
'563' => 'mybank.ocbc.com',
|
|
70
|
+
'564' => 'Marina Bay Financial Centre (564)',
|
|
71
|
+
'565' => 'Compass Point (565)',
|
|
72
|
+
'566' => 'Marine Parade (512)',
|
|
73
|
+
'567' => 'Compass Point',
|
|
74
|
+
'568' => 'Toa Payoh Central',
|
|
75
|
+
'569' => 'HarbourFront ',
|
|
76
|
+
'570' => 'Branch 570',
|
|
77
|
+
'574' => 'Auto Loan Centre',
|
|
78
|
+
'576' => 'Punggol Plaza',
|
|
79
|
+
'579' => 'SMU',
|
|
80
|
+
'581' => 'North (581)',
|
|
81
|
+
'582' => 'Orchardgateway (582)',
|
|
82
|
+
'583' => 'FairPrice Plus',
|
|
83
|
+
'584' => 'Premier Banking Offshore',
|
|
84
|
+
'587' => 'FairPrice Plus (587)',
|
|
85
|
+
'588' => 'Ubi',
|
|
86
|
+
'589' => 'OCBC Centre (589)',
|
|
87
|
+
'590' => 'OCBC Centre (590)',
|
|
88
|
+
'591' => 'North (591)',
|
|
89
|
+
'592' => 'FairPrice Plus (592)',
|
|
90
|
+
'593' => 'Suntec City',
|
|
91
|
+
'594' => 'ION Orchard',
|
|
92
|
+
'595' => 'OCBC Centre (595)',
|
|
93
|
+
'596' => 'Marina Bay Financial Centre',
|
|
94
|
+
'597' => 'VivoCity',
|
|
95
|
+
'601' => 'OCBC Centre (601)',
|
|
96
|
+
'602' => 'OCBC Centre (602)',
|
|
97
|
+
'603' => 'OCBC Centre (603)',
|
|
98
|
+
'604' => 'OCBC Centre (604)',
|
|
99
|
+
'605' => 'Hougang (605)',
|
|
100
|
+
'606' => 'Northpoint (606)',
|
|
101
|
+
'607' => 'OCBC Centre (607)',
|
|
102
|
+
'608' => 'Bedok North (608)',
|
|
103
|
+
'609' => 'Choa Chu Kang (609)',
|
|
104
|
+
'610' => 'Marina Bay Financial Centre (610)',
|
|
105
|
+
'611' => 'Toa Payoh Central (611)',
|
|
106
|
+
'612' => 'Bedok (612)',
|
|
107
|
+
'613' => 'Hougang',
|
|
108
|
+
'614' => 'Northpoint (614)',
|
|
109
|
+
'615' => 'Jurong West (615)',
|
|
110
|
+
'616' => 'Woodlands',
|
|
111
|
+
'617' => 'Sixth Avenue (617)',
|
|
112
|
+
'618' => 'OCBC Centre (618)',
|
|
113
|
+
'619' => 'Lucky Plaza (619)',
|
|
114
|
+
'620' => 'City Square Mall (620)',
|
|
115
|
+
'621' => 'Marine Parade (621)',
|
|
116
|
+
'622' => 'Clementi',
|
|
117
|
+
'623' => 'Bedok (623)',
|
|
118
|
+
'624' => 'North (624)',
|
|
119
|
+
'625' => 'Kallang (625)',
|
|
120
|
+
'626' => 'Holland Village (626)',
|
|
121
|
+
'627' => 'Joo Chiat (627)',
|
|
122
|
+
'628' => 'Jurong Point (628)',
|
|
123
|
+
'629' => 'North (629)',
|
|
124
|
+
'630' => 'North (630)',
|
|
125
|
+
'631' => 'PCL',
|
|
126
|
+
'632' => 'OCBC PCL',
|
|
127
|
+
'633' => 'OCBC Bank PCL (633)',
|
|
128
|
+
'634' => 'OCBC PCL (634)',
|
|
129
|
+
'635' => 'Alexandra Village (635)',
|
|
130
|
+
'636' => 'Woodlands (636)',
|
|
131
|
+
'637' => 'OCBC PCL (637)',
|
|
132
|
+
'640' => 'Jalan Sultan (640)',
|
|
133
|
+
'641' => 'North (641)',
|
|
134
|
+
'642' => 'Marine Parade (642)',
|
|
135
|
+
'643' => 'Causeway Point (643)',
|
|
136
|
+
'644' => 'Plus! (644)',
|
|
137
|
+
'645' => 'Bukit Batok (645)',
|
|
138
|
+
'646' => 'Jurong East (646)',
|
|
139
|
+
'647' => 'North (647)',
|
|
140
|
+
'648' => 'Plus! (648)',
|
|
141
|
+
'649' => 'Sixth Avenue (649)',
|
|
142
|
+
'650' => 'OCBC Centre (650)',
|
|
143
|
+
'651' => 'Marina Bay Financial Centre (651)',
|
|
144
|
+
'652' => 'North (652)',
|
|
145
|
+
'653' => 'City Square Mall',
|
|
146
|
+
'654' => 'Marine Parade (654)',
|
|
147
|
+
'655' => 'Jalan Besar (655)',
|
|
148
|
+
'656' => 'Thomson',
|
|
149
|
+
'657' => 'Ang Mo Kio',
|
|
150
|
+
'658' => 'Clementi (658)',
|
|
151
|
+
'659' => 'Lucky Plaza',
|
|
152
|
+
'660' => 'Holland Village',
|
|
153
|
+
'661' => 'Joo Chiat (661)',
|
|
154
|
+
'662' => 'Bedok North',
|
|
155
|
+
'663' => 'City Square Mall (663)',
|
|
156
|
+
'664' => 'Upper Serangoon (664)',
|
|
157
|
+
'665' => 'Joo Chiat',
|
|
158
|
+
'666' => 'Sixth Avenue',
|
|
159
|
+
'667' => 'Tampines South',
|
|
160
|
+
'668' => 'North (668)',
|
|
161
|
+
'669' => 'Northpoint (669)',
|
|
162
|
+
'670' => 'Upper Serangoon (670)',
|
|
163
|
+
'671' => 'Jurong West (671)',
|
|
164
|
+
'672' => 'Marina Bay Financial Centre (672)',
|
|
165
|
+
'673' => 'Choa Chu Kang',
|
|
166
|
+
'674' => 'Northpoint (674)',
|
|
167
|
+
'675' => 'Jurong West (675)',
|
|
168
|
+
'676' => 'Jalan Sultan (676)',
|
|
169
|
+
'677' => 'Toa Payoh Central (677)',
|
|
170
|
+
'678' => 'Lucky Plaza (678)',
|
|
171
|
+
'679' => 'Marina Bay Financial Centre (679)',
|
|
172
|
+
'680' => 'White Sands (680)',
|
|
173
|
+
'681' => 'Tampines South (681)',
|
|
174
|
+
'682' => 'Woodlands (682)',
|
|
175
|
+
'683' => 'Tampines South (683)',
|
|
176
|
+
'684' => 'Ang Mo Kio (684)',
|
|
177
|
+
'685' => 'Singapore Polytechnic',
|
|
178
|
+
'686' => 'North (686)',
|
|
179
|
+
'687' => 'OCBC Centre (687)',
|
|
180
|
+
'688' => 'Sun Plaza (688)',
|
|
181
|
+
'689' => 'North (689)',
|
|
182
|
+
'690' => 'OCBC Centre (690)',
|
|
183
|
+
'693' => 'Kallang Wave',
|
|
184
|
+
'694' => 'White Sands (694)',
|
|
185
|
+
'695' => 'North (695)',
|
|
186
|
+
'701' => 'OCBC Centre (701)',
|
|
187
|
+
'702' => 'OCBC Centre (702)',
|
|
188
|
+
'703' => 'OCBC Centre (703)',
|
|
189
|
+
'704' => 'OCBC Centre (704)',
|
|
190
|
+
'705' => 'OCBC Centre (705)',
|
|
191
|
+
'802' => 'OCBC ACU',
|
|
192
|
+
}
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
data/lib/banks/posb.rb
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
class STANDARDCHARTERED < SingaporeBankCode::BankAccount
|
|
2
|
+
def min_length
|
|
3
|
+
10
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def resolved_number
|
|
7
|
+
@number
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def bank_code
|
|
11
|
+
'7144'
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def branch_code
|
|
15
|
+
'0' + @number[0..1].to_s
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def branch_name
|
|
19
|
+
reference_hash_collection[branch_code]
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def reference_hash_collection
|
|
23
|
+
{
|
|
24
|
+
'001' => 'Main Office',
|
|
25
|
+
'002' => 'Robinson Road (002)',
|
|
26
|
+
'003' => 'Scotts Mall',
|
|
27
|
+
'004' => 'Tampines Central (004)',
|
|
28
|
+
'005' => 'Upper Thomson (005)',
|
|
29
|
+
'006' => 'Upper Thomson (006)',
|
|
30
|
+
'007' => 'Bukit Timah',
|
|
31
|
+
'008' => 'Anchorpoint (008)',
|
|
32
|
+
'009' => 'Marine Parade (009)',
|
|
33
|
+
'011' => 'South Bridge Road',
|
|
34
|
+
'012' => 'Serangoon Garden',
|
|
35
|
+
'013' => 'Selegie',
|
|
36
|
+
'014' => 'Anchorpoint (014)',
|
|
37
|
+
'015' => 'Selegie (015)',
|
|
38
|
+
'016' => 'Robinson Road',
|
|
39
|
+
'017' => 'Anchorpoint (017)',
|
|
40
|
+
'018' => 'Jurong',
|
|
41
|
+
'019' => 'Hougang',
|
|
42
|
+
'020' => 'City Plaza',
|
|
43
|
+
'022' => 'Woodlands',
|
|
44
|
+
'023' => 'Anchorpint',
|
|
45
|
+
'024' => 'Holland Village',
|
|
46
|
+
'025' => 'Direct Banking',
|
|
47
|
+
'028' => 'Item Processing',
|
|
48
|
+
'038' => 'IBanking',
|
|
49
|
+
'040' => 'Marine Parade',
|
|
50
|
+
'041' => 'Jurong East',
|
|
51
|
+
'042' => 'Tampines Central',
|
|
52
|
+
'049' => 'Battery Road (049)',
|
|
53
|
+
'052' => 'Upper Thomson ',
|
|
54
|
+
'053' => 'Bedok',
|
|
55
|
+
'054' => 'Toa Payoh',
|
|
56
|
+
'056' => 'Suntec PB Centre',
|
|
57
|
+
'057' => 'VivoCity',
|
|
58
|
+
'059' => 'ION Orchard',
|
|
59
|
+
'060' => 'Sixth Avenue',
|
|
60
|
+
'061' => 'NEX Serangoon',
|
|
61
|
+
'062' => 'MBFC',
|
|
62
|
+
'063' => 'Clementi Mall',
|
|
63
|
+
'064' => 'Plaza Singapura',
|
|
64
|
+
'065' => 'Mandarin Gallery Banking Centre',
|
|
65
|
+
'066' => 'Jurong Point Bank@Post',
|
|
66
|
+
'068' => 'SPC SME@POST',
|
|
67
|
+
'070' => 'JEM',
|
|
68
|
+
'075' => 'Battery Road',
|
|
69
|
+
'079' => 'GEMS',
|
|
70
|
+
'088' => 'Private Bank',
|
|
71
|
+
'099' => 'ONEBILL',
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class UOB < SingaporeBankCode::BankAccount
|
|
2
|
+
include UOBBranchCodes
|
|
3
|
+
|
|
4
|
+
def min_length
|
|
5
|
+
10
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def bank_code
|
|
9
|
+
if (retrieval_code > 500) && (retrieval_code < 509)
|
|
10
|
+
'7199'
|
|
11
|
+
else
|
|
12
|
+
'7375'
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def resolved_number
|
|
17
|
+
@number
|
|
18
|
+
end
|
|
19
|
+
end
|