Class: BenefitsEducation::Enrollment
- Inherits:
-
Common::Base
- Object
- Common::Base
- BenefitsEducation::Enrollment
- Defined in:
- lib/lighthouse/benefits_education/enrollment.rb
Overview
Model for a user’s enrollment
Instance Attribute Summary collapse
-
#amendments ⇒ Array[Amendment]
Any amendments made to this enrollment.
-
#begin_date ⇒ DateTime
The date the user enrolled.
-
#end_date ⇒ DateTime
The date the user’s enrollment ended.
-
#facility_code ⇒ String
VA training facility code.
-
#facility_name ⇒ String
The name of the institution where the user is enrolled.
-
#full_time_credit_hour_under_grad ⇒ Integer
The number of full-time undergrad credit hours for the user.
-
#full_time_hours ⇒ Integer
The number of hours the user was a full-time student.
-
#hour_type ⇒ String
The type of credit hours, i.e.
-
#on_campus_hours ⇒ Float
The number of credit hours the user was on campus.
-
#online_hours ⇒ Float
The number of credit hours the user took online.
-
#participant_id ⇒ String
The user’s ID as a participant of the institution.
-
#status ⇒ String
The enrollment status.
-
#term_id ⇒ String
The term ID.
-
#training_type ⇒ String
The type of training the user received.
-
#vacation_day_count ⇒ Integer
The number of vacation days the user logged.
-
#yellow_ribbon_amount ⇒ Float
The institution’s financial contributions to the Yellow Ribbon Program.
Attributes inherited from Common::Base
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Enrollment
constructor
A new instance of Enrollment.
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
#amendments ⇒ Array[Amendment]
Returns 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_date ⇒ DateTime
Returns 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_date ⇒ DateTime
Returns 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_code ⇒ String
Returns 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_name ⇒ String
Returns 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_grad ⇒ Integer
Returns 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_hours ⇒ Integer
Returns 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_type ⇒ String
Returns 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_hours ⇒ Float
Returns 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_hours ⇒ Float
Returns 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_id ⇒ String
Returns 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 |
#status ⇒ String
Returns 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_id ⇒ String
Returns 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_type ⇒ String
Returns 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_count ⇒ Integer
Returns 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_amount ⇒ Float
Returns 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 |