public function download()
    {
        $connection = $this->connection();
        $client = $connection->connect();

        $headers = [
            'Accept' => 'application/pdf',
            'Content-Type' => 'application/pdf',
            'Authorization' => 'Bearer ' . $connection->getAccessToken(),
        ];

        $endpoint = 'https://moneybird.com/' . $connection->getAdministrationId() . '/' . $this->endpoint . '/' . $this->id . '.pdf';
        $body = '';

        $request = new Request('GET', $endpoint, $headers, $body);
        $response = $client->send($request);

        return $response->getBody()->getContents();
    }
public function download()
    {
        $connection = $this->connection();
        $client = $connection->connect();

        $headers = [
            'Accept' => 'application/pdf',
            'Content-Type' => 'application/pdf',
            'Authorization' => 'Bearer ' . $connection->getAccessToken(),
        ];

        $endpoint = 'https://moneybird.com/' . $connection->getAdministrationId() . '/' . $this->endpoint . '/' . $this->id . '.pdf';
        $body = '';

        $request = new Request('GET', $endpoint, $headers, $body);
        $response = $client->send($request);

        return $response->getBody()->getContents();
    }
public function download ( ) { $ connection = $ this -> connection ( ) ; $ client = $ connection -> connect ( ) ; $ headers = [ 'Accept' => 'application/pdf' , 'Content-Type' => 'application/pdf' , 'Authorization' => 'Bearer ' . $ connection -> getAccessToken ( ) , ] ; $ endpoint = 'https://moneybird.com/' . $ connection -> getAdministrationId ( ) . '/' . $ this -> endpoint . '/' . $ this -> id . '.pdf' ; $ body = '' ; $ request = new Request ( 'GET' , $ endpoint , $ headers , $ body ) ; $ response = $ client -> send ( $ request ) ; return $ response -> getBody ( ) -> getContents ( ) ; }
Download invoice as PDF.

@return string PDF file data

@throws \Picqer\Financials\Moneybird\Exceptions\ApiException
Download invoice as PDF .