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