Class: MethodRuby::Resources::Ping

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

Overview

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:



36
37
38
# File 'lib/method_ruby/resources/ping.rb', line 36

def initialize(client:)
  @client = client
end

Instance Method Details

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

Some parameter documentations has been truncated, see Models::PingCheckParams for more details.

Returns a simple health check response for authenticated API clients.

Parameters:

Returns:

See Also:



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/method_ruby/resources/ping.rb', line 21

def check(params)
  parsed, options = MethodRuby::PingCheckParams.dump_request(params)
  @client.request(
    method: :get,
    path: "ping",
    headers: parsed.transform_keys(method_version: "method-version"),
    model: MethodRuby::Models::PingCheckResponse,
    security: {secret_key: true},
    options: options
  )
end