Class: Sink::Resources::Envelopes
- Inherits:
-
Object
- Object
- Sink::Resources::Envelopes
- Defined in:
- lib/sink/resources/envelopes.rb
Instance Method Summary collapse
-
#explicit(opts = {}) ⇒ Sink::Models::Address
Endpoint with a response wrapped within a ‘data` property.
-
#implicit(opts = {}) ⇒ Sink::Models::Address
Endpoint with a response wrapped within a ‘items` property.
-
#initialize(client:) ⇒ Envelopes
constructor
A new instance of Envelopes.
-
#inline_response(opts = {}) ⇒ Sink::Models::EnvelopeInlineResponseResponse
Endpoint with a response wrapped within a ‘items` property that doesn’t use a $ref.
-
#wrapped_array(opts = {}) ⇒ Array<Sink::Models::ObjectWithChildRef>
Endpoint with a response wrapped within a ‘items` property that is an array type.
Constructor Details
#initialize(client:) ⇒ Envelopes
Returns a new instance of Envelopes.
7 8 9 |
# File 'lib/sink/resources/envelopes.rb', line 7 def initialize(client:) @client = client end |
Instance Method Details
#explicit(opts = {}) ⇒ Sink::Models::Address
Endpoint with a response wrapped within a ‘data` property.
16 17 18 19 20 21 22 23 24 |
# File 'lib/sink/resources/envelopes.rb', line 16 def explicit(opts = {}) req = { method: :get, path: "/envelopes/data", unwrap: :data, model: Sink::Models::Address } @client.request(req, opts) end |
#implicit(opts = {}) ⇒ Sink::Models::Address
Endpoint with a response wrapped within a ‘items` property.
31 32 33 34 35 36 37 38 39 |
# File 'lib/sink/resources/envelopes.rb', line 31 def implicit(opts = {}) req = { method: :get, path: "/envelopes/items", unwrap: :items, model: Sink::Models::Address } @client.request(req, opts) end |
#inline_response(opts = {}) ⇒ Sink::Models::EnvelopeInlineResponseResponse
Endpoint with a response wrapped within a ‘items` property that doesn’t use a
$ref.
47 48 49 50 51 52 53 54 55 |
# File 'lib/sink/resources/envelopes.rb', line 47 def inline_response(opts = {}) req = { method: :get, path: "/envelopes/items/inline_response", unwrap: :items, model: Sink::Models::EnvelopeInlineResponseResponse } @client.request(req, opts) end |
#wrapped_array(opts = {}) ⇒ Array<Sink::Models::ObjectWithChildRef>
Endpoint with a response wrapped within a ‘items` property that is an array
type.
63 64 65 66 67 68 69 70 71 |
# File 'lib/sink/resources/envelopes.rb', line 63 def wrapped_array(opts = {}) req = { method: :get, path: "/envelopes/items/wrapped_array", unwrap: :items, model: Sink::ArrayOf.new(Sink::Models::ObjectWithChildRef) } @client.request(req, opts) end |