Class: Sink::Resources::Types::Primitives

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/types/primitives.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Primitives

Returns a new instance of Primitives.

Parameters:



8
9
10
# File 'lib/sink/resources/types/primitives.rb', line 8

def initialize(client:)
  @client = client
end

Instance Method Details

#strings(params = {}, opts = {}) ⇒ Sink::Models::PrimitiveStringsResponse

Endpoint that has a request body property that points to a string model &

returns an object with a string model prop

Parameters:

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

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

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

    Options to specify HTTP behaviour for this request.

Returns:



21
22
23
24
25
26
27
28
29
30
# File 'lib/sink/resources/types/primitives.rb', line 21

def strings(params = {}, opts = {})
  req = {
    method: :post,
    path: "/types/primitives/strings",
    body: params,
    headers: {"Content-Type" => "application/json"},
    model: Sink::Models::PrimitiveStringsResponse
  }
  @client.request(req, opts)
end