Class: Telnyx::Resources::PublicInternetGateways
- Inherits:
-
Object
- Object
- Telnyx::Resources::PublicInternetGateways
- Defined in:
- lib/telnyx/resources/public_internet_gateways.rb
Overview
Public Internet Gateway operations
Instance Method Summary collapse
-
#create(body:, request_options: {}) ⇒ Telnyx::Models::PublicInternetGatewayCreateResponse
Create a new Public Internet Gateway.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::PublicInternetGatewayDeleteResponse
Delete a Public Internet Gateway.
-
#initialize(client:) ⇒ PublicInternetGateways
constructor
private
A new instance of PublicInternetGateways.
-
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::PublicInternetGatewayRead>
Some parameter documentations has been truncated, see Models::PublicInternetGatewayListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::PublicInternetGatewayRetrieveResponse
Retrieve a Public Internet Gateway.
Constructor Details
#initialize(client:) ⇒ PublicInternetGateways
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 PublicInternetGateways.
102 103 104 |
# File 'lib/telnyx/resources/public_internet_gateways.rb', line 102 def initialize(client:) @client = client end |
Instance Method Details
#create(body:, request_options: {}) ⇒ Telnyx::Models::PublicInternetGatewayCreateResponse
Create a new Public Internet Gateway.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/telnyx/resources/public_internet_gateways.rb', line 17 def create(params) parsed, = Telnyx::PublicInternetGatewayCreateParams.dump_request(params) @client.request( method: :post, path: "public_internet_gateways", body: parsed[:body], model: Telnyx::Models::PublicInternetGatewayCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::PublicInternetGatewayDeleteResponse
Delete a Public Internet Gateway.
90 91 92 93 94 95 96 97 |
# File 'lib/telnyx/resources/public_internet_gateways.rb', line 90 def delete(id, params = {}) @client.request( method: :delete, path: ["public_internet_gateways/%1$s", id], model: Telnyx::Models::PublicInternetGatewayDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::PublicInternetGatewayRead>
Some parameter documentations has been truncated, see Models::PublicInternetGatewayListParams for more details.
List all Public Internet Gateways.
66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/telnyx/resources/public_internet_gateways.rb', line 66 def list(params = {}) parsed, = Telnyx::PublicInternetGatewayListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "public_internet_gateways", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::PublicInternetGatewayRead, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::PublicInternetGatewayRetrieveResponse
Retrieve a Public Internet Gateway.
39 40 41 42 43 44 45 46 |
# File 'lib/telnyx/resources/public_internet_gateways.rb', line 39 def retrieve(id, params = {}) @client.request( method: :get, path: ["public_internet_gateways/%1$s", id], model: Telnyx::Models::PublicInternetGatewayRetrieveResponse, options: params[:request_options] ) end |