billimatic-client 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -18
- data/README.md +22 -0
- data/lib/billimatic/url_helpers.rb +17 -0
- data/lib/billimatic/version.rb +1 -1
- data/lib/billimatic.rb +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 255b2eb1e4ea6e2f62bb031fa9d1b9b7a9d85c1d
|
4
|
+
data.tar.gz: c86d27945074cbdc62702d2231bf6054c7f0b83a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 711663f6767076a50e98d4736ec1d9801021db43e1d78b501c566a8edc8a903a1a76716046bb0a620521fc4c39bc0665c18dd8ea56252640f4ccc46895227215
|
7
|
+
data.tar.gz: 7038283e05cdb963ea517a6c48a76b743967f9b446b11b7ad09b13e611bd56529d8eaf240f7d4eef3b9b6001a0fbb995ade1256f9b0a72e4cdd9cef3317343f4
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
billimatic-client (0.
|
4
|
+
billimatic-client (0.4.0)
|
5
5
|
multi_json (~> 1.11)
|
6
6
|
typhoeus (~> 0.8)
|
7
7
|
virtus (~> 1.0.5)
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
ice_nine (~> 0.11.0)
|
16
16
|
thread_safe (~> 0.3, >= 0.3.1)
|
17
17
|
byebug (9.0.5)
|
18
|
-
codeclimate-test-reporter (0.
|
18
|
+
codeclimate-test-reporter (0.6.0)
|
19
19
|
simplecov (>= 0.7.1, < 1.0.0)
|
20
20
|
coderay (1.1.1)
|
21
21
|
coercible (1.0.0)
|
@@ -27,7 +27,7 @@ GEM
|
|
27
27
|
equalizer (0.0.11)
|
28
28
|
ethon (0.9.0)
|
29
29
|
ffi (>= 1.3.0)
|
30
|
-
ffi (1.9.
|
30
|
+
ffi (1.9.14)
|
31
31
|
formatador (0.2.5)
|
32
32
|
guard (2.14.0)
|
33
33
|
formatador (>= 0.2.4)
|
@@ -44,7 +44,7 @@ GEM
|
|
44
44
|
guard-compat (~> 1.1)
|
45
45
|
rspec (>= 2.99.0, < 4.0)
|
46
46
|
ice_nine (0.11.2)
|
47
|
-
json (
|
47
|
+
json (2.0.1)
|
48
48
|
listen (3.1.5)
|
49
49
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
50
50
|
rb-inotify (~> 0.9, >= 0.9.7)
|
@@ -57,7 +57,7 @@ GEM
|
|
57
57
|
nenv (~> 0.1)
|
58
58
|
shellany (~> 0.0)
|
59
59
|
notifier (0.5.2)
|
60
|
-
pry (0.10.
|
60
|
+
pry (0.10.4)
|
61
61
|
coderay (~> 1.1.0)
|
62
62
|
method_source (~> 0.8.1)
|
63
63
|
slop (~> 3.4)
|
@@ -68,24 +68,24 @@ GEM
|
|
68
68
|
rb-fsevent (0.9.7)
|
69
69
|
rb-inotify (0.9.7)
|
70
70
|
ffi (>= 0.5.0)
|
71
|
-
rspec (3.
|
72
|
-
rspec-core (~> 3.
|
73
|
-
rspec-expectations (~> 3.
|
74
|
-
rspec-mocks (~> 3.
|
75
|
-
rspec-core (3.
|
76
|
-
rspec-support (~> 3.
|
77
|
-
rspec-expectations (3.
|
71
|
+
rspec (3.5.0)
|
72
|
+
rspec-core (~> 3.5.0)
|
73
|
+
rspec-expectations (~> 3.5.0)
|
74
|
+
rspec-mocks (~> 3.5.0)
|
75
|
+
rspec-core (3.5.1)
|
76
|
+
rspec-support (~> 3.5.0)
|
77
|
+
rspec-expectations (3.5.0)
|
78
78
|
diff-lcs (>= 1.2.0, < 2.0)
|
79
|
-
rspec-support (~> 3.
|
80
|
-
rspec-mocks (3.
|
79
|
+
rspec-support (~> 3.5.0)
|
80
|
+
rspec-mocks (3.5.0)
|
81
81
|
diff-lcs (>= 1.2.0, < 2.0)
|
82
|
-
rspec-support (~> 3.
|
83
|
-
rspec-support (3.
|
82
|
+
rspec-support (~> 3.5.0)
|
83
|
+
rspec-support (3.5.0)
|
84
84
|
ruby_dep (1.3.1)
|
85
85
|
shellany (0.0.1)
|
86
|
-
simplecov (0.
|
86
|
+
simplecov (0.12.0)
|
87
87
|
docile (~> 1.1.0)
|
88
|
-
json (
|
88
|
+
json (>= 1.8, < 3)
|
89
89
|
simplecov-html (~> 0.10.0)
|
90
90
|
simplecov-html (0.10.0)
|
91
91
|
slop (3.6.0)
|
data/README.md
CHANGED
@@ -171,6 +171,28 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
171
171
|
</tr>
|
172
172
|
</table>
|
173
173
|
|
174
|
+
## Url helpers
|
175
|
+
|
176
|
+
Some url helpers are available:
|
177
|
+
|
178
|
+
### Checkout
|
179
|
+
|
180
|
+
```ruby
|
181
|
+
Billimatic.url_helpers.checkout_url(token: "some-subscription-token")
|
182
|
+
```
|
183
|
+
|
184
|
+
### Subscription dashboard
|
185
|
+
|
186
|
+
```ruby
|
187
|
+
Billimatic.url_helpers.subscription_dashboard_url(token: "some-subscription-token")
|
188
|
+
```
|
189
|
+
|
190
|
+
### Change plan
|
191
|
+
|
192
|
+
```ruby
|
193
|
+
Billimatic.url_helpers.change_plan_url(token: "some-subscription-token", plan_id: 52)
|
194
|
+
```
|
195
|
+
|
174
196
|
## Callbacks
|
175
197
|
|
176
198
|
TODO
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Billimatic
|
2
|
+
class UrlHelpers
|
3
|
+
include Singleton
|
4
|
+
|
5
|
+
def checkout_url(token:)
|
6
|
+
"#{Billimatic.configuration.host}/subscriptions/checkout/#{token}"
|
7
|
+
end
|
8
|
+
|
9
|
+
def subscription_dashboard_url(token:)
|
10
|
+
"#{Billimatic.configuration.host}/subscriptions/#{token}/dashboard"
|
11
|
+
end
|
12
|
+
|
13
|
+
def change_plan_url(token:, plan_id:)
|
14
|
+
"#{Billimatic.configuration.host}/subscriptions/#{token}/change_plan/#{plan_id}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/billimatic/version.rb
CHANGED
data/lib/billimatic.rb
CHANGED
@@ -7,6 +7,7 @@ require 'billimatic/configuration'
|
|
7
7
|
require 'billimatic/client'
|
8
8
|
require 'billimatic/http'
|
9
9
|
require 'billimatic/signature'
|
10
|
+
require 'billimatic/url_helpers'
|
10
11
|
|
11
12
|
require 'billimatic/entities/base'
|
12
13
|
require 'billimatic/entities/entity_service_item'
|
@@ -51,4 +52,8 @@ module Billimatic
|
|
51
52
|
def self.signature(secret)
|
52
53
|
Signature.new(secret)
|
53
54
|
end
|
55
|
+
|
56
|
+
def self.url_helpers
|
57
|
+
UrlHelpers.instance
|
58
|
+
end
|
54
59
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: billimatic-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Tassinari de Oliveira
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-07-
|
13
|
+
date: 2016-07-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: typhoeus
|
@@ -248,6 +248,7 @@ files:
|
|
248
248
|
- lib/billimatic/resources/webhook.rb
|
249
249
|
- lib/billimatic/response.rb
|
250
250
|
- lib/billimatic/signature.rb
|
251
|
+
- lib/billimatic/url_helpers.rb
|
251
252
|
- lib/billimatic/version.rb
|
252
253
|
homepage: https://github.com/myfreecomm/billimatic-client-ruby/
|
253
254
|
licenses: []
|