turkish_bin_numbers 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +5 -0
- data/README.md +78 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/bin_list.json +4382 -0
- data/lib/turkish_bin_numbers/version.rb +3 -0
- data/lib/turkish_bin_numbers.rb +46 -0
- data/turkish_bin_numbers.gemspec +25 -0
- metadata +101 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e753e3a714989e088a5e94811ae569952b3a97c9
|
4
|
+
data.tar.gz: 78b9b01cc13e56ce0e0146e67022e7c11bc67caa
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9672a8196478aefdaa460cb1dec31a4a8d90e776faab8681d93bed777d0550ffc210210c1fc7b901ef83d303310982744d7cf9175489aeb459c629de629989b4
|
7
|
+
data.tar.gz: 91cc37b3ddbda9f70a0fe29105ab53ebf03d8a0578722b099eae5a6ca3d6d0b935edb60c9faf68e1181793062e14b9849193223cbca86e7e1629a4c55d611316
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
# Bin Numbers for Turkish Banks
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/turkish_bin_numbers.svg)](http://badge.fury.io/rb/turkish_bin_numbers)
|
3
|
+
|
4
|
+
Gives information about bank, card type and debit. Also you can query bin numbers by bank.
|
5
|
+
|
6
|
+
## Requirements
|
7
|
+
|
8
|
+
The only requirements are working a Ruby installation.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add it to your Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem 'turkish_bin_numbers'
|
16
|
+
```
|
17
|
+
|
18
|
+
and run on terminal:
|
19
|
+
|
20
|
+
$ bundle
|
21
|
+
|
22
|
+
or install the gem on terminal.
|
23
|
+
|
24
|
+
$ gem install turkish_bin_numbers
|
25
|
+
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
**Get bin number details**
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
TurkishBinNumbers.get(418342)
|
33
|
+
# => {"bin_number"=>418342, "bank_id"=>24, "bank_name"=>"Türkiye İş Bankası", "bin_type"=>"credit_card", "card_type"=>"Visa"}
|
34
|
+
```
|
35
|
+
|
36
|
+
|
37
|
+
**Get bin numbers by bank name**
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
TurkishBinNumbers.bins_of_bank("Ziraat Bankası")
|
41
|
+
# => [454672, 444678, 444676, 540134, 540130, 676123, 512440, 476619, 516932, 444677, 407814, 454671, 547287, 542374, 523529, 513662, 527682, 534981, 447504, 413226, 404591, 676124, 533154, 531102, 528208, 454674, 546957, 530905, 549449, 454673, 469884]
|
42
|
+
```
|
43
|
+
|
44
|
+
|
45
|
+
**Get bin numbers which type is credit card**
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
TurkishBinNumbers.credit_card_bins
|
49
|
+
# => [466283, 516458, 522221, ...]
|
50
|
+
```
|
51
|
+
|
52
|
+
|
53
|
+
**Get bin numbers which type is debit card**
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
TurkishBinNumbers.debit_card_bins
|
57
|
+
# => [627768, 466284, 670670, ...]
|
58
|
+
```
|
59
|
+
|
60
|
+
|
61
|
+
**Get card type of bin number**
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
TurkishBinNumbers.detect_card_type(418342)
|
65
|
+
# => "Visa"
|
66
|
+
```
|
67
|
+
|
68
|
+
<a name="contributing"></a>
|
69
|
+
## Contributing
|
70
|
+
1. Fork it ( https://github.com/tgezginis/turkish_bin_numbers/fork )
|
71
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
72
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
73
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
74
|
+
5. Create a new Pull Request
|
75
|
+
|
76
|
+
**Thanks**
|
77
|
+
- [Onur Bozkurt](https://github.com/onurbozkurt)
|
78
|
+
- [Serhan Balcı](https://github.com/arghan)
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "turkish_bin_numbers"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|