cashbox 0.0.27 → 0.0.28
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cashbox/model/subscription.rb +16 -0
- data/lib/cashbox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5ee5fff97665fd2a7ac1653360cad18dd8420a9
|
4
|
+
data.tar.gz: c0eccb6bb6e081c1680844ec2bceffb16939c4ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf4cd3b4749712c725474fe0215438adb6d62f37eb040e80ed581b0831e2139fe240e559f84abceea2b575f94f9c84b01d8e25b2c148c2d769af30dd25959fd2
|
7
|
+
data.tar.gz: ad9099c7e3f06d8a9f569d17464d10c8f8269348f6a5a1d9de335ff57950fde02ff07da3304e36ceb4c789a2b091905bca76ad21a337c21287d8310279b57521
|
data/Gemfile.lock
CHANGED
@@ -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
|
data/lib/cashbox/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|