Class: CirroIOV2::Resources::NotificationLayout
- Inherits:
-
Base
- Object
- Base
- CirroIOV2::Resources::NotificationLayout
show all
- Defined in:
- lib/cirro_io_v2/resources/notification_layout.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #resource_root
Instance Method Details
#create(params) ⇒ Object
9
10
11
12
|
# File 'lib/cirro_io_v2/resources/notification_layout.rb', line 9
def create(params)
response = client.request_client.request(:post, resource_root, body: params)
Responses::NotificationLayoutResponse.new(response.body)
end
|
#create_template(id, params) ⇒ Object
19
20
21
22
|
# File 'lib/cirro_io_v2/resources/notification_layout.rb', line 19
def create_template(id, params)
response = client.request_client.request(:post, "#{resource_root}/#{id}/notification_layout_templates", body: params)
Responses::NotificationLayoutTemplateResponse.new(response.body)
end
|
#list(params = nil) ⇒ Object
4
5
6
7
|
# File 'lib/cirro_io_v2/resources/notification_layout.rb', line 4
def list(params = nil)
response = client.request_client.request(:get, resource_root, params:)
Responses::NotificationLayoutListResponse.new(response.body)
end
|
#update(id, params) ⇒ Object
14
15
16
17
|
# File 'lib/cirro_io_v2/resources/notification_layout.rb', line 14
def update(id, params)
response = client.request_client.request(:post, "#{resource_root}/#{id}", body: params)
Responses::NotificationLayoutResponse.new(response.body)
end
|