public function orderId() : string { return $this->orderId; }
/** * @param AcceptOrder $command * @throws OrderNotFoundException * @throws InvalidTransitionException */ public function handle(AcceptOrder $command) { $order = $this->orders->getById(new OrderId($command->orderId())); $order->accept(); }