Skip to content

Commit

Permalink
Merge pull request #47 from scullythornton1/ITSASU-295
Browse files Browse the repository at this point in the history
ITSASU-295: create taxId file for Itsa to add in tax Identifier
  • Loading branch information
ShaneTN authored Jul 28, 2021
2 parents b49d8be + 63e21c8 commit 72aa55d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
30 changes: 30 additions & 0 deletions src/main/scala/uk/gov/hmrc/domain/HmrcMtdItsa.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package uk.gov.hmrc.domain

import play.api.libs.json.{Reads, Writes}

case class HmrcMtdItsa(org: String) extends TaxIdentifier with SimpleName {
override def toString = value
val name = "HMRC-MTD-IT"
def value = org
}

object HmrcMtdItsa extends (String => HmrcMtdItsa) {
implicit val orgWrite: Writes[HmrcMtdItsa] = new SimpleObjectWrites[HmrcMtdItsa](_.value)
implicit val orgRead: Reads[HmrcMtdItsa] = new SimpleObjectReads[HmrcMtdItsa]("HMRC-MTD-IT", HmrcMtdItsa.apply)
}
3 changes: 2 additions & 1 deletion src/main/scala/uk/gov/hmrc/domain/taxIds.scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ object TaxIds {
SerialisableTaxId("agentbusinessutr", AgentBusinessUtr.apply),
SerialisableTaxId("psaid", PsaId.apply),
SerialisableTaxId("HMRC-OBTDS-ORG", HmrcObtdsOrg.apply),
SerialisableTaxId("HMRC-MTD-VAT", HmrcMtdVat.apply)
SerialisableTaxId("HMRC-MTD-VAT", HmrcMtdVat.apply),
SerialisableTaxId("HMRC-MTD-IT", HmrcMtdItsa.apply)
)
}

Expand Down

0 comments on commit 72aa55d

Please sign in to comment.