Class: Sink::Resources::MixedParams
- Inherits:
-
Object
- Object
- Sink::Resources::MixedParams
- Defined in:
- lib/sink/resources/mixed_params.rb,
lib/sink/resources/mixed_params/duplicates.rb
Defined Under Namespace
Classes: Duplicates
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#body_with_top_level_one_of_and_path(path_param, params = {}, opts = {}) ⇒ nil
Endpoint with a ‘requestBody` making use of oneOf, and a path param.
-
#initialize(client:) ⇒ MixedParams
constructor
A new instance of MixedParams.
-
#query_and_body(params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with a ‘requestBody` that defines both query and body params.
-
#query_body_and_path(path_param = nil, params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with a ‘requestBody` that defines query, body and path params.
Constructor Details
#initialize(client:) ⇒ MixedParams
Returns a new instance of MixedParams.
10 11 12 13 |
# File 'lib/sink/resources/mixed_params.rb', line 10 def initialize(client:) @client = client @duplicates = Sink::Resources::MixedParams::Duplicates.new(client: client) end |
Instance Attribute Details
#duplicates ⇒ Sink::Resources::MixedParams::Duplicates (readonly)
7 8 9 |
# File 'lib/sink/resources/mixed_params.rb', line 7 def duplicates @duplicates end |
Instance Method Details
#body_with_top_level_one_of_and_path(path_param, params = {}, opts = {}) ⇒ nil
Endpoint with a ‘requestBody` making use of oneOf, and a path param.
See
https://linear.app/stainless/issue/STA-4902/orb-java-unresolved-reference-customerid-externalcustomerid
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/sink/resources/mixed_params.rb', line 30 def body_with_top_level_one_of_and_path(path_param, params = {}, opts = {}) req = { method: :post, path: "/mixed_params/body_with_top_level_one_of_and_path/#{path_param}", body: params, headers: {"Content-Type" => "application/json"}, model: NilClass } @client.request(req, opts) end |
#query_and_body(params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with a ‘requestBody` that defines both query and body params
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/sink/resources/mixed_params.rb', line 50 def query_and_body(params = {}, opts = {}) query_params = [:query_param] req = { method: :post, path: "/mixed_params/query_and_body", query: params.slice(*query_params), body: params.except(*query_params), headers: {"Content-Type" => "application/json"}, model: Sink::Models::BasicSharedModelObject } @client.request(req, opts) end |
#query_body_and_path(path_param = nil, params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with a ‘requestBody` that defines query, body and path params
74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/sink/resources/mixed_params.rb', line 74 def query_body_and_path(path_param = nil, params = {}, opts = {}) query_params = [:query_param] req = { method: :post, path: "/mixed_params/query_body_and_path/#{path_param}", query: params.slice(*query_params), body: params.except(*query_params), headers: {"Content-Type" => "application/json"}, model: Sink::Models::BasicSharedModelObject } @client.request(req, opts) end |