Class: Telnyx::Resources::SimCardGroups
- Inherits:
-
Object
- Object
- Telnyx::Resources::SimCardGroups
- Defined in:
- lib/telnyx/resources/sim_card_groups.rb,
lib/telnyx/resources/sim_card_groups/actions.rb,
sig/telnyx/resources/sim_card_groups.rbs,
sig/telnyx/resources/sim_card_groups/actions.rbs
Overview
SIM Card Groups operations
Defined Under Namespace
Classes: Actions
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#create(name:, data_limit: nil, request_options: {}) ⇒ Telnyx::Models::SimCardGroupCreateResponse
Creates a new SIM card group and returns it.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::SimCardGroupDeleteResponse
Permanently deletes the specified SIM card group from your account.
-
#initialize(client:) ⇒ SimCardGroups
constructor
private
A new instance of SimCardGroups.
-
#list(filter_name: nil, filter_private_wireless_gateway_id: nil, filter_wireless_blocklist_id: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::SimCardGroupListResponse>
Get all SIM card groups belonging to the user that match the given filters.
-
#retrieve(id, include_iccids: nil, request_options: {}) ⇒ Telnyx::Models::SimCardGroupRetrieveResponse
Returns the details regarding a specific SIM card group.
-
#update(id, data_limit: nil, name: nil, request_options: {}) ⇒ Telnyx::Models::SimCardGroupUpdateResponse
Updates the specified SIM card group's attributes and returns the updated group.
Constructor Details
#initialize(client:) ⇒ SimCardGroups
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 SimCardGroups.
147 148 149 150 |
# File 'lib/telnyx/resources/sim_card_groups.rb', line 147 def initialize(client:) @client = client @actions = Telnyx::Resources::SimCardGroups::Actions.new(client: client) end |
Instance Attribute Details
#actions ⇒ Telnyx::Resources::SimCardGroups::Actions (readonly)
8 9 10 |
# File 'lib/telnyx/resources/sim_card_groups.rb', line 8 def actions @actions end |
Instance Method Details
#create(name:, data_limit: nil, request_options: {}) ⇒ Telnyx::Models::SimCardGroupCreateResponse
Creates a new SIM card group and returns it. Groups let you apply shared settings to a set of SIM cards.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/telnyx/resources/sim_card_groups.rb', line 24 def create(params) parsed, = Telnyx::SimCardGroupCreateParams.dump_request(params) @client.request( method: :post, path: "sim_card_groups", body: parsed, model: Telnyx::Models::SimCardGroupCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::SimCardGroupDeleteResponse
Permanently deletes the specified SIM card group from your account.
135 136 137 138 139 140 141 142 |
# File 'lib/telnyx/resources/sim_card_groups.rb', line 135 def delete(id, params = {}) @client.request( method: :delete, path: ["sim_card_groups/%1$s", id], model: Telnyx::Models::SimCardGroupDeleteResponse, options: params[:request_options] ) end |
#list(filter_name: nil, filter_private_wireless_gateway_id: nil, filter_wireless_blocklist_id: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::SimCardGroupListResponse>
Get all SIM card groups belonging to the user that match the given filters.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/telnyx/resources/sim_card_groups.rb', line 105 def list(params = {}) parsed, = Telnyx::SimCardGroupListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "sim_card_groups", query: query.transform_keys( filter_name: "filter[name]", filter_private_wireless_gateway_id: "filter[private_wireless_gateway_id]", filter_wireless_blocklist_id: "filter[wireless_blocklist_id]", page_number: "page[number]", page_size: "page[size]" ), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Models::SimCardGroupListResponse, options: ) end |
#retrieve(id, include_iccids: nil, request_options: {}) ⇒ Telnyx::Models::SimCardGroupRetrieveResponse
Returns the details regarding a specific SIM card group
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/telnyx/resources/sim_card_groups.rb', line 48 def retrieve(id, params = {}) parsed, = Telnyx::SimCardGroupRetrieveParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["sim_card_groups/%1$s", id], query: query, model: Telnyx::Models::SimCardGroupRetrieveResponse, options: ) end |
#update(id, data_limit: nil, name: nil, request_options: {}) ⇒ Telnyx::Models::SimCardGroupUpdateResponse
Updates the specified SIM card group's attributes and returns the updated group.
75 76 77 78 79 80 81 82 83 84 |
# File 'lib/telnyx/resources/sim_card_groups.rb', line 75 def update(id, params = {}) parsed, = Telnyx::SimCardGroupUpdateParams.dump_request(params) @client.request( method: :patch, path: ["sim_card_groups/%1$s", id], body: parsed, model: Telnyx::Models::SimCardGroupUpdateResponse, options: ) end |