Class: Telnyx::Resources::NotificationSettings
- Inherits:
-
Object
- Object
- Telnyx::Resources::NotificationSettings
- Defined in:
- lib/telnyx/resources/notification_settings.rb
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
Add a notification setting.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::NotificationSettingDeleteResponse
Delete a notification setting.
-
#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
Get a notification setting.
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.
110 111 112 |
# File 'lib/telnyx/resources/notification_settings.rb', line 110 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
Add a notification setting.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/telnyx/resources/notification_settings.rb', line 24 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
Delete a notification setting.
98 99 100 101 102 103 104 105 |
# File 'lib/telnyx/resources/notification_settings.rb', line 98 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.
List notification settings.
filter[associated_
74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/telnyx/resources/notification_settings.rb', line 74 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
Get a notification setting.
46 47 48 49 50 51 52 53 |
# File 'lib/telnyx/resources/notification_settings.rb', line 46 def retrieve(id, params = {}) @client.request( method: :get, path: ["notification_settings/%1$s", id], model: Telnyx::Models::NotificationSettingRetrieveResponse, options: params[:request_options] ) end |