Class: BenefitsEducation::Enrollment

Inherits:
Common::Base show all
Defined in:
lib/lighthouse/benefits_education/enrollment.rb

Overview

Model for a user’s enrollment

Instance Attribute Summary collapse

Attributes inherited from Common::Base

#errors_hash, #metadata

Instance Method Summary collapse

Methods inherited from Common::Base

#changed, #changed?, #changes, default_sort, filterable_attributes, max_per_page, per_page, sortable_attributes

Constructor Details

#initialize(attributes) ⇒ Enrollment

Returns a new instance of Enrollment.



60
61
62
63
64
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 60

def initialize(attributes)
  key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
  attributes.transform_keys! { |key| key_mapping[key] || key }
  super(attributes)
end

Instance Attribute Details

#amendmentsArray[Amendment]

Returns Any amendments made to this enrollment.

Returns:

  • (Array[Amendment])

    Any amendments made to this enrollment



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#begin_dateDateTime

Returns The date the user enrolled.

Returns:

  • (DateTime)

    The date the user enrolled



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#end_dateDateTime

Returns The date the user’s enrollment ended.

Returns:

  • (DateTime)

    The date the user’s enrollment ended



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#facility_codeString

Returns VA training facility code.

Returns:

  • (String)

    VA training facility code



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#facility_nameString

Returns The name of the institution where the user is enrolled.

Returns:

  • (String)

    The name of the institution where the user is enrolled



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#full_time_credit_hour_under_gradInteger

Returns The number of full-time undergrad credit hours for the user.

Returns:

  • (Integer)

    The number of full-time undergrad credit hours for the user



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#full_time_hoursInteger

Returns The number of hours the user was a full-time student.

Returns:

  • (Integer)

    The number of hours the user was a full-time student



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#hour_typeString

Returns The type of credit hours, i.e. “Residence” or “Distance”.

Returns:

  • (String)

    The type of credit hours, i.e. “Residence” or “Distance”



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#on_campus_hoursFloat

Returns The number of credit hours the user was on campus.

Returns:

  • (Float)

    The number of credit hours the user was on campus



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#online_hoursFloat

Returns The number of credit hours the user took online.

Returns:

  • (Float)

    The number of credit hours the user took online



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#participant_idString

Returns The user’s ID as a participant of the institution.

Returns:

  • (String)

    The user’s ID as a participant of the institution



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#statusString

Returns The enrollment status.

Returns:

  • (String)

    The enrollment status



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#term_idString

Returns The term ID.

Returns:

  • (String)

    The term ID



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#training_typeString

Returns The type of training the user received.

Returns:

  • (String)

    The type of training the user received



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#vacation_day_countInteger

Returns The number of vacation days the user logged.

Returns:

  • (Integer)

    The number of vacation days the user logged



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end

#yellow_ribbon_amountFloat

Returns The institution’s financial contributions to the Yellow Ribbon Program.

Returns:

  • (Float)

    The institution’s financial contributions to the Yellow Ribbon Program



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lighthouse/benefits_education/enrollment.rb', line 42

class Enrollment < Common::Base
  attribute :begin_date, DateTime
  attribute :end_date, DateTime
  attribute :facility_code, String
  attribute :facility_name, String
  attribute :participant_id
  attribute :training_type
  attribute :term_id
  attribute :hour_type
  attribute :full_time_hours, Integer
  attribute :full_time_credit_hour_under_grad, Integer
  attribute :vacation_day_count, Integer
  attribute :on_campus_hours, Float
  attribute :online_hours, Float
  attribute :yellow_ribbon_amount, Float
  attribute :status, String
  attribute :amendments, Array[Amendment]

  def initialize(attributes)
    key_mapping = { 'begin_date_time' => 'begin_date', 'end_date_time' => 'end_date' }
    attributes.transform_keys! { |key| key_mapping[key] || key }
    super(attributes)
  end
end