Class: Sink::Resources::ResourceRefs::Parent::Child
- Inherits:
-
Object
- Object
- Sink::Resources::ResourceRefs::Parent::Child
- Defined in:
- lib/sink/resources/resource_refs/parent/child.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Child
constructor
A new instance of Child.
-
#returns_child_model(opts = {}) ⇒ Sink::Models::ChildModel
endpoint that returns a model that is referenced from a model in a parent resource.
Constructor Details
#initialize(client:) ⇒ Child
Returns a new instance of Child.
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
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 |