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 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
@@ -0,0 +1,19 @@
1
+ *.gem
2
+ /.bundle/
3
+ /.yardoc
4
+ /Gemfile.lock
5
+ /_yardoc/
6
+ /coverage/
7
+ /doc/
8
+ /pkg/
9
+ /spec/reports/
10
+ tmp
11
+ coverage
12
+ *.bundle
13
+ *.so
14
+ *.o
15
+ *.a
16
+ mkmf.log
17
+ .idea/
18
+ .bundle
19
+ .config
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.4
4
+ before_install: gem install bundler -v 1.11.2
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in turkish_bin_numbers.gemspec
4
+ gemspec
5
+ gem 'json'
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
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
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
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here