Class: Synapsis::Subscription
Class Method Summary
collapse
Methods inherited from APIResource
#class_name, class_name, class_name_pluralized, parse_as_synapse_resource, request, return_response
Class Method Details
.create(params) ⇒ Object
2
3
4
5
6
7
|
# File 'lib/synapsis_v3/subscription.rb', line 2
def self.create(params)
add_subscription_url = "#{API_V3_PATH}/subscription/add"
response = request(:post, add_subscription_url, params.merge(client_credentials))
return_response(response)
end
|
.show(params) ⇒ Object
9
10
11
12
13
14
|
# File 'lib/synapsis_v3/subscription.rb', line 9
def self.show(params)
show_subscription_url = "api/3/subscriptions/#{params[:id]}"
response = request(:get, show_subscription_url, params)
return_response(response)
end
|
.update(params) ⇒ Object
16
17
18
19
20
21
|
# File 'lib/synapsis_v3/subscription.rb', line 16
def self.update(params)
update_subscription_url = "api/3/subscriptions/#{params[:id]}"
response = request(:patch, update_subscription_url, params.merge(client_credentials))
return_response(response)
end
|