-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
APB-9105 APB-9089 read invitation from ACR (#516)
- Loading branch information
Showing
15 changed files
with
577 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app/uk/gov/hmrc/agentclientauthorisation/model/AgentInvitation.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2025 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.agentclientauthorisation.model | ||
|
||
import play.api.libs.json.{Json, OFormat} | ||
import uk.gov.hmrc.agentmtdidentifiers.model.Service | ||
|
||
/** Information provided by the agent to offer representation to HMRC */ | ||
case class AgentInvitation(service: String, clientType: Option[String], clientIdType: String, clientId: String) { | ||
|
||
lazy val getService: Service = Service.forId(service) | ||
} | ||
|
||
object AgentInvitation { | ||
implicit val format: OFormat[AgentInvitation] = Json.format[AgentInvitation] | ||
|
||
def normalizeClientId(clientId: String): String = clientId.replaceAll("\\s", "") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
app/uk/gov/hmrc/agentclientauthorisation/model/InvitationInfo.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright 2025 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.agentclientauthorisation.model | ||
|
||
import play.api.libs.json.{Json, OFormat} | ||
import uk.gov.hmrc.agentmtdidentifiers.model.{Arn, InvitationId, Service} | ||
|
||
import java.time.LocalDate | ||
|
||
case class InvitationInfo( | ||
invitationId: InvitationId, | ||
expiryDate: LocalDate, | ||
status: InvitationStatus, | ||
arn: Arn, | ||
service: Service, | ||
isRelationshipEnded: Boolean = false, | ||
relationshipEndedBy: Option[String] = None, | ||
events: List[StatusChangeEvent], | ||
isAltItsa: Boolean = false | ||
) | ||
|
||
object InvitationInfo { | ||
implicit val format: OFormat[InvitationInfo] = Json.format[InvitationInfo] | ||
} |
Oops, something went wrong.