Class: Telnyx::Resources::SimCardGroups::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::SimCardGroups::Actions
- Defined in:
- lib/telnyx/resources/sim_card_groups/actions.rb,
sig/telnyx/resources/sim_card_groups/actions.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Actions
constructor
private
A new instance of Actions.
-
#list(filter_sim_card_group_id: nil, filter_status: nil, filter_type: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::SimCardGroups::SimCardGroupAction>
This API allows listing a paginated collection a SIM card group actions.
-
#remove_private_wireless_gateway(id, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionRemovePrivateWirelessGatewayResponse
This action will asynchronously remove an existing Private Wireless Gateway definition from a SIM card group.
-
#remove_wireless_blocklist(id, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionRemoveWirelessBlocklistResponse
This action asynchronously removes the Wireless Blocklist assigned to a SIM Card Group.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionRetrieveResponse
This API allows fetching detailed information about a SIM card group action resource to make follow-ups in an existing asynchronous operation.
-
#set_private_wireless_gateway(id, private_wireless_gateway_id:, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionSetPrivateWirelessGatewayResponse
This action will asynchronously assign a provisioned Private Wireless Gateway to the SIM card group.
-
#set_wireless_blocklist(id, wireless_blocklist_id:, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionSetWirelessBlocklistResponse
This action asynchronously assigns a Wireless Blocklist to all SIMs in the SIM Card Group.
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.
172 173 174 |
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 172 def initialize(client:) @client = client end |
Instance Method Details
#list(filter_sim_card_group_id: nil, filter_status: nil, filter_type: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::SimCardGroups::SimCardGroupAction>
This API allows listing a paginated collection a SIM card group actions. It allows to explore a collection of existing asynchronous operation using specific filters.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 49 def list(params = {}) parsed, = Telnyx::SimCardGroups::ActionListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "sim_card_group_actions", query: query.transform_keys( filter_sim_card_group_id: "filter[sim_card_group_id]", filter_status: "filter[status]", filter_type: "filter[type]", page_number: "page[number]", page_size: "page[size]" ), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::SimCardGroups::SimCardGroupAction, options: ) end |
#remove_private_wireless_gateway(id, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionRemovePrivateWirelessGatewayResponse
This action will asynchronously remove an existing Private Wireless Gateway definition from a SIM card group. Completing this operation defines that all SIM cards in the SIM card group will get their traffic handled by Telnyx's default mobile network configuration.
82 83 84 85 86 87 88 89 |
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 82 def remove_private_wireless_gateway(id, params = {}) @client.request( method: :post, path: ["sim_card_groups/%1$s/actions/remove_private_wireless_gateway", id], model: Telnyx::Models::SimCardGroups::ActionRemovePrivateWirelessGatewayResponse, options: params[:request_options] ) end |
#remove_wireless_blocklist(id, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionRemoveWirelessBlocklistResponse
This action asynchronously removes the Wireless Blocklist assigned to a SIM Card
Group. The request returns 404 when the SIM Card Group does not exist and
422 when no Wireless Blocklist is assigned.
104 105 106 107 108 109 110 111 |
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 104 def remove_wireless_blocklist(id, params = {}) @client.request( method: :post, path: ["sim_card_groups/%1$s/actions/remove_wireless_blocklist", id], model: Telnyx::Models::SimCardGroups::ActionRemoveWirelessBlocklistResponse, options: params[:request_options] ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionRetrieveResponse
This API allows fetching detailed information about a SIM card group action resource to make follow-ups in an existing asynchronous operation.
19 20 21 22 23 24 25 26 |
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 19 def retrieve(id, params = {}) @client.request( method: :get, path: ["sim_card_group_actions/%1$s", id], model: Telnyx::Models::SimCardGroups::ActionRetrieveResponse, options: params[:request_options] ) end |
#set_private_wireless_gateway(id, private_wireless_gateway_id:, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionSetPrivateWirelessGatewayResponse
This action will asynchronously assign a provisioned Private Wireless Gateway to the SIM card group. Completing this operation defines that all SIM cards in the SIM card group will get their traffic controlled by the associated Private Wireless Gateway. This operation will also imply that new SIM cards assigned to a group will inherit its network definitions. If it's moved to a different group that doesn't have a Private Wireless Gateway, it'll use Telnyx's default mobile network configuration.
132 133 134 135 136 137 138 139 140 141 |
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 132 def set_private_wireless_gateway(id, params) parsed, = Telnyx::SimCardGroups::ActionSetPrivateWirelessGatewayParams.dump_request(params) @client.request( method: :post, path: ["sim_card_groups/%1$s/actions/set_private_wireless_gateway", id], body: parsed, model: Telnyx::Models::SimCardGroups::ActionSetPrivateWirelessGatewayResponse, options: ) end |
#set_wireless_blocklist(id, wireless_blocklist_id:, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionSetWirelessBlocklistResponse
This action asynchronously assigns a Wireless Blocklist to all SIMs in the SIM
Card Group. The request returns 404 when the SIM Card Group does not exist and
422 when the Wireless Blocklist does not exist.
158 159 160 161 162 163 164 165 166 167 |
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 158 def set_wireless_blocklist(id, params) parsed, = Telnyx::SimCardGroups::ActionSetWirelessBlocklistParams.dump_request(params) @client.request( method: :post, path: ["sim_card_groups/%1$s/actions/set_wireless_blocklist", id], body: parsed, model: Telnyx::Models::SimCardGroups::ActionSetWirelessBlocklistResponse, options: ) end |