Error: Call to a member function read() on string in DocuSign\eSign\ObjectSerializer::deserialize() (line 285 of/vendor/docusign/esign-client/src/ObjectSerializer.php).
I'm calling that function
$temp_file = $envelope_api->getDocument($accountID, $document_id, $envelope_id);
This is causing the issue
$file = fopen($filename, 'w');
while ($chunk = $data->read(200)) {
fwrite($file, $chunk);
}
fclose($file);