package Ġback to basic so op . domain . entities . item _ sale _ rules Ċ Ċ import Ġback to basic so op . domain . Error Ċ import Ġback to basic so op . domain . entities . Cart Ċ import Ġback to basic so op . domain . entities . Item Ċ import Ġback to basic so op . domain . entities . Item Sale Rule Ċ import Ġback to basic so op . domain . entities . Time OfDay Ċ import Ġback to basic so op . shared . Either Ċ Ċ class ĠMinimum Time OfDay For Sale Rule ( private Ġval Ġminimum Time OfDay : ĠTime OfDay ) Ġ: ĠItem Sale Rule Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġvalidate ( cart : ĠCart , Ġitem : ĠItem , Ġquantity : ĠInt ): ĠEither < Error , ĠUnit > Ġ= ĊĠĠĠĠĠĠĠ Ġif Ġ( minimum Time OfDay Ġ> ĠTime OfDay . now ) ĠEither . left ( Error . Invalid (" Can 't Ġbuy Ġthat Ġyet ! ")) Ġelse ĠEither . right ( Unit ) Ċ }