Skip to content

Commit

Permalink
Merge pull request #550 from hmrc/MTDSA-25964-3
Browse files Browse the repository at this point in the history
MTDSA-25964 Rename costOfReplacingDomesticItems
  • Loading branch information
naglisr authored Dec 10, 2024
2 parents 324c53a + efb42bd commit 79ffa68
Show file tree
Hide file tree
Showing 32 changed files with 51 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Def1_CreateAmendUkPropertyAnnualSubmissionRulesValidator extends RulesVali
(allowances.flatMap(_.zeroEmissionsGoodsVehicleAllowance), "/ukProperty/allowances/zeroEmissionsGoodsVehicleAllowance"),
(allowances.flatMap(_.businessPremisesRenovationAllowance), "/ukProperty/allowances/businessPremisesRenovationAllowance"),
(allowances.flatMap(_.otherCapitalAllowance), "/ukProperty/allowances/otherCapitalAllowance"),
(allowances.flatMap(_.costOfReplacingDomesticGoods), "/ukProperty/allowances/costOfReplacingDomesticGoods"),
(allowances.flatMap(_.costOfReplacingDomesticItems), "/ukProperty/allowances/costOfReplacingDomesticItems"),
(allowances.flatMap(_.electricChargePointAllowance), "/ukProperty/allowances/electricChargePointAllowance"),
(allowances.flatMap(_.zeroEmissionsCarAllowance), "/ukProperty/allowances/zeroEmissionsCarAllowance")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ case class CreateAmendUkPropertyAllowances(annualInvestmentAllowance: Option[Big
zeroEmissionsGoodsVehicleAllowance: Option[BigDecimal],
businessPremisesRenovationAllowance: Option[BigDecimal],
otherCapitalAllowance: Option[BigDecimal],
costOfReplacingDomesticGoods: Option[BigDecimal],
costOfReplacingDomesticItems: Option[BigDecimal],
electricChargePointAllowance: Option[BigDecimal],
zeroEmissionsCarAllowance: Option[BigDecimal],
propertyIncomeAllowance: Option[BigDecimal],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Def2_CreateAmendUkPropertyAnnualSubmissionRulesValidator extends RulesVali
(allowances.flatMap(_.zeroEmissionsGoodsVehicleAllowance), "/ukProperty/allowances/zeroEmissionsGoodsVehicleAllowance"),
(allowances.flatMap(_.businessPremisesRenovationAllowance), "/ukProperty/allowances/businessPremisesRenovationAllowance"),
(allowances.flatMap(_.otherCapitalAllowance), "/ukProperty/allowances/otherCapitalAllowance"),
(allowances.flatMap(_.costOfReplacingDomesticGoods), "/ukProperty/allowances/costOfReplacingDomesticGoods"),
(allowances.flatMap(_.costOfReplacingDomesticItems), "/ukProperty/allowances/costOfReplacingDomesticItems"),
(allowances.flatMap(_.zeroEmissionsCarAllowance), "/ukProperty/allowances/zeroEmissionsCarAllowance")
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ case class Allowances(annualInvestmentAllowance: Option[BigDecimal],
zeroEmissionsGoodsVehicleAllowance: Option[BigDecimal],
businessPremisesRenovationAllowance: Option[BigDecimal],
otherCapitalAllowance: Option[BigDecimal],
costOfReplacingDomesticGoods: Option[BigDecimal],
costOfReplacingDomesticItems: Option[BigDecimal],
zeroEmissionsCarAllowance: Option[BigDecimal],
propertyIncomeAllowance: Option[BigDecimal],
structuredBuildingAllowance: Option[Seq[StructuredBuildingAllowance]],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ case class RetrieveUkPropertyAllowances(
zeroEmissionsGoodsVehicleAllowance: Option[BigDecimal],
businessPremisesRenovationAllowance: Option[BigDecimal],
otherCapitalAllowance: Option[BigDecimal],
costOfReplacingDomesticGoods: Option[BigDecimal],
costOfReplacingDomesticItems: Option[BigDecimal],
propertyIncomeAllowance: Option[BigDecimal],
electricChargePointAllowance: Option[BigDecimal],
structuredBuildingAllowance: Option[Seq[RetrieveUkPropertyStructuredBuildingAllowance]],
Expand All @@ -33,7 +33,8 @@ case class RetrieveUkPropertyAllowances(
)

object RetrieveUkPropertyAllowances {
implicit val writes: OWrites[RetrieveUkPropertyAllowances] = Json.writes[RetrieveUkPropertyAllowances]

implicit val writes: OWrites[RetrieveUkPropertyAllowances] = Json.writes

implicit val reads: Reads[RetrieveUkPropertyAllowances] = (
(JsPath \ "annualInvestmentAllowance").readNullable[BigDecimal] and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ case class RetrieveUkPropertyAllowances(
zeroEmissionsGoodsVehicleAllowance: Option[BigDecimal],
businessPremisesRenovationAllowance: Option[BigDecimal],
otherCapitalAllowance: Option[BigDecimal],
costOfReplacingDomesticGoods: Option[BigDecimal],
costOfReplacingDomesticItems: Option[BigDecimal],
propertyIncomeAllowance: Option[BigDecimal],
structuredBuildingAllowance: Option[Seq[RetrieveUkPropertyStructuredBuildingAllowance]],
enhancedStructuredBuildingAllowance: Option[Seq[RetrieveUkPropertyStructuredBuildingAllowance]],
zeroEmissionsCarAllowance: Option[BigDecimal]
)

object RetrieveUkPropertyAllowances {
implicit val writes: OWrites[RetrieveUkPropertyAllowances] = Json.writes[RetrieveUkPropertyAllowances]

implicit val writes: OWrites[RetrieveUkPropertyAllowances] = Json.writes

implicit val reads: Reads[RetrieveUkPropertyAllowances] = (
(JsPath \ "annualInvestmentAllowance").readNullable[BigDecimal] and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class Def1_CreateAmendUkPropertyAnnualSubmissionISpec extends IntegrationBaseSpe
| "zeroEmissionsGoodsVehicleAllowance": 2000.6567890,
| "businessPremisesRenovationAllowance": 2000.75678900,
| "otherCapitalAllowance": 2000.56789080,
| "costOfReplacingDomesticGoods": 2000.95678900,
| "costOfReplacingDomesticItems": 2000.95678900,
| "electricChargePointAllowance": 3000.1567890,
| "structuredBuildingAllowance": [
| {
Expand Down Expand Up @@ -297,7 +297,7 @@ class Def1_CreateAmendUkPropertyAnnualSubmissionISpec extends IntegrationBaseSpe
"/ukProperty/allowances/zeroEmissionsGoodsVehicleAllowance",
"/ukProperty/allowances/businessPremisesRenovationAllowance",
"/ukProperty/allowances/otherCapitalAllowance",
"/ukProperty/allowances/costOfReplacingDomesticGoods",
"/ukProperty/allowances/costOfReplacingDomesticItems",
"/ukProperty/allowances/electricChargePointAllowance",
"/ukProperty/allowances/zeroEmissionsCarAllowance",
"/ukProperty/allowances/structuredBuildingAllowance/0/firstYear/qualifyingAmountExpenditure",
Expand Down Expand Up @@ -423,7 +423,7 @@ class Def1_CreateAmendUkPropertyAnnualSubmissionISpec extends IntegrationBaseSpe
| "zeroEmissionsGoodsVehicleAllowance": 2000.6235450,
| "businessPremisesRenovationAllowance": 2000.745360,
| "otherCapitalAllowance": 2000.8243520,
| "costOfReplacingDomesticGoods": 2000.9064532,
| "costOfReplacingDomesticItems": 2000.9064532,
| "electricChargePointAllowance": 3000.1234520,
| "structuredBuildingAllowance": [
| {
Expand Down Expand Up @@ -763,7 +763,7 @@ class Def1_CreateAmendUkPropertyAnnualSubmissionISpec extends IntegrationBaseSpe
"/ukProperty/allowances/zeroEmissionsGoodsVehicleAllowance",
"/ukProperty/allowances/businessPremisesRenovationAllowance",
"/ukProperty/allowances/otherCapitalAllowance",
"/ukProperty/allowances/costOfReplacingDomesticGoods",
"/ukProperty/allowances/costOfReplacingDomesticItems",
"/ukProperty/allowances/electricChargePointAllowance",
"/ukProperty/allowances/zeroEmissionsCarAllowance",
"/ukProperty/allowances/structuredBuildingAllowance/0/firstYear/qualifyingAmountExpenditure",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class Def2_CreateAmendUkPropertyAnnualSubmissionISpec extends IntegrationBaseSpe
| "zeroEmissionsGoodsVehicleAllowance": 2000.6567890,
| "businessPremisesRenovationAllowance": 2000.75678900,
| "otherCapitalAllowance": 2000.56789080,
| "costOfReplacingDomesticGoods": 2000.95678900,
| "costOfReplacingDomesticItems": 2000.95678900,
| "structuredBuildingAllowance": [
| {
| "amount": 3000.36780,
Expand Down Expand Up @@ -238,7 +238,7 @@ class Def2_CreateAmendUkPropertyAnnualSubmissionISpec extends IntegrationBaseSpe
"/ukProperty/allowances/zeroEmissionsGoodsVehicleAllowance",
"/ukProperty/allowances/businessPremisesRenovationAllowance",
"/ukProperty/allowances/otherCapitalAllowance",
"/ukProperty/allowances/costOfReplacingDomesticGoods",
"/ukProperty/allowances/costOfReplacingDomesticItems",
"/ukProperty/allowances/zeroEmissionsCarAllowance",
"/ukProperty/allowances/structuredBuildingAllowance/0/firstYear/qualifyingAmountExpenditure",
"/ukProperty/allowances/structuredBuildingAllowance/0/amount",
Expand Down Expand Up @@ -324,7 +324,7 @@ class Def2_CreateAmendUkPropertyAnnualSubmissionISpec extends IntegrationBaseSpe
| "zeroEmissionsGoodsVehicleAllowance": 2000.6235450,
| "businessPremisesRenovationAllowance": 2000.745360,
| "otherCapitalAllowance": 2000.8243520,
| "costOfReplacingDomesticGoods": 2000.9064532,
| "costOfReplacingDomesticItems": 2000.9064532,
| "structuredBuildingAllowance": [
| {
| "amount": 3000.303645,
Expand Down Expand Up @@ -575,7 +575,7 @@ class Def2_CreateAmendUkPropertyAnnualSubmissionISpec extends IntegrationBaseSpe
"/ukProperty/allowances/zeroEmissionsGoodsVehicleAllowance",
"/ukProperty/allowances/businessPremisesRenovationAllowance",
"/ukProperty/allowances/otherCapitalAllowance",
"/ukProperty/allowances/costOfReplacingDomesticGoods",
"/ukProperty/allowances/costOfReplacingDomesticItems",
"/ukProperty/allowances/zeroEmissionsCarAllowance",
"/ukProperty/allowances/structuredBuildingAllowance/0/firstYear/qualifyingAmountExpenditure",
"/ukProperty/allowances/structuredBuildingAllowance/0/amount",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Def2_RetrieveUkPropertyAnnualSubmissionISpec extends IntegrationBaseSpec {
| "zeroEmissionsGoodsVehicleAllowance": 456.34,
| "businessPremisesRenovationAllowance": 573.45,
| "otherCapitalAllowance": 452.34,
| "costOfReplacingDomesticGoods": 567.34,
| "costOfReplacingDomesticItems": 567.34,
| "propertyIncomeAllowance": 342.34,
| "structuredBuildingAllowance": [
| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"zeroEmissionsGoodsVehicleAllowance": 456.34,
"businessPremisesRenovationAllowance": 573.45,
"otherCapitalAllowance": 452.34,
"costOfReplacingDomesticGoods": 567.34,
"costOfReplacingDomesticItems": 567.34,
"electricChargePointAllowance": 454.34,
"structuredBuildingAllowance": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"zeroEmissionsGoodsVehicleAllowance": 456.34,
"businessPremisesRenovationAllowance": 573.45,
"otherCapitalAllowance": 452.34,
"costOfReplacingDomesticGoods": 567.34,
"costOfReplacingDomesticItems": 567.34,
"structuredBuildingAllowance": [
{
"amount": 234.34,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"zeroEmissionsGoodsVehicleAllowance":456.34,
"businessPremisesRenovationAllowance":573.45,
"otherCapitalAllowance":452.34,
"costOfReplacingDomesticGoods":567.34,
"costOfReplacingDomesticItems":567.34,
"electricChargePointAllowance":454.34,
"structuredBuildingAllowance":[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"zeroEmissionsGoodsVehicleAllowance":456.34,
"businessPremisesRenovationAllowance":573.45,
"otherCapitalAllowance":452.34,
"costOfReplacingDomesticGoods":567.34,
"costOfReplacingDomesticItems":567.34,
"structuredBuildingAllowance":[
{
"amount":234.34,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
"maximum": 99999999999.99,
"example": "5000.99"
},
"costOfReplacingDomesticGoods": {
"costOfReplacingDomesticItems": {
"type": "number",
"description": "Cost of Replacing Domestic Items - formerly Wear and Tear allowance. The value must be between 0 and 99999999999.99 up to 2 decimal places.",
"multipleOf": 0.01,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"maximum": 99999999999.99,
"example": "5000.99"
},
"costOfReplacingDomesticGoods": {
"costOfReplacingDomesticItems": {
"type": "number",
"description": "Cost of Replacing Domestic Items - formerly Wear and Tear allowance. The value must be between 0 and 99999999999.99 up to 2 decimal places.",
"multipleOf": 0.01,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"description": "All other capital allowances. The value must be between 0 and 99999999999.99 up to 2 decimal places.",
"example": "5000.99"
},
"costOfReplacingDomesticGoods": {
"costOfReplacingDomesticItems": {
"type": "number",
"description": "Cost of Replacing Domestic Items - formerly Wear and Tear allowance. The value must be between 0 and 99999999999.99 up to 2 decimal places.",
"example": "5000.99"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"description": "All other capital allowances. The value must be between 0 and 99999999999.99 up to 2 decimal places.",
"example": "5000.99"
},
"costOfReplacingDomesticGoods": {
"costOfReplacingDomesticItems": {
"type": "number",
"description": "Cost of Replacing Domestic Items - formerly Wear and Tear allowance. The value must be between 0 and 99999999999.99 up to 2 decimal places.",
"example": "5000.99"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Def1_CreateAmendUkPropertyAnnualSubmissionValidatorSpec extends UnitSpec w
| "zeroEmissionsGoodsVehicleAllowance": 456.34,
| "businessPremisesRenovationAllowance": 573.45,
| "otherCapitalAllowance": 452.34,
| "costOfReplacingDomesticGoods": 567.34,
| "costOfReplacingDomesticItems": 567.34,
| "electricChargePointAllowance": 454.34,
| "structuredBuildingAllowance": ${JsArray(structuredBuildingAllowanceEntries)},
| "enhancedStructuredBuildingAllowance": ${JsArray(enhancedStructuredBuildingAllowance)},
Expand Down Expand Up @@ -492,7 +492,7 @@ class Def1_CreateAmendUkPropertyAnnualSubmissionValidatorSpec extends UnitSpec w
"/ukProperty/allowances/zeroEmissionsGoodsVehicleAllowance",
"/ukProperty/allowances/businessPremisesRenovationAllowance",
"/ukProperty/allowances/otherCapitalAllowance",
"/ukProperty/allowances/costOfReplacingDomesticGoods",
"/ukProperty/allowances/costOfReplacingDomesticItems",
"/ukProperty/allowances/electricChargePointAllowance",
"/ukProperty/allowances/zeroEmissionsCarAllowance",
"/ukProperty/adjustments/balancingCharge",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Def1_CreateAmendUkPropertyAnnualSubmissionRequestBodySpec extends UnitSpec
| "zeroEmissionsGoodsVehicleAllowance": 2000.60,
| "businessPremisesRenovationAllowance": 2000.70,
| "otherCapitalAllowance": 2000.80,
| "costOfReplacingDomesticGoods": 2000.90,
| "costOfReplacingDomesticItems": 2000.90,
| "electricChargePointAllowance": 3000.10,
| "structuredBuildingAllowance": [
| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class CreateAmendUkPropertyAllowancesSpec extends UnitSpec {
| "zeroEmissionsGoodsVehicleAllowance": 2000.60,
| "businessPremisesRenovationAllowance": 2000.70,
| "otherCapitalAllowance": 2000.80,
| "costOfReplacingDomesticGoods": 2000.90,
| "costOfReplacingDomesticItems": 2000.90,
| "electricChargePointAllowance": 3000.10,
| "structuredBuildingAllowance": [
| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CreateAmendUkPropertySpec extends UnitSpec {
| "zeroEmissionsGoodsVehicleAllowance": 2000.60,
| "businessPremisesRenovationAllowance": 2000.70,
| "otherCapitalAllowance": 2000.80,
| "costOfReplacingDomesticGoods": 2000.90,
| "costOfReplacingDomesticItems": 2000.90,
| "electricChargePointAllowance": 3000.10,
| "structuredBuildingAllowance": [
| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Def2_CreateAmendUkPropertyAnnualSubmissionValidatorSpec extends UnitSpec w
| "zeroEmissionsGoodsVehicleAllowance": 456.34,
| "businessPremisesRenovationAllowance": 573.45,
| "otherCapitalAllowance": 452.34,
| "costOfReplacingDomesticGoods": 567.34,
| "costOfReplacingDomesticItems": 567.34,
| "electricChargePointAllowance": 454.34,
| "structuredBuildingAllowance": ${JsArray(structuredBuildingAllowanceEntries)},
| "enhancedStructuredBuildingAllowance": ${JsArray(enhancedStructuredBuildingAllowance)},
Expand Down Expand Up @@ -320,7 +320,7 @@ class Def2_CreateAmendUkPropertyAnnualSubmissionValidatorSpec extends UnitSpec w
"/ukProperty/allowances/zeroEmissionsGoodsVehicleAllowance",
"/ukProperty/allowances/businessPremisesRenovationAllowance",
"/ukProperty/allowances/otherCapitalAllowance",
"/ukProperty/allowances/costOfReplacingDomesticGoods",
"/ukProperty/allowances/costOfReplacingDomesticItems",
"/ukProperty/allowances/zeroEmissionsCarAllowance",
"/ukProperty/adjustments/balancingCharge",
"/ukProperty/adjustments/privateUseAdjustment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class AllowancesSpec extends UnitSpec {
| "zeroEmissionsGoodsVehicleAllowance": 2000.60,
| "businessPremisesRenovationAllowance": 2000.70,
| "otherCapitalAllowance": 2000.80,
| "costOfReplacingDomesticGoods": 2000.90,
| "costOfReplacingDomesticItems": 2000.90,
| "structuredBuildingAllowance": [
| {
| "amount": 3000.30,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Def2_CreateAmendUkPropertyAnnualSubmissionRequestBodySpec extends UnitSpec
| "zeroEmissionsGoodsVehicleAllowance": 2000.60,
| "businessPremisesRenovationAllowance": 2000.70,
| "otherCapitalAllowance": 2000.80,
| "costOfReplacingDomesticGoods": 2000.90,
| "costOfReplacingDomesticItems": 2000.90,
| "structuredBuildingAllowance": [
| {
| "amount": 3000.30,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class UkPropertySpec extends UnitSpec {
| "zeroEmissionsGoodsVehicleAllowance": 2000.60,
| "businessPremisesRenovationAllowance": 2000.70,
| "otherCapitalAllowance": 2000.80,
| "costOfReplacingDomesticGoods": 2000.90,
| "costOfReplacingDomesticItems": 2000.90,
| "structuredBuildingAllowance": [
| {
| "amount": 3000.30,
Expand Down
Loading

0 comments on commit 79ffa68

Please sign in to comment.