cashbox 0.0.27 → 0.0.28

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: 951b6470d72ad4abe9306debd04191c96a5fdce6
4
- data.tar.gz: 2ca18f3331caa284dbff6d33420bd4013b013ac0
3
+ metadata.gz: b5ee5fff97665fd2a7ac1653360cad18dd8420a9
4
+ data.tar.gz: c0eccb6bb6e081c1680844ec2bceffb16939c4ee
5
5
  SHA512:
6
- metadata.gz: 2d79edaef2d834998bb5a76ba009722025503c8d87ac55b58244c76e11dbb219a5942dfbab373bdac22b3eec59150057130922130ff385485ae652e0a81b286a
7
- data.tar.gz: 0fd97e7518ede85287def2704c843ac94b2c03079e22f9e7cba795a31933a3eea51868190b1bdf0e9196640bf6fd8df023da053c1959b7a36996e7fcb80db2b0
6
+ metadata.gz: bf4cd3b4749712c725474fe0215438adb6d62f37eb040e80ed581b0831e2139fe240e559f84abceea2b575f94f9c84b01d8e25b2c148c2d769af30dd25959fd2
7
+ data.tar.gz: ad9099c7e3f06d8a9f569d17464d10c8f8269348f6a5a1d9de335ff57950fde02ff07da3304e36ceb4c789a2b091905bca76ad21a337c21287d8310279b57521
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cashbox (0.0.27)
4
+ cashbox (0.0.28)
5
5
  activesupport
6
6
  addressable
7
7
  hashie
@@ -5,6 +5,10 @@ module Cashbox
5
5
  include Rest::Cancel
6
6
  include Rest::Disentitle
7
7
 
8
+ IN_RETRY = "In Retry".freeze
9
+ FAILED_TO_COLLECT = "Failed To Collect".freeze
10
+ GRACE_PERIOD = "Grace Period".freeze
11
+
8
12
  property :id
9
13
  property :vid
10
14
  property :created, coerce: Cashbox::Type.DateTime
@@ -31,6 +35,18 @@ module Cashbox
31
35
  property :starts, coerce: Cashbox::Type.DateTime
32
36
  property :status
33
37
 
38
+ def in_retry?
39
+ billing_state == IN_RETRY
40
+ end
41
+
42
+ def failed_to_collect?
43
+ billing_state == FAILED_TO_COLLECT
44
+ end
45
+
46
+ def grace_period?
47
+ billing_state == GRACE_PERIOD
48
+ end
49
+
34
50
  def add_subscription_item(product_to_add)
35
51
  subscription_item_to_add = Cashbox::SubscriptionItem.new({
36
52
  product: product_to_add
@@ -1,3 +1,3 @@
1
1
  module Cashbox
2
- VERSION = "0.0.27"
2
+ VERSION = "0.0.28"
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.27
4
+ version: 0.0.28
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-10-16 00:00:00.000000000 Z
11
+ date: 2018-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler