Class: JSS::UserGroup

Inherits:
Group show all
Defined in:
lib/jss/api_object/group/user_group.rb,
lib/jss.rb

Overview

A Mobile Device group in the JSS

See also the parent class JSS::Group

See Also:

Constant Summary collapse

RSRC_BASE =

The base for REST resources of this class

"usergroups"
RSRC_LIST_KEY =

the hash key used for the JSON list output of all objects in the JSS

:user_groups
RSRC_OBJECT_KEY =

The hash key used for the JSON object output. It's also used in various error messages

:user_group
VALID_DATA_KEYS =

these keys, as well as :id and :name, are present in valid API JSON data for this class

[:is_smart, :users ]
MEMBER_CLASS =

this allows the parent Group class to do things right

JSS::User
OBJECT_HISTORY_OBJECT_TYPE =

the object type for this object in the object history table. See APIObject#add_object_history_entry

54

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from JSS::Group

Instance Attribute Details

#criteriaJSS::Criteriable::Criteria Originally defined in module Criteriable

#need_to_updateBoolean (readonly) Originally defined in module Updatable

Instance Method Details

#member_email_addressesArray<String>

Return an array of the email addresses of users in this group


134
135
136
# File 'lib/jss/api_object/group/user_group.rb', line 134

def member_email_addresses
  @members.map{|m| m[:email_address]}
end

#member_full_namesArray<String>

Return an array of the full names of users in this group


116
117
118
# File 'lib/jss/api_object/group/user_group.rb', line 116

def member_full_names
  @members.map{|m| m[:full_name]}
end

#member_phone_numbersArray<String>

Return an array of the phone numbers of users in this group


125
126
127
# File 'lib/jss/api_object/group/user_group.rb', line 125

def member_phone_numbers
  @members.map{|m| m[:phone_number]}
end

#member_usernamesArray<String>

Return an array of the usernames of users in this group


107
108
109
# File 'lib/jss/api_object/group/user_group.rb', line 107

def member_usernames
  @members.map{|m| m[:username]}
end