context shop.orders

consumes bynk { Clock, Logger }

type Order = {
  sku: String,
  placedAt: Instant,
}

service ordering {
  on call(sku: String) -> Effect[Order] given Clock, Logger {
    let _   <- Logger.info("placing order")
    let now <- Clock.now()
    Order { sku: sku, placedAt: now }
  }
}
