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

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

Defined Under Namespace

Classes: Child

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Parent

Returns a new instance of Parent.

Parameters:



11
12
13
14
# File 'lib/sink/resources/resource_refs/parent.rb', line 11

def initialize(client:)
  @client = client
  @child = Sink::Resources::ResourceRefs::Parent::Child.new(client: client)
end

Instance Attribute Details

#childSink::Resources::ResourceRefs::Parent::Child (readonly)



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

def child
  @child
end

Instance Method Details

#returns_parent_model_with_child_ref(opts = {}) ⇒ Sink::Models::ParentModelWithChildRef

endpoint that returns a model that has a nested reference to a child model

Parameters:

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

    Options to specify HTTP behaviour for this request.

Returns:



21
22
23
24
25
26
27
28
# File 'lib/sink/resources/resource_refs/parent.rb', line 21

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