protected function getUri(string $endpoint, array $parameters = []): Uri
    {
        Assert::keyExists(self::ENDPOINTS, $endpoint, "Named endpoint {$endpoint} is unknown.");

        $uri = $this->sandbox ? self::SANDBOX_URL : self::PRODUCTION_URL;
        $uri .= self::ENDPOINTS[$endpoint];

        if ($parameters) {
            $uri .= '?' . http_build_query($parameters);
        }

        return new Uri($uri);
    }
protected function getUri(string $endpoint, array $parameters = []): Uri
    {
        Assert::keyExists(self::ENDPOINTS, $endpoint, "Named endpoint {$endpoint} is unknown.");

        $uri = $this->sandbox ? self::SANDBOX_URL : self::PRODUCTION_URL;
        $uri .= self::ENDPOINTS[$endpoint];

        if ($parameters) {
            $uri .= '?' . http_build_query($parameters);
        }

        return new Uri($uri);
    }
protected function getUri ( string $ endpoint , array $ parameters = [ ] ) : Uri { Assert :: keyExists ( self :: ENDPOINTS , $ endpoint , "Named endpoint {$endpoint} is unknown." ) ; $ uri = $ this -> sandbox ? self :: SANDBOX_URL : self :: PRODUCTION_URL ; $ uri .= self :: ENDPOINTS [ $ endpoint ] ; if ( $ parameters ) { $ uri .= '?' . http_build_query ( $ parameters ) ; } return new Uri ( $ uri ) ; }
Builds a URI, based on the named endpoint and provided parameters. The Netaxept API claims to be a REST API, but
it is not in any way, shape, or form a REST API. It requires all requests to be GET requests, and all parameters
to be URLencoded and provided in the query string. About as far away from REST as you can get.

@param string $endpoint
@param array $parameters

@return Uri
Builds a URI based on the named endpoint and provided parameters . The Netaxept API claims to be a REST API but it is not in any way shape or form a REST API . It requires all requests to be GET requests and all parameters to be URLencoded and provided in the query string . About as far away from REST as you can get .