public function delete()
    {
        if (empty($this->attributes->guid)) {
            throw new PmpException('Document has no guid!');
        }

        // expand link template
        $urn = self::URN_DELETE;
        $link = $this->edit($urn);
        if (!$link) {
            throw new LinkException("Unable to find link $urn - have you loaded the document yet?");
        }
        $url = $link->expand(['guid' => $this->attributes->guid]);

        // delete and clear document
        $this->_request('delete', $url);
        $this->clearDocument();
        return $this;
    }