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_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.
243 244 245 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 243 def initialize(client:) @client = client end |
Instance Method Details
#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.
73 74 75 76 77 78 79 80 81 82 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 73 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.
100 101 102 103 104 105 106 107 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 100 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.
126 127 128 129 130 131 132 133 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 126 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 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 47 def list(params = {}) parsed, = Telnyx::SimCards::ActionListParams.dump_request(params) @client.request( method: :get, path: "sim_card_actions", query: parsed.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.
150 151 152 153 154 155 156 157 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 150 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.
181 182 183 184 185 186 187 188 189 190 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 181 def set_public_ip(id, params = {}) parsed, = Telnyx::SimCards::ActionSetPublicIPParams.dump_request(params) @client.request( method: :post, path: ["sim_cards/%1$s/actions/set_public_ip", id], query: parsed, 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.
210 211 212 213 214 215 216 217 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 210 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.
229 230 231 232 233 234 235 236 237 238 |
# File 'lib/telnyx/resources/sim_cards/actions.rb', line 229 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 |