Class: Telnyx::Resources::SimCardDataUsageNotifications
- Inherits:
-
Object
- Object
- Telnyx::Resources::SimCardDataUsageNotifications
- Defined in:
- lib/telnyx/resources/sim_card_data_usage_notifications.rb
Instance Method Summary collapse
-
#create(sim_card_id:, threshold:, request_options: {}) ⇒ Telnyx::Models::SimCardDataUsageNotificationCreateResponse
Creates a new SIM card data usage notification.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::SimCardDataUsageNotificationDeleteResponse
Delete the SIM Card Data Usage Notification.
-
#initialize(client:) ⇒ SimCardDataUsageNotifications
constructor
private
A new instance of SimCardDataUsageNotifications.
-
#list(filter_sim_card_id: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::SimCardDataUsageNotification>
Lists a paginated collection of SIM card data usage notifications.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::SimCardDataUsageNotificationRetrieveResponse
Get a single SIM Card Data Usage Notification.
-
#update(sim_card_data_usage_notification_id, sim_card_id: nil, threshold: nil, request_options: {}) ⇒ Telnyx::Models::SimCardDataUsageNotificationUpdateResponse
Updates information for a SIM Card Data Usage Notification.
Constructor Details
#initialize(client:) ⇒ SimCardDataUsageNotifications
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 SimCardDataUsageNotifications.
131 132 133 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 131 def initialize(client:) @client = client end |
Instance Method Details
#create(sim_card_id:, threshold:, request_options: {}) ⇒ Telnyx::Models::SimCardDataUsageNotificationCreateResponse
Creates a new SIM card data usage notification.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 19 def create(params) parsed, = Telnyx::SimCardDataUsageNotificationCreateParams.dump_request(params) @client.request( method: :post, path: "sim_card_data_usage_notifications", body: parsed, model: Telnyx::Models::SimCardDataUsageNotificationCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::SimCardDataUsageNotificationDeleteResponse
Delete the SIM Card Data Usage Notification.
119 120 121 122 123 124 125 126 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 119 def delete(id, params = {}) @client.request( method: :delete, path: ["sim_card_data_usage_notifications/%1$s", id], model: Telnyx::Models::SimCardDataUsageNotificationDeleteResponse, options: params[:request_options] ) end |
#list(filter_sim_card_id: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::SimCardDataUsageNotification>
Lists a paginated collection of SIM card data usage notifications. It enables exploring the collection using specific filters.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 92 def list(params = {}) parsed, = Telnyx::SimCardDataUsageNotificationListParams.dump_request(params) @client.request( method: :get, path: "sim_card_data_usage_notifications", query: parsed.transform_keys( filter_sim_card_id: "filter[sim_card_id]", page_number: "page[number]", page_size: "page[size]" ), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::SimCardDataUsageNotification, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::SimCardDataUsageNotificationRetrieveResponse
Get a single SIM Card Data Usage Notification.
41 42 43 44 45 46 47 48 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 41 def retrieve(id, params = {}) @client.request( method: :get, path: ["sim_card_data_usage_notifications/%1$s", id], model: Telnyx::Models::SimCardDataUsageNotificationRetrieveResponse, options: params[:request_options] ) end |
#update(sim_card_data_usage_notification_id, sim_card_id: nil, threshold: nil, request_options: {}) ⇒ Telnyx::Models::SimCardDataUsageNotificationUpdateResponse
Updates information for a SIM Card Data Usage Notification.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 65 def update(sim_card_data_usage_notification_id, params = {}) parsed, = Telnyx::SimCardDataUsageNotificationUpdateParams.dump_request(params) @client.request( method: :patch, path: ["sim_card_data_usage_notifications/%1$s", sim_card_data_usage_notification_id], body: parsed, model: Telnyx::Models::SimCardDataUsageNotificationUpdateResponse, options: ) end |