Class: Sink::Resources::Names::Params
- Inherits:
-
Object
- Object
- Sink::Resources::Names::Params
- Defined in:
- lib/sink/resources/names/params.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Params
constructor
A new instance of Params.
-
#options_param(params = {}, opts = {}) ⇒ nil
Endpoint with a ‘requestBody` that has a property named `options`.
-
#timeout_param(params = {}, opts = {}) ⇒ nil
Endpoint with a ‘requestBody` that has a property named `timeout`.
Constructor Details
#initialize(client:) ⇒ Params
Returns a new instance of Params.
8 9 10 |
# File 'lib/sink/resources/names/params.rb', line 8 def initialize(client:) @client = client end |
Instance Method Details
#options_param(params = {}, opts = {}) ⇒ nil
Endpoint with a ‘requestBody` that has a property named `options`
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/sink/resources/names/params.rb', line 20 def (params = {}, opts = {}) req = { method: :post, path: "/names/body_params/options", body: params, headers: {"Content-Type" => "application/json"}, model: NilClass } @client.request(req, opts) end |
#timeout_param(params = {}, opts = {}) ⇒ nil
Endpoint with a ‘requestBody` that has a property named `timeout`
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/sink/resources/names/params.rb', line 39 def timeout_param(params = {}, opts = {}) req = { method: :post, path: "/names/body_params/timeout", body: params, headers: {"Content-Type" => "application/json"}, model: NilClass } @client.request(req, opts) end |