Class: Sink::Resources::Responses::UnionTypes
- Inherits:
-
Object
- Object
- Sink::Resources::Responses::UnionTypes
- Defined in:
- lib/sink/resources/responses/union_types.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ UnionTypes
constructor
A new instance of UnionTypes.
-
#mixed_types(opts = {}) ⇒ Boolean, ...
Endpoint with a top level union response of different types.
-
#nullable_union(opts = {}) ⇒ Sink::Models::SimpleObject, Sink::Models::UnionTypeNullableUnionResponse::UnnamedTypeWithunionParent5
Endpoint with a top level union response of floats and integers.
-
#numbers(opts = {}) ⇒ Float
Endpoint with a top level union response of floats and integers.
-
#objects(opts = {}) ⇒ Sink::Models::SimpleObject, Sink::Models::UnionTypeObjectsResponse::UnnamedTypeWithunionParent6
Endpoint with a top level union response of just object variants.
-
#super_mixed_types(opts = {}) ⇒ Boolean, ...
Endpoint with a top level union response of different types.
-
#unknown_variant(opts = {}) ⇒ Object, Sink::Models::SimpleObject
Endpoint with a top level union response with a variant that is ‘type: unknown`.
Constructor Details
#initialize(client:) ⇒ UnionTypes
Returns a new instance of UnionTypes.
8 9 10 |
# File 'lib/sink/resources/responses/union_types.rb', line 8 def initialize(client:) @client = client end |
Instance Method Details
#mixed_types(opts = {}) ⇒ Boolean, ...
Endpoint with a top level union response of different types.
17 18 19 20 21 22 23 24 |
# File 'lib/sink/resources/responses/union_types.rb', line 17 def mixed_types(opts = {}) req = { method: :post, path: "/responses/unions/mixed_types", model: Sink::Unknown } @client.request(req, opts) end |
#nullable_union(opts = {}) ⇒ Sink::Models::SimpleObject, Sink::Models::UnionTypeNullableUnionResponse::UnnamedTypeWithunionParent5
Endpoint with a top level union response of floats and integers.
31 32 33 34 35 36 37 38 |
# File 'lib/sink/resources/responses/union_types.rb', line 31 def nullable_union(opts = {}) req = { method: :post, path: "/responses/unions/nullable", model: Sink::Unknown } @client.request(req, opts) end |
#numbers(opts = {}) ⇒ Float
Endpoint with a top level union response of floats and integers.
45 46 47 48 49 50 51 52 |
# File 'lib/sink/resources/responses/union_types.rb', line 45 def numbers(opts = {}) req = { method: :post, path: "/responses/unions/numbers", model: Float } @client.request(req, opts) end |
#objects(opts = {}) ⇒ Sink::Models::SimpleObject, Sink::Models::UnionTypeObjectsResponse::UnnamedTypeWithunionParent6
Endpoint with a top level union response of just object variants.
59 60 61 62 63 64 65 66 |
# File 'lib/sink/resources/responses/union_types.rb', line 59 def objects(opts = {}) req = { method: :post, path: "/responses/unions/objects", model: Sink::Unknown } @client.request(req, opts) end |
#super_mixed_types(opts = {}) ⇒ Boolean, ...
Endpoint with a top level union response of different types.
73 74 75 76 77 78 79 80 |
# File 'lib/sink/resources/responses/union_types.rb', line 73 def super_mixed_types(opts = {}) req = { method: :post, path: "/responses/unions/super_mixed_types", model: Sink::Unknown } @client.request(req, opts) end |
#unknown_variant(opts = {}) ⇒ Object, Sink::Models::SimpleObject
Endpoint with a top level union response with a variant that is ‘type: unknown`
87 88 89 90 91 92 93 94 |
# File 'lib/sink/resources/responses/union_types.rb', line 87 def unknown_variant(opts = {}) req = { method: :post, path: "/responses/unions/unknown_variant", model: Sink::Unknown } @client.request(req, opts) end |