diff --git a/src/Api.php b/src/Api.php index f34040b..139269d 100644 --- a/src/Api.php +++ b/src/Api.php @@ -235,6 +235,20 @@ class Api } $query = array_merge($query, (array)$content); + + // rewrite query args to properly dump true/false parameters + foreach($query as $key => $value) + { + if ($value === false) + { + $query[$key] = "false"; + } + elseif ($value === true) + { + $query[$key] = "true"; + } + } + $query = \GuzzleHttp\Psr7\build_query($query); $url = $request->getUri()->withQuery($query); diff --git a/tests/ApiTest.php b/tests/ApiTest.php index f9db6d9..7c74d34 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -364,7 +364,7 @@ class ApiTest extends \PHPUnit_Framework_TestCase //})); $api = new Api($this->application_key, $this->application_secret, $this->endpoint, $this->consumer_key, $this->client); - $api->get('/me/api/credential', ['dryRun' => true, 'noDryRun' => false]); + $api->get('/me/api/credential', ['dryRun' => true, 'notDryRun' => false]); } }