module Enlight module Models class Course < Enlight::Models::Model attr_accessor :external_id attr_accessor :course_name attr_accessor :name attr_accessor :available_instructor_led attr_accessor :available_self_paced attr_accessor :organization_id attr_accessor :organization_name attr_accessor :content_provider_id attr_accessor :content_provider_name attr_accessor :description attr_accessor :activites attr_accessor :tags attr_accessor :custom_fields attr_accessor :profile_image_url attr_accessor :completed attr_accessor :started attr_accessor :expires alias_method :activities, :activites def activites=(value) if value.instance_of?(Array) && value.any? @activites = [] value.each {|v| @activites.append(Enlight::Models::CourseActivity.new(v))} else @activites = nil end end def custom_fields=(value) if value.instance_of?(Array) && value.any? @custom_fields = [] value.each {|v| @custom_fields.append(Enlight::Models::CustomField.new(v))} else @custom_fields = nil end end def course_name=(value) @course_name = value @name = value end def name=(value) @course_name = value @name = value end end end end