Class: Sink::Resources::ResourceRefs::Parent::Child

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/resource_refs/parent/child.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Child

Returns a new instance of Child.

Parameters:



9
10
11
# File 'lib/sink/resources/resource_refs/parent/child.rb', line 9

def initialize(client:)
  @client = client
end

Instance Method Details

#returns_child_model(opts = {}) ⇒ Sink::Models::ChildModel

endpoint that returns a model that is referenced from a model in a parent

resource

Parameters:

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



19
20
21
22
23
24
25
26
# File 'lib/sink/resources/resource_refs/parent/child.rb', line 19

def returns_child_model(opts = {})
  req = {
    method: :get,
    path: "/resource_refs/child",
    model: Sink::Models::ChildModel
  }
  @client.request(req, opts)
end