docusign-esign-csharp-client icon indicating copy to clipboard operation
docusign-esign-csharp-client copied to clipboard

Remove Unsupported Expiration Methods from EnvelopeDefinition

Open RiccoYuan opened this issue 4 years ago • 3 comments

The same problem is also in the C# package DocuSign.eSign.dll Version: 4.5.2 .NETFramework Version: v4.7

https://github.com/docusign/docusign-node-client/issues/154#issue-512866285

This SDK's docs list a few expiration-related members directly on the EnvelopeDefinition object that don't seem to map to the actual Docusign API or have any effect. Specifically, this concerns:

expireAfter expireDateTime expireEnabled In my testing, these values have no effect on the sent envelope, and expireDateTime in particular seems to promise functionality that doesn't exist -- Docusign only allows users to set the expiration in number of days, as an integer.

RiccoYuan avatar Mar 19 '21 07:03 RiccoYuan

@RiccoYuan I just ran into this issue. Do you know what the work around to setting the expiration to a new envelope?

mrkoggles avatar May 07 '21 11:05 mrkoggles

The expire related members directly on the envelope are deprecated. We need to document that I will post a bug. This solution is to add a Notification object to the envelope. In C# this would be

Notification notification = new Notification();
Expirations expirations = new Expirations();

expirations.ExpireEnabled = "true";
expirations.ExpireAfter = "5";
expirations.ExpireWarn = "2";

Reminders reminders = new Reminders();
reminders.ReminderEnabled = "false";
reminders.ReminderFrequency = "0";
reminders.ReminderDelay = "0";
notification.Expirations = expirations;
notification.Reminders = reminders;
notification.UseAccountDefaults = "false";

envelopeDef.Notification = notification;

That produces this JSON block: "notification": { "expirations": { "expireAfter": "5", "expireEnabled": "true", "expireWarn": "2" }, "reminders": { "reminderDelay": "0", "reminderEnabled": "false", "reminderFrequency": "0" }, "useAccountDefaults": "false" },

geoffpdevsup avatar May 18 '21 23:05 geoffpdevsup

I posted DEVDOCS-4866 API reference should mark expireAfter, expireDateTime and expireEnabled on the EnvelopeDefintion deprecated. See Notifications.

geoffpdevsup avatar May 18 '21 23:05 geoffpdevsup