简体   繁体   中英

Docusign PHP SDK: how update whole envelope in one call via sdk?

To update my envelope(draft) I'm currently using the following code:

$envelope_api = new EnvelopesApi($api_client);
$envelope_definition = $this->makeEnvelopeDefinition($envelope_pdo);
$envelope_api->updateDocuments($account_id, $envelope_id, $envelope_definition);
if ($shuld_remove_cc_recipient) {
    $envelope_api->deleteRecipient($account_id, $envelope_id, self::CC_RECIPIENT_ID);
}

return $envelope_api->update($account_id, $envelope_id, $envelope_definition);

I want update/delete documents and recipients in one call, just like it is when creating envelope:

$envelope_api = new EnvelopesApi($api_client);
$envelope_definition = $this->makeEnvelopeDefinition($envelope_pdo);
$envelope_api->createEnvelope($credentials->getAccountId(), $envelope_definition);

Is there a better way to do what I'm trying to do?

You can do a single call to update everything only when you CREATE a new envelope.

When you have an EXISTING envelope and want to modify it, you need separate calls to update documents and recipients.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM