Class: Sink::Resources::Types::Arrays
- Inherits:
-
Object
- Object
- Sink::Resources::Types::Arrays
- Defined in:
- lib/sink/resources/types/arrays.rb
Instance Method Summary collapse
-
#float_items(opts = {}) ⇒ Array<Float>
Endpoint with a response schema that is an array of number types.
-
#initialize(client:) ⇒ Arrays
constructor
A new instance of Arrays.
-
#nested_in_params(params = {}, opts = {}) ⇒ nil
Endpoint with a request schema that has a property that points to an array model.
-
#object_items(opts = {}) ⇒ Array<Sink::Models::ArrayObjectItemsResponse::ArrayObjectItemsResponse>
Endpoint with a response schema that is an array of in-line object types.
Constructor Details
#initialize(client:) ⇒ Arrays
Returns a new instance of Arrays.
8 9 10 |
# File 'lib/sink/resources/types/arrays.rb', line 8 def initialize(client:) @client = client end |
Instance Method Details
#float_items(opts = {}) ⇒ Array<Float>
Endpoint with a response schema that is an array of number types.
17 18 19 20 21 22 23 24 |
# File 'lib/sink/resources/types/arrays.rb', line 17 def float_items(opts = {}) req = { method: :get, path: "/types/array/float_items", model: Sink::ArrayOf.new(Float) } @client.request(req, opts) end |
#nested_in_params(params = {}, opts = {}) ⇒ nil
Endpoint with a request schema that has a property that points to an array
model.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/sink/resources/types/arrays.rb', line 35 def nested_in_params(params = {}, opts = {}) req = { method: :post, path: "/types/array/model_nested_in_params", body: params, headers: {"Content-Type" => "application/json"}, model: NilClass } @client.request(req, opts) end |
#object_items(opts = {}) ⇒ Array<Sink::Models::ArrayObjectItemsResponse::ArrayObjectItemsResponse>
Endpoint with a response schema that is an array of in-line object types.
51 52 53 54 55 56 57 58 |
# File 'lib/sink/resources/types/arrays.rb', line 51 def object_items(opts = {}) req = { method: :get, path: "/types/array/object_items", model: Sink::ArrayOf.new(Sink::Models::ArrayObjectItemsResponse::ArrayObjectItemsResponse) } @client.request(req, opts) end |