Class: Sink::Resources::Names::Params

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/names/params.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Params

Returns a new instance of Params.

Parameters:



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`

Parameters:

  • params (Hash{Symbol => Object}) (defaults to: {})

    Attributes to send in this request. @option params [String, nil] :options my options request parameter

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:

  • (nil)


20
21
22
23
24
25
26
27
28
29
# File 'lib/sink/resources/names/params.rb', line 20

def options_param(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`

Parameters:

  • params (Hash{Symbol => Object}) (defaults to: {})

    Attributes to send in this request. @option params [Float, nil] :timeout my timeout request parameter

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:

  • (nil)


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