diff --git a/lib/types/student.rb b/lib/types/student.rb index 41d49a3..7f515f3 100644 --- a/lib/types/student.rb +++ b/lib/types/student.rb @@ -10,7 +10,8 @@ class Student < Base :provider, :email, :grades, - :school_id + :school_id, + :identifier def initialize(attributes = {}, client: nil) @uid = attributes['sourcedId'] @@ -23,6 +24,7 @@ def initialize(attributes = {}, client: nil) @provider = 'oneroster' @grades = attributes['grades'] @school_id = school_id_from(attributes) + @identifier = attributes['identifier'] end def username(client = nil) @@ -47,7 +49,8 @@ def to_h provider: @provider, email: @email, grades: @grades, - school_id: @school_id + school_id: @school_id, + identifier: @identifier } end diff --git a/spec/client_spec.rb b/spec/client_spec.rb index 3ff75f6..03014dc 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -699,7 +699,8 @@ provider: 'oneroster', email: student_1['email'], grades: student_1['grades'], - school_id: nil + school_id: nil, + identifier: student_1['identifier'] ) end end diff --git a/spec/support/api_responses.rb b/spec/support/api_responses.rb index 095082f..3631af3 100644 --- a/spec/support/api_responses.rb +++ b/spec/support/api_responses.rb @@ -114,7 +114,8 @@ 'username' => '', 'email' => '', 'status' => 'active', - 'junk' => 'data' + 'junk' => 'data', + 'identifier' => 'student_identifier_1' } end