def plansFor()

in app/conf/PaperPlans.scala [34:60]


  def plansFor(config: Config, product: String) = PaperPlans(
    saturday = ProductRatePlanId(config.getString(s"$product.saturday")),
    saturdayplus = ProductRatePlanId(config.getString(s"$product.saturdayplus")),
    sunday = ProductRatePlanId(config.getString(s"$product.sunday")),
    sundayplus = ProductRatePlanId(config.getString(s"$product.sundayplus")),
    weekend = ProductRatePlanId(config.getString(s"$product.weekend")),
    weekendplus = ProductRatePlanId(config.getString(s"$product.weekendplus")),
    sixday = ProductRatePlanId(config.getString(s"$product.sixday")),
    sixdayplus = ProductRatePlanId(config.getString(s"$product.sixdayplus")),
    everyday = ProductRatePlanId(config.getString(s"$product.everyday")),
    everydayplus = ProductRatePlanId(config.getString(s"$product.everydayplus"))
  )

  def fromConfig(config: Config, stage: Stage): PaperProducts = {
    val stageConfig = config.getConfig(s"touchpoint.backend.environments.${stage.name}")

    PaperProducts(
      digitalVoucher = plansFor(stageConfig, "digitalVoucher"),
      voucher = plansFor(stageConfig, "voucher"),
      delivery = plansFor(stageConfig, "delivery"),
      nationalDelivery = NationalDeliveryPaperPlans(
        weekend = ProductRatePlanId(stageConfig.getString("nationalDelivery.weekend")),
        sixday = ProductRatePlanId(stageConfig.getString("nationalDelivery.sixday")),
        everyday = ProductRatePlanId(stageConfig.getString("nationalDelivery.everyday")),
      )
    )
  }