ifsc 1.6.1 → 2.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b84f2e2b4a991e4aa5961e7b0336bd3b4135717a93731e102cd78e8ea771f612
4
- data.tar.gz: 8d1348b3fd3d58014b5153e03f32239ab7916cc44c797d3b810e5bc00be45f44
3
+ metadata.gz: 4ac8ecd53872b58b8a53b10e45e9411632cec5aacf1b8ef3d0648695c176b821
4
+ data.tar.gz: 6b7d0445c445cbb851514a507f6f239dc600e419d74cb987f1a28f019b36a9c9
5
5
  SHA512:
6
- metadata.gz: 6cb83857dcae2a71d9c233948323b48ee0c6e42a9ade5554ad72680d6ff02271a80a93690ac7ece220fa8e999cdadffa4cd3eda4250f35cc38f30915445a663d
7
- data.tar.gz: fc1bcc9a8c49df86a992d3941640278adc9d6c962165eca520ffecca7d4cec91dfa165e7cce25aeff379845ec299bffc69e41dd3d7d8d0dc87e0b1be5a5df830
6
+ metadata.gz: 8895e13cc8b1deb7be3b225053d95997b41c8cd00b799f9ff49573d7b658ef37db89095a0557fe072905006e4959024db822fafdd64c4d0b2b44ffaf114e0b1a
7
+ data.tar.gz: d2da3a2eb268d33a7a6cea7d4d8af0a99b454e142ffe5de93dc74247f37146775e3b0acc450b17cb36c1fc5c096c2d1680804b86ec6af26f7fe8aca496da1eff
data/CHANGELOG.md CHANGED
@@ -5,6 +5,27 @@ 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.3][2.0.3]
9
+ ## Changed
10
+ - Adds back 20 IFSC codes removed due to a change on the RBI sheet structure in 2.0.2
11
+
12
+ ## [2.0.2][2.0.2]
13
+ ## Changed
14
+ - Metadata changes
15
+
16
+ ## [2.0.1][2.0.1]
17
+ ## Changed
18
+ - Metadata changes
19
+
20
+ ## [2.0.0][2.0.0]
21
+ ### Removed
22
+ - Removed support for Elixir package
23
+ ### Changed
24
+ - Builds are now powered by GitHub Actions, instead of Wercker
25
+ ### Added
26
+ - There is a supported golang SDK. See the README for instructions on how to use it.
27
+ - 1 New Bank: `"AHDC": "Ahmednagar District Central Co-operative Bank"`
28
+
8
29
  ## [1.6.1][1.6.1]
9
30
  ### Added
10
31
  - Only metadata changes in this release.
@@ -210,7 +231,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
210
231
 
211
232
  - Removes some data formats (YAML/Large JSON) for cleaner code. If you were using them, please let create an issue.
212
233
 
213
- [unreleased]: https://github.com/razorpay/ifsc/compare/1.6.1...HEAD
234
+ [unreleased]: https://github.com/razorpay/ifsc/compare/2.0.3...HEAD
235
+ [2.0.3]: https://github.com/razorpay/ifsc/releases/tag/2.0.3
236
+ [2.0.2]: https://github.com/razorpay/ifsc/releases/tag/2.0.2
237
+ [2.0.1]: https://github.com/razorpay/ifsc/releases/tag/2.0.1
238
+ [2.0.0]: https://github.com/razorpay/ifsc/releases/tag/2.0.0
214
239
  [1.6.1]: https://github.com/razorpay/ifsc/releases/tag/1.6.1
215
240
  [1.5.13]: https://github.com/razorpay/ifsc/releases/tag/1.5.13
216
241
  [1.5.12]: https://github.com/razorpay/ifsc/releases/tag/1.5.12
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
- [![wercker status](https://app.wercker.com/status/bc9b22047e1b8eb55ce98ba451d7b504/s/master 'wercker status')](https://app.wercker.com/project/byKey/bc9b22047e1b8eb55ce98ba451d7b504) [![](https://images.microbadger.com/badges/image/razorpay/ifsc:1.6.1.svg)](https://microbadger.com/images/razorpay/ifsc:1.6.1) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
7
+ [![](https://images.microbadger.com/badges/image/razorpay/ifsc:2.0.3.svg)](https://microbadger.com/images/razorpay/ifsc:2.0.3) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
8
8
 
9
- [![](https://images.microbadger.com/badges/version/razorpay/ifsc:1.6.1.svg)](https://microbadger.com/images/razorpay/ifsc:1.6.1) [![npm version](https://badge.fury.io/js/ifsc.svg)](https://badge.fury.io/js/ifsc) [![Gem Version](https://badge.fury.io/rb/ifsc.svg)](https://badge.fury.io/rb/ifsc) [![PHP version](https://badge.fury.io/ph/razorpay%2Fifsc.svg)](https://badge.fury.io/ph/razorpay%2Fifsc) [![Hex pm](http://img.shields.io/hexpm/v/ifsc.svg)](https://hex.pm/packages/ifsc)
9
+ [![](https://images.microbadger.com/badges/version/razorpay/ifsc:2.0.3.svg)](https://microbadger.com/images/razorpay/ifsc:2.0.3) [![npm version](https://badge.fury.io/js/ifsc.svg)](https://badge.fury.io/js/ifsc) [![Gem Version](https://badge.fury.io/rb/ifsc.svg)](https://badge.fury.io/rb/ifsc) [![PHP version](https://badge.fury.io/ph/razorpay%2Fifsc.svg)](https://badge.fury.io/ph/razorpay%2Fifsc) [![Hex pm](http://img.shields.io/hexpm/v/ifsc.svg)](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 [`build` pipeline][buildlist] on Wercker should result in a container
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.2](https://endoflife.date/php).
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 3 modules: PHP/Node.js/Ruby as of now.
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
- ### Elixir
285
-
286
- Documentation: [https://hexdocs.pm/ifsc](https://hexdocs.pm/ifsc)
287
-
288
- Online validation
289
-
290
- ```elixir
291
- iex> IFSC.get("KKBK0000261")
292
- {:ok,
293
- %Razorpay.IFSC{
294
- address: "JMD REGENT SQUARE,MEHRAULI GURGAON ROAD,OPPOSITE BRISTOL HOTEL,",
295
- bank: "Kotak Mahindra Bank",
296
- bank_code: "KKBK",
297
- branch: "GURGAON",
298
- city: "GURGAON",
299
- contact: "4131000",
300
- district: "GURGAON",
301
- ifsc: "KKBK0000261",
302
- rtgs: true,
303
- state: "HARYANA"
304
- }}
305
-
306
- iex> IFSC.get("foobar")
307
- {:error, :invalid_ifsc}
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 = '1.6.1'
7
- s.date = '2021-07-09'
6
+ s.version = '2.0.3'
7
+ s.date = '2021-11-17'
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']