protected function rest_delete($id, array $body = [])
    {
        if (empty($id)) {
            throw new ApiException("Invalid resource id.");
        }

        $id = urlencode($id);
        $result = $this->client->performHttpCall(
            self::REST_DELETE,
            "{$this->getResourcePath()}/{$id}",
            $this->parseRequestBody($body)
        );

        if ($result === null) {
            return null;
        }

        return ResourceFactory::createFromApiResult($result, $this->getResourceObject());
    }
protected function rest_delete($id, array $body = [])
    {
        if (empty($id)) {
            throw new ApiException("Invalid resource id.");
        }

        $id = urlencode($id);
        $result = $this->client->performHttpCall(
            self::REST_DELETE,
            "{$this->getResourcePath()}/{$id}",
            $this->parseRequestBody($body)
        );

        if ($result === null) {
            return null;
        }

        return ResourceFactory::createFromApiResult($result, $this->getResourceObject());
    }
protected function rest_delete ( $ id , array $ body = [ ] ) { if ( empty ( $ id ) ) { throw new ApiException ( "Invalid resource id." ) ; } $ id = urlencode ( $ id ) ; $ result = $ this -> client -> performHttpCall ( self :: REST_DELETE , "{$this->getResourcePath()}/{$id}" , $ this -> parseRequestBody ( $ body ) ) ; if ( $ result === null ) { return null ; } return ResourceFactory :: createFromApiResult ( $ result , $ this -> getResourceObject ( ) ) ; }
Sends a DELETE request to a single Molle API object.

@param string $id
@param array $body

@return BaseResource
@throws ApiException
Sends a DELETE request to a single Molle API object .