Intercom\IntercomLeads::create PHP Method

create() public method

Creates Lead.
See also: https://developers.intercom.io/reference#create-lead
public create ( array $options ) : mixed
$options array
return mixed
    public function create($options)
    {
        return $this->client->post("contacts", $options);
    }

Usage Example

 public function testLeadCreate()
 {
     $stub = $this->getMockBuilder('Intercom\\IntercomClient')->disableOriginalConstructor()->getMock();
     $stub->method('post')->willReturn('foo');
     $leads = new IntercomLeads($stub);
     $this->assertEquals('foo', $leads->create([]));
 }