コード例 #1
0
 /**
  * Creates Conversation Reply to Conversation with given ID.
  * @see https://developers.intercom.io/reference#replying-to-a-conversation
  * @param string $id
  * @param array $options
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function replyToConversation($id, $options)
 {
     $path = $this->conversationReplyPath($id);
     return $this->client->post($path, $options);
 }
コード例 #2
0
 /**
  * Lists User Events.
  * @see https://developers.intercom.io/reference#list-user-events
  * @param array $options
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function getEvents($options)
 {
     return $this->client->get("events", array_merge(["type" => "user"], $options));
 }
コード例 #3
0
 /**
  * Creates Message.
  * @see https://developers.intercom.io/reference#conversations
  * @param array $options
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function create($options)
 {
     return $this->client->post("messages", $options);
 }
コード例 #4
0
 /**
  * Creates Events in bulk.
  * @see https://developers.intercom.io/reference#bulk-event-operations
  * @param array $options
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function events($options)
 {
     return $this->client->post("bulk/events", $options);
 }
コード例 #5
0
 /**
  * Converts Lead.
  * @see https://developers.intercom.io/reference#convert-a-lead
  * @param $options
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function convertLead($options)
 {
     return $this->client->post("contacts/convert", $options);
 }
コード例 #6
0
 /**
  * Lists Tags.
  * @see https://developers.intercom.io/reference#list-tags-for-an-app
  * @param array $options
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function getTags($options = [])
 {
     return $this->client->get("tags", $options);
 }
コード例 #7
0
 /**
  * Lists Segments.
  * @see https://developers.intercom.com/reference#list-segments
  * @param array $options
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function getSegments($options = [])
 {
     return $this->client->get("segments", $options);
 }
コード例 #8
0
 /**
  * Returns list of Admins.
  * @see https://developers.intercom.io/reference#list-admins
  * @param array $options
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function getAdmins($options = [])
 {
     return $this->client->get("admins", $options);
 }
コード例 #9
0
 public function __construct()
 {
     self::$intercom = IntercomClient::factory(array('app_id' => $_ENV['INTERCOM_APP_ID'], 'api_key' => $_ENV['INTERCOM_API_KEY']));
 }
コード例 #10
0
 /**
  * Returns list of Counts.
  * @see https://developers.intercom.io/reference#getting-counts
  * @param array $options
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function getCounts($options = [])
 {
     return $this->client->get("counts", $options);
 }
コード例 #11
0
 public function deleteUser($id, $options = [])
 {
     $path = $this->userPath($id);
     return $this->client->delete($path, $options);
 }
コード例 #12
0
 /**
  * Returns list of Companies.
  * @see https://developers.intercom.io/reference#list-companies
  * @param array $options
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function getCompanies($options)
 {
     return $this->client->get("companies", $options);
 }
コード例 #13
0
 /**
  * Returns single Note.
  * @see https://developers.intercom.io/reference#view-a-note
  * @param string $id
  * @return mixed
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 public function getNote($id)
 {
     return $this->client->get("notes/" . $id, []);
 }