Class: BGSDependents::Relationship

Inherits:
Base show all
Defined in:
app/models/bgs_dependents/relationship.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(proc_id) ⇒ Relationship

Returns a new instance of Relationship.



5
6
7
# File 'app/models/bgs_dependents/relationship.rb', line 5

def initialize(proc_id)
  @proc_id = proc_id
end

Instance Method Details

#params_for_686c(participant_a_id, dependent) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/models/bgs_dependents/relationship.rb', line 9

def params_for_686c(participant_a_id, dependent)
  {
    vnp_proc_id: @proc_id,
    vnp_ptcpnt_id_a: participant_a_id,
    vnp_ptcpnt_id_b: dependent[:vnp_participant_id],
    ptcpnt_rlnshp_type_nm: dependent[:participant_relationship_type_name],
    family_rlnshp_type_nm: dependent[:family_relationship_type_name],
    event_dt: format_date(dependent[:event_date]),
    begin_dt: format_date(dependent[:begin_date]),
    end_dt: format_date(dependent[:end_date]),
    marage_cntry_nm: dependent[:marriage_country],
    marage_state_cd: dependent[:marriage_state],
    marage_city_nm: dependent[:marriage_city],
    marage_trmntn_cntry_nm: dependent[:divorce_country],
    marage_trmntn_state_cd: dependent[:divorce_state],
    marage_trmntn_city_nm: dependent[:divorce_city],
    marage_trmntn_type_cd: dependent[:marriage_termination_type_code],
    mthly_support_from_vet_amt: dependent[:living_expenses_paid_amount],
    child_prevly_married_ind: dependent[:child_prevly_married_ind],
    dep_has_income_ind: dependent[:dep_has_income_ind]
  }
end