Class: Desk::Api::Companies
- Inherits:
-
Object
- Object
- Desk::Api::Companies
- Includes:
- Creatable, Listable, Searchable
- Defined in:
- lib/desk/api/companies.rb
Constant Summary collapse
- VALID_SEARCH_PARAMS =
[:q]
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#return_class ⇒ Object
readonly
Returns the value of attribute return_class.
Instance Method Summary collapse
- #cases(id) ⇒ Object
-
#initialize(connection) ⇒ Companies
constructor
A new instance of Companies.
Methods included from Searchable
Methods included from Creatable
Methods included from Listable
Constructor Details
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
16 17 18 |
# File 'lib/desk/api/companies.rb', line 16 def connection @connection end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
16 17 18 |
# File 'lib/desk/api/companies.rb', line 16 def endpoint @endpoint end |
#return_class ⇒ Object (readonly)
Returns the value of attribute return_class.
16 17 18 |
# File 'lib/desk/api/companies.rb', line 16 def return_class @return_class end |
Instance Method Details
#cases(id) ⇒ Object
24 25 26 |
# File 'lib/desk/api/companies.rb', line 24 def cases(id) Desk::Collection.new(connection.get("companies/#{id}/cases"), Desk::Case) end |