Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/types/student.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class Student < Base
:provider,
:email,
:grades,
:school_id
:school_id,
:identifier

def initialize(attributes = {}, client: nil)
@uid = attributes['sourcedId']
Expand All @@ -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)
Expand All @@ -47,7 +49,8 @@ def to_h
provider: @provider,
email: @email,
grades: @grades,
school_id: @school_id
school_id: @school_id,
identifier: @identifier
}
end

Expand Down
3 changes: 2 additions & 1 deletion spec/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion spec/support/api_responses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@
'username' => '',
'email' => '',
'status' => 'active',
'junk' => 'data'
'junk' => 'data',
'identifier' => 'student_identifier_1'
}
end

Expand Down