Class: Telnyx::Resources::SimCards::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::SimCards::Actions
- Defined in:
- lib/telnyx/resources/sim_cards/actions.rb
Instance Method Summary collapse
-
#bulk_disable_voice(sim_card_group_id:, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionBulkDisableVoiceResponse
This API triggers an asynchronous operation to disable voice on SIM cards belonging to a specified SIM Card Group.<br/> For each SIM Card a SIM Card Action will be generated.
-
#bulk_enable_voice(sim_card_group_id:, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionBulkEnableVoiceResponse
This API triggers an asynchronous operation to enable voice on SIM cards belonging to a specified SIM Card Group.<br/> For each SIM Card a SIM Card Action will be generated.
-
#bulk_set_public_ips(sim_card_ids:, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionBulkSetPublicIPsResponse
This API triggers an asynchronous operation to set a public IP for each of the specified SIM cards.<br/> For each SIM Card a SIM Card Action will be generated.
-
#disable(id, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionDisableResponse
This API disables a SIM card, disconnecting it from the network and making it impossible to consume data.<br/> The API will trigger an asynchronous operation called a SIM Card Action.
-
#enable(id, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionEnableResponse
This API enables a SIM card, connecting it to the network and making it possible to consume data.<br/> To enable a SIM card, it must be associated with a SIM card group.<br/> The API will trigger an asynchronous operation called a SIM Card Action.
-
#initialize(client:) ⇒ Actions
constructor
private
A new instance of Actions.
-
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::SimCards::SimCardAction>
Some parameter documentations has been truncated, see Models::SimCards::ActionListParams for more details.
-
#remove_public_ip(id, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionRemovePublicIPResponse
This API removes an existing public IP from a SIM card.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionRetrieveResponse
This API fetches detailed information about a SIM card action to follow-up on an existing asynchronous operation.
-
#set_public_ip(id, region_code: nil, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionSetPublicIPResponse
Some parameter documentations has been truncated, see Models::SimCards::ActionSetPublicIPParams for more details.
-
#set_standby(id, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionSetStandbyResponse
The SIM card will be able to connect to the network once the process to set it to standby has been completed, thus making it possible to consume data.<br/> To set a SIM card to standby, it must be associated with SIM card group.<br/> The API will trigger an asynchronous operation called a SIM Card Action.
-
#validate_registration_codes(registration_codes: nil, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionValidateRegistrationCodesResponse
It validates whether SIM card registration codes are valid or not.
Constructor Details
#initialize(client:) ⇒ Actions
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 Actions.
305 306 307 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 305 def initialize(client:) @client = client end |
Instance Method Details
#bulk_disable_voice(sim_card_group_id:, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionBulkDisableVoiceResponse
This API triggers an asynchronous operation to disable voice on SIM cards belonging to a specified SIM Card Group.<br/> For each SIM Card a SIM Card Action will be generated. The status of the SIM Card Actions can be followed through the [List SIM Card Action](developers.telnyx.com/api-reference/sim-card-actions/list-sim-card-actions) API.
The overall status of the Bulk SIM Card Action can be followed through the [List Bulk SIM Card Action](developers.telnyx.com/api-reference/sim-card-actions/list-bulk-sim-card-actions) API.
79 80 81 82 83 84 85 86 87 88 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 79 def bulk_disable_voice(params) parsed, = Telnyx::SimCards::ActionBulkDisableVoiceParams.dump_request(params) @client.request( method: :post, path: "sim_cards/actions/bulk_disable_voice", body: parsed, model: Telnyx::Models::SimCards::ActionBulkDisableVoiceResponse, options: ) end |
#bulk_enable_voice(sim_card_group_id:, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionBulkEnableVoiceResponse
This API triggers an asynchronous operation to enable voice on SIM cards belonging to a specified SIM Card Group.<br/> For each SIM Card a SIM Card Action will be generated. The status of the SIM Card Actions can be followed through the [List SIM Card Action](developers.telnyx.com/api-reference/sim-card-actions/list-sim-card-actions) API.
The overall status of the Bulk SIM Card Action can be followed through the [List Bulk SIM Card Action](developers.telnyx.com/api-reference/sim-card-actions/list-bulk-sim-card-actions) API.
109 110 111 112 113 114 115 116 117 118 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 109 def bulk_enable_voice(params) parsed, = Telnyx::SimCards::ActionBulkEnableVoiceParams.dump_request(params) @client.request( method: :post, path: "sim_cards/actions/bulk_enable_voice", body: parsed, model: Telnyx::Models::SimCards::ActionBulkEnableVoiceResponse, options: ) end |
#bulk_set_public_ips(sim_card_ids:, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionBulkSetPublicIPsResponse
This API triggers an asynchronous operation to set a public IP for each of the specified SIM cards.<br/> For each SIM Card a SIM Card Action will be generated. The status of the SIM Card Action can be followed through the [List SIM Card Action](developers.telnyx.com/api-reference/sim-card-actions/list-sim-card-actions) API.
134 135 136 137 138 139 140 141 142 143 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 134 def bulk_set_public_ips(params) parsed, = Telnyx::SimCards::ActionBulkSetPublicIPsParams.dump_request(params) @client.request( method: :post, path: "sim_cards/actions/bulk_set_public_ips", body: parsed, model: Telnyx::Models::SimCards::ActionBulkSetPublicIPsResponse, options: ) end |
#disable(id, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionDisableResponse
This API disables a SIM card, disconnecting it from the network and making it impossible to consume data.<br/> The API will trigger an asynchronous operation called a SIM Card Action. Transitioning to the disabled state may take a period of time. The status of the SIM Card Action can be followed through the [List SIM Card Action](developers.telnyx.com/api-reference/sim-card-actions/list-sim-card-actions) API.
161 162 163 164 165 166 167 168 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 161 def disable(id, params = {}) @client.request( method: :post, path: ["sim_cards/%1$s/actions/disable", id], model: Telnyx::Models::SimCards::ActionDisableResponse, options: params[:request_options] ) end |
#enable(id, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionEnableResponse
This API enables a SIM card, connecting it to the network and making it possible to consume data.<br/> To enable a SIM card, it must be associated with a SIM card group.<br/> The API will trigger an asynchronous operation called a SIM Card Action. Transitioning to the enabled state may take a period of time. The status of the SIM Card Action can be followed through the [List SIM Card Action](developers.telnyx.com/api-reference/sim-card-actions/list-sim-card-actions) API.
187 188 189 190 191 192 193 194 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 187 def enable(id, params = {}) @client.request( method: :post, path: ["sim_cards/%1$s/actions/enable", id], model: Telnyx::Models::SimCards::ActionEnableResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::SimCards::SimCardAction>
Some parameter documentations has been truncated, see Models::SimCards::ActionListParams for more details.
This API lists a paginated collection of SIM card actions. It enables exploring a collection of existing asynchronous operations using specific filters.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 47 def list(params = {}) parsed, = Telnyx::SimCards::ActionListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "sim_card_actions", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::SimCards::SimCardAction, options: ) end |
#remove_public_ip(id, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionRemovePublicIPResponse
This API removes an existing public IP from a SIM card. <br/><br/> The API will trigger an asynchronous operation called a SIM Card Action. The status of the SIM Card Action can be followed through the [List SIM Card Action](developers.telnyx.com/api-reference/sim-card-actions/list-sim-card-actions) API.
211 212 213 214 215 216 217 218 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 211 def remove_public_ip(id, params = {}) @client.request( method: :post, path: ["sim_cards/%1$s/actions/remove_public_ip", id], model: Telnyx::Models::SimCards::ActionRemovePublicIPResponse, options: params[:request_options] ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionRetrieveResponse
This API fetches detailed information about a SIM card action to follow-up on an existing asynchronous operation.
19 20 21 22 23 24 25 26 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 19 def retrieve(id, params = {}) @client.request( method: :get, path: ["sim_card_actions/%1$s", id], model: Telnyx::Models::SimCards::ActionRetrieveResponse, options: params[:request_options] ) end |
#set_public_ip(id, region_code: nil, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionSetPublicIPResponse
Some parameter documentations has been truncated, see Models::SimCards::ActionSetPublicIPParams for more details.
This API makes a SIM card reachable on the public internet by mapping a random public IP to the SIM card. <br/><br/> The API will trigger an asynchronous operation called a SIM Card Action. The status of the SIM Card Action can be followed through the [List SIM Card Action](developers.telnyx.com/api-reference/sim-card-actions/list-sim-card-actions) API. <br/><br/> Setting a Public IP to a SIM Card incurs a charge and will only succeed if the account has sufficient funds.
242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 242 def set_public_ip(id, params = {}) parsed, = Telnyx::SimCards::ActionSetPublicIPParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :post, path: ["sim_cards/%1$s/actions/set_public_ip", id], query: query, model: Telnyx::Models::SimCards::ActionSetPublicIPResponse, options: ) end |
#set_standby(id, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionSetStandbyResponse
The SIM card will be able to connect to the network once the process to set it to standby has been completed, thus making it possible to consume data.<br/> To set a SIM card to standby, it must be associated with SIM card group.<br/> The API will trigger an asynchronous operation called a SIM Card Action. Transitioning to the standby state may take a period of time. The status of the SIM Card Action can be followed through the [List SIM Card Action](developers.telnyx.com/api-reference/sim-card-actions/list-sim-card-actions) API.
272 273 274 275 276 277 278 279 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 272 def set_standby(id, params = {}) @client.request( method: :post, path: ["sim_cards/%1$s/actions/set_standby", id], model: Telnyx::Models::SimCards::ActionSetStandbyResponse, options: params[:request_options] ) end |
#validate_registration_codes(registration_codes: nil, request_options: {}) ⇒ Telnyx::Models::SimCards::ActionValidateRegistrationCodesResponse
It validates whether SIM card registration codes are valid or not.
291 292 293 294 295 296 297 298 299 300 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 291 def validate_registration_codes(params = {}) parsed, = Telnyx::SimCards::ActionValidateRegistrationCodesParams.dump_request(params) @client.request( method: :post, path: "sim_cards/actions/validate_registration_codes", body: parsed, model: Telnyx::Models::SimCards::ActionValidateRegistrationCodesResponse, options: ) end |