/** * 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); }
/** * 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)); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
public function __construct() { self::$intercom = IntercomClient::factory(array('app_id' => $_ENV['INTERCOM_APP_ID'], 'api_key' => $_ENV['INTERCOM_API_KEY'])); }
/** * 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); }
public function deleteUser($id, $options = []) { $path = $this->userPath($id); return $this->client->delete($path, $options); }
/** * 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); }
/** * 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, []); }