Class: RenderRuby::OwnerResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/render_ruby/resources/owners.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from RenderRuby::Resource

Instance Method Details

#list(**params) ⇒ Object



5
6
7
8
9
# File 'lib/render_ruby/resources/owners.rb', line 5

def list(**params)
  response = get_request('owners', params: params)

  Collection.from_response(response, type: Owner)
end

#retrieve(owner_id:) ⇒ Object



11
12
13
# File 'lib/render_ruby/resources/owners.rb', line 11

def retrieve(owner_id:)
  Owner.new get_request("owners/#{owner_id}").body
end