Skip to content

Commit 87c3f96

Browse files
authored
Merge pull request #20 from w3r-one/feature/apiv9-update
feat: v9 api change for client update
2 parents f53c2aa + f410a01 commit 87c3f96

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/TogglApi.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ public function createClient($workspaceId, $clientName)
6161
* Update client.
6262
*
6363
* @param int $clientId
64-
* @param array $clientData
64+
* @param array $client
6565
*
6666
* @return bool|mixed|object
6767
*/
68-
public function updateClient($workspaceId, $clientId, $clientData)
68+
public function updateClient($workspaceId, $clientId, $client)
6969
{
70-
return $this->PUT('clients/'.$clientId, ['client' => $clientData]);
70+
return $this->workspace($workspaceId)->updateClient($clientId, $client);
7171
}
7272

7373
/**

src/TogglTrackWorkspaceApi.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ public function createClient($clientData)
7373
* Update client.
7474
*
7575
* @param int $clientId
76-
* @param array $clientData
76+
* @param array $client
7777
*
7878
* @return bool|mixed|object
7979
*/
80-
public function updateClient($clientId, $clientData)
80+
public function updateClient($clientId, $client)
8181
{
82-
return $this->PUT('clients/' . $clientId, ['client' => $clientData]);
82+
return $this->PUT("clients/{$clientId}", $client);
8383
}
8484

8585
/**

0 commit comments

Comments
 (0)