Class: FormProfiles::MDOT
- Inherits:
-
FormProfile
- Object
- FormProfile
- FormProfiles::MDOT
- Defined in:
- app/models/form_profiles/mdot.rb
Instance Method Summary collapse
- #initialize_mdot_contact_information(response) ⇒ Object private
- #initialize_mdot_supplies(response) ⇒ Object private
- #metadata ⇒ Object
- #prefill ⇒ Object
Instance Method Details
#initialize_mdot_contact_information(response) ⇒ Object (private)
44 45 46 47 48 49 50 |
# File 'app/models/form_profiles/mdot.rb', line 44 def initialize_mdot_contact_information(response) MDOT::FormContactInformation.new( permanent_address: response&.permanent_address, temporary_address: response&.temporary_address, vet_email: response&.vet_email ) end |
#initialize_mdot_supplies(response) ⇒ Object (private)
52 53 54 55 56 57 |
# File 'app/models/form_profiles/mdot.rb', line 52 def initialize_mdot_supplies(response) MDOT::FormSupplyInformation.new( available: response&.supplies, eligibility: response&.eligibility ) end |
#metadata ⇒ Object
27 28 29 30 31 32 33 |
# File 'app/models/form_profiles/mdot.rb', line 27 def { version: 0, prefill: true, returnUrl: '/veteran-information' } end |
#prefill ⇒ Object
35 36 37 38 39 40 |
# File 'app/models/form_profiles/mdot.rb', line 35 def prefill @response = MDOT::Client.new(user).get_supplies @mdot_contact_information = initialize_mdot_contact_information(@response) @mdot_supplies = initialize_mdot_supplies(@response) super end |