Class: Clever::Types::SchoolAdmin
- Defined in:
- lib/clever/types/school_admin.rb
Instance Attribute Summary
Attributes inherited from Teacher
#email, #first_name, #last_name, #provider, #role, #uid
Instance Method Summary collapse
-
#initialize(attributes = {}, client: nil) ⇒ SchoolAdmin
constructor
A new instance of SchoolAdmin.
Methods inherited from Teacher
Methods inherited from Base
Constructor Details
#initialize(attributes = {}, client: nil) ⇒ SchoolAdmin
Returns a new instance of SchoolAdmin.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/clever/types/school_admin.rb', line 6 def initialize(attributes = {}, *, client: nil) @district_username = attributes.dig('roles', 'staff', 'credentials', 'district_username') @email = attributes['email'] @first_name = attributes['name']['first'] @last_name = attributes['name']['last'] @provider = 'clever' @sis_id = attributes.dig('roles', 'staff', 'sis_id') @uid = attributes['id'] @username = username(client) @role = 'admin' end |