Class: Sink::Resources::Types::Unions
- Inherits:
-
Object
- Object
- Sink::Resources::Types::Unions
- Defined in:
- lib/sink/resources/types/unions.rb
Instance Method Summary collapse
-
#array_param_discriminated_by_property_name(params = {}, opts = {}) ⇒ String
Endpoint with an array request param schema with items discriminated union that just defines the ‘propertyName` config.
-
#array_param_discriminated_with_basic_mapping(params = {}, opts = {}) ⇒ String
Endpoint with an array request param schema with items discriminated union that also defines the ‘mapping` config.
-
#initialize(client:) ⇒ Unions
constructor
A new instance of Unions.
-
#param_discriminated_by_property_name(params = {}, opts = {}) ⇒ String
Endpoint with a request param schema that is a discriminated union that just defines the ‘propertyName` config.
-
#param_discriminated_with_basic_mapping(params = {}, opts = {}) ⇒ String
Endpoint with a request param schema that is a discriminated union that also defines the ‘mapping` config.
-
#response_discriminated_by_property_name(opts = {}) ⇒ Sink::Models::UnionDiscriminatedVariantA, Sink::Models::UnionDiscriminatedVariantB
Endpoint with a response schema that is a discriminated union that just defines the ‘propertyName` config.
-
#response_discriminated_with_basic_mapping(opts = {}) ⇒ Sink::Models::UnionDiscriminatedVariantA, Sink::Models::UnionDiscriminatedVariantB
Endpoint with a response schema that is a discriminated union that also defines the ‘mapping` config.
Constructor Details
#initialize(client:) ⇒ Unions
Returns a new instance of Unions.
8 9 10 |
# File 'lib/sink/resources/types/unions.rb', line 8 def initialize(client:) @client = client end |
Instance Method Details
#array_param_discriminated_by_property_name(params = {}, opts = {}) ⇒ String
Endpoint with an array request param schema with items discriminated union that
just defines the `propertyName` config
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/sink/resources/types/unions.rb', line 21 def array_param_discriminated_by_property_name(params = {}, opts = {}) req = { method: :post, path: "/types/unions/array_param_discriminated_by_property_name", body: params[:body], headers: {"Content-Type" => "application/json"}, model: String } @client.request(req, opts) end |
#array_param_discriminated_with_basic_mapping(params = {}, opts = {}) ⇒ String
Endpoint with an array request param schema with items discriminated union that
also defines the `mapping` config
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/sink/resources/types/unions.rb', line 41 def array_param_discriminated_with_basic_mapping(params = {}, opts = {}) req = { method: :post, path: "/types/unions/array_param_discriminated_with_basic_mapping", body: params[:body], headers: {"Content-Type" => "application/json"}, model: String } @client.request(req, opts) end |
#param_discriminated_by_property_name(params = {}, opts = {}) ⇒ String
Endpoint with a request param schema that is a discriminated union that just
defines the `propertyName` config
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/sink/resources/types/unions.rb', line 62 def param_discriminated_by_property_name(params = {}, opts = {}) req = { method: :post, path: "/types/unions/param_discriminated_by_property_name", body: params, headers: {"Content-Type" => "application/json"}, model: String } @client.request(req, opts) end |
#param_discriminated_with_basic_mapping(params = {}, opts = {}) ⇒ String
Endpoint with a request param schema that is a discriminated union that also
defines the `mapping` config
83 84 85 86 87 88 89 90 91 92 |
# File 'lib/sink/resources/types/unions.rb', line 83 def param_discriminated_with_basic_mapping(params = {}, opts = {}) req = { method: :post, path: "/types/unions/param_discriminated_with_basic_mapping", body: params, headers: {"Content-Type" => "application/json"}, model: String } @client.request(req, opts) end |
#response_discriminated_by_property_name(opts = {}) ⇒ Sink::Models::UnionDiscriminatedVariantA, Sink::Models::UnionDiscriminatedVariantB
Endpoint with a response schema that is a discriminated union that just defines
the `propertyName` config
100 101 102 103 104 105 106 107 |
# File 'lib/sink/resources/types/unions.rb', line 100 def response_discriminated_by_property_name(opts = {}) req = { method: :get, path: "/types/unions/response_discriminated_by_property_name", model: Sink::Unknown } @client.request(req, opts) end |
#response_discriminated_with_basic_mapping(opts = {}) ⇒ Sink::Models::UnionDiscriminatedVariantA, Sink::Models::UnionDiscriminatedVariantB
Endpoint with a response schema that is a discriminated union that also defines
the `mapping` config
115 116 117 118 119 120 121 122 |
# File 'lib/sink/resources/types/unions.rb', line 115 def response_discriminated_with_basic_mapping(opts = {}) req = { method: :get, path: "/types/unions/response_discriminated_with_basic_mapping", model: Sink::Unknown } @client.request(req, opts) end |