/**
  * Send envelope
  *
  * @param Envelope $envelope
  * @param array $options
  * @return mixed
  */
 public function sendEnvelope(Envelope $envelope, array $options = array())
 {
     $defaultOptions = array('accountId' => $this->getAccountId(), 'emailSubject' => $envelope->getEmailSubject(), 'emailBlurb' => $envelope->getEmailBlurb(), 'status' => $envelope->getStatus());
     if (null !== $this->brandId) {
         $defaultOptions['brandId'] = $this->brandId;
     }
     if (count($options)) {
         $data = array_merge($defaultOptions, $options);
     } else {
         $data = $defaultOptions;
     }
     if (isset($options['templateId'])) {
         $templateRoles = $this->prepareRecipients($envelope);
         if (count($templateRoles)) {
             $data['templateRoles'] = $templateRoles;
         }
     }
     $dataString = json_encode($data);
     $headers = array('Content-Length: ' . strlen($dataString));
     //echo '<pre>' . $dataString; die;
     return $this->makeRequest($this->getBaseUrl() . '/envelopes', array('method' => 'post', 'data' => $dataString, 'headers' => $headers));
 }