Skip to content

Commit c2c8f7f

Browse files
authored
Merge pull request #221 from asknicely/get-segment-by-id
Support getting a segment by ID
2 parents c9f84d8 + bf0024e commit c2c8f7f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/IntercomSegments.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ public function __construct($client)
1717
$this->client = $client;
1818
}
1919

20+
/**
21+
* Gets a single segment by ID.
22+
* @see https://developers.intercom.com/reference#view-a-segment
23+
* @param string $id
24+
* @param array $options
25+
* @return mixed
26+
* @throws \GuzzleHttp\Exception\GuzzleException
27+
*/
28+
public function getSegment($id, array $options = [])
29+
{
30+
return $this->client->get('segments/' . $id, $options);
31+
}
32+
2033
/**
2134
* Lists Segments.
2235
* @see https://developers.intercom.com/reference#list-segments

0 commit comments

Comments
 (0)