Skip to content

Commit

Permalink
Merge pull request #20 from w3r-one/feature/apiv9-update
Browse files Browse the repository at this point in the history
feat: v9 api change for client update
  • Loading branch information
SimonJnsson authored Oct 30, 2023
2 parents f53c2aa + f410a01 commit 87c3f96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/TogglApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ public function createClient($workspaceId, $clientName)
* Update client.
*
* @param int $clientId
* @param array $clientData
* @param array $client
*
* @return bool|mixed|object
*/
public function updateClient($workspaceId, $clientId, $clientData)
public function updateClient($workspaceId, $clientId, $client)
{
return $this->PUT('clients/'.$clientId, ['client' => $clientData]);
return $this->workspace($workspaceId)->updateClient($clientId, $client);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/TogglTrackWorkspaceApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ public function createClient($clientData)
* Update client.
*
* @param int $clientId
* @param array $clientData
* @param array $client
*
* @return bool|mixed|object
*/
public function updateClient($clientId, $clientData)
public function updateClient($clientId, $client)
{
return $this->PUT('clients/' . $clientId, ['client' => $clientData]);
return $this->PUT("clients/{$clientId}", $client);
}

/**
Expand Down

0 comments on commit 87c3f96

Please sign in to comment.