File tree 3 files changed +25
-0
lines changed 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -371,6 +371,9 @@ $client->companies->update([
371
371
'name' => 'foocorp',
372
372
]);
373
373
374
+ /** Delete a company by ID */
375
+ $client->companies->delete('531ee472cce572a6ec000006');
376
+
374
377
/** List Companies */
375
378
$client->companies->getCompanies([]);
376
379
Original file line number Diff line number Diff line change @@ -32,6 +32,20 @@ public function update($options)
32
32
{
33
33
return $ this ->create ($ options );
34
34
}
35
+
36
+ /**
37
+ * Deletes a Company.
38
+ *
39
+ * @see https://developers.intercom.com/intercom-api-reference/reference#delete-a-company
40
+ * @param array $options
41
+ * @return stdClass
42
+ * @throws Exception
43
+ */
44
+ public function delete ($ id , $ options = [])
45
+ {
46
+ $ path = $ this ->companyPath ($ id );
47
+ return $ this ->client ->delete ($ path , $ options );
48
+ }
35
49
36
50
/**
37
51
* Attaches a Contact to a Company.
Original file line number Diff line number Diff line change @@ -29,6 +29,14 @@ public function testCompanyGet()
29
29
$ companies = new IntercomCompanies ($ this ->client );
30
30
$ this ->assertSame ('foo ' , $ companies ->getCompanies ([]));
31
31
}
32
+
33
+ public function testCompanyDelete ()
34
+ {
35
+ $ this ->client ->method ('delete ' )->willReturn ('foo ' );
36
+
37
+ $ companies = new IntercomCompanies ($ this ->client );
38
+ $ this ->assertSame ('foo ' , $ companies ->delete ('' ));
39
+ }
32
40
33
41
public function testCompanyPath ()
34
42
{
You can’t perform that action at this time.
0 commit comments