Class: Sink::Resources::Types
- Inherits:
-
Object
- Object
- Sink::Resources::Types
- Defined in:
- lib/sink/resources/types.rb,
lib/sink/resources/types/maps.rb,
lib/sink/resources/types/enums.rb,
lib/sink/resources/types/allofs.rb,
lib/sink/resources/types/arrays.rb,
lib/sink/resources/types/unions.rb,
lib/sink/resources/types/objects.rb,
lib/sink/resources/types/primitives.rb,
lib/sink/resources/types/read_only_params.rb,
lib/sink/resources/types/write_only_responses.rb
Defined Under Namespace
Classes: Allofs, Arrays, Enums, Maps, Objects, Primitives, ReadOnlyParams, Unions, WriteOnlyResponses
Instance Attribute Summary collapse
- #allofs ⇒ Sink::Resources::Types::Allofs readonly
- #arrays ⇒ Sink::Resources::Types::Arrays readonly
- #enums ⇒ Sink::Resources::Types::Enums readonly
- #maps ⇒ Sink::Resources::Types::Maps readonly
- #objects ⇒ Sink::Resources::Types::Objects readonly
- #primitives ⇒ Sink::Resources::Types::Primitives readonly
- #read_only_params ⇒ Sink::Resources::Types::ReadOnlyParams readonly
- #unions ⇒ Sink::Resources::Types::Unions readonly
- #write_only_responses ⇒ Sink::Resources::Types::WriteOnlyResponses readonly
Instance Method Summary collapse
-
#dates(params = {}, opts = {}) ⇒ Sink::Models::TypeDatesResponse
Endpoint that has date types should generate params/responses with rich date types.
-
#datetimes(params = {}, opts = {}) ⇒ Sink::Models::TypeDatetimesResponse
Endpoint that has date-time types.
-
#initialize(client:) ⇒ Types
constructor
A new instance of Types.
Constructor Details
#initialize(client:) ⇒ Types
Returns a new instance of Types.
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/sink/resources/types.rb', line 34 def initialize(client:) @client = client @primitives = Sink::Resources::Types::Primitives.new(client: client) @read_only_params = Sink::Resources::Types::ReadOnlyParams.new(client: client) @write_only_responses = Sink::Resources::Types::WriteOnlyResponses.new(client: client) @maps = Sink::Resources::Types::Maps.new(client: client) @enums = Sink::Resources::Types::Enums.new(client: client) @allofs = Sink::Resources::Types::Allofs.new(client: client) @unions = Sink::Resources::Types::Unions.new(client: client) @objects = Sink::Resources::Types::Objects.new(client: client) @arrays = Sink::Resources::Types::Arrays.new(client: client) end |
Instance Attribute Details
#allofs ⇒ Sink::Resources::Types::Allofs (readonly)
22 23 24 |
# File 'lib/sink/resources/types.rb', line 22 def allofs @allofs end |
#arrays ⇒ Sink::Resources::Types::Arrays (readonly)
31 32 33 |
# File 'lib/sink/resources/types.rb', line 31 def arrays @arrays end |
#enums ⇒ Sink::Resources::Types::Enums (readonly)
19 20 21 |
# File 'lib/sink/resources/types.rb', line 19 def enums @enums end |
#maps ⇒ Sink::Resources::Types::Maps (readonly)
16 17 18 |
# File 'lib/sink/resources/types.rb', line 16 def maps @maps end |
#objects ⇒ Sink::Resources::Types::Objects (readonly)
28 29 30 |
# File 'lib/sink/resources/types.rb', line 28 def objects @objects end |
#primitives ⇒ Sink::Resources::Types::Primitives (readonly)
7 8 9 |
# File 'lib/sink/resources/types.rb', line 7 def primitives @primitives end |
#read_only_params ⇒ Sink::Resources::Types::ReadOnlyParams (readonly)
10 11 12 |
# File 'lib/sink/resources/types.rb', line 10 def read_only_params @read_only_params end |
#unions ⇒ Sink::Resources::Types::Unions (readonly)
25 26 27 |
# File 'lib/sink/resources/types.rb', line 25 def unions @unions end |
#write_only_responses ⇒ Sink::Resources::Types::WriteOnlyResponses (readonly)
13 14 15 |
# File 'lib/sink/resources/types.rb', line 13 def write_only_responses @write_only_responses end |
Instance Method Details
#dates(params = {}, opts = {}) ⇒ Sink::Models::TypeDatesResponse
Endpoint that has date types should generate params/responses with rich date
types.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/sink/resources/types.rb', line 60 def dates(params = {}, opts = {}) req = { method: :post, path: "/types/dates", body: params, headers: {"Content-Type" => "application/json"}, model: Sink::Models::TypeDatesResponse } @client.request(req, opts) end |
#datetimes(params = {}, opts = {}) ⇒ Sink::Models::TypeDatetimesResponse
Endpoint that has date-time types.
83 84 85 86 87 88 89 90 91 92 |
# File 'lib/sink/resources/types.rb', line 83 def datetimes(params = {}, opts = {}) req = { method: :post, path: "/types/datetimes", body: params, headers: {"Content-Type" => "application/json"}, model: Sink::Models::TypeDatetimesResponse } @client.request(req, opts) end |