public function endpoint($endpoint = null)
    {
        if ($endpoint === null) {
            return $this->getEndpoint();
        }

        return $this->setEndpoint($endpoint);
    }
public function endpoint($endpoint = null)
    {
        if ($endpoint === null) {
            return $this->getEndpoint();
        }

        return $this->setEndpoint($endpoint);
    }
public function endpoint ( $ endpoint = null ) { if ( $ endpoint === null ) { return $ this -> getEndpoint ( ) ; } return $ this -> setEndpoint ( $ endpoint ) ; }
Set the endpoint path to use

@param string|null $endpoint The endpoint
@return string|$this
@deprecated 2.0.0 Use setEndpoint() and getEndpoint() instead.
Set the endpoint path to use