com.gu.config.HolidayRatePlanIds.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of membership-common_2.12 Show documentation
Show all versions of membership-common_2.12 Show documentation
Scala library for common Guardian Membership/Subscriptions functionality.
package com.gu.config
import com.typesafe.config.Config
import com.gu.memsub.Subscription.{ProductRatePlanChargeId, ProductRatePlanId}
case class HolidayRatePlanIds(prpId: ProductRatePlanId, prpcId: ProductRatePlanChargeId)
object HolidayRatePlanIds {
def apply(config: Config): HolidayRatePlanIds =
HolidayRatePlanIds(
prpId = ProductRatePlanId(config.getString("plan")),
prpcId = ProductRatePlanChargeId(config.getString("charge"))
)
}