Class: Sink::Resources::Types
- Inherits:
-
Object
- Object
- Sink::Resources::Types
show all
- 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
Instance Method Summary
collapse
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
22
23
24
|
# File 'lib/sink/resources/types.rb', line 22
def allofs
@allofs
end
|
31
32
33
|
# File 'lib/sink/resources/types.rb', line 31
def arrays
@arrays
end
|
19
20
21
|
# File 'lib/sink/resources/types.rb', line 19
def enums
@enums
end
|
16
17
18
|
# File 'lib/sink/resources/types.rb', line 16
def maps
@maps
end
|
28
29
30
|
# File 'lib/sink/resources/types.rb', line 28
def objects
@objects
end
|
7
8
9
|
# File 'lib/sink/resources/types.rb', line 7
def primitives
@primitives
end
|
10
11
12
|
# File 'lib/sink/resources/types.rb', line 10
def read_only_params
@read_only_params
end
|
25
26
27
|
# File 'lib/sink/resources/types.rb', line 25
def unions
@unions
end
|
13
14
15
|
# File 'lib/sink/resources/types.rb', line 13
def write_only_responses
@write_only_responses
end
|
Instance Method Details
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
|
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
|