Class: Sink::Resources::BodyParams::Unions

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/body_params/unions.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Unions

Returns a new instance of Unions.

Parameters:



8
9
10
# File 'lib/sink/resources/body_params/unions.rb', line 8

def initialize(client:)
  @client = client
end

Instance Method Details

#param_union_enum_new_type(params = {}, opts = {}) ⇒ nil

Defines a request parameter that is configured to generate a ‘NewType` type in

Python and is used in a union type alongside an enum.

Parameters:

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

    Attributes to send in this request. @option params [String, Symbol, Model::UnnamedTypeWithunionParent17, nil] :model

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

    Options to specify HTTP behaviour for this request.

Returns:

  • (nil)


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

def param_union_enum_new_type(params = {}, opts = {})
  req = {
    method: :post,
    path: "/body_params/unions/param_union_enum_new_type",
    body: params,
    headers: {"Content-Type" => "application/json"},
    model: NilClass
  }
  @client.request(req, opts)
end