Skip to content

Commit

Permalink
Merge pull request #61 from hmrc/api4update
Browse files Browse the repository at this point in the history
updated api4 calls to include the new schema and regime
  • Loading branch information
MJCallahanPage authored Mar 10, 2017
2 parents a0ad6e3 + e6a202e commit 5fd9e9e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/registration/RegistrationRequestModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ package models.registration
import play.api.libs.json.Json

case class RegistrationRequestModel(isAnAgent: Boolean,
requiresNameMatch: Boolean = false)
requiresNameMatch: Boolean = false,
final val regime: String = RegistrationRequestModel.taxRegime)

object RegistrationRequestModel {

final val taxRegime: String = "ITSA"
implicit val format = Json.format[RegistrationRequestModel]

}
8 changes: 8 additions & 0 deletions test/resources/schemas/new_registration_request.schema
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@
"oneOf": [
{
"required": [
"regime",
"requiresNameMatch",
"isAnAgent",
"individual"
]
},
{
"required": [
"regime",
"requiresNameMatch",
"isAnAgent",
"organisation"
Expand All @@ -60,6 +62,11 @@
"noIndividualOrOrganisation": {
"type": "object",
"properties": {
"regime": {
"description": "The type of Tax Regime. Values for regime: ATED, AWRS, AMLS, CDS, DDS, TAVC, ITSA",
"type": "string",
"pattern": "^[A-Z]{3,10}$"
},
"requiresNameMatch": {
"description": "Boolean value to indicate whether or not matching by name is required",
"type": "boolean",
Expand All @@ -73,6 +80,7 @@
}
},
"required": [
"regime",
"requiresNameMatch",
"isAnAgent"
],
Expand Down

0 comments on commit 5fd9e9e

Please sign in to comment.