Intercom\IntercomLeads::getLead PHP Method

getLead() public method

Returns single Lead.
See also: https://developers.intercom.io/reference#view-a-lead
public getLead ( string $id, array $options = [] ) : mixed
$id string
$options array
return mixed
    public function getLead($id, $options = [])
    {
        $path = $this->leadPath($id);
        return $this->client->get($path, $options);
    }

Usage Example

 public function testLeadsGet()
 {
     $stub = $this->getMockBuilder('Intercom\\IntercomClient')->disableOriginalConstructor()->getMock();
     $stub->method('get')->willReturn('foo');
     $leads = new IntercomLeads($stub);
     $this->assertEquals('foo', $leads->getLead("bar"));
 }