Module: Teleflow::Api::NotificationTemplates
- Included in:
- Client
- Defined in:
- lib/teleflow/api/notification_templates.rb
Overview
Module Teleflow::Api::NotificationTemplates provides an API for managing notification templates in the Teleflow application.
This module includes methods for creating, retrieving, updating, and deleting notification templates. It also includes methods for creating and retrieving the notification blueprint.
For more information on the Teleflow API(api-teleflow.khulnasoft.com/api#/Notification%20templates), see docs.teleflow.khulnasoft.com/api/get-notification-templates/.
Instance Method Summary collapse
-
#create_notification_template(body) ⇒ Hash, number
Creates a new notification template.
-
#create_notification_template_blueprint(template_id) ⇒ Hash, number
Creates a new notification template blueprint.
-
#delete_notification_template(template_id) ⇒ number
Execute a soft delete of a notification template given a certain ID.
-
#notification_template(template_id) ⇒ Hash, number
Retrieves the notification template with the given ID.
-
#notification_template_blueprint(template_id) ⇒ Hash, number
Retrieves the notification template blueprint with the given ID.
-
#notification_templates(query = {}) ⇒ Hash, number
Returns a list of notification template that can be paginated using the ‘page` query parameter.
-
#update_notification_template(template_id, body) ⇒ Hash, number
Updates new notification template.
-
#update_notification_template_status(template_id, body) ⇒ Hash, number
Update notification template status.
Instance Method Details
#create_notification_template(body) ⇒ Hash, number
Creates a new notification template.
@bodyparams:
40 41 42 |
# File 'lib/teleflow/api/notification_templates.rb', line 40 def create_notification_template(body) post("/notification-templates", body: body) end |
#create_notification_template_blueprint(template_id) ⇒ Hash, number
Creates a new notification template blueprint.
105 106 107 |
# File 'lib/teleflow/api/notification_templates.rb', line 105 def create_notification_template_blueprint(template_id) post("/notification-templates/#{template_id}/blueprint") end |
#delete_notification_template(template_id) ⇒ number
Execute a soft delete of a notification template given a certain ID.
@pathparams:
73 74 75 |
# File 'lib/teleflow/api/notification_templates.rb', line 73 def delete_notification_template(template_id) delete("/notification-templates/#{template_id}") end |
#notification_template(template_id) ⇒ Hash, number
Retrieves the notification template with the given ID.
85 86 87 |
# File 'lib/teleflow/api/notification_templates.rb', line 85 def notification_template(template_id) get("/notification-templates/#{template_id}") end |
#notification_template_blueprint(template_id) ⇒ Hash, number
Retrieves the notification template blueprint with the given ID.
97 98 99 |
# File 'lib/teleflow/api/notification_templates.rb', line 97 def notification_template_blueprint(template_id) get("/notification-templates/#{template_id}/blueprint") end |
#notification_templates(query = {}) ⇒ Hash, number
Returns a list of notification template that can be paginated using the ‘page` query parameter
@queryparams:
21 22 23 |
# File 'lib/teleflow/api/notification_templates.rb', line 21 def notification_templates(query = {}) get("/notification-templates", query: query) end |
#update_notification_template(template_id, body) ⇒ Hash, number
Updates new notification template.
@pathparams: @bodyparams:
62 63 64 |
# File 'lib/teleflow/api/notification_templates.rb', line 62 def update_notification_template(template_id, body) put("/notification-templates/#{template_id}", body: body) end |
#update_notification_template_status(template_id, body) ⇒ Hash, number
Update notification template status
@pathparams:
120 121 122 |
# File 'lib/teleflow/api/notification_templates.rb', line 120 def update_notification_template_status(template_id, body) put("/notification-templates/#{template_id}/status", body: body) end |