Class: BGSDependents::StepChild

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

Constant Summary collapse

EXPENSE_PAID_CONVERTER =
{ 'Half' => '.5', 'More than half' => '.75', 'Less than half' => '.25' }.freeze

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(stepchild_info) ⇒ StepChild

Returns a new instance of StepChild.



6
7
8
# File 'app/models/bgs_dependents/step_child.rb', line 6

def initialize(stepchild_info)
  @stepchild_info = stepchild_info
end

Instance Method Details

#format_infoObject



10
11
12
13
14
15
16
17
# File 'app/models/bgs_dependents/step_child.rb', line 10

def format_info
  {
    living_expenses_paid: EXPENSE_PAID_CONVERTER[@stepchild_info['living_expenses_paid']],
    lives_with_relatd_person_ind: 'N',
    ssn: @stepchild_info['ssn'],
    birth_date: @stepchild_info['birth_date']
  }.merge(@stepchild_info['full_name']).with_indifferent_access
end