Class: FormProfiles::VA21p530

Inherits:
FormProfile
  • Object
show all
Defined in:
app/models/form_profiles/va_21p530.rb

Instance Method Summary collapse

Instance Method Details

#metadataObject



6
7
8
9
10
11
12
# File 'app/models/form_profiles/va_21p530.rb', line 6

def 
  {
    version: 0,
    prefill: true,
    returnUrl: '/claimant-information'
  }
end

#prefillObject



14
15
16
17
18
19
20
21
22
23
24
25
# File 'app/models/form_profiles/va_21p530.rb', line 14

def prefill
  @identity_information = initialize_identity_information
  @contact_information = initialize_contact_information
  if @contact_information&.address&.country.present?
    @contact_information.address.country = convert_to_iso2(@contact_information.address.country)
  end
  mappings = self.class.mappings_for_form(form_id)

  form_data = generate_prefill(mappings) if FormProfile.prefill_enabled_forms.include?(form_id)

  { form_data:, metadata: }
end