Class: Naviance::Student
- Inherits:
-
Object
- Object
- Naviance::Student
- Defined in:
- lib/naviance/student.rb
Instance Attribute Summary (collapse)
-
- (Object) class_year
readonly
Returns the value of attribute class_year.
-
- (Object) first_name
readonly
Returns the value of attribute first_name.
-
- (Object) id
readonly
Returns the value of attribute id.
-
- (Object) last_name
readonly
Returns the value of attribute last_name.
-
- (Object) school_id
readonly
Returns the value of attribute school_id.
Class Method Summary (collapse)
-
+ (Object) find(env, access_token, id)
Get Student data from Naviance.
Instance Method Summary (collapse)
-
- (Student) initialize(params)
constructor
:nodoc:.
Constructor Details
- (Student) initialize(params)
:nodoc:
5 6 7 8 9 10 11 |
# File 'lib/naviance/student.rb', line 5 def initialize(params) # :nodoc: @id = params['naviance_student_id'] @school_id = params['naviance_school_id'] @first_name = params['first_name'] @last_name = params['last_name'] @class_year = params['class_year'] end |
Instance Attribute Details
- (Object) class_year (readonly)
Returns the value of attribute class_year
3 4 5 |
# File 'lib/naviance/student.rb', line 3 def class_year @class_year end |
- (Object) first_name (readonly)
Returns the value of attribute first_name
3 4 5 |
# File 'lib/naviance/student.rb', line 3 def first_name @first_name end |
- (Object) id (readonly)
Returns the value of attribute id
3 4 5 |
# File 'lib/naviance/student.rb', line 3 def id @id end |
- (Object) last_name (readonly)
Returns the value of attribute last_name
3 4 5 |
# File 'lib/naviance/student.rb', line 3 def last_name @last_name end |
- (Object) school_id (readonly)
Returns the value of attribute school_id
3 4 5 |
# File 'lib/naviance/student.rb', line 3 def school_id @school_id end |
Class Method Details
+ (Object) find(env, access_token, id)
Get Student data from Naviance
Attributes
-
env - The environment you are working in sandbox or production. Also accepts corresponding Rails.env
-
access_token - A valid access token see Naviance::AccessToken#get
-
id - The Naviance ID of the Student
20 21 22 |
# File 'lib/naviance/student.rb', line 20 def self.find(env, access_token, id) Naviance.fetch(env, access_token, id, 'student') end |