Class: Telnyx::Resources::Fqdns
- Inherits:
-
Object
- Object
- Telnyx::Resources::Fqdns
- Defined in:
- lib/telnyx/resources/fqdns.rb
Overview
FQDN operations
Instance Method Summary collapse
-
#create(connection_id:, dns_record_type:, fqdn:, port: nil, request_options: {}) ⇒ Telnyx::Models::FqdnCreateResponse
Some parameter documentations has been truncated, see Models::FqdnCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::FqdnDeleteResponse
Delete an FQDN.
-
#initialize(client:) ⇒ Fqdns
constructor
private
A new instance of Fqdns.
-
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Fqdn>
Some parameter documentations has been truncated, see Models::FqdnListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::FqdnRetrieveResponse
Return the details regarding a specific FQDN.
-
#update(id, connection_id: nil, dns_record_type: nil, fqdn: nil, port: nil, request_options: {}) ⇒ Telnyx::Models::FqdnUpdateResponse
Some parameter documentations has been truncated, see Models::FqdnUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Fqdns
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 Fqdns.
146 147 148 |
# File 'lib/telnyx/resources/fqdns.rb', line 146 def initialize(client:) @client = client end |
Instance Method Details
#create(connection_id:, dns_record_type:, fqdn:, port: nil, request_options: {}) ⇒ Telnyx::Models::FqdnCreateResponse
Some parameter documentations has been truncated, see Models::FqdnCreateParams for more details.
Create a new FQDN object.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/telnyx/resources/fqdns.rb', line 27 def create(params) parsed, = Telnyx::FqdnCreateParams.dump_request(params) @client.request( method: :post, path: "fqdns", body: parsed, model: Telnyx::Models::FqdnCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::FqdnDeleteResponse
Delete an FQDN.
134 135 136 137 138 139 140 141 |
# File 'lib/telnyx/resources/fqdns.rb', line 134 def delete(id, params = {}) @client.request( method: :delete, path: ["fqdns/%1$s", id], model: Telnyx::Models::FqdnDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::Fqdn>
Some parameter documentations has been truncated, see Models::FqdnListParams for more details.
Get all FQDNs belonging to the user that match the given filters.
filter[connection_
110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/telnyx/resources/fqdns.rb', line 110 def list(params = {}) parsed, = Telnyx::FqdnListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "fqdns", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Fqdn, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::FqdnRetrieveResponse
Return the details regarding a specific FQDN.
49 50 51 52 53 54 55 56 |
# File 'lib/telnyx/resources/fqdns.rb', line 49 def retrieve(id, params = {}) @client.request( method: :get, path: ["fqdns/%1$s", id], model: Telnyx::Models::FqdnRetrieveResponse, options: params[:request_options] ) end |
#update(id, connection_id: nil, dns_record_type: nil, fqdn: nil, port: nil, request_options: {}) ⇒ Telnyx::Models::FqdnUpdateResponse
Some parameter documentations has been truncated, see Models::FqdnUpdateParams for more details.
Update the details of a specific FQDN.
80 81 82 83 84 85 86 87 88 89 |
# File 'lib/telnyx/resources/fqdns.rb', line 80 def update(id, params = {}) parsed, = Telnyx::FqdnUpdateParams.dump_request(params) @client.request( method: :patch, path: ["fqdns/%1$s", id], body: parsed, model: Telnyx::Models::FqdnUpdateResponse, options: ) end |