Class: Preneeds::CurrentlyBuriedPerson
- Defined in:
- app/models/preneeds/currently_buried_person.rb
Overview
Models a currently buried person under a veteran’s benefit from a BurialForm form
Instance Attribute Summary collapse
-
#cemetery_number ⇒ String
Cemetery number.
-
#name ⇒ Preneeds::FullName
Currently buried person’s full name.
Class Method Summary collapse
-
.permitted_params ⇒ Array
List of permitted params for use with Strong Parameters.
Instance Method Summary collapse
-
#as_eoas ⇒ Hash
Converts object attributes to a hash to be used when constructing a SOAP request body.
Methods inherited from Base
Methods included from Vets::Model
#attributes, #initialize, #nested_attributes
Methods included from Vets::Attributes
Instance Attribute Details
#cemetery_number ⇒ String
Returns cemetery number.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/models/preneeds/currently_buried_person.rb', line 11 class CurrentlyBuriedPerson < Preneeds::Base attribute :cemetery_number, String attribute :name, Preneeds::FullName # (see Preneeds::BurialForm#as_eoas) # def as_eoas { cemeteryNumber: cemetery_number, name: name.as_eoas } end # (see Preneeds::Applicant.permitted_params) # def self.permitted_params [:cemetery_number, { name: Preneeds::FullName.permitted_params }] end end |
#name ⇒ Preneeds::FullName
Returns currently buried person’s full name.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/models/preneeds/currently_buried_person.rb', line 11 class CurrentlyBuriedPerson < Preneeds::Base attribute :cemetery_number, String attribute :name, Preneeds::FullName # (see Preneeds::BurialForm#as_eoas) # def as_eoas { cemeteryNumber: cemetery_number, name: name.as_eoas } end # (see Preneeds::Applicant.permitted_params) # def self.permitted_params [:cemetery_number, { name: Preneeds::FullName.permitted_params }] end end |
Class Method Details
.permitted_params ⇒ Array
List of permitted params for use with Strong Parameters
23 24 25 |
# File 'app/models/preneeds/currently_buried_person.rb', line 23 def self.permitted_params [:cemetery_number, { name: Preneeds::FullName.permitted_params }] end |
Instance Method Details
#as_eoas ⇒ Hash
Converts object attributes to a hash to be used when constructing a SOAP request body. Hash attributes must correspond to XSD ordering or API call will fail
17 18 19 |
# File 'app/models/preneeds/currently_buried_person.rb', line 17 def as_eoas { cemeteryNumber: cemetery_number, name: name.as_eoas } end |