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
Weekend Voucher holiday stop model #426
Conversation
e9c0737
to
664fe3c
Compare
lib/holiday-stops/src/main/scala/com/gu/holiday_stops/CurrentWeekendVoucherSubscription.scala
Outdated
Show resolved
Hide resolved
lib/holiday-stops/src/main/scala/com/gu/holiday_stops/CurrentWeekendVoucherSubscription.scala
Show resolved
Hide resolved
subscription: Subscription, | ||
weekendVoucherProductRatePlanId: String, | ||
stoppedPublicationDate: StoppedPublicationDate | ||
): Either[ZuoraHolidayWriteError, CurrentWeekendVoucherSubscription] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method doesn't seem to attempt to write to Zuora
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe separate refactoring PR as it would have to be hanged everywhere.
@@ -52,7 +52,9 @@ object SalesforceHolidayStopRequestsDetail extends Logging { | |||
case class HolidayStopRequestsDetailChargePrice(value: Double) extends AnyVal | |||
implicit val formatHolidayStopRequestsDetailChargePrice = Jsonx.formatInline[HolidayStopRequestsDetailChargePrice] | |||
|
|||
case class StoppedPublicationDate(value: LocalDate) extends AnyVal | |||
case class StoppedPublicationDate(value: LocalDate) extends AnyVal { | |||
def getDayOfWeek: String = value.getDayOfWeek.toString.toLowerCase.capitalize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be val
(or lazy val
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vals are not allowed in value classes
👍 Looks good pending Kelvins points |
It satisfies
and is represented as
Billing periods per voucher product:
https://docs.google.com/spreadsheets/d/1gfVse_wcRPXRPeQBV3sVvJgmWKNzaBf6m0kbWKeihqY/edit?pli=1#gid=0