private function download(AbstractRequestTransport $requestTransport, $filename)
    {
        $response = $this->apiTransport->send(
            $requestTransport->getPath(),
            $requestTransport->getMethod(),
            $requestTransport->getQueryParams(),
            $requestTransport->getBody(),
            $requestTransport->getHeaders()
        );

        if ($response->getStatusCode() === 200) {
            return (new Psr7\Response())
                ->withHeader('Content-Type', 'text/csv; charset=utf-8')
                ->withHeader('Content-Disposition', 'attachment; filename="' . $filename . '"')
                ->withBody($response->getBody());
        }

        return $response;
    }
private function download(AbstractRequestTransport $requestTransport, $filename)
    {
        $response = $this->apiTransport->send(
            $requestTransport->getPath(),
            $requestTransport->getMethod(),
            $requestTransport->getQueryParams(),
            $requestTransport->getBody(),
            $requestTransport->getHeaders()
        );

        if ($response->getStatusCode() === 200) {
            return (new Psr7\Response())
                ->withHeader('Content-Type', 'text/csv; charset=utf-8')
                ->withHeader('Content-Disposition', 'attachment; filename="' . $filename . '"')
                ->withBody($response->getBody());
        }

        return $response;
    }
@param AbstractRequestTransport $requestTransport
@param string                   $filename

@return Psr7\MessageTrait

@throws TransportException