Intercom\IntercomSegments::getSegments PHP Method

getSegments() public method

Lists Segments.
See also: https://developers.intercom.com/reference#list-segments
public getSegments ( array $options = [] ) : mixed
$options array
return mixed
    public function getSegments($options = [])
    {
        return $this->client->get("segments", $options);
    }

Usage Example

 public function testSegmentList()
 {
     $stub = $this->getMockBuilder('Intercom\\IntercomClient')->disableOriginalConstructor()->getMock();
     $stub->method('get')->willReturn('foo');
     $segments = new IntercomSegments($stub);
     $this->assertEquals('foo', $segments->getSegments());
 }