public function deleteById($id, array $options = [])
{
if (empty($id) || !trim($id)) {
throw new \InvalidArgumentException();
}
$id = urlencode($id);
$response = $this->request($id, Request::DELETE, [], $options);
$responseData = $response->getData();
if (isset($responseData['found']) && false == $responseData['found']) {
throw new NotFoundException('Doc id ' . $id . ' not found and can not be deleted');
}
return $response;
}