private function buildUrl($endpoint, $url_parameters = [], $special_url = null)
    {
        foreach ($url_parameters as $key => $value) {
            //@codeCoverageIgnoreStart
            $endpoint = str_replace('{'.$key.'}', $value, $endpoint);
            //@codeCoverageIgnoreEnd
        }

        if (is_null($special_url)) {
            $url = trim($this->api_base_url, "/ \t\n\r\0\x0B");
        } else {
            $url = $special_url;
        }
        $url = $url.'/'.trim($endpoint, "/ \t\n\r\0\x0B");

        return $url;
    }