Exemplo n.º 1
0
        private static void RemindAdobeEnvelope(ESignAccount account, ESignEnvelopeInfo actualEnvelope)
        {
            var adobeSignClient = AdobeSignClientBuilder.Build(account);
            var reminderModel   = GetReminderCreationInfoModel(actualEnvelope);

            ESignApiExecutor.TryExecute(() => adobeSignClient.DocumentsService.SendReminder(reminderModel), adobeSignClient);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public static void CancelAdobeSignEnvelope(ESignAccount account, ESignEnvelopeInfo actualEnvelope,
                                                   string voidReason)
        {
            var adobeSignClient = AdobeSignClientBuilder.Build(account);

            ESignApiExecutor.TryExecute(
                () => adobeSignClient.DocumentsService.CancelAgreement(actualEnvelope.EnvelopeID, voidReason),
                adobeSignClient);
        }
Exemplo n.º 4
0
 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 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();
        }