Class: LUSI::API::Person::UserAccount
- Inherits:
-
Object
- Object
- LUSI::API::Person::UserAccount
- Defined in:
- lib/lusi_api/person/student.rb
Overview
Represents a user’s network account in the LUSI API
Instance Attribute Summary collapse
-
#account_name ⇒ String?
The account username.
-
#identity ⇒ String?
The student identity associated with the username.
Instance Method Summary collapse
-
#initialize(xml = nil, lookup = nil, account_name: nil, identity: nil) ⇒ void
constructor
Initialises a new UserAccount instance.
-
#to_s ⇒ String
Returns a string representation of the UserAccount instance.
Constructor Details
#initialize(xml = nil, lookup = nil, account_name: nil, identity: nil) ⇒ void
Initialises a new UserAccount instance
413 414 415 416 |
# File 'lib/lusi_api/person/student.rb', line 413 def initialize(xml = nil, lookup = nil, account_name: nil, identity: nil) @account_name = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:AccountName', account_name) @identity = LUSI::API::Core::XML.xml_content_at(xml, 'xmlns:Identity', identity) end |
Instance Attribute Details
#account_name ⇒ String?
Returns the account username.
401 402 403 |
# File 'lib/lusi_api/person/student.rb', line 401 def account_name @account_name end |
#identity ⇒ String?
Returns the student identity associated with the username.
405 406 407 |
# File 'lib/lusi_api/person/student.rb', line 405 def identity @identity end |
Instance Method Details
#to_s ⇒ String
Returns a string representation of the UserAccount instance
420 421 422 |
# File 'lib/lusi_api/person/student.rb', line 420 def to_s @account_name end |