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 void AuthenticateAdobeSignAccount(ESignAccount account) { var companyId = PXAccess.GetCompanyName(); var client = AdobeSignClientBuilder.BuildUnauthorized(account, companyId); PXLongOperation.StartOperation(this, () => { var loginUrl = client.Authentication.GetLoginPageUrl(); throw new PXRedirectToUrlException(loginUrl, PXBaseRedirectException.WindowMode.InlineWindow, string.Empty, false); }); }
private void GetAdobeAccessToken(string code, ESignAccount account) { var adobeSignClient = AdobeSignClientBuilder.BuildUnauthorized(Accounts.Current); var accessToken = ESignApiExecutor.TryExecute(adobeSignClient.Authentication.CreateAccessToken, code, adobeSignClient); account.AccessToken = accessToken.access_token; account.RefreshToken = accessToken.refresh_token; account.Status = Messages.ESignIntegrationStatus.Connected; Accounts.Update(account); Actions.PressSave(); }