Class: AbsorbApi::CourseEnrollment

Inherits:
Record
  • Object
show all
Defined in:
lib/absorb_api/course_enrollment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Record

all, can_create, can_search, find, #initialize, with_relationships

Constructor Details

This class inherits a constructor from AbsorbApi::Record

Instance Attribute Details

#accepted_terms_and_conditionsObject

Returns the value of attribute accepted_terms_and_conditions.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def accepted_terms_and_conditions
  @accepted_terms_and_conditions
end

#certificate_idObject

Returns the value of attribute certificate_id.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def certificate_id
  @certificate_id
end

#course_idObject

Returns the value of attribute course_id.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def course_id
  @course_id
end

#course_nameObject

Returns the value of attribute course_name.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def course_name
  @course_name
end

#course_version_idObject

Returns the value of attribute course_version_id.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def course_version_id
  @course_version_id
end

#creditsObject

Returns the value of attribute credits.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def credits
  @credits
end

#date_completedObject

Returns the value of attribute date_completed.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def date_completed
  @date_completed
end

#date_startedObject

Returns the value of attribute date_started.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def date_started
  @date_started
end

#enrollment_key_idObject

Returns the value of attribute enrollment_key_id.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def enrollment_key_id
  @enrollment_key_id
end

#full_nameObject

Returns the value of attribute full_name.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def full_name
  @full_name
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def id
  @id
end

#progressObject

Returns the value of attribute progress.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def progress
  @progress
end

#scoreObject

Returns the value of attribute score.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def score
  @score
end

#statusObject

Returns the value of attribute status.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def status
  @status
end

#time_spentObject

Returns the value of attribute time_spent.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def time_spent
  @time_spent
end

#user_idObject

Returns the value of attribute user_id.



5
6
7
# File 'lib/absorb_api/course_enrollment.rb', line 5

def user_id
  @user_id
end

Instance Method Details

#lessons(**conditions) ⇒ Object



10
11
12
13
14
# File 'lib/absorb_api/course_enrollment.rb', line 10

def lessons(**conditions)
  get(url, conditions.merge(ignore_resource_not_found: true)).map do |attrs|
    LessonEnrollment.new(attrs)
  end
end