synapsis_v3 0.1.7 → 0.1.8

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: 7c45696cc646182a1ba142777fb7b519379046ca
4
- data.tar.gz: 463a138bcdabcb6300a55607056ed805811064b2
3
+ metadata.gz: f0a4c4f213e8ea0c73e519010ffe74fbea72b059
4
+ data.tar.gz: 78b40364a80835e7a637017e6dfa320f76fc4890
5
5
  SHA512:
6
- metadata.gz: 04e9c930071b631b4c48036370078e1d4c54a0e24239744fb0c53067221896a9682118baaf9022f78f64bcd16ebec244d8213b66c27774132a525e93489e89eb
7
- data.tar.gz: 014be6870b5a83cf9d8313215027adaaa5fddd8705e3825c7634c8712e618c129b040f22019b306b4f26edcc63b338877d8e609a2ed3bf6bff8849362ae4cd60
6
+ metadata.gz: 11d1babbc1a36563f6b4ade3822e97922b6929ffc4561b4ebdab97a97abe9465958e1fa1a043d8f151e342a804bafa819729f72068116a173b83719ab2df8929
7
+ data.tar.gz: 07cc02118e5d928e4246b31c538f6b356bcca0a9c29ba5f15dfc6806a829258fd08b2bf6fde64525d59b5539710e793174e85d90ae6b306b92d0665d43c855a5
data/lib/synapsis_v3.rb CHANGED
@@ -14,6 +14,7 @@ require "synapsis_v3/error"
14
14
  require "synapsis_v3/user"
15
15
  require "synapsis_v3/node"
16
16
  require "synapsis_v3/transaction"
17
+ require "synapsis_v3/subscription"
17
18
 
18
19
  API_V3_PATH = 'api/v3/'
19
20
 
@@ -0,0 +1,23 @@
1
+ class Synapsis::Subscription < Synapsis::APIResource
2
+ def self.create(params)
3
+ add_subscription_url = "#{API_V3_PATH}/subscription/add"
4
+
5
+ response = request(:post, add_subscription_url, params.merge(client_credentials))
6
+ return_response(response)
7
+ end
8
+
9
+ def self.show(params)
10
+ show_subscription_url = "api/3/subscriptions/#{params[:id]}"
11
+
12
+ response = request(:get, show_subscription_url, params)
13
+ return_response(response)
14
+ end
15
+
16
+ def self.update(params)
17
+ update_subscription_url = "api/3/subscriptions/#{params[:id]}"
18
+
19
+ response = request(:patch, update_subscription_url, params.merge(client_credentials))
20
+ return_response(response)
21
+ end
22
+ end
23
+
@@ -1,3 +1,3 @@
1
1
  module SynapsisV3
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synapsis_v3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daryll Santos
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-23 00:00:00.000000000 Z
11
+ date: 2016-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -132,6 +132,7 @@ files:
132
132
  - lib/synapsis_v3/api_resource.rb
133
133
  - lib/synapsis_v3/error.rb
134
134
  - lib/synapsis_v3/node.rb
135
+ - lib/synapsis_v3/subscription.rb
135
136
  - lib/synapsis_v3/transaction.rb
136
137
  - lib/synapsis_v3/user.rb
137
138
  - lib/synapsis_v3/version.rb