public function cancel()
    {
        if (!$this->status && !$this->attemped && $cancelled = $this->service->cancel($this->getId())) {
            $this->setAttributes(
                $cancelled->toArray()
            );
            return true;
        }
        return false;
    }
public function cancel()
    {
        if (!$this->status && !$this->attemped && $cancelled = $this->service->cancel($this->getId())) {
            $this->setAttributes(
                $cancelled->toArray()
            );
            return true;
        }
        return false;
    }
public function cancel ( ) { if ( ! $ this -> status && ! $ this -> attemped && $ cancelled = $ this -> service -> cancel ( $ this -> getId ( ) ) ) { $ this -> setAttributes ( $ cancelled -> toArray ( ) ) ; return true ; } return false ; }
Cancels this Invoice if it's pending

@return bool
Cancels this Invoice if it s pending