Class: ScalarRubyTest::Resources::Ping
- Inherits:
-
Object
- Object
- ScalarRubyTest::Resources::Ping
- Defined in:
- lib/amritk-scalar-test/resources/ping.rb
Defined Under Namespace
Classes: RawResponses, ResultResponses
Instance Attribute Summary collapse
-
#with_raw_response ⇒ Object
readonly
Returns the value of attribute with_raw_response.
-
#with_result ⇒ Object
readonly
Returns the value of attribute with_result.
Instance Method Summary collapse
-
#initialize(client) ⇒ Ping
constructor
A new instance of Ping.
- #ping(request_options: nil) ⇒ Object
Constructor Details
#initialize(client) ⇒ Ping
Returns a new instance of Ping.
11 12 13 14 15 |
# File 'lib/amritk-scalar-test/resources/ping.rb', line 11 def initialize(client) @client = client @with_raw_response = RawResponses.new(client) @with_result = ResultResponses.new(@with_raw_response) end |
Instance Attribute Details
#with_raw_response ⇒ Object (readonly)
Returns the value of attribute with_raw_response.
9 10 11 |
# File 'lib/amritk-scalar-test/resources/ping.rb', line 9 def with_raw_response @with_raw_response end |
#with_result ⇒ Object (readonly)
Returns the value of attribute with_result.
9 10 11 |
# File 'lib/amritk-scalar-test/resources/ping.rb', line 9 def with_result @with_result end |
Instance Method Details
#ping(request_options: nil) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/amritk-scalar-test/resources/ping.rb', line 19 def ping(params = {}) parsed = Models::PingParams.dump_request(params) = Runtime.(parsed.delete(:request_options)) request_headers = Runtime.request_option_hash(, :headers).merge(Runtime.request_option_hash(, :extra_headers)) response = @client.request( method: "GET", path: "/ping", headers: request_headers, request_options: , ) Runtime.deserialize(response, "PingResponse") end |