cashbox 0.0.18 → 0.0.19

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
  SHA1:
3
- metadata.gz: 47a735087da637425a37c57f9388e45cd746a103
4
- data.tar.gz: 3103c5ca7d9f5f796a6d1ac02809002704cd7761
3
+ metadata.gz: ee6554691c8e1dcb5a21a397f466416fa1544220
4
+ data.tar.gz: f980a1e311101a331b4fb232b1cb07225908dadc
5
5
  SHA512:
6
- metadata.gz: c7d3cc94cc631fd4b2257a5f33d7f76b4b56afc935584f1fe9fde098b2812a213e1a42d2a4f819fcb93950458c54a98191d7b2a4ee2103c49c5a83bb6ab45395
7
- data.tar.gz: 31abd4be4c2fc8b3d908d692718af698975050ada11a69c84016117515cfc5740b95730b0937add2bfa689c08a28a3d5981b19a154d1e2280360ab896b600843
6
+ metadata.gz: d6b3cb04135f969d4940390744bcb2b805449faa4d8f8f5ff54de7983a36538f346f51b3b9e9ba633d531cedeb27b5682318e71f28b0a50ef99f0b15f03c83e0
7
+ data.tar.gz: 17fb55174a434a6632a7c1c45bc6638440c2a02218ea599a03991d6e755838a95cf3060ff1fa9f99e71c60cce68a99176fd83ab8a76217a4de9e1efa202e9a6d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cashbox (0.0.18)
4
+ cashbox (0.0.19)
5
5
  activesupport
6
6
  addressable
7
7
  hashie
@@ -28,5 +28,12 @@ module Cashbox
28
28
  def last_digits
29
29
  self[type.underscore].last_digits
30
30
  end
31
+
32
+ def card_network
33
+ return unless type == "CreditCard"
34
+ bin_number = credit_card.bin
35
+ return "Visa" if bin_number.start_with?("3")
36
+ return "Master Card" if bin_number.start_with?("2", "5")
37
+ end
31
38
  end
32
39
  end
@@ -1,3 +1,3 @@
1
1
  module Cashbox
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cashbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathon Storer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-23 00:00:00.000000000 Z
11
+ date: 2018-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler