Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIR-1729: Add cir email verification template #1196

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions app/preview/TemplateParams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ object TemplateParams {
"tradingName" -> "ABC Accountants Ltd",
"receivedDate" -> "20190214"
),
"cir_email_verification_code" -> Map(
"team_name" -> "CIR",
"verification_code" -> "ABCDEF"
),
"cir_email_verification_code_welsh" -> Map(
"team_name" -> "CIR",
"verification_code" -> "ABCDEF"
),
"client_rejected_authorisation_request" -> Map(
"agencyName" -> "Agent 1",
"clientName" -> "Client 2",
Expand Down Expand Up @@ -1752,6 +1760,14 @@ object TemplateParams2 {
"cir_appointment_confirmation" -> Map(
"" -> ""
),
"cir_email_verification_code" -> Map(
"team_name" -> "CIR",
"verification_code" -> "ABCDEG"
),
"cir_email_verification_code_welsh" -> Map(
"team_name" -> "CIR",
"verification_code" -> "ABCDEG"
),
"eeitt_ce930_confirmation" -> Map(
"" -> ""
),
Expand Down Expand Up @@ -3499,6 +3515,14 @@ object TemplateParams3 {
"cds_code" -> Map(
"confirmationCode" -> "HGDY"
),
"cir_email_verification_code" -> Map(
"team_name" -> "CIR",
"verification_code" -> "ABCDEH"
),
"cir_email_verification_code_welsh" -> Map(
"team_name" -> "CIR",
"verification_code" -> "ABCDEH"
),
"face_to_face_payment_email_successful_cy" -> Map(
"totalAmountInPence" -> "100000",
"transactionReference" -> "4012637",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ object ServiceIdentifier {
case object BusinessRates extends ServiceIdentifier { override val name = "bars" }
case object Charities extends ServiceIdentifier { override val name = "charities" }
case object Childcare extends ServiceIdentifier { override val name = "cc" }
case object CIPInsightsAndReputation extends ServiceIdentifier { override val name = "cir" }
case object CompanyAccountsTaxOnline extends ServiceIdentifier { override val name = "cato" }
case object CorporationTax extends ServiceIdentifier { override val name = "ct" }
case object CountryByCountryReportingNew extends ServiceIdentifier { override val name = "cbcr_new" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import uk.gov.hmrc.hmrcemailrenderer.templates.awrs.AwrsTemplates
import uk.gov.hmrc.hmrcemailrenderer.templates.bars.BarsTemplates
import uk.gov.hmrc.hmrcemailrenderer.templates.cbcr.CBCRTemplates
import uk.gov.hmrc.hmrcemailrenderer.templates.cbcrnew.CBCRNewTemplates
import uk.gov.hmrc.hmrcemailrenderer.templates.cir.CirTemplates
import uk.gov.hmrc.hmrcemailrenderer.templates.crsfatca.CRSFatcaTemplates
import uk.gov.hmrc.hmrcemailrenderer.templates.cds.cdsTestTemplates
import uk.gov.hmrc.hmrcemailrenderer.templates.childcare.ChildcareTemplates
Expand Down Expand Up @@ -110,6 +111,7 @@ trait TemplateLocator {
"ARS" -> ArsTemplates.templates,
"BARS" -> BarsTemplates.templates,
"Childcare" -> ChildcareTemplates.templates,
"CIR" -> CirTemplates.templates,
"DAC6" -> Dac6Templates.templates,
"DASS" -> DASSTemplates.templates,
"MDR" -> MdrTemplates.templates,
Expand Down
45 changes: 45 additions & 0 deletions app/uk/gov/hmrc/hmrcemailrenderer/templates/cir/CirTemplates.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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.
*/

package uk.gov.hmrc.hmrcemailrenderer.templates.cir

import uk.gov.hmrc.hmrcemailrenderer.domain.{ MessagePriority, MessageTemplate }
import uk.gov.hmrc.hmrcemailrenderer.templates.FromAddress
import uk.gov.hmrc.hmrcemailrenderer.templates.ServiceIdentifier.CIPInsightsAndReputation

object CirTemplates {

val templates = Seq(
MessageTemplate.create(
templateId = "cir_email_verification_code",
fromAddress = FromAddress.noReply("CIP Insights and Reputation"),
service = CIPInsightsAndReputation,
subject = "Your email confirmation code",
plainTemplate = txt.EmailVerification.f,
htmlTemplate = html.EmailVerification.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "cir_email_verification_code_welsh",
fromAddress = FromAddress.noReply("CIP Insights and Reputation"),
service = CIPInsightsAndReputation,
subject = "Eich cod gwirio e-bost",
plainTemplate = txt.EmailVerificationWelsh.f,
htmlTemplate = html.EmailVerificationWelsh.f,
priority = Some(MessagePriority.Urgent)
)
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@*
* 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, "Verify your email address") {
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Dear Customer</p>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">You requested a code to verify your
email address.</p>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Your code is:
<b>@params("verification_code")</b>
</p>
<h2 style="; margin: 0 0 30px 0;">What you need to do now</h2>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Return to the service to use this code. The code can only be used once. </p>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">If this email account is not shared and you did not request this code, you need to contact HMRC.</p>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Do not reply to this email. </p>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">From HMRC</p>


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@(params: Map[String, Any])Verify your email address

Dear Customer

You requested a code to verify your email address.

Your code is: @params("verification_code")

What you need to do now

Return to the service to use this code. The code can only be used once.

If this email account is not shared and you did not request this code, you need to contact HMRC.

Do not reply to this email.

From HMRC
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@*
* 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, "Gwirio’ch cyfeiriad e-bost", isWelsh = true) {
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Annwyl Gwsmer</p>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Rydych wedi gofyn am god i wirio eich
Cyfeiriad e-bost.</p>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Eich cod yw:
<b>@params("verification_code")</b>
</p>
<h2 style="margin: 0 0 30px 0;">Yr hyn y mae’n rhaid i chi ei wneud nawr</h2>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Dychwelwch at y gwasanaeth i ddefnyddio’r cod hwn. Dim ond unwaith y gellir defnyddio’r cod. </p>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Os nad yw’r cyfrif e-bost hwn yn cael ei rannu, ac ni wnaethoch ofyn am y cod hwn, mae’n rhaid i chi gysylltu â CThEF.</p>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Peidiwch ag ymateb i’r e-bost hwn. </p>
<p style="font-size: 19px; line-height: 1.315789474; margin: 0 0 30px 0;">Gan y HMRC</p>


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@(params: Map[String, Any])Gwirio’ch cyfeiriad e-bost

Annwyl Gwsmer

Rydych wedi gofyn am god i wirio eich Cyfeiriad e-bost.

Eich cod yw: @params("verification_code")

Yr hyn y mae’n rhaid i chi ei wneud nawr

Dychwelwch at y gwasanaeth i ddefnyddio’r cod hwn. Dim ond unwaith y gellir defnyddio’r cod.

Os nad yw’r cyfrif e-bost hwn yn cael ei rannu, ac ni wnaethoch ofyn am y cod hwn, mae’n rhaid i chi gysylltu â CThEF.

Peidiwch ag ymateb i’r e-bost hwn.

Gan y HMRC
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ class TemplateLocatorSpec extends AnyWordSpecLike with should.Matchers with Opti
"DASS",
"IOSS",
"DPRS",
"TGP"
"TGP",
"CIR"
)
}

Expand Down Expand Up @@ -334,6 +335,8 @@ class TemplateLocatorSpec extends AnyWordSpecLike with should.Matchers with Opti
"childcare_taxfree_england_B",
"cir_appointment_confirmation",
"cir_appointment_confirmation_cy",
"cir_email_verification_code",
"cir_email_verification_code_welsh",
"cir_return_confirmation",
"cir_return_confirmation_cy",
"cir_revocation_confirmation",
Expand Down