private static ReminderCreationInfoModel GetReminderCreationInfoModel(ESignEnvelopeInfo actualEnvelope) { return(new ReminderCreationInfoModel { agreementId = actualEnvelope.EnvelopeID }); }
private static Notification CreateNotification(ESignEnvelopeInfo envelope) { var reminder = new Reminders(); if (envelope.SendReminders != false) { reminder = new Reminders { ReminderDelay = envelope.FirstReminderDay.ToString(), ReminderFrequency = envelope.ReminderFrequency.ToString(), ReminderEnabled = true.ToString() }; } return(new Notification { UseAccountDefaults = false.ToString(), Reminders = reminder, Expirations = new Expirations { ExpireAfter = envelope.ExpiredDays.ToString(), ExpireWarn = envelope.WarnDays.ToString(), ExpireEnabled = true.ToString() } }); }
private static void RemindAdobeEnvelope(ESignAccount account, ESignEnvelopeInfo actualEnvelope) { var adobeSignClient = AdobeSignClientBuilder.Build(account); var reminderModel = GetReminderCreationInfoModel(actualEnvelope); ESignApiExecutor.TryExecute(() => adobeSignClient.DocumentsService.SendReminder(reminderModel), adobeSignClient); }
private static void RedirectToAdobeSign(ESignAccount account, ESignEnvelopeInfo envelope) { var adobeSignClient = AdobeSignClientBuilder.Build(account); var url = ESignApiExecutor.TryExecute(() => adobeSignClient.DocumentsService .GetAgreementAssets(envelope.EnvelopeID), adobeSignClient).viewURL; throw new PXRedirectToUrlException(url, string.Empty); }
public static void CancelAdobeSignEnvelope(ESignAccount account, ESignEnvelopeInfo actualEnvelope, string voidReason) { var adobeSignClient = AdobeSignClientBuilder.Build(account); ESignApiExecutor.TryExecute( () => adobeSignClient.DocumentsService.CancelAgreement(actualEnvelope.EnvelopeID, voidReason), adobeSignClient); }
public static void VoidAdobeSignEnvelope(ESignEnvelopeInfo envelope, ESignAccount account) { if (envelope.EnvelopeInfoID.HasValue) { var adobeSignClient = AdobeSignClientBuilder.Build(account); ESignApiExecutor.TryExecute(() => adobeSignClient.DocumentsService.DeleteAgreement(envelope.EnvelopeID), adobeSignClient); } }
private static void RemindDocuSignEnvelope(ESignAccount account, ESignEnvelopeInfo actualEnvelope) { var dsService = new DocuSignService(); var request = new BaseRequestModel { ESignAccount = account, EnvelopeId = actualEnvelope.EnvelopeID }; dsService.RemindEnvelope(request); }
public static void VoidDraftDocuSignEnvelope(ESignAccount account, ESignEnvelopeInfo envelope) { var dsService = new DocuSignService(); var request = new VoidEnvelopeRequestModel { ESignAccount = account, EnvelopeId = envelope.EnvelopeID, }; dsService.VoidDraftEnvelope(request); }
public static void VoidDocuSignEnvelope(ESignAccount account, ESignEnvelopeInfo envelope, string voidReason) { var dsService = new DocuSignService(); var request = new VoidEnvelopeRequestModel { ESignAccount = account, EnvelopeId = envelope.EnvelopeID, VoidReason = string.IsNullOrEmpty(voidReason) ? Messages.DefaultEnvelopeVoidReason : voidReason }; dsService.VoidEnvelope(request); }
private static void VoidDocuSignEnvelope(ESignEnvelopeInfo envelope, ESignAccount account) { if (envelope.IsActionsAvailable != null && envelope.IsActionsAvailable.Value && envelope.EnvelopeInfoID.HasValue) { VoidDocuSignEnvelope(account, envelope, Messages.DefaultEnvelopeVoidReason); } else if (envelope.LastStatus == EnvelopeStatus.DocuSign.Created) { VoidDraftDocuSignEnvelope(account, envelope); } }
private static void RedirectToDocuSign(ESignAccount account, ESignEnvelopeInfo envelope) { var dsService = new DocuSignService(); var request = new BaseRequestModel { ESignAccount = account, EnvelopeId = envelope.EnvelopeID }; var url = dsService.Redirect(request); throw new PXRedirectToUrlException(url.Url, string.Empty); }
private static IEnumerable <Signer> ParseSigners(IEnumerable <ESignRecipient> recipients, ESignEnvelopeInfo envelopeInfo) { var tabs = new Tabs(); return(recipients.Select(item => new Signer { Name = item.Name, Email = item.Email, RecipientId = item.RecipientID.ToString(), Tabs = tabs, Note = item.CustomMessage, RoutingOrder = envelopeInfo.IsOrder.HasValue && envelopeInfo.IsOrder.Value ? item.Position.ToString() : 1.ToString() })); }
private static IEnumerable <CarbonCopy> ParseCarbonCopy(IEnumerable <ESignRecipient> recipients, ESignEnvelopeInfo envelopeInfo) { return(recipients.Select(item => new CarbonCopy { Email = item.Email, Name = item.Name, RecipientId = item.RecipientID.ToString(), Note = item.CustomMessage, RoutingOrder = envelopeInfo.IsOrder.HasValue && envelopeInfo.IsOrder.Value ? item.Position.ToString() : 1.ToString() })); }