Module: Desk::Api::Listable
- Included in:
- Articles, Brands, Cases, Companies, CustomFields, Customers, FacebookUsers, Filters, Groups, InboundMailboxes, Topics, Translations
- Defined in:
- lib/desk/api/modules/listable.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
5 6 7 |
# File 'lib/desk/api/modules/listable.rb', line 5 def all Desk::Collection.new(connection.get(endpoint), return_class) end |
#show(id) ⇒ Object
9 10 11 12 |
# File 'lib/desk/api/modules/listable.rb', line 9 def show(id) raise ArgumentError "Must provide an ID" unless id return_class.new(connection.get("#{endpoint}/#{id}")) end |