Class: MethodRuby::Resources::Ping

Inherits:
Object
  • Object
show all
Defined in:
lib/method_ruby/resources/ping.rb

Overview

API health check endpoint.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Ping

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 Ping.

Parameters:



29
30
31
# File 'lib/method_ruby/resources/ping.rb', line 29

def initialize(client:)
  @client = client
end

Instance Method Details

#check(request_options: {}) ⇒ MethodRuby::Models::PingCheckResponse

Returns the API health status and version.

Parameters:

Returns:

See Also:



16
17
18
19
20
21
22
23
24
# File 'lib/method_ruby/resources/ping.rb', line 16

def check(params = {})
  @client.request(
    method: :get,
    path: "ping",
    model: MethodRuby::Models::PingCheckResponse,
    security: {},
    options: params[:request_options]
  )
end