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
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: e7bc7de3e9adcb4fdfd1e17654464da76bb449f9
|
|
4
|
+
data.tar.gz: a24cc6957d898de788b4a6ad132354f80d74ea43
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d8a8a851d01e0c0cb07bb174f6e8e3b6c799ffe63a4ae5025250a9f26a796097f023f244a55ed08c84ef47a8db81bb2b1629fd5d90eb38db9147c9b148a9f2e5
|
|
7
|
+
data.tar.gz: 77fcfc7b8f87354adc515781c1b88466b04d0f603cc04f85a815fba843af7a89c391fdb82bae9f32ef3a396b9e298bbbf4908ce20c9a20a0c1ec80515f85b5e9
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2015 Sherwyn Goh
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# SingaporeBankCodes
|
|
2
|
+
This gem allows you to provide a bank name and account number, and will generate the branch code, bank code, and branch name. Singapore banks only. Currently serviced banks are:
|
|
3
|
+
['OCBC', 'DBS', 'UOB', 'FEB', 'POSB', 'POSB Plus', 'HSBC', 'Standard Chartered', 'CITIBANK', 'Malayan Banking Berhad']
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your application's Gemfile:
|
|
8
|
+
|
|
9
|
+
```ruby
|
|
10
|
+
gem 'SingaporeBankCodes'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
And then execute:
|
|
14
|
+
|
|
15
|
+
$ bundle
|
|
16
|
+
|
|
17
|
+
Or install it yourself as:
|
|
18
|
+
|
|
19
|
+
$ gem install SingaporeBankCodes
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
```ruby
|
|
23
|
+
resolver = BankCodeResolver.new(name: 'POSB', account: '123456789')
|
|
24
|
+
resolver.get_result
|
|
25
|
+
#returns a hash with keys bank_code, branch_code, branch_name and resolved account number, which can be different from supplied account number
|
|
26
|
+
BankCodeResolver.bank_options #for possible bank names
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Contributing
|
|
31
|
+
|
|
32
|
+
1. Fork it ( https://github.com/[my-github-username]/SingaporeBankCodes/fork )
|
|
33
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
34
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
35
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
36
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'SingaporeBankCodes/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "SingaporeBankCodes"
|
|
8
|
+
spec.version = SingaporeBankCodes::VERSION
|
|
9
|
+
spec.authors = ["Sherwyn Goh"]
|
|
10
|
+
spec.email = ["sherwyn.lj.goh@gmail.com"]
|
|
11
|
+
spec.summary = %q{Account number to bank branch and bank code converter.}
|
|
12
|
+
spec.description = %q{}
|
|
13
|
+
spec.homepage = ""
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
|
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
23
|
+
spec.add_development_dependency "rspec", '~> 3.0'
|
|
24
|
+
spec.add_development_dependency "pry", '~> 0.10.0'
|
|
25
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
require_relative './banks/bank_account'
|
|
2
|
+
require_relative './banks/citibank'
|
|
3
|
+
require_relative './banks/dbs'
|
|
4
|
+
require_relative './banks/hsbc'
|
|
5
|
+
require_relative './banks/malayan_banking_berhad'
|
|
6
|
+
require_relative './banks/ocbc'
|
|
7
|
+
require_relative './banks/posb'
|
|
8
|
+
require_relative './banks/posb_plus'
|
|
9
|
+
require_relative './banks/uob/uob_branch_codes'
|
|
10
|
+
require_relative './banks/uob/uob'
|
|
11
|
+
require_relative './banks/standard_chartered'
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class BankCodeResolver
|
|
15
|
+
BANKS = ['OCBC', 'DBS', 'UOB', 'FEB', 'POSB', 'POSB Plus', 'HSBC', 'Standard Chartered', 'CITIBANK', 'Malayan Banking Berhad']
|
|
16
|
+
attr_accessor :name, :number
|
|
17
|
+
|
|
18
|
+
def initialize(args)
|
|
19
|
+
@name = args.fetch(:name)
|
|
20
|
+
@number = args.fetch(:number)
|
|
21
|
+
raise ArgumentError.new "Name(#{@name}) needs to be one of #{BankCodeResolver::BANKS}" unless BankCodeResolver::BANKS.include?(@name)
|
|
22
|
+
@bank_account = Object.const_get(@name.delete(' ').upcase).new(@number)
|
|
23
|
+
min_length = @bank_account.min_length
|
|
24
|
+
raise ArgumentError.new "Account number needs to be at least #{min_length}" unless (@number.to_s.length >= min_length)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.bank_options
|
|
28
|
+
BankCodeResolver::BANKS
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def get_result
|
|
32
|
+
bank_code, branch_code, branch_name, resolved_number = @bank_account.resolve!
|
|
33
|
+
{
|
|
34
|
+
'bank_account' => bank_code,
|
|
35
|
+
'branch_code' => branch_code,
|
|
36
|
+
'branch_name' => branch_name,
|
|
37
|
+
'resolved_account_number' => resolved_number,
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
module SingaporeBankCode
|
|
2
|
+
class BankAccount
|
|
3
|
+
attr_accessor :number
|
|
4
|
+
|
|
5
|
+
def initialize number
|
|
6
|
+
@number = number
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def branch_code
|
|
10
|
+
@number.to_s[0..2]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def branch_name
|
|
14
|
+
reference_hash_collection[branch_code] rescue 'Branch not registered'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def min_length
|
|
18
|
+
4
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def resolved_number
|
|
22
|
+
@number
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def resolve!
|
|
26
|
+
[bank_code, branch_code, branch_name, resolved_number]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
class CITIBANK < SingaporeBankCode::BankAccount
|
|
2
|
+
def bank_code
|
|
3
|
+
'7214'
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def reference_hash_collection
|
|
7
|
+
{
|
|
8
|
+
'001' => 'Shenton Way - IB',
|
|
9
|
+
'002' => 'Orchard Road - IB',
|
|
10
|
+
'003' => 'Taman Jurong - IB',
|
|
11
|
+
'011' => 'Shenton Way - CSG',
|
|
12
|
+
'012' => 'Orchard Road - CSG',
|
|
13
|
+
'013' => 'Taman Jurong - CSG',
|
|
14
|
+
'015' => 'Esplanade',
|
|
15
|
+
'017' => 'Cuscaden Road',
|
|
16
|
+
'018' => 'Citibank Card Centre',
|
|
17
|
+
'019' => 'Great World City',
|
|
18
|
+
'020' => 'Parkway Parade',
|
|
19
|
+
'021' => 'Paragon',
|
|
20
|
+
'022' => 'Bishan',
|
|
21
|
+
'023' => 'Marina Bay Sands',
|
|
22
|
+
'024' => 'Vivo City',
|
|
23
|
+
'025' => 'Holland Village',
|
|
24
|
+
'026' => 'Ang Mo Kio',
|
|
25
|
+
'027' => 'Tampines Plaza',
|
|
26
|
+
'028' => 'SMRT',
|
|
27
|
+
'029' => 'Serangoon',
|
|
28
|
+
'031' => 'Private Bank',
|
|
29
|
+
'032' => 'Asia Square',
|
|
30
|
+
'033' => 'Woodlands',
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
data/lib/banks/dbs.rb
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
class DBS < SingaporeBankCode::BankAccount
|
|
2
|
+
def min_length
|
|
3
|
+
9
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def bank_code
|
|
7
|
+
'7171'
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def reference_hash_collection
|
|
11
|
+
{
|
|
12
|
+
'001' => 'DBS Shenton Way',
|
|
13
|
+
'002' => 'DBS Jurong Point',
|
|
14
|
+
'003' => 'Shenton Way (03)',
|
|
15
|
+
'004' => 'Parkway Parade (004)',
|
|
16
|
+
'005' => 'DBS Toa Payoh',
|
|
17
|
+
'006' => 'DBS Alexandra',
|
|
18
|
+
'007' => 'South Bridge (07)',
|
|
19
|
+
'008' => 'DBS Great World City',
|
|
20
|
+
'009' => 'Shenton Way (09)',
|
|
21
|
+
'010' => 'DBS South Bridge',
|
|
22
|
+
'011' => 'DBS Rochor',
|
|
23
|
+
'012' => 'DBS HarbourFront',
|
|
24
|
+
'014' => 'DBS Bukit Timah',
|
|
25
|
+
'015' => 'DBS Thomson',
|
|
26
|
+
'016' => 'Payment Ops (Remittance)',
|
|
27
|
+
'017' => 'DBS Bedok',
|
|
28
|
+
'018' => 'DBS AMK Hub',
|
|
29
|
+
'019' => 'DBS Woodlands',
|
|
30
|
+
'020' => 'DBS Clementi',
|
|
31
|
+
'021' => 'Staff',
|
|
32
|
+
'022' => 'DBS Battery Road',
|
|
33
|
+
'023' => 'DBS Hougang',
|
|
34
|
+
'024' => 'DBS Balestier',
|
|
35
|
+
'025' => 'DBS Towner Road',
|
|
36
|
+
'026' => 'Towner Road (26)',
|
|
37
|
+
'027' => 'DBS Parkway Parade',
|
|
38
|
+
'028' => 'Balestier (28)',
|
|
39
|
+
'029' => 'DBS Tampines Centre',
|
|
40
|
+
'030' => 'Jurong (30)',
|
|
41
|
+
'031' => 'Investment Banking',
|
|
42
|
+
'032' => 'Buona Vista (32)',
|
|
43
|
+
'033' => 'DBS Raffles City',
|
|
44
|
+
'036' => 'Finance & Tax',
|
|
45
|
+
'037' => 'Financial Institutions Group',
|
|
46
|
+
'038' => 'BOSC',
|
|
47
|
+
'047' => 'DBS Serangoon Garden',
|
|
48
|
+
'048' => 'DBS Raffles Place',
|
|
49
|
+
'049' => 'Clementi (49)',
|
|
50
|
+
'050' => 'Shenton Way (50)',
|
|
51
|
+
'051' => 'Shenton Way (51)',
|
|
52
|
+
'052' => 'DBS Eunos Station',
|
|
53
|
+
'053' => 'Bedok (53)',
|
|
54
|
+
'054' => 'DBS Westgate',
|
|
55
|
+
'055' => 'Shenton Way (55)',
|
|
56
|
+
'056' => 'Liat Towers (56)',
|
|
57
|
+
'057' => 'DBS RWS Sentosa',
|
|
58
|
+
'060' => 'Shenton Way (60)',
|
|
59
|
+
'061' => 'Marina Bay Sands',
|
|
60
|
+
'062' => 'DBS Scape',
|
|
61
|
+
'063' => 'DBS Holland Village',
|
|
62
|
+
'064' => 'DBS Gleneagles',
|
|
63
|
+
'065' => 'DBS Liat Towers',
|
|
64
|
+
'066' => 'DBS Choa Chu Kang',
|
|
65
|
+
'067' => 'Shenton Way (67)',
|
|
66
|
+
'069' => 'Liat Towers (69)',
|
|
67
|
+
'070' => 'DBS Bishan',
|
|
68
|
+
'072' => 'Raffles Place (72)',
|
|
69
|
+
'074' => 'DBS Suntec City',
|
|
70
|
+
'081' => 'Local Clearing',
|
|
71
|
+
'082' => 'Cashline',
|
|
72
|
+
'096' => 'Br Remittances Unit',
|
|
73
|
+
'098' => 'Liat Tower (098)',
|
|
74
|
+
'100' => 'DBS Plaza Singapura',
|
|
75
|
+
'104' => 'DBS Tai Seng',
|
|
76
|
+
'105' => 'DBS NUS Remix',
|
|
77
|
+
'106' => 'DBS Telepark',
|
|
78
|
+
'107' => 'Buona Vista Corp',
|
|
79
|
+
'109' => 'Treasures Ctr - Ngee Ann',
|
|
80
|
+
'110' => 'Treasures Centre - Siglap Treasures',
|
|
81
|
+
'113' => 'MBFC',
|
|
82
|
+
'118' => 'DBS China Square',
|
|
83
|
+
'120' => 'iBanking',
|
|
84
|
+
'121' => 'Bras Basah (121)',
|
|
85
|
+
'122' => 'POSB Hougang Central',
|
|
86
|
+
'123' => 'Bras Basah (123)',
|
|
87
|
+
'124' => "Bras Basah (124)",
|
|
88
|
+
'125' => "POSB ITE College Central",
|
|
89
|
+
'126' => "Bras Basah (126)",
|
|
90
|
+
'127' => "Bras Basah (127)",
|
|
91
|
+
'128' => "Bras Basah (128)",
|
|
92
|
+
'129' => "POSB Jurong Point",
|
|
93
|
+
'130' => "POSB Bukit Panjang",
|
|
94
|
+
'131' => "Bras Basah (131)",
|
|
95
|
+
'132' => "Bras Basah (132)",
|
|
96
|
+
'133' => "Bras Basah (133)",
|
|
97
|
+
'134' => "Bras Basah (134)",
|
|
98
|
+
'135' => "Bras Basah (135)",
|
|
99
|
+
'136' => "Bras Basah (136)",
|
|
100
|
+
'137' => "Bras Basah (137)",
|
|
101
|
+
'138' => "POSB Tampines West",
|
|
102
|
+
'139' => "Bras Basah (139)",
|
|
103
|
+
'140' => "Bras Basah (140)",
|
|
104
|
+
'141' => "POSB Newton",
|
|
105
|
+
'142' => "POSB Kaki Bukit",
|
|
106
|
+
'143' => "POSB Yishun West",
|
|
107
|
+
'144' => "Bras Basah (144)",
|
|
108
|
+
'145' => "KeyPoint",
|
|
109
|
+
'146' => "POSB Macpherson",
|
|
110
|
+
'147' => "Bras Basah (147)",
|
|
111
|
+
'148' => "Bras Basah (148)",
|
|
112
|
+
'149' => "POSB Jurong West",
|
|
113
|
+
'150' => "POSB Bukit Batok Central",
|
|
114
|
+
'151' => "Bras Basah (151)",
|
|
115
|
+
'152' => "Bras Basah (152)",
|
|
116
|
+
'153' => "POSB Punggol Plaza",
|
|
117
|
+
'154' => "Bras Basah (154)",
|
|
118
|
+
'155' => "Bras Basah (155)",
|
|
119
|
+
'156' => "Bras Basah (156)",
|
|
120
|
+
'157' => "POSB Siglap",
|
|
121
|
+
'158' => "Bras Basah (158)",
|
|
122
|
+
'159' => "Bras Basah (159)",
|
|
123
|
+
'160' => "Bras Basah (160)",
|
|
124
|
+
'161' => "Bras Basah (161)",
|
|
125
|
+
'162' => "POSB Taman Warna",
|
|
126
|
+
'163' => "POSB Yew Tee",
|
|
127
|
+
'164' => "POSB Tanjong Pagar",
|
|
128
|
+
'165' => "Bras Basah (165)",
|
|
129
|
+
'166' => "POSB Tiong Bahru",
|
|
130
|
+
'167' => "POSB Toa Payoh East",
|
|
131
|
+
'168' => "POSB Bukit Batok West",
|
|
132
|
+
'169' => "Bras Basah (169)",
|
|
133
|
+
'170' => "Bras Basah (170)",
|
|
134
|
+
'171' => "POSB Woodlands West",
|
|
135
|
+
'172' => "Bras Basah (172)",
|
|
136
|
+
'173' => "Bras Basah (173)",
|
|
137
|
+
'174' => "Bras Basah (174)",
|
|
138
|
+
'175' => "POSB Zhenghua",
|
|
139
|
+
'176' => "POSB Telok Blangah East",
|
|
140
|
+
'177' => "Bras Basah (177)",
|
|
141
|
+
'178' => "POSB Bras Basah",
|
|
142
|
+
'179' => "POSB Toa Payoh Central",
|
|
143
|
+
'180' => "Bras Basah (180)",
|
|
144
|
+
'181' => "POSB Marine Parade",
|
|
145
|
+
'182' => "Bras Basah (182)",
|
|
146
|
+
'183' => "Bras Basah (183)",
|
|
147
|
+
'184' => "Bras Basah (184)",
|
|
148
|
+
'185' => "Bras Basah (185)",
|
|
149
|
+
'186' => "POSB Sims Ave",
|
|
150
|
+
'187' => "Bras Basah (187)",
|
|
151
|
+
'188' => "Bras Basah (188)",
|
|
152
|
+
'189' => "POSB Centrepoint",
|
|
153
|
+
'190' => "POSB Suntec City",
|
|
154
|
+
'191' => "POSB Yishun Central",
|
|
155
|
+
'192' => "Bras Basah (192)",
|
|
156
|
+
'193' => "POSB Eastpoint",
|
|
157
|
+
'194' => "Bras Basah (194)",
|
|
158
|
+
'195' => "POSB Vivo City",
|
|
159
|
+
'196' => "Bras Basah (196)",
|
|
160
|
+
'197' => "Bras Basah (197)",
|
|
161
|
+
'198' => "POSB Ang Mo Kio Central",
|
|
162
|
+
'199' => "POSB Bukit Merah Central",
|
|
163
|
+
'200' => "POSB Bedok Central",
|
|
164
|
+
'201' => "POSB Clementi Central",
|
|
165
|
+
'202' => "POSB Woodlands",
|
|
166
|
+
'203' => "POSB Thomson Plaza",
|
|
167
|
+
'204' => "POSB Beauty World",
|
|
168
|
+
'205' => "Bras Basah (205)",
|
|
169
|
+
'206' => "Bras Basah (206)",
|
|
170
|
+
'207' => "POSB Ang Mo Kio North",
|
|
171
|
+
'208' => "Bras Basah (208)",
|
|
172
|
+
'209' => "POSB SGH",
|
|
173
|
+
'210' => "Bras Basah (210)",
|
|
174
|
+
'211' => "Bras Basah (211)",
|
|
175
|
+
'212' => "Bras Basah (212)",
|
|
176
|
+
'213' => "POSB Bedok South",
|
|
177
|
+
'214' => "POSB Collyer Quay",
|
|
178
|
+
'215' => "Bras Basah (215)",
|
|
179
|
+
'216' => "POSB Boon Lay",
|
|
180
|
+
'217' => "POSB Potong Pasir",
|
|
181
|
+
'218' => "Bras Basah (218)",
|
|
182
|
+
'219' => "Bras Basah (219)",
|
|
183
|
+
'220' => "Bras Basah (220)",
|
|
184
|
+
'221' => "POSB Square 2",
|
|
185
|
+
'222' => "Bras Basah (222)",
|
|
186
|
+
'223' => "Bras Basah (223)",
|
|
187
|
+
'224' => "Bras Basah (224)",
|
|
188
|
+
'225' => "Bras Basah (225)",
|
|
189
|
+
'226' => "Bras Basah (226)",
|
|
190
|
+
'227' => "Bras Basah (227)",
|
|
191
|
+
'228' => "POSB Raffles Quay",
|
|
192
|
+
'229' => "Bras Basah (229)",
|
|
193
|
+
'230' => "POSB Tampines East",
|
|
194
|
+
'231' => "POSB Funan Centre",
|
|
195
|
+
'232' => "Bras Basah (232)",
|
|
196
|
+
'233' => "POSB Nanyang Estate",
|
|
197
|
+
'234' => "Bras Basah (234)",
|
|
198
|
+
'235' => "POSB Upper Cross Street",
|
|
199
|
+
'236' => "Bras Basah (236)",
|
|
200
|
+
'237' => "Bras Basah (237)",
|
|
201
|
+
'238' => "POSB Heartland Mall",
|
|
202
|
+
'239' => "Bras Basah (239)",
|
|
203
|
+
'240' => "POSB Jurong East Central",
|
|
204
|
+
'241' => "POSB Kampong Ubi",
|
|
205
|
+
'242' => "POSB Serangoon Central",
|
|
206
|
+
'243' => "POSB Tampines Central",
|
|
207
|
+
'244' => "POSB Bishan Central",
|
|
208
|
+
'245' => "POSB White Sands",
|
|
209
|
+
'246' => "Bras Basah (246)",
|
|
210
|
+
'247' => "POSB Ngee Ann City",
|
|
211
|
+
'248' => "POSB Great World City",
|
|
212
|
+
'249' => "Bras Basah (249)",
|
|
213
|
+
'250' => "Bras Basah (250)",
|
|
214
|
+
'251' => "Bras Basah (251)",
|
|
215
|
+
'254' => "Payment Ops (Chq & Giro)",
|
|
216
|
+
'257' => "POSB Compass Point",
|
|
217
|
+
'259' => "POSB Nee Soon South",
|
|
218
|
+
'260' => "POSB Pasir Ris East Branch",
|
|
219
|
+
'287' => "POSB West Coast",
|
|
220
|
+
'288' => "DBS MBFC",
|
|
221
|
+
'289' => "POSB Canberra",
|
|
222
|
+
'291' => "DBS Sports Hub",
|
|
223
|
+
'347' => "Outward Clearing Centre 1",
|
|
224
|
+
'363' => "Network Management",
|
|
225
|
+
'390' => "Giro Processing Unit",
|
|
226
|
+
'391' => "Outward Clearing Centre 2",
|
|
227
|
+
}
|
|
228
|
+
end
|
|
229
|
+
end
|
data/lib/banks/hsbc.rb
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
class HSBC < SingaporeBankCode::BankAccount
|
|
2
|
+
|
|
3
|
+
def bank_code
|
|
4
|
+
'7232'
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def resolved_number
|
|
8
|
+
@number[3..-1]
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def reference_hash_collection
|
|
12
|
+
{
|
|
13
|
+
'041' => "Collyer Quay 041",
|
|
14
|
+
'042' => "Orchard Dhoby Ghaut 042",
|
|
15
|
+
'043' => "Claymore-Tanglin 043",
|
|
16
|
+
'044' => "Holland Village 044",
|
|
17
|
+
'045' => "Serangoon 045",
|
|
18
|
+
'046' => "Jurong 046",
|
|
19
|
+
'047' => "Collyer Quay-TG Pagar 047",
|
|
20
|
+
'049' => "Suntec 049",
|
|
21
|
+
'050' => "Jurong-Bukit Timah 050",
|
|
22
|
+
'051' => "Marine Parade 051",
|
|
23
|
+
'052' => "Collyer Quay 052",
|
|
24
|
+
'054' => "Serangoon-Bishan 054",
|
|
25
|
+
'055' => "Claymore-Ord Central 055",
|
|
26
|
+
'056' => "Collyer Quay-Vivocity 056",
|
|
27
|
+
'057' => "Claymore – Nassim 057",
|
|
28
|
+
'071' => "Tampines 071",
|
|
29
|
+
'141' => "Collyer Quay-OCB141",
|
|
30
|
+
'142' => "Orchard Dhoby Ghaut 142",
|
|
31
|
+
'143' => "Liat Tower Wealth Hub",
|
|
32
|
+
'144' => "Holland Village",
|
|
33
|
+
'145' => "Serangoon Garden",
|
|
34
|
+
'146' => "Jurong",
|
|
35
|
+
'147' => "Tanjong Pagar",
|
|
36
|
+
'149' => "Suntec City",
|
|
37
|
+
'150' => "Upper Bukit Timah",
|
|
38
|
+
'151' => "Marine Parade",
|
|
39
|
+
'152' => "Collyer Quay",
|
|
40
|
+
'154' => "Bishan",
|
|
41
|
+
'155' => "Orchard Central",
|
|
42
|
+
'156' => "VivoCity",
|
|
43
|
+
'157' => "Nassim Hill",
|
|
44
|
+
'171' => "Tampines",
|
|
45
|
+
'172' => "Claymore",
|
|
46
|
+
'800' => "VA DBU 00",
|
|
47
|
+
'801' => "VA DBU 01",
|
|
48
|
+
'802' => "VA DBU 02",
|
|
49
|
+
'803' => "VA DBU 03",
|
|
50
|
+
'870' => "VA ACU 70",
|
|
51
|
+
'872' => "VA ACU 72",
|
|
52
|
+
'873' => "VA ACU 73",
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
class MALAYANBANKINGBERHAD < SingaporeBankCode::BankAccount
|
|
2
|
+
|
|
3
|
+
def bank_code
|
|
4
|
+
'7302'
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def reference_hash_collection
|
|
8
|
+
{
|
|
9
|
+
'001' => 'Main Branch',
|
|
10
|
+
'002' => 'Robinson Road',
|
|
11
|
+
'003' => 'Tampines',
|
|
12
|
+
'004' => 'Woodlands 888 Plaza',
|
|
13
|
+
'005' => 'Maybank@HDBHub',
|
|
14
|
+
'006' => 'Bukit Timah',
|
|
15
|
+
'007' => 'Jurong Point',
|
|
16
|
+
'008' => 'Balestier Plaza',
|
|
17
|
+
'009' => 'North Bridge Road',
|
|
18
|
+
'010' => 'Ang Mo Kio',
|
|
19
|
+
'011' => 'Queensway',
|
|
20
|
+
'012' => 'Maybank@nex',
|
|
21
|
+
'013' => 'Bedok',
|
|
22
|
+
'014' => 'Geylang Serai',
|
|
23
|
+
'015' => 'Marine Parade',
|
|
24
|
+
'016' => 'Choa Chu Kang',
|
|
25
|
+
'017' => 'Chinatown',
|
|
26
|
+
'018' => 'Holland Village',
|
|
27
|
+
'019' => 'Jurong East',
|
|
28
|
+
'020' => 'Yishun',
|
|
29
|
+
'021' => 'Textile Centre',
|
|
30
|
+
'022' => 'Kovan',
|
|
31
|
+
'033' => 'HP Processing Centre',
|
|
32
|
+
'052' => 'Maybank Card Centre',
|
|
33
|
+
'080' => 'e-Banking',
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
end
|