Skip to content

Commit

Permalink
HIPP-1365 - added HIP API ownership email templates (#1170)
Browse files Browse the repository at this point in the history
* HIPP-1365 - added HIP API ownership email templates

* HIPP-1365 - content updates following DC feedback
  • Loading branch information
rdawson-hmrc authored Jul 11, 2024
1 parent 1b2b55d commit 841822d
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/preview/TemplateParams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1652,6 +1652,15 @@ object TemplateParams2 {
"hipp_application_deleted_team" -> Map(
"applicationname" -> "Test-Hipp-App"
),
"hipp_api_ownership_added_email" -> Map(
"teamname" -> "My Team",
"apispecificationname" -> "API Name"
),
"hipp_api_ownership_removed_email" -> Map(
"teamname" -> "My Team",
"otherteamname" -> "New API Team",
"apispecificationname" -> "API Name"
),
"chargeable_return_submit" -> Map(
"first_name" -> "FirstName",
"last_name" -> "SecondName",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@*
* Copyright 2023 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.
*@

@(params: Map[String, Any])
@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "There has been a change of API ownership"){
<p style="margin: 0 0 30px; font-size: 19px;">Your team @params("teamname") is the new owner of @params("apispecificationname").</p>
<p style="margin: 0 0 30px; font-size: 19px;">To view this change, visit /api-hub on the MDTP admin network.</p>
<p style="margin: 0 0 30px; font-size: 19px;">If this is an error, please follow the Get Support link on the Hub.</p>
<p style="margin: 0 0 30px; font-size: 19px;">From HMRC The Integration Hub</p>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@(params: Map[String, Any])
Your team @params("teamname") is the new owner of @params("apispecificationname").
To view this change, visit /api-hub on the MDTP admin network.
If this is an error, please follow the Get Support link on the Hub.
From HMRC The Integration Hub
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@*
* Copyright 2023 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.
*@

@(params: Map[String, Any])
@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "There has been a change of API ownership"){
<p style="margin: 0 0 30px; font-size: 19px;">Your team @params("teamname") is no longer the owner of @params("apispecificationname"). The team @params("otherteamname") is now the new owner of this API.</p>
<p style="margin: 0 0 30px; font-size: 19px;">To view this change, visit /api-hub on the MDTP admin network.</p>
<p style="margin: 0 0 30px; font-size: 19px;">If this is an error, please follow the Get Support link on the Hub.</p>
<p style="margin: 0 0 30px; font-size: 19px;">From HMRC The Integration Hub</p>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@(params: Map[String, Any])
Your team @params("teamname") is no longer the owner of @params("apispecificationname"). The team @params("otherteamname") is now the new owner of this API.
To view this change, visit /api-hub on the MDTP admin network.
If this is an error, please follow the Get Support link on the Hub.
From HMRC The Integration Hub
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,24 @@ object HippTemplates {
plainTemplate = txt.ProductionAccessRequestSubmitted.f,
htmlTemplate = html.ProductionAccessRequestSubmitted.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_api_ownership_added_email",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "There has been a change of API ownership",
plainTemplate = txt.ApiOwnershipAdded.f,
htmlTemplate = html.ApiOwnershipAdded.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_api_ownership_removed_email",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "There has been a change of API ownership",
plainTemplate = txt.ApiOwnershipRemoved.f,
htmlTemplate = html.ApiOwnershipRemoved.f,
priority = Some(MessagePriority.Urgent)
)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,8 @@ class TemplateLocatorSpec extends AnyWordSpecLike with should.Matchers with Opti
"hipp_application_deleted",
"hipp_application_deleted_team",
"hipp_remove_team_member_from_app_email",
"hipp_api_ownership_added_email",
"hipp_api_ownership_removed_email",
"ho10_confirmation_submission",
"ho10_confirmation_submission_cy",
"ho5_code",
Expand Down

0 comments on commit 841822d

Please sign in to comment.