Skip to content

Commit 9f7ad35

Browse files
committed
Make it possible to sent query information with a create (needed for actions)
1 parent f74e38a commit 9f7ad35

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/MessageBird/Resources/Base.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,18 @@ public function getObject()
7070
}
7171

7272
/**
73-
* @param $object
73+
* @param $object
74+
* @param array $query
7475
*
7576
* @return $this->Object
76-
*
77+
* @throws Exceptions\HttpException
7778
* @throws Exceptions\RequestException
7879
* @throws Exceptions\ServerException
7980
*/
80-
public function create($object)
81+
public function create($object, $query = [])
8182
{
8283
$body = json_encode($object);
83-
list(, , $body) = $this->HttpClient->performHttpRequest(Common\HttpClient::REQUEST_POST, $this->resourceName, $query = null, $body);
84+
list(, , $body) = $this->HttpClient->performHttpRequest(Common\HttpClient::REQUEST_POST, $this->resourceName, $query, $body);
8485
return $this->processRequest($body);
8586
}
8687

0 commit comments

Comments
 (0)