public function buildQueryString(array $parameters, array $initialQueryParameters = [], $previousKey = null)
    {
        $queryParameters = $initialQueryParameters;

        foreach ($parameters as $key => $value) {
            if (null !== $previousKey) {
                $key = "{$previousKey}[{$key}]";
            }

            if (is_array($value)) {
                $queryParameters = $this->buildQueryString($value, $queryParameters, $key);
            } else {
                $queryParameters[] = "{$key}={$value}";
            }
        }

        return null !== $previousKey ? $queryParameters : implode('&', $queryParameters);
    }