Class: Sink::Resources::BodyParams::Unions
- Inherits:
-
Object
- Object
- Sink::Resources::BodyParams::Unions
- Defined in:
- lib/sink/resources/body_params/unions.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Unions
constructor
A new instance of Unions.
-
#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.
Constructor Details
#initialize(client:) ⇒ Unions
Returns a new instance of Unions.
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.
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 |