public function url($id = null, $additionalEndpoint = null)
    {
        $endpoint = $this->endpoint();

        if (! is_null($id)) {
            $endpoint .= '/' . $id;
        }
        if (! is_null($additionalEndpoint)) {
            $endpoint .= '/' . $additionalEndpoint;
        }

        return $endpoint;
    }
public function url($id = null, $additionalEndpoint = null)
    {
        $endpoint = $this->endpoint();

        if (! is_null($id)) {
            $endpoint .= '/' . $id;
        }
        if (! is_null($additionalEndpoint)) {
            $endpoint .= '/' . $additionalEndpoint;
        }

        return $endpoint;
    }
public function url ( $ id = null , $ additionalEndpoint = null ) { $ endpoint = $ this -> endpoint ( ) ; if ( ! is_null ( $ id ) ) { $ endpoint .= '/' . $ id ; } if ( ! is_null ( $ additionalEndpoint ) ) { $ endpoint .= '/' . $ additionalEndpoint ; } return $ endpoint ; }
Build url that will hit the API.

@param int    $id                 The resource's id.
@param string $additionalEndpoint Additional endpoint that will be appended to the URL.

@return string
Build url that will hit the API .