public function build() : string
    {
        $path = collect([
                $this->prepends,
                $this->resourceKey,
                $this->id,
                $this->appends,
            ])
            ->filter()
            ->implode('/');

        $uri = "{$path}.{$this->format}";

        return $this->hasParams() ? $uri.'?'.http_build_query($this->params) : $uri;
    }