Class: GData::Apps::UserEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/gdata/apps/provisioning.rb

Overview

UserEntry object.

Handles API responses relative to a user

Attributes :

username : string
given_name : string
family_name : string
suspended : string "true" or string "false"
ip_whitelisted : string "true" or string "false"
admin : string "true" or string "false"
change_password_at_next_login : string "true" or string "false"
agreed_to_terms : string "true" or string "false"
quota_limit : string (value in MB)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entry) ⇒ UserEntry

UserEntry constructor. Needs a REXML::Element <entry> as parameter



334
335
336
337
338
339
340
341
342
343
344
# File 'lib/gdata/apps/provisioning.rb', line 334

def initialize(entry) #:nodoc:
  @family_name = entry.elements["apps:name"].attributes["familyName"]
  @given_name = entry.elements["apps:name"].attributes["givenName"]
  @username = entry.elements["apps:login"].attributes["userName"]
  @suspended = entry.elements["apps:login"].attributes["suspended"]
  @ip_whitelisted = entry.elements["apps:login"].attributes["ipWhitelisted"]
  @admin = entry.elements["apps:login"].attributes["admin"]
  @change_password_at_next_login = entry.elements["apps:login"].attributes["changePasswordAtNextLogin"]
  @agreed_to_terms = entry.elements["apps:login"].attributes["agreedToTerms"]
  @quota_limit = entry.elements["apps:quota"].attributes["limit"]
end

Instance Attribute Details

#adminObject (readonly)

Returns the value of attribute admin.



331
332
333
# File 'lib/gdata/apps/provisioning.rb', line 331

def admin
  @admin
end

#agreed_to_termsObject (readonly)

Returns the value of attribute agreed_to_terms.



331
332
333
# File 'lib/gdata/apps/provisioning.rb', line 331

def agreed_to_terms
  @agreed_to_terms
end

#change_password_at_next_loginObject (readonly)

Returns the value of attribute change_password_at_next_login.



331
332
333
# File 'lib/gdata/apps/provisioning.rb', line 331

def 
  @change_password_at_next_login
end

#family_nameObject (readonly)

Returns the value of attribute family_name.



331
332
333
# File 'lib/gdata/apps/provisioning.rb', line 331

def family_name
  @family_name
end

#given_nameObject (readonly)

Returns the value of attribute given_name.



331
332
333
# File 'lib/gdata/apps/provisioning.rb', line 331

def given_name
  @given_name
end

#ip_whitelistedObject (readonly)

Returns the value of attribute ip_whitelisted.



331
332
333
# File 'lib/gdata/apps/provisioning.rb', line 331

def ip_whitelisted
  @ip_whitelisted
end

#quota_limitObject (readonly)

Returns the value of attribute quota_limit.



331
332
333
# File 'lib/gdata/apps/provisioning.rb', line 331

def quota_limit
  @quota_limit
end

#suspendedObject (readonly)

Returns the value of attribute suspended.



331
332
333
# File 'lib/gdata/apps/provisioning.rb', line 331

def suspended
  @suspended
end

#usernameObject (readonly)

Returns the value of attribute username.



331
332
333
# File 'lib/gdata/apps/provisioning.rb', line 331

def username
  @username
end

Instance Method Details

#to_sObject



346
347
348
349
350
351
352
# File 'lib/gdata/apps/provisioning.rb', line 346

def to_s
  outstr = "#<#{self.class}:0x#{self.object_id.to_s(16)}>\n"
  instance_variables.sort.each do |v|
    outstr += "\t#{v[1,v.length-1]} : #{instance_variable_get(v).to_s}\n"
  end
  outstr
end