/**
  * Execute DELETE request.
  *
  * @param string $path
  * @param array  $binds
  *
  * @return Response
  */
 public function delete($path, $binds = null)
 {
     $httpRequest = $this->prepare('DELETE', $path, $binds);
     try {
         $httpResponse = $httpRequest->send();
     } catch (BadResponseException $exc) {
         $httpResponse = $exc->getResponse();
     }
     $json = $httpResponse->json();
     $response = new Response();
     $response->setStatus($json['status']);
     $response->setError($json['error']);
     if (isset($json['data']['items'])) {
         $response->setData($json['data']['items']);
     } else {
         $response->setData($json['data']);
     }
     return $response;
 }
 /**
  * @param Response $response
  */
 public function setError(Response $response)
 {
     $error = $response->getError();
     $this->setCode($error['code']);
     $this->setMessage($error['message']);
 }