Skip to content

Commit 1abaa58

Browse files
authored
Boolean as a parameter in the request object will result to '1' or '0' in the http request, which is not supported by the API. (#161)
e.g. setting "withDefinitions" to true in ListOrderCustomAttributesRequest will be translated to /custom-attributes?with_definitions=1 in the http request
1 parent 0491be0 commit 1abaa58

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Core/Client/RawClient.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ private function encodeQueryValue(mixed $value): string
250250
if (is_string($value)) {
251251
return urlencode($value);
252252
}
253+
if (is_bool($value)) {
254+
return $value ? 'true' : 'false';
255+
}
253256
if (is_scalar($value)) {
254257
return urlencode((string)$value);
255258
}

0 commit comments

Comments
 (0)