Class: BGSDependents::ChildStudent

Inherits:
Base show all
Defined in:
app/models/bgs_dependents/child_student.rb

Constant Summary

Constants inherited from Base

Base::MILITARY_POST_OFFICE_TYPE_CODES

Instance Attribute Summary

Attributes inherited from Common::Base

#errors_hash, #metadata

Instance Method Summary collapse

Methods inherited from Base

#adjust_address_lines_for!, #adjust_country_name_for!, #create_address_params, #create_person_params, #dependent_address, #format_date, #formatted_boolean, #generate_address, #relationship_type, #serialize_dependent_result

Methods inherited from Common::Base

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

Constructor Details

#initialize(dependents_application, proc_id, vnp_participant_id) ⇒ ChildStudent

Returns a new instance of ChildStudent.



10
11
12
13
14
# File 'app/models/bgs_dependents/child_student.rb', line 10

def initialize(dependents_application, proc_id, vnp_participant_id)
  @proc_id = proc_id
  @vnp_participant_id = vnp_participant_id
  self.attributes = dependents_application
end

Instance Method Details

#params_for_686cObject

rubocop:disable Metrics/MethodLength



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'app/models/bgs_dependents/child_student.rb', line 17

def params_for_686c
  {
    vnp_proc_id: @proc_id,
    vnp_ptcpnt_id: @vnp_participant_id,
    saving_amt: student_networth_information&.dig('savings'),
    real_estate_amt: student_networth_information&.dig('real_estate'),
    other_asset_amt: student_networth_information&.dig('other_assets'),
    rmks: student_networth_information&.dig('remarks'),
    marage_dt: format_date(student_address_marriage_tuition&.dig('marriage_date')),
    agency_paying_tuitn_nm: student_address_marriage_tuition&.dig('agency_name'),
    stock_bond_amt: student_networth_information&.dig('securities'),
    govt_paid_tuitn_ind: convert_boolean(student_address_marriage_tuition&.dig('tuition_is_paid_by_gov_agency')),
    govt_paid_tuitn_start_dt: format_date(student_address_marriage_tuition&.dig('date_payments_began')),
    term_year_emplmt_income_amt: student_earnings_from_school_year&.dig('earnings_from_all_employment'),
    term_year_other_income_amt: student_earnings_from_school_year&.dig('all_other_income'),
    term_year_ssa_income_amt: student_earnings_from_school_year&.dig('annual_social_security_payments'),
    term_year_annty_income_amt: student_earnings_from_school_year&.dig('other_annuities_income'),
    next_year_annty_income_amt: student_expected_earnings_next_year&.dig('other_annuities_income'),
    next_year_emplmt_income_amt: student_expected_earnings_next_year&.dig('earnings_from_all_employment'),
    next_year_other_income_amt: student_expected_earnings_next_year&.dig('all_other_income'),
    next_year_ssa_income_amt: student_expected_earnings_next_year&.dig('annual_social_security_payments')
  }
end