Class: Sink::Resources::MixedParams::Duplicates
- Inherits:
-
Object
- Object
- Sink::Resources::MixedParams::Duplicates
- Defined in:
- lib/sink/resources/mixed_params/duplicates.rb
Instance Method Summary collapse
-
#body_and_path(_path_id = nil, params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with a ‘requestBody` that defines a param with the same name in path and body params.
-
#initialize(client:) ⇒ Duplicates
constructor
A new instance of Duplicates.
-
#query_and_body(params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with a ‘requestBody` that defines a param with the same name in query and body params.
-
#query_and_path(_path_id = nil, params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with a ‘requestBody` that defines a param with the same name in path and query params.
Constructor Details
#initialize(client:) ⇒ Duplicates
Returns a new instance of Duplicates.
8 9 10 |
# File 'lib/sink/resources/mixed_params/duplicates.rb', line 8 def initialize(client:) @client = client end |
Instance Method Details
#body_and_path(_path_id = nil, params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with a ‘requestBody` that defines a param with the same name in path
and body params
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/sink/resources/mixed_params/duplicates.rb', line 23 def body_and_path(_path_id = nil, params = {}, opts = {}) req = { method: :post, path: "/mixed_params/duplicates/body_and_path/#{params.fetch(:path_id)}", body: params, headers: {"Content-Type" => "application/json"}, model: Sink::Models::BasicSharedModelObject } @client.request(req, opts) end |
#query_and_body(params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with a ‘requestBody` that defines a param with the same name in query
and body params
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/sink/resources/mixed_params/duplicates.rb', line 43 def query_and_body(params = {}, opts = {}) query_params = [:query_id] req = { method: :post, path: "/mixed_params/duplicates/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_and_path(_path_id = nil, params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with a ‘requestBody` that defines a param with the same name in path
and query params
67 68 69 70 71 72 73 74 75 |
# File 'lib/sink/resources/mixed_params/duplicates.rb', line 67 def query_and_path(_path_id = nil, params = {}, opts = {}) req = { method: :post, path: "/mixed_params/duplicates/query_and_path/#{params.fetch(:path_id)}", query: params, model: Sink::Models::BasicSharedModelObject } @client.request(req, opts) end |