Class: Sink::Resources::EmptyBody
- Inherits:
-
Object
- Object
- Sink::Resources::EmptyBody
- Defined in:
- lib/sink/resources/empty_body.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ EmptyBody
constructor
A new instance of EmptyBody.
-
#stainless_empty_object(path_param = nil, params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with x-stainless-empty-object should still have types for params.
-
#typed_params(path_param = nil, params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with an empty ‘requestBody` should still have types for params.
Constructor Details
#initialize(client:) ⇒ EmptyBody
Returns a new instance of EmptyBody.
7 8 9 |
# File 'lib/sink/resources/empty_body.rb', line 7 def initialize(client:) @client = client end |
Instance Method Details
#stainless_empty_object(path_param = nil, params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with x-stainless-empty-object should still have types for params
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/sink/resources/empty_body.rb', line 23 def stainless_empty_object(path_param = nil, params = {}, opts = {}) req = { method: :post, path: "/mixed_params/with_empty_body/#{path_param}/x_stainless_empty_object", body: params[:body], query: params.except(:body), headers: {"Content-Type" => "application/json"}, model: Sink::Models::BasicSharedModelObject } @client.request(req, opts) end |
#typed_params(path_param = nil, params = {}, opts = {}) ⇒ Sink::Models::BasicSharedModelObject
Endpoint with an empty ‘requestBody` should still have types for params
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/sink/resources/empty_body.rb', line 47 def typed_params(path_param = nil, params = {}, opts = {}) req = { method: :post, path: "/mixed_params/with_empty_body/#{path_param}", body: params[:body], query: params.except(:body), headers: {"Content-Type" => "application/json"}, model: Sink::Models::BasicSharedModelObject } @client.request(req, opts) end |