Sha256: 63d18da37d84cf122f8cfc5f59580714f0582cc01a858490a2c9f17e842045e6

Contents?: true

Size: 586 Bytes

Versions: 6

Compression:

Stored size: 586 Bytes

Contents

# frozen_string_literal: true
class Zendesk2::Groups
  include Zendesk2::Collection

  include Zendesk2::PagedCollection
  include Zendesk2::Searchable

  model Zendesk2::Group

  self.collection_method = :get_groups
  self.collection_root   = 'groups'
  self.model_method      = :get_group
  self.model_root        = 'group'
  self.search_type       = 'group'

  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
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
zendesk2-1.15.0 lib/zendesk2/groups.rb
zendesk2-1.13.1 lib/zendesk2/groups.rb
zendesk2-1.13.0 lib/zendesk2/groups.rb
zendesk2-1.12.0 lib/zendesk2/groups.rb
zendesk2-1.11.0 lib/zendesk2/groups.rb
zendesk2-1.10.0 lib/zendesk2/groups.rb