Class: Telnyx::Resources::SimCardDataUsageNotifications
- Inherits:
-
Object
- Object
- Telnyx::Resources::SimCardDataUsageNotifications
- Defined in:
- lib/telnyx/resources/sim_card_data_usage_notifications.rb
Overview
SIM Cards operations
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.
133 134 135 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 133 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.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 20 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.
121 122 123 124 125 126 127 128 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 121 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.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 93 def list(params = {}) parsed, = Telnyx::SimCardDataUsageNotificationListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "sim_card_data_usage_notifications", query: query.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.
42 43 44 45 46 47 48 49 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 42 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.
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/telnyx/resources/sim_card_data_usage_notifications.rb', line 66 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 |