Class: Zendesk2::Groups

Inherits:
Object
  • Object
show all
Includes:
Collection, PagedCollection, Searchable
Defined in:
lib/zendesk2/groups.rb

Instance Method Summary collapse

Methods included from Searchable

included, #search

Methods included from PagedCollection

#all, #all_entries, #collection_method, #collection_root, #create, #create!, #each_entry, #each_page, #get, #get!, included, #model_method, #model_root, #new_page, #next_page, #previous_page

Methods included from Collection

#all, cistern_included, #collection_method, #collection_root, #create, #create!, #get, #get!, included, #model_method, #model_root, #namespace, #new

Instance Method Details

#assignableObject



16
17
18
19
20
# File 'lib/zendesk2/groups.rb', line 16

def assignable
  data = cistern.get_assignable_groups.body
  collection = cistern.groups.load(data['groups'])
  collection.merge_attributes(Cistern::Hash.slice(data, 'next_page', 'previous_page', 'count'))
end