turkish_bin_numbers 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e753e3a714989e088a5e94811ae569952b3a97c9
4
- data.tar.gz: 78b9b01cc13e56ce0e0146e67022e7c11bc67caa
3
+ metadata.gz: 7c03cbf46740e2b2b402806f37ca3f3dd6f44725
4
+ data.tar.gz: 175de975f7649e4397134bfa1a79ea7aff6c3ed0
5
5
  SHA512:
6
- metadata.gz: 9672a8196478aefdaa460cb1dec31a4a8d90e776faab8681d93bed777d0550ffc210210c1fc7b901ef83d303310982744d7cf9175489aeb459c629de629989b4
7
- data.tar.gz: 91cc37b3ddbda9f70a0fe29105ab53ebf03d8a0578722b099eae5a6ca3d6d0b935edb60c9faf68e1181793062e14b9849193223cbca86e7e1629a4c55d611316
6
+ metadata.gz: 88a11bc45d032988c5a68fee3d68922c146b64060bc9ffe8f68644ce02ca951619532d9eaab3b2f003a73c2bcb79f70af854bccf3fce5b80e602efc8ae0a0fae
7
+ data.tar.gz: bb095630a276c649b8cd16c39c79eaa74fa1939c70c5dd0c345d89bb6102b2b324b976f01d2e3b98f71308d6b2b04b323b624e1bc8c08193acddd20fb3791835
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Bin Numbers for Turkish Banks
2
2
  [![Gem Version](https://badge.fury.io/rb/turkish_bin_numbers.svg)](http://badge.fury.io/rb/turkish_bin_numbers)
3
3
 
4
- Gives information about bank, card type and debit. Also you can query bin numbers by bank.
4
+ Bin numbers used by Turkish Banks. You can query by bin number and get info (bank name, credit card type, etc.) or you can query by bank and card type and get list of bins.
5
5
 
6
6
  ## Requirements
7
7
 
8
- The only requirements are working a Ruby installation.
8
+ The only requirement is a working Ruby installation.
9
9
 
10
10
  ## Installation
11
11
 
@@ -26,7 +26,7 @@ or install the gem on terminal.
26
26
 
27
27
  ## Usage
28
28
 
29
- **Get bin number details**
29
+ **Get info by bin number**
30
30
 
31
31
  ```ruby
32
32
  TurkishBinNumbers.get(418342)
@@ -38,11 +38,19 @@ TurkishBinNumbers.get(418342)
38
38
 
39
39
  ```ruby
40
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]
41
+ # => [454672, 444678, 444676, ...]
42
42
  ```
43
43
 
44
44
 
45
- **Get bin numbers which type is credit card**
45
+ **Get bank list**
46
+
47
+ ```ruby
48
+ TurkishBinNumbers.banks
49
+ # => ["ABank", "Akbank", "Aktifbank", ...]
50
+ ```
51
+
52
+
53
+ **Get bin numbers for non-debit credit cards**
46
54
 
47
55
  ```ruby
48
56
  TurkishBinNumbers.credit_card_bins
@@ -50,7 +58,7 @@ TurkishBinNumbers.credit_card_bins
50
58
  ```
51
59
 
52
60
 
53
- **Get bin numbers which type is debit card**
61
+ **Get bin numbers for debit credit cards**
54
62
 
55
63
  ```ruby
56
64
  TurkishBinNumbers.debit_card_bins
@@ -58,7 +66,7 @@ TurkishBinNumbers.debit_card_bins
58
66
  ```
59
67
 
60
68
 
61
- **Get card type of bin number**
69
+ **Get card type of bin number (Visa, MasterCard, American Express, Maestro)**
62
70
 
63
71
  ```ruby
64
72
  TurkishBinNumbers.detect_card_type(418342)
@@ -28,6 +28,11 @@ module TurkishBinNumbers
28
28
  return bins.map {|b| b["bin_number"]}
29
29
  end
30
30
 
31
+ def self.banks
32
+ banks = @data.map {|b| b["bank_name"] }
33
+ return banks.uniq
34
+ end
35
+
31
36
  def self.detect_card_type(bin)
32
37
  bin = bin.to_s
33
38
  case
@@ -1,3 +1,3 @@
1
1
  module TurkishBinNumbers
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turkish_bin_numbers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tolga Gezginiş