in lambda/src/main/scala/pricemigrationengine/handlers/NotificationHandler.scala [373:386]
def country(
cohortSpec: CohortSpec,
address: SalesforceAddress
): Either[NotificationHandlerFailure, String] = {
// The country is usually a required field, this came from the old print migrations. It was
// not required for the 2023 digital migrations. Although technically required for
// the 2024 print migration, "United Kingdom" can be substituted for missing values considering
// that we are only delivery in the UK.
MigrationType(cohortSpec) match {
case Newspaper2024 => Right(address.country.getOrElse("United Kingdom"))
case SupporterPlus2024 => Right(address.country.getOrElse(""))
case _ => requiredField(address.country, "Contact.OtherAddress.country")
}
}