Skip to content

Commit

Permalink
Fyst 1457 update behavior of software id field in xml (#5216)
Browse files Browse the repository at this point in the history
  • Loading branch information
tahsinaislam authored Dec 17, 2024
1 parent 665bef7 commit 4c08153
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/lib/environment_credentials.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def irs(key)
etin: 'GYR_EFILER_ETIN',
app_sys_id: 'GYR_EFILER_APP_SYS_ID',
efin: 'VITA_MIN_EFIN',
md_sin: 'MD_SIN',
sin: 'VITA_MIN_SIN',
}
ENV[env_var_names[key]].presence || dig(:irs, key)
Expand Down
2 changes: 1 addition & 1 deletion app/lib/submission_builder/return_header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def document
xml.EFIN EnvironmentCredentials.irs(:efin)
xml.OriginatorTypeCd "OnlineFiler"
end
xml.SoftwareId EnvironmentCredentials.irs(:sin)
xml.SoftwareId EnvironmentCredentials.irs(StateFile::StateInformationService.software_id_key(@submission.data_source.state_code).to_sym)
xml.ReturnType StateFile::StateInformationService.return_type(@submission.data_source.state_code)
xml.Filer do
xml.Primary do
Expand Down
7 changes: 7 additions & 0 deletions app/services/state_file/state_information_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class StateInformationService
:return_type,
:review_controller_class,
:schema_file_name,
:software_id_key,
:state_name,
:submission_builder_class,
:submission_type,
Expand Down Expand Up @@ -69,6 +70,7 @@ def state_intake_class_names
return_type: "Form140",
review_controller_class: StateFile::Questions::AzReviewController,
schema_file_name: "AZIndividual2024v2.0.zip",
software_id_key: "sin",
state_name: "Arizona",
submission_builder_class: SubmissionBuilder::Ty2022::States::Az::AzReturnXml,
survey_link: "https://codeforamerica.co1.qualtrics.com/jfe/form/SV_0v0BnYNRoLIqzhY",
Expand Down Expand Up @@ -100,6 +102,7 @@ def state_intake_class_names
review_controller_class: StateFile::Questions::IdReviewController,
state_name: "Idaho",
schema_file_name: "ID_MeF2024V0.1.zip",
software_id_key: "sin",
submission_type: "Form40",
submission_builder_class: SubmissionBuilder::Ty2024::States::Id::IdReturnXml,
survey_link: "https://codeforamerica.co1.qualtrics.com/jfe/form/SV_0URdKLyW7K53rZc",
Expand Down Expand Up @@ -127,6 +130,7 @@ def state_intake_class_names
return_type: "502",
review_controller_class: StateFile::Questions::MdReviewController,
schema_file_name: "MDIndividual2024v1.0.zip",
software_id_key: "md_sin", # MD assigned us a unique software id only in use for MD
state_name: "Maryland",
submission_type: "MD502",
submission_builder_class: SubmissionBuilder::Ty2024::States::Md::MdReturnXml,
Expand Down Expand Up @@ -154,6 +158,7 @@ def state_intake_class_names
return_type: "FormNCD400",
review_controller_class: StateFile::Questions::NcReviewController,
schema_file_name: "NCIndividual2024v0.7.zip",
software_id_key: "sin",
state_name: "North Carolina",
submission_type: "FormNCD400",
submission_builder_class: SubmissionBuilder::Ty2024::States::Nc::NcReturnXml,
Expand All @@ -176,6 +181,7 @@ def state_intake_class_names
navigation_class: Navigation::StateFileNjQuestionNavigation,
review_controller_class: StateFile::Questions::NjReviewController,
submission_builder_class: SubmissionBuilder::Ty2024::States::Nj::NjReturnXml,
software_id_key: "sin",
state_name: "New Jersey",
return_type: "Resident",
schema_file_name: "NJIndividual2024V0.1.zip",
Expand Down Expand Up @@ -211,6 +217,7 @@ def state_intake_class_names
state_name: "New York",
submission_type: "IT201",
schema_file_name: "NYSIndividual2023V4.0.zip",
software_id_key: "sin",
submission_builder_class: SubmissionBuilder::Ty2022::States::Ny::NyReturnXml,
survey_link: "https://codeforamerica.co1.qualtrics.com/jfe/form/SV_3pXUfy2c3SScmgu",
tax_payment_info_url: "https://www.tax.ny.gov/pay/ind/pay-income-tax-online.htm",
Expand Down
2 changes: 1 addition & 1 deletion config/credentials/demo.yml.enc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/credentials/development.yml.enc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/credentials/heroku.yml.enc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/credentials/production.yml.enc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/credentials/staging.yml.enc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
intake.direct_file_data.mailing_zip = mailing_zip
intake.direct_file_data.tax_return_year = tax_return_year
allow(EnvironmentCredentials).to receive(:irs).with(:efin).and_return efin
allow(EnvironmentCredentials).to receive(:irs).with(:sin).and_return sin
software_id = StateFile::StateInformationService.software_id_key(state_code).to_sym
allow(EnvironmentCredentials).to receive(:irs).with(software_id).and_return sin
end

it "generates xml with the right values" do
Expand Down

0 comments on commit 4c08153

Please sign in to comment.