From 596a761a4d45798443c00dcc01b9dca33e3823f5 Mon Sep 17 00:00:00 2001 From: Ben Casey Date: Fri, 24 Nov 2017 23:50:38 +0930 Subject: [PATCH 1/2] Contact makeAgent() should be PUT not GET --- src/Resources/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resources/Contact.php b/src/Resources/Contact.php index f2785a7..f010a75 100644 --- a/src/Resources/Contact.php +++ b/src/Resources/Contact.php @@ -85,6 +85,6 @@ public function makeAgent($id, array $query = null) { $end = $id . '/make_agent'; - return $this->api()->request('GET', $this->endpoint($end), null, $query); + return $this->api()->request('PUT', $this->endpoint($end), null, $query); } } From f9aceb2c74d7ce1612efabcd3c5a35fb0cf775db Mon Sep 17 00:00:00 2001 From: Ben Casey Date: Sat, 25 Nov 2017 22:20:05 +0930 Subject: [PATCH 2/2] Fix makeAgent request. --- src/Resources/Contact.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Resources/Contact.php b/src/Resources/Contact.php index f010a75..c12a2e2 100644 --- a/src/Resources/Contact.php +++ b/src/Resources/Contact.php @@ -81,10 +81,10 @@ public function fields(array $query = null) * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException * @throws \Freshdesk\Exceptions\ValidationException */ - public function makeAgent($id, array $query = null) + public function makeAgent($id, array $query = []) { $end = $id . '/make_agent'; - return $this->api()->request('PUT', $this->endpoint($end), null, $query); + return $this->api()->request('PUT', $this->endpoint($end), $query); } }