Class: Telnyx::Resources::GlobalIPHealthChecks
- Inherits:
-
Object
- Object
- Telnyx::Resources::GlobalIPHealthChecks
- Defined in:
- lib/telnyx/resources/global_ip_health_checks.rb
Instance Method Summary collapse
-
#create(global_ip_id: nil, health_check_params: nil, health_check_type: nil, request_options: {}) ⇒ Telnyx::Models::GlobalIPHealthCheckCreateResponse
Create a Global IP health check.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::GlobalIPHealthCheckDeleteResponse
Delete a Global IP health check.
-
#initialize(client:) ⇒ GlobalIPHealthChecks
constructor
private
A new instance of GlobalIPHealthChecks.
-
#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::GlobalIPHealthCheckListResponse>
List all Global IP health checks.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::GlobalIPHealthCheckRetrieveResponse
Retrieve a Global IP health check.
Constructor Details
#initialize(client:) ⇒ GlobalIPHealthChecks
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 GlobalIPHealthChecks.
98 99 100 |
# File 'lib/telnyx/resources/global_ip_health_checks.rb', line 98 def initialize(client:) @client = client end |
Instance Method Details
#create(global_ip_id: nil, health_check_params: nil, health_check_type: nil, request_options: {}) ⇒ Telnyx::Models::GlobalIPHealthCheckCreateResponse
Create a Global IP health check.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/telnyx/resources/global_ip_health_checks.rb', line 21 def create(params = {}) parsed, = Telnyx::GlobalIPHealthCheckCreateParams.dump_request(params) @client.request( method: :post, path: "global_ip_health_checks", body: parsed, model: Telnyx::Models::GlobalIPHealthCheckCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::GlobalIPHealthCheckDeleteResponse
Delete a Global IP health check.
86 87 88 89 90 91 92 93 |
# File 'lib/telnyx/resources/global_ip_health_checks.rb', line 86 def delete(id, params = {}) @client.request( method: :delete, path: ["global_ip_health_checks/%1$s", id], model: Telnyx::Models::GlobalIPHealthCheckDeleteResponse, options: params[:request_options] ) end |
#list(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::GlobalIPHealthCheckListResponse>
List all Global IP health checks.
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/telnyx/resources/global_ip_health_checks.rb', line 63 def list(params = {}) parsed, = Telnyx::GlobalIPHealthCheckListParams.dump_request(params) @client.request( method: :get, path: "global_ip_health_checks", query: parsed.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Models::GlobalIPHealthCheckListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::GlobalIPHealthCheckRetrieveResponse
Retrieve a Global IP health check.
43 44 45 46 47 48 49 50 |
# File 'lib/telnyx/resources/global_ip_health_checks.rb', line 43 def retrieve(id, params = {}) @client.request( method: :get, path: ["global_ip_health_checks/%1$s", id], model: Telnyx::Models::GlobalIPHealthCheckRetrieveResponse, options: params[:request_options] ) end |