Class: LighthouseGeneratePdfProvider
- Inherits:
-
Object
- Object
- LighthouseGeneratePdfProvider
- Includes:
- GeneratePdfProvider
- Defined in:
- lib/disability_compensation/providers/generate_pdf/lighthouse_generate_pdf_provider.rb
Instance Method Summary collapse
- #generate_526_pdf(form_content, transaction_id) ⇒ Object
-
#initialize(icn) ⇒ LighthouseGeneratePdfProvider
constructor
A new instance of LighthouseGeneratePdfProvider.
- #service ⇒ Object
- #transform_service ⇒ Object
Methods included from GeneratePdfProvider
Constructor Details
#initialize(icn) ⇒ LighthouseGeneratePdfProvider
Returns a new instance of LighthouseGeneratePdfProvider.
8 9 10 |
# File 'lib/disability_compensation/providers/generate_pdf/lighthouse_generate_pdf_provider.rb', line 8 def initialize(icn) @icn = icn end |
Instance Method Details
#generate_526_pdf(form_content, transaction_id) ⇒ Object
12 13 14 15 |
# File 'lib/disability_compensation/providers/generate_pdf/lighthouse_generate_pdf_provider.rb', line 12 def generate_526_pdf(form_content, transaction_id) body = transform_service.transform(JSON.parse(form_content)) service.submit526(body, nil, nil, { generate_pdf: true, transaction_id: }) end |
#service ⇒ Object
21 22 23 |
# File 'lib/disability_compensation/providers/generate_pdf/lighthouse_generate_pdf_provider.rb', line 21 def service @service ||= BenefitsClaims::Service.new(@icn) end |
#transform_service ⇒ Object
17 18 19 |
# File 'lib/disability_compensation/providers/generate_pdf/lighthouse_generate_pdf_provider.rb', line 17 def transform_service @transform_service ||= EVSS::DisabilityCompensationForm::Form526ToLighthouseTransform.new end |