public function setStatus(Result\ResultStatus $status)
    {
        if (Result\ResultStatus::UNPROCESSED !== $status->getValue()) {
            $this->transacted = true;
            $this->dateTransacted = new DateTime();
        }

        if (!$this->transaction->isParent()
            && Result\ResultStatus::ERROR !== $status->getValue()
            && Result\ResultStatus::UNPROCESSED !== $status->getValue())  {
            $this->transaction->getParent()->setStatus($status);
        }

        $this->transaction->setStatus($status);
        $this->status = $status;
    }