Class: Telnyx::Resources::DynamicEmergencyEndpoints
- Inherits:
-
Object
- Object
- Telnyx::Resources::DynamicEmergencyEndpoints
- Defined in:
- lib/telnyx/resources/dynamic_emergency_endpoints.rb
Instance Method Summary collapse
-
#create(callback_number:, caller_name:, dynamic_emergency_address_id:, request_options: {}) ⇒ Telnyx::Models::DynamicEmergencyEndpointCreateResponse
Creates a dynamic emergency endpoints.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::DynamicEmergencyEndpointDeleteResponse
Deletes the dynamic emergency endpoint based on the ID provided.
-
#initialize(client:) ⇒ DynamicEmergencyEndpoints
constructor
private
A new instance of DynamicEmergencyEndpoints.
-
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::DynamicEmergencyEndpoint>
Some parameter documentations has been truncated, see Models::DynamicEmergencyEndpointListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::DynamicEmergencyEndpointRetrieveResponse
Returns the dynamic emergency endpoint based on the ID provided.
Constructor Details
#initialize(client:) ⇒ DynamicEmergencyEndpoints
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 DynamicEmergencyEndpoints.
105 106 107 |
# File 'lib/telnyx/resources/dynamic_emergency_endpoints.rb', line 105 def initialize(client:) @client = client end |
Instance Method Details
#create(callback_number:, caller_name:, dynamic_emergency_address_id:, request_options: {}) ⇒ Telnyx::Models::DynamicEmergencyEndpointCreateResponse
Creates a dynamic emergency endpoints.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/telnyx/resources/dynamic_emergency_endpoints.rb', line 21 def create(params) parsed, = Telnyx::DynamicEmergencyEndpointCreateParams.dump_request(params) @client.request( method: :post, path: "dynamic_emergency_endpoints", body: parsed, model: Telnyx::Models::DynamicEmergencyEndpointCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::DynamicEmergencyEndpointDeleteResponse
Deletes the dynamic emergency endpoint based on the ID provided
93 94 95 96 97 98 99 100 |
# File 'lib/telnyx/resources/dynamic_emergency_endpoints.rb', line 93 def delete(id, params = {}) @client.request( method: :delete, path: ["dynamic_emergency_endpoints/%1$s", id], model: Telnyx::Models::DynamicEmergencyEndpointDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::DynamicEmergencyEndpoint>
Some parameter documentations has been truncated, see Models::DynamicEmergencyEndpointListParams for more details.
Returns the dynamic emergency endpoints according to filters
70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/telnyx/resources/dynamic_emergency_endpoints.rb', line 70 def list(params = {}) parsed, = Telnyx::DynamicEmergencyEndpointListParams.dump_request(params) @client.request( method: :get, path: "dynamic_emergency_endpoints", query: parsed.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::DynamicEmergencyEndpoint, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::DynamicEmergencyEndpointRetrieveResponse
Returns the dynamic emergency endpoint based on the ID provided
43 44 45 46 47 48 49 50 |
# File 'lib/telnyx/resources/dynamic_emergency_endpoints.rb', line 43 def retrieve(id, params = {}) @client.request( method: :get, path: ["dynamic_emergency_endpoints/%1$s", id], model: Telnyx::Models::DynamicEmergencyEndpointRetrieveResponse, options: params[:request_options] ) end |