Class: BGSDependents::Spouse

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

Constant Summary

Constants inherited from Base

Base::MILITARY_POST_OFFICE_TYPE_CODES

Instance Attribute Summary collapse

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) ⇒ Spouse

Returns a new instance of Spouse.



45
46
47
48
49
50
# File 'app/models/bgs_dependents/spouse.rb', line 45

def initialize(dependents_application)
  @dependents_application = dependents_application
  @spouse_information = @dependents_application['spouse_information']

  self.attributes = spouse_attributes
end

Instance Attribute Details

#addressHash

Returns the person’s address.

Returns:

  • (Hash)

    the person’s address



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#birth_dateString

Returns the person’s birth date.

Returns:

  • (String)

    the person’s birth date



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#ever_married_indString

Returns Y/N indicates whether the person has ever been married.

Returns:

  • (String)

    Y/N indicates whether the person has ever been married



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#firstString

Returns the person’s first name.

Returns:

  • (String)

    the person’s first name



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#lastString

Returns the person’s last name.

Returns:

  • (String)

    the person’s last name



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#martl_status_type_cdString

Returns marital status type: Married, Divorced, Widowed, Separated, Never Married.

Returns:

  • (String)

    marital status type: Married, Divorced, Widowed, Separated, Never Married



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#middleString

Returns the person’s middle name.

Returns:

  • (String)

    the person’s middle name



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#spouse_incomeString

Returns did this spouse have income in the last 365 days.

Returns:

  • (String)

    did this spouse have income in the last 365 days



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#ssnString

Returns the person’s social security number.

Returns:

  • (String)

    the person’s social security number



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#suffixString

Returns the person’s name suffix.

Returns:

  • (String)

    the person’s name suffix



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#va_file_numberString

Returns the person’s va file number.

Returns:

  • (String)

    the person’s va file number



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

#vet_indString

Returns Y/N indicates whether the person is a veteran.

Returns:

  • (String)

    Y/N indicates whether the person is a veteran



32
# File 'app/models/bgs_dependents/spouse.rb', line 32

attribute :ssn, String

Instance Method Details

#format_infoHash

Sets a hash with spouse attributes

Returns:

  • (Hash)

    spouse attributes including name, address and marital info



56
57
58
# File 'app/models/bgs_dependents/spouse.rb', line 56

def format_info
  attributes.with_indifferent_access
end