/**
  * Put Deal
  *
  * @param Batchblue_Service_BatchBook_Deal $deal
  * @return Batchblue_Service_BatchBook_DealService   Provides a fluent interface
  */
 public function putDeal(Batchblue_Service_BatchBook_Deal $deal)
 {
     $httpClient = new Zend_Http_Client('https://' . $this->_accountName . '.batchbook.com/service/deals/' . $deal->getId() . '.xml');
     $paramsPut = array('deal[title]' => $deal->getTitle(), 'deal[description]' => $deal->getDescription(), 'deal[amount]' => $deal->getAmount(), 'deal[status]' => $deal->getStatus());
     $httpClient->setAuth($this->_token, 'x');
     $httpClient->setHeaders(Zend_Http_Client::CONTENT_TYPE, Zend_Http_Client::ENC_URLENCODED);
     $httpClient->setRawData(http_build_query($paramsPut, '', '&'), Zend_Http_Client::ENC_URLENCODED);
     $response = $httpClient->request(Zend_Http_Client::PUT);
     if (200 != $response->getStatus()) {
         //TODO: throw more specific exception
         echo $httpClient->getLastRequest();
         throw new Exception('Deal not updated:' . $response->getMessage() . "\n" . $response->getBody());
     }
     return $this;
 }