cashbox 0.0.36 → 0.0.37
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/Dockerfile +7 -4
- data/Gemfile.lock +1 -1
- data/lib/cashbox/model/subscription.rb +13 -22
- data/lib/cashbox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e8c90c985e2903b78aac8740875c83e34e2807f
|
4
|
+
data.tar.gz: 6ce13a773b53e115d6997f5f201e19c24ae959de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 016afcbef564c0dc62adae7a43dd333f37efd67794e442e8406ee8fb1614594285e4b8fd0f6205a53a990c27ed7669b218c8e31a2863819f36f2fd6f791c0eba
|
7
|
+
data.tar.gz: 4a8a7d55a37c06ee9e76fd61321556321c30d41c403a920016738dc09f1b1e2db9f10c90cca6ca340a677790352f5e2118cb46c98b16a36101b97709e03e57ea
|
data/Dockerfile
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
FROM paasmule/rbenv
|
2
2
|
|
3
3
|
RUN mkdir /app
|
4
|
-
ADD . /app
|
5
4
|
WORKDIR /app
|
6
5
|
|
6
|
+
ADD .ruby-version ./
|
7
7
|
RUN rbenv install $(cat .ruby-version)
|
8
|
+
RUN gem install bundler
|
8
9
|
|
9
|
-
|
10
|
-
RUN
|
10
|
+
ADD Gemfile Gemfile.lock cashbox.gemspec ./
|
11
|
+
RUN mkdir -p ./lib/cashbox/
|
12
|
+
ADD lib/cashbox/version.rb ./lib/cashbox/
|
13
|
+
RUN bundle install
|
11
14
|
|
12
|
-
|
15
|
+
ADD . ./
|
data/Gemfile.lock
CHANGED
@@ -47,28 +47,19 @@ module Cashbox
|
|
47
47
|
billing_state == GRACE_PERIOD
|
48
48
|
end
|
49
49
|
|
50
|
-
def
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
def replace_subscription_item(product_to_add, product_to_remove)
|
64
|
-
subscription_item_to_remove = remove_subscription_item(product_to_remove)
|
65
|
-
|
66
|
-
add_subscription_item(product_to_add)
|
67
|
-
items.last.replaces = subscription_item_to_remove.product.id if subscription_item_to_remove
|
68
|
-
end
|
69
|
-
|
70
|
-
def update_subscription_items
|
71
|
-
Cashbox::Request.new(:post, "#{route(id)}?effective_date=today&bill_prorated_period=true", { body: self.to_json })
|
50
|
+
def add_subscription_items(subscription_items, bill_prorated)
|
51
|
+
request = Cashbox::Request.new(:post, route(vid),
|
52
|
+
{
|
53
|
+
query: {
|
54
|
+
effective_date: 'today',
|
55
|
+
bill_prorated_period: bill_prorated
|
56
|
+
},
|
57
|
+
body: {
|
58
|
+
id: id,
|
59
|
+
items: subscription_items
|
60
|
+
}.to_json
|
61
|
+
})
|
62
|
+
self.class.cast(self, request.response)
|
72
63
|
end
|
73
64
|
end
|
74
65
|
end
|
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.37
|
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-
|
11
|
+
date: 2018-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
230
|
version: '0'
|
231
231
|
requirements: []
|
232
232
|
rubyforge_project:
|
233
|
-
rubygems_version: 2.
|
233
|
+
rubygems_version: 2.5.2
|
234
234
|
signing_key:
|
235
235
|
specification_version: 4
|
236
236
|
summary: Cashbox Rest Client
|