src/AbstractClient.php
public function api($name)
    {
        $reflector = new ReflectionClass(get_called_class());
        $namespace = $reflector->getNamespaceName();

        $class = $namespace.'\\Api\\'.$name;

        $apiClass = new $class($this->httpClient);

        $this->httpClient->setApiClass($apiClass);

        return $apiClass;
    }
public function api($name)
    {
        $reflector = new ReflectionClass(get_called_class());
        $namespace = $reflector->getNamespaceName();

        $class = $namespace.'\\Api\\'.$name;

        $apiClass = new $class($this->httpClient);

        $this->httpClient->setApiClass($apiClass);

        return $apiClass;
    }
@param $name

@return mixed