Class: OneRoster::Types::Admin

Inherits:
Teacher show all
Defined in:
lib/types/admin.rb

Instance Attribute Summary

Attributes inherited from Teacher

#email, #first_name, #last_name, #provider, #role, #uid

Instance Method Summary collapse

Methods inherited from Teacher

#to_h, #username

Methods inherited from Base

#to_h

Constructor Details

#initialize(attributes = {}, client: nil) ⇒ Admin

Returns a new instance of Admin.



4
5
6
7
8
9
10
11
12
13
# File 'lib/types/admin.rb', line 4

def initialize(attributes = {}, *, client: nil)
  @uid          = attributes['sourcedId']
  @email        = attributes['email']
  @first_name   = attributes['givenName']
  @last_name    = attributes['familyName']
  @api_username = attributes['username']
  @username     = username(client)
  @provider     = 'oneroster'
  @role         = 'admin'
end