Я реализовал массовую отправку с использованием PHP-клиента docusign.Я получаю следующее сообщение об ошибке
{"errorCode": "UNSPECIFIED_ERROR", "message": "Значение не может быть пустым. Имя параметра: stream"}
когда я бегу ниже исходного кода.
$templateId = 'd756f973-...';
$apiClient = $this->getDocuSignClient();
// Get Template
$templatesApi = new TemplatesApi($apiClient);
$templateDetails = $templatesApi->get($this->getAccountId(), $templateId);
// Set documents
...
// Receipient
$signer = new Signer();
$signer->setIsBulkRecipient('true');
$signer->setRecipientId('1');
$recipients = new Recipients();
$recipients->setSigners([$signer]);
// Create draft template
$envelopDefinition = new EnvelopeDefinition();
$envelopDefinition->setStatus('created');
$envelopDefinition->setDocuments($documents);
$envelopDefinition->setRecipients($recipients);
$envelopDefinition->setEmailSubject('Sign bulk send');
$envelopeApi = new EnvelopesApi($apiClient);
$envelopSummary = $envelopeApi->createEnvelope($this->getAccountId(), $envelopDefinition);
// Update bulk recipients
$clients = Client::all();
$bulkRecipients = [];
foreach ($clients as $client) {
$bulkRecipient = new BulkRecipient();
$bulkRecipient->setEmail($client->email);
$bulkRecipient->setName($client->first_name);
$bulkRecipients[] = $bulkRecipient;
}
$bulkRequest = new BulkRecipientsRequest();
$bulkRequest->setBulkRecipients($bulkRecipients);
$bulkEnvelopesApi = new BulkEnvelopesApi($apiClient);
$bulkEnvelopesApi->updateRecipients($this->getAccountId(), $envelopSummary['envelope_id'], '1', $bulkRequest);
// ---------- the error message throws on above line ----------
Любая помощь приветствуется.Заранее спасибо