diff --git a/app/controllers/v0/health_care_applications_controller.rb b/app/controllers/v0/health_care_applications_controller.rb index 9636b20c734..49e676eaa32 100644 --- a/app/controllers/v0/health_care_applications_controller.rb +++ b/app/controllers/v0/health_care_applications_controller.rb @@ -12,7 +12,7 @@ class HealthCareApplicationsController < ApplicationController service_tag 'healthcare-application' FORM_ID = '1010ez' - skip_before_action(:authenticate, only: %i[create show enrollment_status healthcheck download_pdf facilities]) + skip_before_action(:authenticate, only: %i[create show enrollment_status healthcheck facilities]) before_action :record_submission_attempt, only: :create before_action :load_user, only: %i[create enrollment_status] @@ -69,14 +69,6 @@ def healthcheck render(json: HCA::Service.new.health_check) end - def download_pdf - source_file_path = PdfFill::Filler.fill_form(health_care_application, SecureRandom.uuid, sign: false) - file_contents = File.read(source_file_path) - File.delete(source_file_path) - - send_data file_contents, filename: file_name_for_pdf, type: 'application/pdf', disposition: 'attachment' - end - def facilities render(json: lighthouse_facilities_service.get_facilities(lighthouse_facilities_params)) end @@ -109,13 +101,6 @@ def lighthouse_facilities_params ) end - def file_name_for_pdf - veteran_name = health_care_application.parsed_form.try(:[], 'veteranFullName') - first_name = veteran_name.try(:[], 'first') || 'First' - last_name = veteran_name.try(:[], 'last') || 'Last' - "10-10EZ_#{first_name}_#{last_name}.pdf" - end - def record_submission_attempt StatsD.increment("#{HCA::Service::STATSD_KEY_PREFIX}.submission_attempt") if health_care_application.short_form? diff --git a/config/routes.rb b/config/routes.rb index cc8807d889f..db2ba446c87 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -115,7 +115,6 @@ get(:enrollment_status) get(:rating_info) get(:facilities) - post(:download_pdf) end end diff --git a/lib/pdf_fill/filler.rb b/lib/pdf_fill/filler.rb index 2ce6719beca..fc0d79ac0f2 100644 --- a/lib/pdf_fill/filler.rb +++ b/lib/pdf_fill/filler.rb @@ -8,7 +8,6 @@ require 'pdf_fill/forms/va210781' require 'pdf_fill/forms/va218940' require 'pdf_fill/forms/va1010cg' -require 'pdf_fill/forms/va1010ez' require 'pdf_fill/forms/va686c674' require 'pdf_fill/forms/va281900' require 'pdf_fill/forms/va288832' @@ -32,7 +31,6 @@ module Filler '21-0781' => PdfFill::Forms::Va210781, '21-8940' => PdfFill::Forms::Va218940, '10-10CG' => PdfFill::Forms::Va1010cg, - '10-10EZ' => PdfFill::Forms::Va1010ez, '686C-674' => PdfFill::Forms::Va686c674, '28-1900' => PdfFill::Forms::Va281900, '28-8832' => PdfFill::Forms::Va288832, diff --git a/lib/pdf_fill/forms/maps/input_map_1010_ez.rb b/lib/pdf_fill/forms/maps/input_map_1010_ez.rb deleted file mode 100644 index 58723c811b1..00000000000 --- a/lib/pdf_fill/forms/maps/input_map_1010_ez.rb +++ /dev/null @@ -1,111 +0,0 @@ -# frozen_string_literal: true - -module PdfFill - module Forms - module Maps - module InputMap1010Ez - def self.extended(base) - base.include(self) - end - - INPUT_MAP = OpenStruct.new( - benefits_type: { - enrollment: 'F[0].P4[0].CheckBox7[6]', - registration: 'F[0].P4[0].CheckBox7[7]' - }, - veteran: { - name: 'F[0].P4[0].LastFirstMiddle[0]', - preferred_name: 'F[0].P4[0].TextField2[1]', - mothers_maiden_name: 'F[0].P4[0].TextField2[0]', - date_of_birth: 'F[0].P4[0].DateTimeField4[0]', - gender: 'F[0].P4[0].RadioButtonList[1]', - sigi_genders: 'F[0].P4[0].RadioButtonList[4]', - ssn: 'F[0].P4[0].SSN[0]', - place_of_birth: 'F[0].P4[0].TextField5[0]', - state_of_birth: 'F[0].P4[0].TextField5[0]', - marital_status: 'F[0].P4[0].RadioButtonList[3]', - email: 'F[0].P4[0].TextField23[0]', - home_phone: 'F[0].P4[0].TextField10[0]', - mobile_phone: 'F[0].P4[0].TextField11[0]', - initial_va_contact: 'F[0].P4[0].RadioButtonList[2]', - address: { - street: 'F[0].P4[0].TextField6[0]', - city: 'F[0].P4[0].TextField7[0]', - state: 'F[0].P4[0].TextField8[0]', - postalCode: 'F[0].P4[0].TextField25[0]' - }, - home_address: { - street: 'F[0].P4[0].TextField6[1]', - city: 'F[0].P4[0].TextField7[1]', - state: 'F[0].P4[0].TextField8[1]', - postalCode: 'F[0].P4[0].TextField25[1]' - }, - ethnicity: { - isAmericanIndianOrAlaskanNative: 'F[0].P4[0].CheckBox7[0]', - isAsian: 'F[0].P4[0].CheckBox7[1]', - isBlackOrAfricanAmerican: 'F[0].P4[0].CheckBox7[3]', - isSpanishHispanicLatino: 'F[0].P4[0].RadioButtonList[0]', - isNativeHawaiianOrOtherPacificIslander: 'F[0].P4[0].CheckBox7[4]', - isWhite: 'F[0].P4[0].CheckBox7[2]', - hasDemographicNoAnswer: 'F[0].P4[0].CheckBox7[5]' - }, - service: { - last_branch_of_service: 'F[0].P5[0].TextField13[0]', - last_entry_date: 'F[0].P5[0].DateTimeField8[0]', - last_discharge_date: 'F[0].P5[0].DateTimeField9[0]', - discharge_type: 'F[0].P5[0].TextField24[0]', - purple_heart_recipient: 'F[0].P5[0].RadioButtonList[6]', - is_former_pow: 'F[0].P5[0].RadioButtonList[7]', - post_11111998_combat: 'F[0].P5[0].RadioButtonList[8]', - disabled_in_lod: 'F[0].P5[0].RadioButtonList[9]', - sw_asia_combat: 'F[0].P5[0].RadioButtonList[10]', - vietnam_service: 'F[0].P5[0].RadioButtonList[12]', - exposed_to_radiation: 'F[0].P5[0].RadioButtonList[13]', - radium_treatments: 'F[0].P5[0].RadioButtonList[14]', - camp_lejeune: 'F[0].P5[0].RadioButtonList[15]' - }, - disclose_financial_information: 'F[0].P6[0].RadioButtonList[0]', - gross_income: 'F[0].P6[0].NumericField2[0]', - net_income: 'F[0].P6[0].NumericField2[3]', - other_income: 'F[0].P6[0].NumericField2[6]' - }, - spouse: { - name: 'F[0].P5[0].TextField20[0]', - date_of_birth: 'F[0].P5[0].DateTimeField6[0]', - date_of_marriage: 'F[0].P5[0].DateTimeField5[0]', - address: 'F[0].P5[0].TextField20[3]', - cohabitated_last_year: 'F[0].P5[0].RadioButtonList[2]', - gross_income: 'F[0].P6[0].NumericField2[1]', - net_income: 'F[0].P6[0].NumericField2[4]', - other_income: 'F[0].P6[0].NumericField2[7]' - }, - is_medicaid_eligible: 'F[0].P5[0].RadioButtonList[4]', - is_enrolled_nedicare_part_a: 'F[0].P5[0].RadioButtonList[5]', - medicare_number: 'F[0].P5[0].MedicareClaimNumber[0]', - medicare_effective_date: 'F[0].P5[0].DateTimeField1[0]', - deductible_medical_expenses: 'F[0].P6[0].NumericField2[9]', - deductible_funeral_expenses: 'F[0].P6[0].NumericField2[10]', - deductible_education_expenses: 'F[0].P6[0].NumericField2[11]', - providers: { - insurance_name: 'F[0].P5[0].TextField17[0]', - insurance_policy_holder_name: 'F[0].P5[0].TextField18[0]', - insurance_policy_number: 'F[0].P5[0].TextField19[0]', - insurance_group_code: 'F[0].P5[0].TextField19[1]' - }, - dependents: { - name: 'F[0].P5[0].TextField20[1]', - date_of_birth: 'F[0].P5[0].DateTimeField3[0]', - ssn: 'F[0].P5[0].TextField20[4]', - relation: 'F[0].P5[0].RadioButtonList[3]', - became_dependent: 'F[0].P5[0].DateTimeField7[0]', - attend_school_last_year: 'F[0].P5[0].RadioButtonList[1]', - disabled_before18: 'F[0].P5[0].RadioButtonList[0]', - gross_income: 'F[0].P6[0].NumericField2[2]', - net_income: 'F[0].P6[0].NumericField2[5]', - other_income: 'F[0].P6[0].NumericField2[8]' - } - ) - end - end - end -end diff --git a/lib/pdf_fill/forms/maps/key_map_1010_ez.rb b/lib/pdf_fill/forms/maps/key_map_1010_ez.rb deleted file mode 100644 index 31b22700277..00000000000 --- a/lib/pdf_fill/forms/maps/key_map_1010_ez.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -require 'pdf_fill/forms/maps/input_map_1010_ez' - -module PdfFill - module Forms - module Maps - module KeyMap1010Ez - extend InputMap1010Ez - - KEY = { - 'helpers' => { - 'veteranFullName' => { key: INPUT_MAP.veteran[:name], question_num: 3 }, - 'gender' => { key: INPUT_MAP.veteran[:gender], question_num: 6 }, - 'sigiGenders' => { key: INPUT_MAP.veteran[:sigi_genders], question_num: 7 }, - 'placeOfBirth' => { key: INPUT_MAP.veteran[:place_of_birth], question_num: 12 }, - 'isAmericanIndianOrAlaskanNative' => { - key: INPUT_MAP.veteran[:ethnicity][:isAmericanIndianOrAlaskanNative], - question_num: 9 - }, - 'isAsian' => { key: INPUT_MAP.veteran[:ethnicity][:isAsian], question_num: 9 }, - 'isBlackOrAfricanAmerican' => { - key: INPUT_MAP.veteran[:ethnicity][:isBlackOrAfricanAmerican], - question_num: 9 - }, - 'isSpanishHispanicLatino' => { - key: INPUT_MAP.veteran[:ethnicity][:isSpanishHispanicLatino], - question_num: 8 - }, - 'isNativeHawaiianOrOtherPacificIslander' => { - key: INPUT_MAP.veteran[:ethnicity][:isNativeHawaiianOrOtherPacificIslander], - question_num: 9 - }, - 'isWhite' => { key: INPUT_MAP.veteran[:ethnicity][:isWhite], question_num: 9 }, - 'hasDemographicNoAnswer' => { - key: INPUT_MAP.veteran[:ethnicity][:hasDemographicNoAnswer], question_num: 9 - }, - 'maritalStatus' => { key: INPUT_MAP.veteran[:marital_status], question_num: 28 }, - 'wantsInitialVaContact' => { key: INPUT_MAP.veteran[:initial_va_contact], question_num: 37 }, - 'purpleHeartRecipient' => { key: INPUT_MAP.veteran[:service][:purple_heart_recipient] }, - 'isFormerPow' => { key: INPUT_MAP.veteran[:service][:is_former_pow] }, - 'postNov111998Combat' => { key: INPUT_MAP.veteran[:service][:post_11111998_combat] }, - 'disabledInLineOfDuty' => { key: INPUT_MAP.veteran[:service][:disabled_in_lod] }, - 'swAsiaCombat' => { key: INPUT_MAP.veteran[:service][:sw_asia_combat] }, - 'vietnamService' => { key: INPUT_MAP.veteran[:service][:vietnam_service] }, - 'exposedToRadiation' => { key: INPUT_MAP.veteran[:service][:exposed_to_radiation] }, - 'radiumTreatments' => { key: INPUT_MAP.veteran[:service][:radium_treatments] }, - 'campLejeune' => { key: INPUT_MAP.veteran[:service][:camp_lejeune] }, - 'isMedicaidEligible' => { key: INPUT_MAP.is_medicaid_eligible }, - 'isEnrolledMedicarePartA' => { key: INPUT_MAP.is_enrolled_nedicare_part_a }, - 'providers' => { - 'insuranceName' => { key: INPUT_MAP.providers[:insurance_name] }, - 'insurancePolicyHolderName' => { key: INPUT_MAP.providers[:insurance_policy_holder_name] }, - 'insurancePolicyNumber' => { key: INPUT_MAP.providers[:insurance_policy_number] }, - 'insuranceGroupCode' => { key: INPUT_MAP.providers[:insurance_group_code] } - }, - 'dependents' => { - 'fullName' => { key: INPUT_MAP.dependents[:name] }, - 'dependentRelation' => { key: INPUT_MAP.dependents[:relation] }, - 'socialSecurityNumber' => { key: INPUT_MAP.dependents[:ssn] }, - 'dateOfBirth' => { key: INPUT_MAP.dependents[:date_of_birth] }, - 'becameDependent' => { key: INPUT_MAP.dependents[:became_dependent] }, - 'attendedSchoolLastYear' => { key: INPUT_MAP.dependents[:attend_school_last_year] }, - 'disabledBefore18' => { key: INPUT_MAP.dependents[:disabled_before18] }, - 'grossIncome' => { key: INPUT_MAP.dependents[:gross_income] }, - 'netIncome' => { key: INPUT_MAP.dependents[:net_income] }, - 'otherIncome' => { key: INPUT_MAP.dependents[:other_income] } - }, - 'spouseFullName' => { key: INPUT_MAP.spouse[:name] }, - 'spouseAddress' => { key: INPUT_MAP.spouse[:address] }, - 'cohabitedLastYear' => { key: INPUT_MAP.spouse[:cohabitated_last_year] }, - 'veteranDateOfBirth' => { key: INPUT_MAP.veteran[:date_of_birth], question_num: 11 }, - 'lastEntryDate' => { key: INPUT_MAP.veteran[:service][:last_entry_date] }, - 'lastDischargeDate' => { key: INPUT_MAP.veteran[:service][:last_discharge_date] }, - 'medicarePartAEffectiveDate' => { key: INPUT_MAP.medicare_effective_date }, - 'spouseDateOfBirth' => { key: INPUT_MAP.spouse[:date_of_birth] }, - 'dateOfMarriage' => { key: INPUT_MAP.spouse[:date_of_marriage] }, - 'discloseFinancialInformation' => { key: INPUT_MAP.veteran[:disclose_financial_information] } - }, - 'mothersMaidenName' => { key: INPUT_MAP.veteran[:mothers_maiden_name], question_num: 5 }, - 'veteranSocialSecurityNumber' => { key: INPUT_MAP.veteran[:ssn], question_num: 10 }, - 'email' => { key: INPUT_MAP.veteran[:email], question_num: 22 }, - 'homePhone' => { key: INPUT_MAP.veteran[:home_phone], question_num: 20 }, - 'mobilePhone' => { key: INPUT_MAP.veteran[:mobile_phone], question_num: 21 }, - 'veteranAddress' => { - 'street' => { key: INPUT_MAP.veteran[:address][:street], question_num: 15 }, - 'city' => { key: INPUT_MAP.veteran[:address][:city], question_num: 16 }, - 'postalCode' => { key: INPUT_MAP.veteran[:address][:postalCode], question_num: 18 }, - 'state' => { key: INPUT_MAP.veteran[:address][:state], question_num: 17 } - }, - 'veteranHomeAddress' => { - 'street' => { key: INPUT_MAP.veteran[:home_address][:street], question_num: 23 }, - 'city' => { key: INPUT_MAP.veteran[:home_address][:city], question_num: 24 }, - 'postalCode' => { key: INPUT_MAP.veteran[:home_address][:postalCode], question_num: 26 }, - 'state' => { key: INPUT_MAP.veteran[:home_address][:state], question_num: 25 } - }, - 'lastServiceBranch' => { key: INPUT_MAP.veteran[:service][:last_branch_of_service] }, - 'dischargeType' => { key: INPUT_MAP.veteran[:service][:discharge_type] }, - 'medicareClaimNumber' => { key: INPUT_MAP.medicare_number }, - 'spouseGrossIncome' => { key: INPUT_MAP.spouse[:gross_income] }, - 'spouseNetIncome' => { key: INPUT_MAP.spouse[:net_income] }, - 'spouseOtherIncome' => { key: INPUT_MAP.spouse[:other_income] }, - 'veteranGrossIncome' => { key: INPUT_MAP.veteran[:gross_income] }, - 'veteranNetIncome' => { key: INPUT_MAP.veteran[:net_income] }, - 'veteranOtherIncome' => { key: INPUT_MAP.veteran[:other_income] }, - 'deductibleMedicalExpenses' => { key: INPUT_MAP.deductible_medical_expenses }, - 'deductibleFuneralExpenses' => { key: INPUT_MAP.deductible_funeral_expenses }, - 'deductibleEducationExpenses' => { key: INPUT_MAP.deductible_education_expenses } - }.freeze - end - end - end -end diff --git a/lib/pdf_fill/forms/pdfs/10-10EZ.pdf b/lib/pdf_fill/forms/pdfs/10-10EZ.pdf deleted file mode 100644 index 77691d82416..00000000000 Binary files a/lib/pdf_fill/forms/pdfs/10-10EZ.pdf and /dev/null differ diff --git a/lib/pdf_fill/forms/va1010ez.rb b/lib/pdf_fill/forms/va1010ez.rb deleted file mode 100644 index bd57784804a..00000000000 --- a/lib/pdf_fill/forms/va1010ez.rb +++ /dev/null @@ -1,193 +0,0 @@ -# frozen_string_literal: true - -require 'pdf_fill/forms/form_base' -require 'pdf_fill/forms/maps/key_map_1010_ez' - -module PdfFill - module Forms - class Va1010ez < FormBase - include Maps::KeyMap1010Ez - - GENDERS = { NB: '0', M: '1', F: '2', TM: '3', TF: '4', NA: '6', O: 'Off' }.freeze - - MARITAL_STATUS = ['Married', 'Never Married', 'Separated', 'Widowed', 'Divorced'].freeze - - ETHNICITY_CHOICES = %w[ - isAmericanIndianOrAlaskanNative - isAsian - isBlackOrAfricanAmerican - isSpanishHispanicLatino - isNativeHawaiianOrOtherPacificIslander - isWhite - hasDemographicNoAnswer - ].freeze - - SERVICE_HISTORIES = %w[ - purpleHeartRecipient - isFormerPow - postNov111998Combat - disabledInLineOfDuty - swAsiaCombat - vietnamService - exposedToRadiation - radiumTreatments - campLejeune - ].freeze - - def merge_fields(_options = {}) - @form_data['helpers'] = { - 'veteran' => {}, - 'secondaryCaregiverOne' => {}, - 'secondaryCaregiverTwo' => {} - } - - merge_names('veteranFullName') - merge_names('spouseFullName') - merge_ethnicity_choices - merge_place_of_birth - merge_gender('gender') - merge_gender('sigiGenders') - merge_marital_status - merge_service_histories - merge_providers - merge_spouse_address - merge_dependents - merge_financial_discloser - merge_radio_buttons - format_dates - - @form_data - end - - private - - def merge_radio_buttons - fields = %w[isMedicaidEligible isEnrolledMedicarePartA cohabitedLastYear wantsInitialVaContact] - fields.each { |field| merge_radio_button(field, @form_data) } - end - - def merge_names(type) - name = @form_data[type] - - full_name_parts = [ - name['last'], - name['first'], - name['middle'] - ].compact.join(', ') - - @form_data['helpers'][type] = full_name_parts - end - - def merge_gender(type = 'gender') - value = @form_data[type] || 'O' - - @form_data['helpers'][type] = GENDERS[value.to_sym] - end - - def merge_ethnicity_choices - ETHNICITY_CHOICES.each do |choice| - value = @form_data[choice] - selected = value == true ? '1' : '2' - - @form_data['helpers'][choice] = selected - end - end - - def merge_marital_status - value = @form_data['maritalStatus'] - - MARITAL_STATUS.each_with_index do |status, i| - if value.downcase == status&.downcase - @form_data['helpers']['maritalStatus'] = (i + 1).to_s - break - end - end - end - - def merge_place_of_birth - city = @form_data['cityOfBirth'] - state = @form_data['stateOfBirth'] - - @form_data['helpers']['placeOfBirth'] = [city, state].join(', ') - end - - def merge_service_histories - SERVICE_HISTORIES.each { |history| merge_checkbox(history, @form_data) } - end - - def merge_providers - providers = @form_data['providers'] - provider = providers.first - - @form_data['helpers']['providers'] = provider - end - - def merge_dependents - dependents = @form_data['dependents'] - return if dependents.empty? - - dependent = dependents.first - - @form_data['helpers']['dependents'] = dependent - - format_date_for('dateOfBirth', dependent, 'dependents') - format_date_for('becameDependent', dependent, 'dependents') - merge_radio_button('dependentRelation', dependent, 'dependents') - merge_radio_button('disabledBefore18', dependent, 'dependents') - merge_radio_button('attendedSchoolLastYear', dependent, 'dependents') - end - - def merge_spouse_address - address = @form_data['spouseAddress']&.symbolize_keys - - full_address = format('%s %s, %s %s', address) - @form_data['helpers']['spouseAddress'] = full_address - end - - def merge_financial_discloser - disclosure = @form_data['discloseFinancialInformation'] - selected = disclosure == true ? 0 : 1 - - @form_data['helpers']['discloseFinancialInformation'] = selected - end - - def format_date_for(field, source, *path) - date = source[field] - date = Date.parse(date).strftime('%m/%d/%Y') if date - assign_value(field, date, path) - end - - def format_dates - %w[ - veteranDateOfBirth lastEntryDate lastDischargeDate medicarePartAEffectiveDate - spouseDateOfBirth dateOfMarriage - ].each { |field| format_date_for(field, @form_data) } - end - - def merge_radio_button(field, source, *path) - selected = source[field] == true ? '1' : '2' - - assign_value(field, selected, path) - end - - def form_data_helper(_field, path) - form_data = path.empty? ? @form_data : @form_data.dig(*path) - form_data.is_a?(Array) ? form_data.first : form_data - end - - def assign_value(field, value, path) - if path.empty? - @form_data['helpers'][field] = value - return - end - - @form_data['helpers'].dig(*path)[field] = value - end - - def merge_checkbox(field, source, *path) - selected = source[field] == true ? 'YES' : 'NO' - assign_value(field, selected, path) - end - end - end -end diff --git a/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb b/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb new file mode 100644 index 00000000000..85bf4cda2ff --- /dev/null +++ b/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module ClaimsApi + class VnpPtcpntAddrsService < ClaimsApi::LocalBGS + def vnp_ptcpnt_addrs_create(options) + arg_strg = convert_nil_values(options) + body = Nokogiri::XML::DocumentFragment.parse <<~EOXML + + #{arg_strg} + + EOXML + + make_request(endpoint: 'VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService', + action: 'vnpPtcpntAddrsCreate', body:, key: 'return') + end + end +end diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb new file mode 100644 index 00000000000..e9dfa8550cb --- /dev/null +++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'bgs_service/vnp_ptcpnt_addrs_service' +require Rails.root.join('modules', 'claims_api', 'spec', 'support', 'bgs_client_helpers.rb') + +metadata = { + bgs: { + service: 'vnp_ptcpnt_addrs_service', + operation: 'vnp_ptcpnt_addrs_create' + } +} + +describe ClaimsApi::VnpPtcpntAddrsService, metadata do + subject { described_class.new external_uid: 'xUid', external_key: 'xKey' } + + describe 'vnp_ptcpnt_addrs_create' do + let(:options) { {} } + + it 'responds with attributes' do + options[:vnp_ptcpnt_addrs_id] = nil + options[:vnp_proc_id] = '3854596' + options[:vnp_ptcpnt_id] = '182057' + options[:efctv_dt] = '2020-07-16T18:20:18Z' + options[:addrs_one_txt] = '76 Crowther Ave' + options[:addrs_three_txt] = nil + options[:addrs_two_txt] = nil + options[:bad_addrs_ind] = nil + options[:city_nm] = 'Bridgeport' + options[:cntry_nm] = nil + options[:county_nm] = nil + options[:eft_waiver_type_nm] = nil + options[:email_addrs_txt] = 'testy@test.com' + options[:end_dt] = nil + options[:fms_addrs_code_txt] = nil + options[:frgn_postal_cd] = nil + options[:group_1_verifd_type_cd] = nil + options[:jrn_dt] = '2020-07-16T18:20:17Z' + options[:jrn_lctn_id] = 281 + options[:jrn_obj_id] = 'VAgovAPI' + options[:jrn_status_type_cd] = 'U' + options[:jrn_user_id] = 'VAgovAPI' + options[:lctn_nm] = nil + options[:mlty_postal_type_cd] = nil + options[:mlty_post_office_type_cd] = nil + options[:postal_cd] = 'CT' + options[:prvnc_nm] = 'CT' + options[:ptcpnt_addrs_type_nm] = 'Mailing' + options[:shared_addrs_ind] = 'N' + options[:trsury_addrs_five_txt] = nil + options[:trsury_addrs_four_txt] = nil + options[:trsury_addrs_one_txt] = nil + options[:trsury_addrs_six_txt] = nil + options[:trsury_addrs_three_txt] = nil + options[:trsury_addrs_two_txt] = nil + options[:trsury_seq_nbr] = nil + options[:trtry_nm] = nil + options[:zip_first_suffix_nbr] = nil + options[:zip_prefix_nbr] = '06605' + options[:zip_second_suffix_nbr] = nil + + use_bgs_cassette('happy_path') do + response = subject.vnp_ptcpnt_addrs_create(options) + expect(response).to include( + { vnp_ptcpnt_addrs_id: '143950', + efctv_dt: '2020-07-16T18:20:18Z', + vnp_ptcpnt_id: '182057', + vnp_proc_id: '3854596', + addrs_one_txt: '76 Crowther Ave', + city_nm: 'Bridgeport', + email_addrs_txt: 'testy@test.com', + jrn_dt: '2020-07-16T18:20:17Z', + jrn_lctn_id: '281', + jrn_obj_id: 'VAgovAPI', + jrn_status_type_cd: 'U', + jrn_user_id: 'VAgovAPI', + postal_cd: 'CT', + prvnc_nm: 'CT', + ptcpnt_addrs_type_nm: 'Mailing', + shared_addrs_ind: 'N', + zip_prefix_nbr: '06605' } + ) + end + end + end +end diff --git a/modules/claims_api/spec/support/bgs_client_helpers.rb b/modules/claims_api/spec/support/bgs_client_helpers.rb index 8cd2c5f8ebc..4d6394c50fd 100644 --- a/modules/claims_api/spec/support/bgs_client_helpers.rb +++ b/modules/claims_api/spec/support/bgs_client_helpers.rb @@ -38,7 +38,7 @@ module BGSClientHelpers # Then, HTTP interactions that occur within the block supplied to this method # will be captured by VCR cassettes that have the following convenient # properties: - # - They will be nicely organized at `bgs/:service/:operation/:name` + # - They will be nicely organized at `claims_api/bgs/:service/:operation/:name` # - Cassette matching will be done on canonicalized XML bodies, so # reformatting cassettes for human readability won't defeat matching def use_bgs_cassette(name, &) diff --git a/modules/simple_forms_api/app/models/simple_forms_api/vba_20_10207.rb b/modules/simple_forms_api/app/models/simple_forms_api/vba_20_10207.rb index a324bc267b6..c85aa2fc66f 100644 --- a/modules/simple_forms_api/app/models/simple_forms_api/vba_20_10207.rb +++ b/modules/simple_forms_api/app/models/simple_forms_api/vba_20_10207.rb @@ -82,6 +82,17 @@ def handle_attachments(file_path) end end + def desired_stamps + coords = if %w[veteran non-veteran].include? data['preparer_type'] + [[50, 685]] + elsif data['third_party_type'] == 'power-of-attorney' + [[50, 440]] + elsif %w[third-party-veteran third-party-non-veteran].include? data['preparer_type'] + [[50, 565]] + end + [{ coords:, text: data['statement_of_truth_signature'], page: 4 }] + end + def submission_date_config { should_stamp_date?: false diff --git a/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0845.rb b/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0845.rb index c5194b67cee..787c2c88b03 100644 --- a/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0845.rb +++ b/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0845.rb @@ -37,6 +37,10 @@ def words_to_remove person_address + organization_address end + def desired_stamps + [{ coords: [50, 240], text: data['statement_of_truth_signature'], page: 2 }] + end + def submission_date_config { should_stamp_date?: true, diff --git a/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0966.rb b/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0966.rb index afb264d1e98..6e7da54c6e1 100644 --- a/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0966.rb +++ b/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0966.rb @@ -59,6 +59,10 @@ def third_party_info end end + def desired_stamps + [{ coords: [50, 415], text: data['statement_of_truth_signature'], page: 1 }] + end + def submission_date_config { should_stamp_date?: true, diff --git a/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0972.rb b/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0972.rb index eb63fb40ccd..fdd73820a23 100644 --- a/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0972.rb +++ b/modules/simple_forms_api/app/models/simple_forms_api/vba_21_0972.rb @@ -27,6 +27,10 @@ def zip_code_is_us_based @data.dig('preparer_address', 'country') == 'USA' end + def desired_stamps + [{ coords: [50, 465], text: data['statement_of_truth_signature'], page: 2 }] + end + def submission_date_config { should_stamp_date?: true, diff --git a/modules/simple_forms_api/app/models/simple_forms_api/vba_21_10210.rb b/modules/simple_forms_api/app/models/simple_forms_api/vba_21_10210.rb index be1eeb6fa35..2ba5fcbb0cb 100644 --- a/modules/simple_forms_api/app/models/simple_forms_api/vba_21_10210.rb +++ b/modules/simple_forms_api/app/models/simple_forms_api/vba_21_10210.rb @@ -33,6 +33,10 @@ def words_to_remove statement + witness_phone + witness_email end + def desired_stamps + [{ coords: [50, 160], text: data['statement_of_truth_signature'], page: 2 }] + end + def submission_date_config { should_stamp_date?: true, diff --git a/modules/simple_forms_api/app/models/simple_forms_api/vba_21_4142.rb b/modules/simple_forms_api/app/models/simple_forms_api/vba_21_4142.rb index 849608e35d0..f82f456d972 100644 --- a/modules/simple_forms_api/app/models/simple_forms_api/vba_21_4142.rb +++ b/modules/simple_forms_api/app/models/simple_forms_api/vba_21_4142.rb @@ -32,6 +32,10 @@ def zip_code_is_us_based @data.dig('veteran', 'address', 'country') == 'USA' end + def desired_stamps + [{ coords: [50, 560], text: data['statement_of_truth_signature'], page: 1 }] + end + def submission_date_config { should_stamp_date?: true, diff --git a/modules/simple_forms_api/app/models/simple_forms_api/vba_21p_0847.rb b/modules/simple_forms_api/app/models/simple_forms_api/vba_21p_0847.rb index 89c3c30ba75..d5670cf04bb 100644 --- a/modules/simple_forms_api/app/models/simple_forms_api/vba_21p_0847.rb +++ b/modules/simple_forms_api/app/models/simple_forms_api/vba_21p_0847.rb @@ -31,6 +31,10 @@ def zip_code_is_us_based @data.dig('preparer_address', 'country') == 'USA' end + def desired_stamps + [{ coords: [50, 190], text: data['statement_of_truth_signature'], page: 1 }] + end + def submission_date_config { should_stamp_date?: true, diff --git a/modules/simple_forms_api/app/models/simple_forms_api/vba_26_4555.rb b/modules/simple_forms_api/app/models/simple_forms_api/vba_26_4555.rb index a146e8bb6f0..2584fe31709 100644 --- a/modules/simple_forms_api/app/models/simple_forms_api/vba_26_4555.rb +++ b/modules/simple_forms_api/app/models/simple_forms_api/vba_26_4555.rb @@ -45,6 +45,18 @@ def zip_code_is_us_based @data.dig('veteran', 'address', 'country') == 'USA' end + def desired_stamps + return [] unless data + + [].tap do |stamps| + stamps << { coords: [73, 390], text: 'X' } unless data.dig('previous_sah_application', + 'has_previous_sah_application') + stamps << { coords: [73, 355], text: 'X' } unless data.dig('previous_hi_application', + 'has_previous_hi_application') + stamps << { coords: [73, 320], text: 'X' } unless data.dig('living_situation', 'is_in_care_facility') + end.compact + end + def submission_date_config { should_stamp_date?: false } end diff --git a/modules/simple_forms_api/app/models/simple_forms_api/vha_10_7959f_1.rb b/modules/simple_forms_api/app/models/simple_forms_api/vha_10_7959f_1.rb index 094564b668e..7e67ba30f91 100644 --- a/modules/simple_forms_api/app/models/simple_forms_api/vha_10_7959f_1.rb +++ b/modules/simple_forms_api/app/models/simple_forms_api/vha_10_7959f_1.rb @@ -27,6 +27,10 @@ def zip_code_is_us_based true end + def desired_stamps + [{ coords: [26, 82.5], text: data['statement_of_truth_signature'], page: 0 }] + end + def submission_date_config { should_stamp_date?: false } end diff --git a/modules/simple_forms_api/app/services/simple_forms_api/pdf_stamper.rb b/modules/simple_forms_api/app/services/simple_forms_api/pdf_stamper.rb index 4c38e4e3387..68cc6e837b5 100644 --- a/modules/simple_forms_api/app/services/simple_forms_api/pdf_stamper.rb +++ b/modules/simple_forms_api/app/services/simple_forms_api/pdf_stamper.rb @@ -9,12 +9,23 @@ class PdfStamper SUBMISSION_DATE_TITLE = 'Application Submitted:' def self.stamp_pdf(stamped_template_path, form, current_loa) + stamp_signature(stamped_template_path, form) + + stamp_auth_text(stamped_template_path, current_loa) + + stamp_submission_date(stamped_template_path, form.submission_date_config) + end + + def self.stamp_signature(stamped_template_path, form) form_number = form.data['form_number'] if FORM_REQUIRES_STAMP.include? form_number - stamp_method = "stamp#{form_number.gsub('-', '')}".downcase - send(stamp_method, stamped_template_path, form) + form.desired_stamps.each do |desired_stamp| + stamp(desired_stamp, stamped_template_path) + end end + end + def self.stamp_auth_text(stamped_template_path, current_loa) current_time = "#{Time.current.in_time_zone('America/Chicago').strftime('%H:%M:%S')} " auth_text = case current_loa when 3 @@ -24,145 +35,15 @@ def self.stamp_pdf(stamped_template_path, form, current_loa) else 'Signee not signed in.' end - stamp_text = SUBMISSION_TEXT + current_time - desired_stamps = [[10, 10, stamp_text]] - verify(stamped_template_path) { stamp(desired_stamps, stamped_template_path, auth_text, text_only: false) } - - stamp_submission_date(stamped_template_path, form.submission_date_config) - end - - def self.stamp107959f1(stamped_template_path, form) - desired_stamps = [[26, 82.5, form.data['statement_of_truth_signature']]] - append_to_stamp = false - verify(stamped_template_path) { stamp(desired_stamps, stamped_template_path, append_to_stamp) } - end - - def self.stamp264555(stamped_template_path, form) - desired_stamps = [] - desired_stamps.append([73, 390, 'X']) unless form.data['previous_sah_application']['has_previous_sah_application'] - desired_stamps.append([73, 355, 'X']) unless form.data['previous_hi_application']['has_previous_hi_application'] - desired_stamps.append([73, 320, 'X']) unless form.data['living_situation']['is_in_care_facility'] - append_to_stamp = false - stamp(desired_stamps, stamped_template_path, append_to_stamp) - end - - def self.stamp214142(stamped_template_path, form) - desired_stamps = [[50, 560]] - signature_text = form.data['statement_of_truth_signature'] - page_configuration = [ - { type: :new_page }, - { type: :text, position: desired_stamps[0] }, - { type: :new_page } - ] - - verified_multistamp(stamped_template_path, signature_text, page_configuration) - - # This is a one-off case where we need to stamp a date on the first page of 21-4142 when resubmitting - if form.data['in_progress_form_created_at'] - date_title = 'Application Submitted:' - date_text = form.data['in_progress_form_created_at'] - stamp214142_date_stamp_for_resubmission(stamped_template_path, date_title, date_text) + coords = [10, 10] + text = SUBMISSION_TEXT + current_time + page = 0 + desired_stamp = { coords:, text:, page: } + verify(stamped_template_path) do + stamp(desired_stamp, stamped_template_path, append_to_stamp: auth_text, text_only: false) end end - def self.stamp214142_date_stamp_for_resubmission(stamped_template_path, date_title, date_text) - date_title_stamp_position = [440, 710] - date_text_stamp_position = [440, 690] - page_configuration = [ - { type: :text, position: date_title_stamp_position }, - { type: :new_page }, - { type: :new_page } - ] - - verified_multistamp(stamped_template_path, date_title, page_configuration, 12) - - page_configuration = [ - { type: :text, position: date_text_stamp_position }, - { type: :new_page }, - { type: :new_page } - ] - - verified_multistamp(stamped_template_path, date_text, page_configuration, 12) - end - - def self.stamp2110210(stamped_template_path, form) - desired_stamps = [[50, 160]] - signature_text = form.data['statement_of_truth_signature'] - page_configuration = [ - { type: :new_page }, - { type: :new_page }, - { type: :text, position: desired_stamps[0] } - ] - - verified_multistamp(stamped_template_path, signature_text, page_configuration) - end - - def self.stamp210845(stamped_template_path, form) - desired_stamps = [[50, 240]] - signature_text = form.data['statement_of_truth_signature'] - page_configuration = [ - { type: :new_page }, - { type: :new_page }, - { type: :text, position: desired_stamps[0] } - ] - - verified_multistamp(stamped_template_path, signature_text, page_configuration) - end - - def self.stamp21p0847(stamped_template_path, form) - desired_stamps = [[50, 190]] - signature_text = form.data['statement_of_truth_signature'] - page_configuration = [ - { type: :new_page }, - { type: :text, position: desired_stamps[0] } - ] - - verified_multistamp(stamped_template_path, signature_text, page_configuration) - end - - def self.stamp210972(stamped_template_path, form) - desired_stamps = [[50, 465]] - signature_text = form.data['statement_of_truth_signature'] - page_configuration = [ - { type: :new_page }, - { type: :new_page }, - { type: :text, position: desired_stamps[0] } - ] - - verified_multistamp(stamped_template_path, signature_text, page_configuration) - end - - def self.stamp210966(stamped_template_path, form) - desired_stamps = [[50, 415]] - signature_text = form.data['statement_of_truth_signature'] - page_configuration = [ - { type: :new_page }, - { type: :text, position: desired_stamps[0] } - ] - - verified_multistamp(stamped_template_path, signature_text, page_configuration) - end - - def self.stamp2010207(stamped_template_path, form) - desired_stamps = if %w[veteran non-veteran].include? form.data['preparer_type'] - [[50, 685]] - elsif form.data['third_party_type'] == 'power-of-attorney' - [[50, 440]] - elsif %w[third-party-veteran third-party-non-veteran].include? form.data['preparer_type'] - [[50, 565]] - end - signature_text = form.data['statement_of_truth_signature'] - page_configuration = [ - { type: :new_page }, - { type: :new_page }, - { type: :new_page }, - { type: :new_page }, - { type: :text, position: desired_stamps[0] } - ] - - verified_multistamp(stamped_template_path, signature_text, page_configuration) - end - def self.stamp4010007_uuid(uuid) uuid = "UUID: #{uuid}" stamped_template_path = 'tmp/vba_40_10007-tmp.pdf' @@ -195,13 +76,21 @@ def self.multistamp(stamped_template_path, signature_text, page_configuration, f Common::FileHelpers.delete_file_if_exists(stamp_path) if defined?(stamp_path) end - def self.stamp(desired_stamps, stamped_template_path, append_to_stamp, text_only: true) + def self.stamp(desired_stamp, stamped_template_path, append_to_stamp: false, text_only: true) current_file_path = stamped_template_path - desired_stamps.each do |x, y, text| + coords = desired_stamp[:coords] + text = desired_stamp[:text] + page = desired_stamp[:page] + x = coords[0] + y = coords[1] + if page + page_configuration = get_page_configuration(page, coords) + verified_multistamp(stamped_template_path, text, page_configuration) + else datestamp_instance = CentralMail::DatestampPdf.new(current_file_path, append_to_stamp:) current_file_path = datestamp_instance.run(text:, x:, y:, text_only:, size: 9) + File.rename(current_file_path, stamped_template_path) end - File.rename(current_file_path, stamped_template_path) end def self.perform_multistamp(stamped_template_path, stamp_path) @@ -258,5 +147,16 @@ def self.default_page_configuration { type: :new_page } ] end + + def self.get_page_configuration(page, position) + [ + { type: :new_page }, + { type: :new_page }, + { type: :new_page }, + { type: :new_page } + ].tap do |config| + config[page] = { type: :text, position: } + end + end end end diff --git a/modules/simple_forms_api/spec/services/pdf_stamper_spec.rb b/modules/simple_forms_api/spec/services/pdf_stamper_spec.rb index 09927ed66fb..4771703c2fb 100644 --- a/modules/simple_forms_api/spec/services/pdf_stamper_spec.rb +++ b/modules/simple_forms_api/spec/services/pdf_stamper_spec.rb @@ -8,78 +8,52 @@ let(:form) { "SimpleFormsApi::#{test_payload.titleize.gsub(' ', '')}".constantize.new(data) } let(:path) { 'tmp/stuff.json' } - describe 'form-specific stamp methods' do - subject(:stamp) { described_class.send(stamp_method, generated_form_path, form) } + describe '.stamp_signature' do + subject(:stamp_signature) { described_class.stamp_signature(path, form) } before do - allow(Common::FileHelpers).to receive(:random_file_path).and_return('fake/stamp_path') - allow(Common::FileHelpers).to receive(:delete_file_if_exists) - end - - %w[21-4142 21-10210 21p-0847].each do |form_number| - context "when generating a stamped file for form #{form_number}" do - let(:stamp_method) { "stamp#{form_number.gsub('-', '')}" } - let(:test_payload) { "vba_#{form_number.gsub('-', '_')}" } - let(:generated_form_path) { 'fake/generated_form_path' } - - it 'raises an error' do - expect { stamp }.to raise_error(StandardError, /An error occurred while verifying stamp/) - end - end - end - end - - describe '.stamp107959f1' do - subject(:stamp107959f1) { described_class.stamp107959f1(path, form) } - - before do - allow(described_class).to receive(:stamp).and_return(true) allow(File).to receive(:size).and_return(1, 2) end context 'when statement_of_truth_signature is provided' do - before { stamp107959f1 } + before do + allow(described_class).to receive(:stamp).and_return(true) + stamp_signature + end let(:test_payload) { 'vha_10_7959f_1' } - let(:signature) { form.data['statement_of_truth_signature'] } - let(:stamps) { [[26, 82.5, signature]] } + let(:desired_stamp) do + { + coords: [26, 82.5], + text: form.data['statement_of_truth_signature'], + page: 0 + } + end it 'calls stamp with correct desired_stamp' do - expect(described_class).to have_received(:stamp).with(stamps, path, false) + expect(described_class).to have_received(:stamp).with(desired_stamp, path) end end - end - - describe '.stamp264555' do - subject(:stamp264555) { described_class.stamp264555(path, form) } - - before do - allow(described_class).to receive(:stamp).and_return(true) - allow(File).to receive(:size).and_return(1, 2) - end - context 'when it is called with legitimate parameters' do - before { stamp264555 } + context 'when no stamps are needed' do + before do + allow(described_class).to receive(:stamp).and_return(true) + stamp_signature + end let(:test_payload) { 'vba_26_4555' } let(:stamps) { [] } - it 'calls stamp correctly' do - expect(described_class).to have_received(:stamp).with(stamps, path, false) + it 'does not call :stamp' do + expect(described_class).not_to have_received(:stamp) end end - end - - describe '.stamp210845' do - subject(:stamp210845) { described_class.stamp210845(path, form) } - - before do - allow(described_class).to receive(:multistamp).and_return(true) - allow(File).to receive(:size).and_return(1, 2) - end context 'when it is called with legitimate parameters' do - before { stamp210845 } + before do + allow(described_class).to receive(:multistamp).and_return(true) + stamp_signature + end let(:test_payload) { 'vba_21_0845' } let(:signature) { form.data['statement_of_truth_signature'] } @@ -87,7 +61,8 @@ [ { type: :new_page }, { type: :new_page }, - { type: :text, position: [50, 240] } + { type: :text, position: [50, 240] }, + { type: :new_page } ] end diff --git a/spec/controllers/v0/health_care_applications_controller_spec.rb b/spec/controllers/v0/health_care_applications_controller_spec.rb index 84cd49af786..619dbf23f44 100644 --- a/spec/controllers/v0/health_care_applications_controller_spec.rb +++ b/spec/controllers/v0/health_care_applications_controller_spec.rb @@ -14,21 +14,4 @@ expect(json['attributes']).to eq(hca_response['attributes']) end end - - describe '#download_pdf' do - let(:response_pdf) { Rails.root.join 'tmp', 'pdfs', '10-10EZ_John_Smith.pdf' } - let(:expected_pdf) { Rails.root.join 'spec', 'fixtures', 'pdf_fill', '10-10EZ', 'unsigned', 'simple.pdf' } - - it 'downloads a pdf' do - post :download_pdf, params: JSON.parse(hca_request) - - File.open(response_pdf, 'wb+') { |f| f.write(response.body) } - - expect(response).to have_http_status(:ok) - - expect( - pdfs_fields_match?(response_pdf, expected_pdf) - ).to eq(true) - end - end end diff --git a/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml b/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml new file mode 100644 index 00000000000..11d52b9b5fd --- /dev/null +++ b/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml @@ -0,0 +1,186 @@ +--- +http_interactions: +- request: + method: get + uri: /VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService?WSDL + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Faraday v2.9.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 04 Apr 2024 18:57:11 GMT + Server: + - Apache + X-Frame-Options: + - SAMEORIGIN + Transfer-Encoding: + - chunked + Content-Type: + - text/xml;charset=utf-8 + Strict-Transport-Security: + - max-age=16000000; includeSubDomains; preload; + body: + encoding: UTF-8 + string: |- + + recorded_at: Thu, 04 Apr 2024 18:57:11 GMT +- request: + method: post + uri: /VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService + body: + encoding: UTF-8 + string: | + + + + + + VAgovAPI + + + 127.0.0.1 + 281 + VAgovAPI + xUid + xKey + + + + + + + + 3854596 + 182057 + 2020-07-16T18:20:18Z + 76 Crowther Ave + + + + Bridgeport + + + + testy@test.com + + + + + 2020-07-16T18:20:17Z + 281 + VAgovAPI + U + VAgovAPI + + + + CT + CT + Mailing + N + + + + + + + + + + 06605 + + + + + + headers: + User-Agent: + - Faraday v2.9.0 + Content-Type: + - text/xml;charset=UTF-8 + Host: + - ".vba.va.gov" + Soapaction: + - '"vnpPtcpntAddrsCreate"' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 04 Apr 2024 18:57:12 GMT + Server: + - Apache + X-Frame-Options: + - SAMEORIGIN + Transfer-Encoding: + - chunked + Content-Type: + - text/xml; charset=utf-8 + Strict-Transport-Security: + - max-age=16000000; includeSubDomains; preload; + body: + encoding: UTF-8 + string: | + + + + + rO0ABXdKABR3ZWJsb2dpYy5hcHAudm5wLWVhcgAAANYAAAAjd2VibG9naWMud29ya2FyZWEuU3RyaW5nV29ya0NvbnRleHQABTIuMC44AAA= + + + + + + 143950 + 2020-07-16T18:20:18Z + 182057 + 3854596 + 76 Crowther Ave + Bridgeport + testy@test.com + 2020-07-16T18:20:17Z + 281 + VAgovAPI + U + VAgovAPI + CT + CT + Mailing + N + 06605 + + + + + recorded_at: Thu, 04 Apr 2024 18:57:12 GMT +recorded_with: VCR 6.2.0