Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
edsonalvesan committed Nov 9, 2020
1 parent 21db205 commit e588ba7
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
3 changes: 2 additions & 1 deletion src/DigiSacClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ public function getBaseBotUrlEnd()
*/
public function prepareRequest(DigiSacRequest $request)
{
$url = $this->getBaseBotUrlBegin().$request->getUrl().$this->getBaseBotUrlEnd().'/'.$request->getEndpoint();
//$url = $this->getBaseBotUrlBegin().$request->getUrl().$this->getBaseBotUrlEnd().'/'.$request->getEndpoint();
$url = $request->getUrl().'/'.$request->getEndpoint();

return [
$url,
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/ContactTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function getContact(array $url_token, $id, array $params)
return new Contact($response->getDecodedBody());
}

public function addContact(array $url_token, $id, array $params)
public function addContact(array $url_token, array $params)
{
if (!empty($url_token)) {
$this->url_token = $url_token;
Expand All @@ -39,7 +39,7 @@ public function updateContact(array $url_token, $id, array $params)
$this->url_token = $url_token;
}

$response = $this->put('contacts', $params);
$response = $this->put('contacts/'.$id, $params);

return new Contact($response->getDecodedBody());
}
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/DepartmentTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getDepartment(array $url_token, $id, array $params)
return new Department($response->getDecodedBody());
}

public function addDepartment(array $url_token, $id, array $params)
public function addDepartment(array $url_token, array $params)
{
if (!empty($url_token)) {
$this->url_token = $url_token;
Expand All @@ -35,7 +35,7 @@ public function updateDepartment(array $url_token, $id, array $params)
$this->url_token = $url_token;
}

$response = $this->put('departments', $params);
$response = $this->put('departments/'.$id, $params);

return new Department($response->getDecodedBody());
}
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/OrganizationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getOrganization(array $url_token, $id, array $params)
return new Organization($response->getDecodedBody());
}

public function addOrganization(array $url_token, $id, array $params)
public function addOrganization(array $url_token, array $params)
{
if (!empty($url_token)) {
$this->url_token = $url_token;
Expand All @@ -35,7 +35,7 @@ public function updateOrganization(array $url_token, $id, array $params)
$this->url_token = $url_token;
}

$response = $this->put('organizations', $params);
$response = $this->put('organizations/'.$id, $params);

return new Organization($response->getDecodedBody());
}
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/PersonTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getPerson(array $url_token, $id, array $params)
return new Person($response->getDecodedBody());
}

public function addPerson(array $url_token, $id, array $params)
public function addPerson(array $url_token, array $params)
{
if (!empty($url_token)) {
$this->url_token = $url_token;
Expand All @@ -35,7 +35,7 @@ public function updatePerson(array $url_token, $id, array $params)
$this->url_token = $url_token;
}

$response = $this->put('people', $params);
$response = $this->put('people/'.$id, $params);

return new Person($response->getDecodedBody());
}
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/ServiceTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getService(array $url_token, $id, array $params)
return new Service($response->getDecodedBody());
}

public function addService(array $url_token, $id, array $params)
public function addService(array $url_token, array $params)
{
if (!empty($url_token)) {
$this->url_token = $url_token;
Expand All @@ -45,7 +45,7 @@ public function updateService(array $url_token, $id, array $params)
$this->url_token = $url_token;
}

$response = $this->put('services', $params);
$response = $this->put('services/'.$id, $params);

return new Service($response->getDecodedBody());
}
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/TagTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getTag(array $url_token, $id, array $params)
return new Tag($response->getDecodedBody());
}

public function addTag(array $url_token, $id, array $params)
public function addTag(array $url_token, array $params)
{
if (!empty($url_token)) {
$this->url_token = $url_token;
Expand All @@ -35,7 +35,7 @@ public function updateTag(array $url_token, $id, array $params)
$this->url_token = $url_token;
}

$response = $this->put('tags', $params);
$response = $this->put('tags/'.$id, $params);

return new Tag($response->getDecodedBody());
}
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/TicketTopicTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getTicketTopic(array $url_token, $id, array $params)
return new TicketTopic($response->getDecodedBody());
}

public function addTicketTopic(array $url_token, $id, array $params)
public function addTicketTopic(array $url_token, array $params)
{
if (!empty($url_token)) {
$this->url_token = $url_token;
Expand All @@ -35,7 +35,7 @@ public function updateTicketTopic(array $url_token, $id, array $params)
$this->url_token = $url_token;
}

$response = $this->put('ticket-topics', $params);
$response = $this->put('ticket-topics/'.$id, $params);

return new TicketTopic($response->getDecodedBody());
}
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/UserTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function getUser(array $url_token, $id, array $params)
return new User($response->getDecodedBody());
}

public function addUser(array $url_token, $id, array $params)
public function addUser(array $url_token, array $params)
{
if (!empty($url_token)) {
$this->url_token = $url_token;
Expand All @@ -48,7 +48,7 @@ public function updateUser(array $url_token, $id, array $params)
$this->url_token = $url_token;
}

$response = $this->put('users', $params);
$response = $this->put('users/'.$id, $params);

return new User($response->getDecodedBody());
}
Expand Down

0 comments on commit e588ba7

Please sign in to comment.