Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/IntercomCompanies.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ public function create($options)
* @return stdClass
* @throws Exception
*/
public function update($options)
public function update($id, array $options = null)
{
return $this->create($options);
// BC layer
// TODO: Next Major : Remove this.
if (func_num_args() < 2 || is_array($id)) {
@trigger_error('Specify an id or use create method to update the company', E_USER_DEPRECATED);

return $this->create($id);
}

return $this->client->put($this->companyPath($id), $options);
}

/**
Expand Down