Class: CirroIOV2::Resources::NotificationTopic
- Inherits:
-
Base
- Object
- Base
- CirroIOV2::Resources::NotificationTopic
show all
- Defined in:
- lib/cirro_io_v2/resources/notification_topic.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#create(params) ⇒ Object
23
24
25
26
|
# File 'lib/cirro_io_v2/resources/notification_topic.rb', line 23
def create(params)
response = client.request_client.request(:post, resource_root, body: params)
Responses::NotificationTopicResponse.new(response.body)
end
|
#delete(id) ⇒ Object
28
29
30
31
|
# File 'lib/cirro_io_v2/resources/notification_topic.rb', line 28
def delete(id)
response = client.request_client.request(:delete, "#{resource_root}/#{id}")
Responses::NotificationTopicDeleteResponse.new(response.body)
end
|
#find(id) ⇒ Object
8
9
10
11
|
# File 'lib/cirro_io_v2/resources/notification_topic.rb', line 8
def find(id)
response = client.request_client.request(:get, "#{resource_root}/#{id}")
Responses::NotificationTopicResponse.new(response.body)
end
|
#list(params = nil) ⇒ Object
18
19
20
21
|
# File 'lib/cirro_io_v2/resources/notification_topic.rb', line 18
def list(params = nil)
response = client.request_client.request(:get, resource_root, params:)
Responses::NotificationTopicListResponse.new(response.body)
end
|
#resource_root ⇒ Object
4
5
6
|
# File 'lib/cirro_io_v2/resources/notification_topic.rb', line 4
def resource_root
'notification_topics'
end
|
#update(id, params) ⇒ Object
13
14
15
16
|
# File 'lib/cirro_io_v2/resources/notification_topic.rb', line 13
def update(id, params)
response = client.request_client.request(:post, "#{resource_root}/#{id}", body: params)
Responses::NotificationTopicResponse.new(response.body)
end
|