Class: Telnyx::Resources::NotificationSettings
- Inherits:
-
Object
- Object
- Telnyx::Resources::NotificationSettings
- Defined in:
- lib/telnyx/resources/notification_settings.rb,
sig/telnyx/resources/notification_settings.rbs
Overview
Notification settings operations
Instance Method Summary collapse
-
#create(notification_channel_id: nil, notification_event_condition_id: nil, notification_profile_id: nil, parameters: nil, request_options: {}) ⇒ Telnyx::Models::NotificationSettingCreateResponse
Adds a notification setting that enables delivery of a notification event type to a notification profile.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::NotificationSettingDeleteResponse
Deletes the specified notification setting, disabling that notification delivery.
-
#initialize(client:) ⇒ NotificationSettings
constructor
private
A new instance of NotificationSettings.
-
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::NotificationSetting>
Some parameter documentations has been truncated, see Models::NotificationSettingListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::NotificationSettingRetrieveResponse
Returns the details of a single notification setting by its identifier.
Constructor Details
#initialize(client:) ⇒ NotificationSettings
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of NotificationSettings.
113 114 115 |
# File 'lib/telnyx/resources/notification_settings.rb', line 113 def initialize(client:) @client = client end |
Instance Method Details
#create(notification_channel_id: nil, notification_event_condition_id: nil, notification_profile_id: nil, parameters: nil, request_options: {}) ⇒ Telnyx::Models::NotificationSettingCreateResponse
Adds a notification setting that enables delivery of a notification event type to a notification profile.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/telnyx/resources/notification_settings.rb', line 25 def create(params = {}) parsed, = Telnyx::NotificationSettingCreateParams.dump_request(params) @client.request( method: :post, path: "notification_settings", body: parsed, model: Telnyx::Models::NotificationSettingCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::NotificationSettingDeleteResponse
Deletes the specified notification setting, disabling that notification delivery.
101 102 103 104 105 106 107 108 |
# File 'lib/telnyx/resources/notification_settings.rb', line 101 def delete(id, params = {}) @client.request( method: :delete, path: ["notification_settings/%1$s", id], model: Telnyx::Models::NotificationSettingDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::NotificationSetting>
Some parameter documentations has been truncated, see Models::NotificationSettingListParams for more details.
Returns a paginated list of your notification settings, which map notification event types to profiles and channels.
filter[associated_
76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/telnyx/resources/notification_settings.rb', line 76 def list(params = {}) parsed, = Telnyx::NotificationSettingListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "notification_settings", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::NotificationSetting, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::NotificationSettingRetrieveResponse
Returns the details of a single notification setting by its identifier.
47 48 49 50 51 52 53 54 |
# File 'lib/telnyx/resources/notification_settings.rb', line 47 def retrieve(id, params = {}) @client.request( method: :get, path: ["notification_settings/%1$s", id], model: Telnyx::Models::NotificationSettingRetrieveResponse, options: params[:request_options] ) end |