Class: Telnyx::Resources::SimCardGroups::Actions

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/sim_card_groups/actions.rb

Instance Method Summary collapse

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.

Parameters:



170
171
172
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 170

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.

Parameters:

Returns:

See Also:



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, options = 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: 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.

Parameters:

  • id (String)

    Identifies the SIM group.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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 will asynchronously remove an existing Wireless Blocklist to all the SIMs in the SIM card group.

Parameters:

  • id (String)

    Identifies the SIM group.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



103
104
105
106
107
108
109
110
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 103

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.

Parameters:

  • id (String)

    Identifies the resource.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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.

Parameters:

  • id (String)

    Identifies the SIM group.

  • private_wireless_gateway_id (String)

    The identification of the related Private Wireless Gateway resource.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



131
132
133
134
135
136
137
138
139
140
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 131

def set_private_wireless_gateway(id, params)
  parsed, options = 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: options
  )
end

#set_wireless_blocklist(id, wireless_blocklist_id:, request_options: {}) ⇒ Telnyx::Models::SimCardGroups::ActionSetWirelessBlocklistResponse

This action will asynchronously assign a Wireless Blocklist to all the SIMs in the SIM card group.

Parameters:

  • id (String)

    Identifies the SIM group.

  • wireless_blocklist_id (String)

    The identification of the related Wireless Blocklist resource.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



156
157
158
159
160
161
162
163
164
165
# File 'lib/telnyx/resources/sim_card_groups/actions.rb', line 156

def set_wireless_blocklist(id, params)
  parsed, options = 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: options
  )
end