File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,18 @@ public function create($options)
2828 return $ this ->client ->post ("contacts " , $ options );
2929 }
3030
31+ /**
32+ * Creates Lead.
33+ * @see https://developers.intercom.io/reference#create-lead
34+ * @param array $options
35+ * @return mixed
36+ * @throws \GuzzleHttp\Exception\GuzzleException
37+ */
38+ public function update ($ options )
39+ {
40+ return $ this ->create ($ options );
41+ }
42+
3143 /**
3244 * Lists Leads.
3345 * @see https://developers.intercom.io/reference#list-leads
Original file line number Diff line number Diff line change @@ -12,6 +12,15 @@ public function testLeadCreate()
1212 $ this ->assertEquals ('foo ' , $ leads ->create ([]));
1313 }
1414
15+ public function testLeadUpdate ()
16+ {
17+ $ stub = $ this ->getMockBuilder ('Intercom\IntercomClient ' )->disableOriginalConstructor ()->getMock ();
18+ $ stub ->method ('post ' )->willReturn ('foo ' );
19+
20+ $ leads = new IntercomLeads ($ stub );
21+ $ this ->assertEquals ('foo ' , $ leads ->update ([]));
22+ }
23+
1524 public function testLeadsList ()
1625 {
1726 $ stub = $ this ->getMockBuilder ('Intercom\IntercomClient ' )->disableOriginalConstructor ()->getMock ();
You can’t perform that action at this time.
0 commit comments