ifsc 1.6.0 → 2.0.2
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 +4 -4
- data/CHANGELOG.md +28 -2
- data/README.md +87 -62
- data/ifsc.gemspec +2 -2
- data/src/IFSC.json +1 -1
- data/src/banknames.json +41 -9
- data/src/banks.json +571 -201
- data/src/custom-sublets.json +0 -1
- data/src/ruby/bank.rb +35 -3
- data/src/sublet.json +56 -33
- data/tests/ruby/ifsc_spec.rb +0 -1
- data/tests/validator_asserts.json +0 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 551ba69b5c3bb77d97604e90b16c7c1cbcb34a2c54678c2d56427d31ac8c6501
|
|
4
|
+
data.tar.gz: aba3bd2ad855a5d39822ba22d8910413ed31bffeaa6d8f22ff7b5c346601275e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29ee2e3f08a350d3386217978b435482f546a510ed7a958d55e4a6d568ad32fc26e1073e0b677b4b5b1a571693b59c9fd69bbd8f451a067fa9893ab7fef1da22
|
|
7
|
+
data.tar.gz: 79bb5faef4d535acb5c8babb18ef2df66636da31d1dd08db1bdfc25d3380035fe437f6849a7ebf4b6477a80fe634b6e1064650b623bf67832f1de50872791ca6
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
5
5
|
|
|
6
6
|
## [UNRELEASED][unreleased]
|
|
7
7
|
|
|
8
|
+
## [2.0.2][2.0.2]
|
|
9
|
+
## Changed
|
|
10
|
+
- Metadata changes
|
|
11
|
+
|
|
12
|
+
## [2.0.1][2.0.1]
|
|
13
|
+
## Changed
|
|
14
|
+
- Metadata changes
|
|
15
|
+
|
|
16
|
+
## [2.0.0][2.0.0]
|
|
17
|
+
### Removed
|
|
18
|
+
- Removed support for Elixir package
|
|
19
|
+
### Changed
|
|
20
|
+
- Builds are now powered by GitHub Actions, instead of Wercker
|
|
21
|
+
### Added
|
|
22
|
+
- There is a supported golang SDK. See the README for instructions on how to use it.
|
|
23
|
+
- 1 New Bank: `"AHDC": "Ahmednagar District Central Co-operative Bank"`
|
|
24
|
+
|
|
25
|
+
## [1.6.1][1.6.1]
|
|
26
|
+
### Added
|
|
27
|
+
- Only metadata changes in this release.
|
|
28
|
+
- 2 new banks
|
|
29
|
+
- RDCB: Rajnandgaon District Central Co Operative Bank
|
|
30
|
+
- TMSB: The Malad Sahakari Bank Ltd
|
|
8
31
|
## [1.6.0][1.6.0]
|
|
9
32
|
- Support PHP8
|
|
10
33
|
- Fix for some invalid IFSCs being marked as valid. Ex: `PUNB0000000` (#229)
|
|
@@ -204,8 +227,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
204
227
|
|
|
205
228
|
- Removes some data formats (YAML/Large JSON) for cleaner code. If you were using them, please let create an issue.
|
|
206
229
|
|
|
207
|
-
[unreleased]: https://github.com/razorpay/ifsc/compare/
|
|
208
|
-
[
|
|
230
|
+
[unreleased]: https://github.com/razorpay/ifsc/compare/2.0.2...HEAD
|
|
231
|
+
[2.0.2]: https://github.com/razorpay/ifsc/releases/tag/2.0.2
|
|
232
|
+
[2.0.1]: https://github.com/razorpay/ifsc/releases/tag/2.0.1
|
|
233
|
+
[2.0.0]: https://github.com/razorpay/ifsc/releases/tag/2.0.0
|
|
234
|
+
[1.6.1]: https://github.com/razorpay/ifsc/releases/tag/1.6.1
|
|
209
235
|
[1.5.13]: https://github.com/razorpay/ifsc/releases/tag/1.5.13
|
|
210
236
|
[1.5.12]: https://github.com/razorpay/ifsc/releases/tag/1.5.12
|
|
211
237
|
[1.5.11]: https://github.com/razorpay/ifsc/releases/tag/1.5.11
|
data/README.md
CHANGED
|
@@ -4,18 +4,15 @@ This is part of the IFSC toolset released by Razorpay.
|
|
|
4
4
|
You can find more details about the entire release at
|
|
5
5
|
[ifsc.razorpay.com](https://ifsc.razorpay.com).
|
|
6
6
|
|
|
7
|
-
[](https://microbadger.com/images/razorpay/ifsc:2.0.2) [](https://opensource.org/licenses/MIT) [](http://makeapullrequest.com)
|
|
8
8
|
|
|
9
|
-
[](https://microbadger.com/images/razorpay/ifsc:2.0.2) [](https://badge.fury.io/js/ifsc) [](https://badge.fury.io/rb/ifsc) [](https://badge.fury.io/ph/razorpay%2Fifsc) [](https://hex.pm/packages/ifsc)
|
|
10
10
|
|
|
11
11
|
## Dataset
|
|
12
12
|
|
|
13
|
-
If you are just looking for the dataset, go to
|
|
14
|
-
the [releases][releases] section and download
|
|
15
|
-
the latest release.
|
|
13
|
+
If you are just looking for the dataset, go to the [releases][releases] section and download the latest release.
|
|
16
14
|
|
|
17
|
-
The latest
|
|
18
|
-
with the complete dataset as well.
|
|
15
|
+
The latest `scraper` workflow on GitHub should publish a `release-artifact` as well.
|
|
19
16
|
|
|
20
17
|
### Source
|
|
21
18
|
|
|
@@ -79,12 +76,30 @@ require "ifsc"
|
|
|
79
76
|
|
|
80
77
|
The PHP package has a dependency on the virtual package `php-http/client-implementation` which requires you to install an adapter, but we do not care which one. That is an implementation detail in your application. You do not have to use the `php-http/curl-client` if you do not want to. You may use the `php-http/guzzle6-adapter`. Read more about the virtual packages, why this is a good idea and about the flexibility it brings at the [HTTPlug docs](http://docs.php-http.org/en/latest/httplug/users.html). You can find a list of suported providers on [packagist](https://packagist.org/providers/php-http/client-implementation).
|
|
81
78
|
|
|
82
|
-
The minimum [PHP version supported is 7.
|
|
79
|
+
The minimum [PHP version supported is 7.3](https://endoflife.date/php). The package can be installed on PHP>=7.1 however.
|
|
83
80
|
|
|
84
81
|
## Node.js
|
|
85
82
|
|
|
86
83
|
`$ npm install ifsc`
|
|
87
84
|
|
|
85
|
+
## Go
|
|
86
|
+
|
|
87
|
+
This package is compatible with modern Go releases in module mode, with Go installed:
|
|
88
|
+
|
|
89
|
+
`go get github.com/razorpay/ifsc/v2`
|
|
90
|
+
|
|
91
|
+
will resolve and add the package to the current development module, along with its dependencies.
|
|
92
|
+
|
|
93
|
+
Alternatively the same can be achieved if you use import in a package:
|
|
94
|
+
|
|
95
|
+
`import "github.com/razorpay/ifsc/v2/src/go"`
|
|
96
|
+
|
|
97
|
+
and run go get without parameters.
|
|
98
|
+
|
|
99
|
+
Finally, to use the top-of-trunk version of this repo, use the following command:
|
|
100
|
+
|
|
101
|
+
`go get github.com/razorpay/ifsc/v2@master`
|
|
102
|
+
|
|
88
103
|
## Support Matrix
|
|
89
104
|
|
|
90
105
|
Only the latest version of each SDK is considered.
|
|
@@ -93,12 +108,12 @@ Only the latest version of each SDK is considered.
|
|
|
93
108
|
| -------- | ---------- | ---------- | ----------------------- | -------------- |
|
|
94
109
|
| PHP | ✅ | ✅ | ✅ (✅) | ✅ |
|
|
95
110
|
| Ruby | ✅ | ✅ | ✅ (✅) | ✅ |
|
|
96
|
-
| Elixir | ✅ | ✅ | ✅ (❎) | ❎ |
|
|
97
111
|
| Node.js | ✅ | ✅ | ❎ (❎) | ✅ |
|
|
112
|
+
| Go | ✅ | ✅ | ✅ (✅) | ✅ |
|
|
98
113
|
|
|
99
114
|
## API Documentation
|
|
100
115
|
|
|
101
|
-
This repository also hosts the source code for
|
|
116
|
+
This repository also hosts the source code for 5 modules: PHP/Node.js/Ruby/Go as of now.
|
|
102
117
|
The API is documented below:
|
|
103
118
|
|
|
104
119
|
### PHP
|
|
@@ -281,58 +296,69 @@ Razorpay::IFSC::IFSC.find '...'
|
|
|
281
296
|
code = Razorpay::IFSC::IFSC.new '...'; code.get
|
|
282
297
|
```
|
|
283
298
|
|
|
284
|
-
###
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
299
|
+
### Go
|
|
300
|
+
|
|
301
|
+
```go
|
|
302
|
+
package main
|
|
303
|
+
|
|
304
|
+
import (
|
|
305
|
+
ifsc "github.com/razorpay/ifsc/src/go"
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
// todo: change funcs not required to lower case.
|
|
309
|
+
|
|
310
|
+
func main() {
|
|
311
|
+
|
|
312
|
+
ifsc.Validate("KKBK0000261") // Returns true
|
|
313
|
+
ifsc.Validate("BOTM0XEEMRA") // Returns false
|
|
314
|
+
|
|
315
|
+
ifsc.ValidateBankCode("PUNB") // Returns true
|
|
316
|
+
ifsc.ValidateBankCode("ABCD") // Returns false
|
|
317
|
+
|
|
318
|
+
ifsc.GetBankName("PUNB") // Returns "Punjab National Bank", nil
|
|
319
|
+
ifsc.GetBankName("ABCD") // Returns "", errors.New(invalid bank code)
|
|
320
|
+
ifsc.GetBankName(ifsc.HDFC) // Returns "HDFC Bank", nil
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
ifsc.GetBankDetails("PUNB")
|
|
324
|
+
// or
|
|
325
|
+
ifsc.GetBankDetails(ifsc.PUNB)
|
|
326
|
+
|
|
327
|
+
/* Returns
|
|
328
|
+
(*ifsc.Bank){
|
|
329
|
+
Name : "Punjab National Bank",
|
|
330
|
+
BankCode : "024",
|
|
331
|
+
Code : "PUNB",
|
|
332
|
+
Type : "PSB",
|
|
333
|
+
IFSC : "PUNB0244200",
|
|
334
|
+
MICR : "110024001",
|
|
335
|
+
IIN : "508568",
|
|
336
|
+
APBS : true,
|
|
337
|
+
AchCredit : true,
|
|
338
|
+
AchDebit : true,
|
|
339
|
+
NachDebit : true,
|
|
340
|
+
Upi : true
|
|
341
|
+
}), nil
|
|
342
|
+
*/
|
|
343
|
+
|
|
344
|
+
ifsc.LookUP("KKBK0000261")
|
|
345
|
+
|
|
346
|
+
/*
|
|
347
|
+
Returns
|
|
348
|
+
(*ifsc.IFSCResponse)({
|
|
349
|
+
Bank : "Kotak Mahindra Bank",
|
|
350
|
+
Branch : "GURGAON",
|
|
351
|
+
Address : "JMD REGENT SQUARE,MEHRAULI GURGAON ROAD,OPPOSITE BRISTOL HOTEL,",
|
|
352
|
+
Contact : "4131000",
|
|
353
|
+
City : "GURGAON",
|
|
354
|
+
District : "GURGAON",
|
|
355
|
+
State : "HARYANA",
|
|
356
|
+
IFSC : "KKBK0000261",
|
|
357
|
+
BankCode : "KKBK"
|
|
358
|
+
}), nil
|
|
359
|
+
*/
|
|
360
|
+
}
|
|
309
361
|
|
|
310
|
-
Offline validation
|
|
311
|
-
|
|
312
|
-
```elixir
|
|
313
|
-
iex> IFSC.validate("KKBK0000261")
|
|
314
|
-
{:ok,
|
|
315
|
-
%Razorpay.IFSC{
|
|
316
|
-
address: nil,
|
|
317
|
-
bank: "Kotak Mahindra Bank",
|
|
318
|
-
bank_code: "KKBK",
|
|
319
|
-
branch: nil,
|
|
320
|
-
city: nil,
|
|
321
|
-
contact: nil,
|
|
322
|
-
district: nil,
|
|
323
|
-
ifsc: "KKBK0000261",
|
|
324
|
-
rtgs: nil,
|
|
325
|
-
state: nil
|
|
326
|
-
}}
|
|
327
|
-
|
|
328
|
-
iex> IFSC.validate("foobar")
|
|
329
|
-
{:error, :invalid_format}
|
|
330
|
-
|
|
331
|
-
iex> IFSC.validate("AAAA0000000")
|
|
332
|
-
{:error, :invalid_bank_code}
|
|
333
|
-
|
|
334
|
-
iex(> IFSC.validate("HDFC0000000")
|
|
335
|
-
{:error, :invalid_branch_code}
|
|
336
362
|
```
|
|
337
363
|
|
|
338
364
|
### Code Notes
|
|
@@ -358,6 +384,5 @@ is under public domain.
|
|
|
358
384
|
|
|
359
385
|
[combined]: https://rbidocs.rbi.org.in/rdocs/content/docs/68774.xlsx
|
|
360
386
|
[releases]: https://github.com/razorpay/ifsc/releases
|
|
361
|
-
[buildlist]: https://app.wercker.com/razorpay/ifsc/runs?view=runs&q=pipeline%3Abuild
|
|
362
387
|
[rtgs]: https://rbidocs.rbi.org.in/rdocs/RTGS/DOCs/RTGEB0815.xlsx
|
|
363
388
|
[ach]: https://www.npci.org.in/what-we-do/nach/live-members/live-banks
|
data/ifsc.gemspec
CHANGED
|
@@ -3,8 +3,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = 'ifsc'
|
|
6
|
-
s.version = '
|
|
7
|
-
s.date = '2021-
|
|
6
|
+
s.version = '2.0.2'
|
|
7
|
+
s.date = '2021-11-16'
|
|
8
8
|
s.summary = 'IFSC code database to help you validate IFSC codes'
|
|
9
9
|
s.description = 'A simple gem by @razorpay to help you validate your IFSC codes. IFSC codes are bank codes within India'
|
|
10
10
|
s.authors = ['Abhay Rana', 'Nihal Gonsalves']
|