Skip to content

Commit

Permalink
MTDSA-27878 Implement RULE_MISSING_SUBMISSION_DATES as a BE error in …
Browse files Browse the repository at this point in the history
…error mapping + OAS changes to include TAX_YEAR_NOT_SUPPORTED and MISSING_SUBMISSION_DATES GTS for the relevant cumulative endpoints (#551)

* MTDSA-27878 Implement RULE_MISSING_SUBMISSION_DATES as a BE error in error mapping

* MTDSA-27878 OAS changes to include TAX_YEAR_NOT_SUPPORTED and MISSING_SUBMISSION_DATES GTS for the relevant cumulative endpoints
  • Loading branch information
Taiwo-AB authored Dec 11, 2024
1 parent 79ffa68 commit 5f69fa3
Show file tree
Hide file tree
Showing 19 changed files with 109 additions and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CreateAmendForeignPropertyCumulativePeriodSummaryService @Inject() (connec
"INVALID_START_DATE" -> RuleStartDateNotAlignedWithReportingTypeError,
"START_DATE_NOT_ALIGNED" -> RuleStartDateNotAlignedToCommencementDateError,
"END_DATE_NOT_ALIGNED" -> RuleEndDateNotAlignedWithReportingTypeError,
"MISSING_SUBMISSION_DATES" -> InternalError,
"MISSING_SUBMISSION_DATES" -> RuleMissingSubmissionDatesError,
"START_END_DATE_NOT_ACCEPTED" -> RuleStartAndEndDateNotAllowedError,
"OUTSIDE_AMENDMENT_WINDOW" -> RuleOutsideAmendmentWindowError,
"EARLY_DATA_SUBMISSION_NOT_ACCEPTED" -> RuleEarlyDataSubmissionNotAcceptedError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CreateAmendUkPropertyCumulativeSummaryService @Inject() (connector: Create
"INVALID_START_DATE" -> RuleStartDateNotAlignedWithReportingTypeError,
"START_DATE_NOT_ALIGNED" -> RuleStartDateNotAlignedToCommencementDateError,
"END_DATE_NOT_ALIGNED" -> RuleEndDateNotAlignedWithReportingTypeError,
"MISSING_SUBMISSION_DATES" -> InternalError,
"MISSING_SUBMISSION_DATES" -> RuleMissingSubmissionDatesError,
"START_END_DATE_NOT_ACCEPTED" -> RuleStartAndEndDateNotAllowedError,
"OUTSIDE_AMENDMENT_WINDOW" -> RuleOutsideAmendmentWindowError,
"TAX_YEAR_NOT_SUPPORTED" -> RuleTaxYearNotSupportedError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class Def1_CreateAmendForeignPropertyCumulativePeriodSummaryISpec extends Integr
(UNPROCESSABLE_ENTITY, "INVALID_START_DATE", BAD_REQUEST, RuleStartDateNotAlignedWithReportingTypeError),
(UNPROCESSABLE_ENTITY, "START_DATE_NOT_ALIGNED", BAD_REQUEST, RuleStartDateNotAlignedToCommencementDateError),
(UNPROCESSABLE_ENTITY, "END_DATE_NOT_ALIGNED", BAD_REQUEST, RuleEndDateNotAlignedWithReportingTypeError),
(UNPROCESSABLE_ENTITY, "MISSING_SUBMISSION_DATES", INTERNAL_SERVER_ERROR, InternalError),
(UNPROCESSABLE_ENTITY, "MISSING_SUBMISSION_DATES", BAD_REQUEST, RuleMissingSubmissionDatesError),
(UNPROCESSABLE_ENTITY, "START_END_DATE_NOT_ACCEPTED", BAD_REQUEST, RuleStartAndEndDateNotAllowedError),
(UNPROCESSABLE_ENTITY, "OUTSIDE_AMENDMENT_WINDOW", BAD_REQUEST, RuleOutsideAmendmentWindowError),
(UNPROCESSABLE_ENTITY, "EARLY_DATA_SUBMISSION_NOT_ACCEPTED", BAD_REQUEST, RuleEarlyDataSubmissionNotAcceptedError),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class Def1_CreateAmendUkPropertyCumulativeSummaryISpec extends IntegrationBaseSp
(UNPROCESSABLE_ENTITY, "INVALID_START_DATE", BAD_REQUEST, RuleStartDateNotAlignedWithReportingTypeError),
(UNPROCESSABLE_ENTITY, "START_DATE_NOT_ALIGNED", BAD_REQUEST, RuleStartDateNotAlignedToCommencementDateError),
(UNPROCESSABLE_ENTITY, "END_DATE_NOT_ALIGNED", BAD_REQUEST, RuleEndDateNotAlignedWithReportingTypeError),
(UNPROCESSABLE_ENTITY, "MISSING_SUBMISSION_DATES", INTERNAL_SERVER_ERROR, InternalError),
(UNPROCESSABLE_ENTITY, "MISSING_SUBMISSION_DATES", BAD_REQUEST, RuleMissingSubmissionDatesError),
(UNPROCESSABLE_ENTITY, "START_END_DATE_NOT_ACCEPTED", BAD_REQUEST, RuleStartAndEndDateNotAllowedError),
(UNPROCESSABLE_ENTITY, "OUTSIDE_AMENDMENT_WINDOW", BAD_REQUEST, RuleOutsideAmendmentWindowError),
(UNPROCESSABLE_ENTITY, "TAX_YEAR_NOT_SUPPORTED", BAD_REQUEST, RuleTaxYearNotSupportedError),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"fromDate":"2024-03-09",
"toDate":"2024-03-29",
"foreignProperty":[
"fromDate": "2025-04-06",
"toDate": "2025-07-05",
"foreignProperty": [
{
"countryCode":"FRA",
"income":{
"rentIncome":{
"rentAmount":4882.23
"countryCode": "FRA",
"income": {
"rentIncome": {
"rentAmount": 4882.23
},
"foreignTaxCreditRelief":false,
"premiumsOfLeaseGrant":884.72,
"otherPropertyIncome":7713.09,
"foreignTaxPaidOrDeducted":884.12,
"specialWithholdingTaxOrUkTaxPaid":847.72
"foreignTaxCreditRelief": false,
"premiumsOfLeaseGrant": 884.72,
"otherPropertyIncome": 7713.09,
"foreignTaxPaidOrDeducted": 884.12,
"specialWithholdingTaxOrUkTaxPaid": 847.72
},
"expenses":{
"expenses": {
"consolidatedExpenses": 3992.93,
"residentialFinancialCost":879.28,
"broughtFwdResidentialFinancialCost":846.13
"residentialFinancialCost": 879.28,
"broughtFwdResidentialFinancialCost": 846.13
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"fromDate":"2024-03-09",
"toDate":"2024-03-29",
"foreignProperty":[
"fromDate": "2025-04-06",
"toDate": "2025-07-05",
"foreignProperty": [
{
"countryCode":"FRA",
"income":{
"rentIncome":{
"rentAmount":4882.23
"countryCode": "FRA",
"income": {
"rentIncome": {
"rentAmount": 4882.23
},
"foreignTaxCreditRelief":false,
"premiumsOfLeaseGrant":884.72,
"otherPropertyIncome":7713.09,
"foreignTaxPaidOrDeducted":884.12,
"specialWithholdingTaxOrUkTaxPaid":847.72
"foreignTaxCreditRelief": false,
"premiumsOfLeaseGrant": 884.72,
"otherPropertyIncome": 7713.09,
"foreignTaxPaidOrDeducted": 884.12,
"specialWithholdingTaxOrUkTaxPaid": 847.72
},
"expenses":{
"premisesRunningCosts":129.35,
"repairsAndMaintenance":7490.32,
"financialCosts":5000.99,
"professionalFees":847.90,
"travelCosts":69.20,
"costOfServices":478.23,
"residentialFinancialCost":879.28,
"broughtFwdResidentialFinancialCost":846.13,
"other":138.92
"expenses": {
"premisesRunningCosts": 129.35,
"repairsAndMaintenance": 7490.32,
"financialCosts": 5000.99,
"professionalFees": 847.90,
"travelCosts": 69.20,
"costOfServices": 478.23,
"residentialFinancialCost": 879.28,
"broughtFwdResidentialFinancialCost": 846.13,
"other": 138.92
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"submittedOn": "2021-06-17T10:59:47.544Z",
"fromDate": "2020-01-29",
"toDate": "2020-04-29",
"submittedOn": "2025-07-07T10:59:47.544Z",
"fromDate": "2025-04-06",
"toDate": "2025-07-05",
"foreignProperty": [
{
"countryCode": "AFG",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"submittedOn": "2021-06-17T10:59:47.544Z",
"fromDate": "2020-01-29",
"toDate": "2020-04-29",
"submittedOn": "2025-07-07T10:59:47.544Z",
"fromDate": "2025-04-06",
"toDate": "2025-07-05",
"foreignProperty": [
{
"countryCode": "AFG",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"fromDate": "2025-04-05",
"toDate": "2025-05-01",
"fromDate": "2025-04-06",
"toDate": "2025-07-05",
"ukProperty": {
"income": {
"premiumsOfLeaseGrant": 42.12,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"fromDate": "2025-04-05",
"toDate": "2025-05-01",
"fromDate": "2025-04-06",
"toDate": "2025-07-05",
"ukProperty":{
"income": {
"premiumsOfLeaseGrant": 4889.23,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"submittedOn": "2022-10-21T10:59:47.544Z",
"fromDate": "2022-07-21",
"toDate": "2022-08-21",
"submittedOn": "2025-07-07T10:59:47.544Z",
"fromDate": "2025-04-06",
"toDate": "2025-07-05",
"ukProperty": {
"income": {
"premiumsOfLeaseGrant": 4889.23,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"submittedOn": "2023-10-21T10:59:47.544Z",
"fromDate": "2022-07-21",
"toDate": "2022-08-21",
"submittedOn": "2025-07-07T10:59:47.544Z",
"fromDate": "2025-04-06",
"toDate": "2025-07-05",
"ukProperty": {
"income": {
"premiumsOfLeaseGrant": 4889.23,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ description: |
### Test data
Scenario simulation using Gov-Test-Scenario headers is only available in the sandbox environment.
| Tax Years | Header Value (Gov_test-Scenario) | Scenario |
|-----------------|---------------------------------------------|-----------------------------------------------------------------------------------------------------|
| 2025-26 onwards | N/A - DEFAULT | Simulates success response. |
| 2025-26 onwards | NOT_FOUND | Simulates the scenario where no data is found. |
| 2025-26 onwards | STATEFUL | Performs a stateful create. |
| 2025-26 onwards | START_DATE_NOT_ALIGNED_TO_COMMENCEMENT_DATE | Simulates the scenario where the start date does not align to the commencement date. |
| 2025-26 onwards | END_DATE_NOT_ALIGNED_WITH_REPORTING_TYPE | Simulates the scenario where the end date does not align to the reporting type. |
| 2025-26 onwards | START_AND_END_DATE_NOT_ALLOWED | Simulates the scenario where the start/end date not accepted for annual/latent submission. |
| 2025-26 onwards | EARLY_DATA_SUBMISSION_NOT_ACCEPTED | Simulates the scenario where individuals cannot submit data more than 10 days before end of period. |
| 2025-26 onwards | OUTSIDE_AMENDMENT_WINDOW | Simulates the scenario where request cannot be completed as it is outside the amendment window. |
| 2025-26 onwards | DUPLICATE_COUNTRY_CODE | Simulates the scenario where the same country code has been submitted more twice |
| 2025-26 onwards | ADVANCE_SUBMISSION_REQUIRES_PERIOD_END_DATE | Simulates the scenario for advance submission where the end date must be the end of the period |
| 2025-26 onwards | SUBMISSION_END_DATE_CANNOT_MOVE_BACKWARDS | Simulates the scenario where the submission end date cannot be earlier than existing submission |
| 2025-26 onwards | START_DATE_NOT_ALIGNED_WITH_REPORTING_TYPE | Simulates the scenario where the start date does not align with the reporting type |
| Header Value (Gov_test-Scenario) | Scenario |
|---------------------------------------------|-----------------------------------------------------------------------------------------------------|
| N/A - DEFAULT | Simulates success response. |
| NOT_FOUND | Simulates the scenario where no data is found. |
| TAX_YEAR_NOT_SUPPORTED | Simulates the scenario where the tax year is not supported. |
| STATEFUL | Performs a stateful create or update. |
| START_DATE_NOT_ALIGNED_TO_COMMENCEMENT_DATE | Simulates the scenario where the start date does not align to the commencement date. |
| END_DATE_NOT_ALIGNED_WITH_REPORTING_TYPE | Simulates the scenario where the end date does not align to the reporting type. |
| MISSING_SUBMISSION_DATES | Simulates the scenario where the submission start/end date not provided. |
| START_AND_END_DATE_NOT_ALLOWED | Simulates the scenario where the start/end date not accepted for annual/latent submission. |
| EARLY_DATA_SUBMISSION_NOT_ACCEPTED | Simulates the scenario where individuals cannot submit data more than 10 days before end of period. |
| OUTSIDE_AMENDMENT_WINDOW | Simulates the scenario where request cannot be completed as it is outside the amendment window. |
| DUPLICATE_COUNTRY_CODE | Simulates the scenario where the same country code has been submitted more twice. |
| ADVANCE_SUBMISSION_REQUIRES_PERIOD_END_DATE | Simulates the scenario for advance submission where the end date must be the end of the period. |
| SUBMISSION_END_DATE_CANNOT_MOVE_BACKWARDS | Simulates the scenario where the submission end date cannot be earlier than existing submission. |
| START_DATE_NOT_ALIGNED_WITH_REPORTING_TYPE | Simulates the scenario where the start date does not align with the reporting type. |
tags:
- Foreign Property Cumulative Period Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ description: |
### Test data
Scenario simulation using Gov-Test-Scenario headers is only available in the sandbox environment.
| Tax Years | Header Value (Gov-Test-Scenario) | Scenario |
|-----------------|----------------------------------|--------------------------------------------------------------------------|
| 2025-26 onwards | N/A - DEFAULT | Simulates success response with Foreign Property. |
| 2025-26 onwards | NOT_FOUND | Simulates the scenario where no data is found. |
| 2025-26 onwards | FOREIGN_PROPERTY_FULL_EXPENSES | Simulates success response of a Foreign property with full expenses. |
| 2025-26 onwards | FOREIGN_PROPERTY_CONSOLIDATED | Simulates the scenario of a Foreign property with consolidated expenses. |
| 2025-26 onwards | UK_PROPERTY | Simulates the scenario where the type of business is incorrect. |
| 2025-26 onwards | STATEFUL | Performs a stateful retrieve. |
| Header Value (Gov-Test-Scenario) | Scenario |
|----------------------------------|--------------------------------------------------------------------------|
| N/A - DEFAULT | Simulates success response with Foreign Property. |
| NOT_FOUND | Simulates the scenario where no data is found. |
| TAX_YEAR_NOT_SUPPORTED | Simulates the scenario where the tax year is not supported. |
| FOREIGN_PROPERTY_FULL_EXPENSES | Simulates success response of a Foreign property with full expenses. |
| FOREIGN_PROPERTY_CONSOLIDATED | Simulates the scenario of a Foreign property with consolidated expenses. |
| UK_PROPERTY | Simulates the scenario where the type of business is incorrect. |
| STATEFUL | Performs a stateful retrieve. |
tags:
- Foreign Property Cumulative Period Summary
Expand Down
Loading

0 comments on commit 5f69fa3

Please sign in to comment.