Пример #1
0
 /**
  * @param \HelpScout\model\Attachment $attachment
  */
 public function createAttachment(Attachment $attachment)
 {
     list(, $body) = $this->doPost('attachments.json', $attachment->toJson(), 201);
     if ($body) {
         $attachment->setHash($body['item']['hash']);
     }
 }
 /**
  * @param  \HelpScout\model\Attachment $attachment
  * @return void
  */
 public function createAttachment(Attachment $attachment)
 {
     list(, $body) = $this->doPost('attachments.json', $attachment->toJson(), 201);
     if ($body) {
         $body = json_decode($body);
         $attachment->setHash($body->item->hash);
     }
 }