/** * @param RefundOrder $command * @throws InvalidTransitionException * @throws OrderNotFoundException */ public function handle(RefundOrder $command) { $order = $this->orders->getById(new OrderId($command->orderId())); $order->refund(); }