cashbox 0.0.19 → 0.0.20

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: ee6554691c8e1dcb5a21a397f466416fa1544220
4
- data.tar.gz: f980a1e311101a331b4fb232b1cb07225908dadc
3
+ metadata.gz: 3f52f6f930caedd2bc74808b2febe71ee6afd2b5
4
+ data.tar.gz: ea0f28b205288aa685484b43e9cb0977fdf80b70
5
5
  SHA512:
6
- metadata.gz: d6b3cb04135f969d4940390744bcb2b805449faa4d8f8f5ff54de7983a36538f346f51b3b9e9ba633d531cedeb27b5682318e71f28b0a50ef99f0b15f03c83e0
7
- data.tar.gz: 17fb55174a434a6632a7c1c45bc6638440c2a02218ea599a03991d6e755838a95cf3060ff1fa9f99e71c60cce68a99176fd83ab8a76217a4de9e1efa202e9a6d
6
+ metadata.gz: ed48a132c39aaff0fa8e4cf3034adf8bc504ffc54c14fc033760fc5a5d92f53441453746543c6af472bc765634dee49142c2c7ef136b9af737cf53b96e0f5597
7
+ data.tar.gz: ac3945ae92184317f32f243fbb8b81de99dfa72805074237b5ece12e8266394a2f1dba86e1c501ee50b68b0af36d0ae37f6fce4cd78ede19df0d4c8caa333fc5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cashbox (0.0.19)
4
+ cashbox (0.0.20)
5
5
  activesupport
6
6
  addressable
7
7
  hashie
@@ -31,7 +31,7 @@ module Cashbox
31
31
 
32
32
  def card_network
33
33
  return unless type == "CreditCard"
34
- bin_number = credit_card.bin
34
+ bin_number = credit_card.bin.to_s
35
35
  return "Visa" if bin_number.start_with?("3")
36
36
  return "Master Card" if bin_number.start_with?("2", "5")
37
37
  end
@@ -29,5 +29,7 @@ module Cashbox
29
29
  property :subscription, coerce: Cashbox::Subscription
30
30
  property :subscription_sequence
31
31
  property :to_be_captured, coerce: Cashbox::Type.Boolean
32
+
33
+ delegate :credit_card?, :direct_debit?, :direct_debit, :credit_card, :account_holder, :last_digits, :card_network, to: :source_payment_method
32
34
  end
33
35
  end
@@ -1,3 +1,3 @@
1
1
  module Cashbox
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
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.19
4
+ version: 0.0.20
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-26 00:00:00.000000000 Z
11
+ date: 2018-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler