Esempio n. 1
0
        override public void Execute()
        {
            layoutSettingsToCreate = CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                     .WithBreadCrumbs()
                                     .WithGlobalConfirmButton()
                                     .WithGlobalDownloadButton()
                                     .WithGlobalNavigation()
                                     .WithGlobalSaveAsLayoutButton()
                                     .WithLogoImageLink(OLD_LOGO_IMAGE_LINK)
                                     .WithLogoImageSource(OLD_LOGO_IMAGE_SOURCE)
                                     .WithNavigator()
                                     .WithProgressBar()
                                     .WithSessionBar()
                                     .WithTitle()
                                     .Build();

            settingsToCreate = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                               .WithCaptureText()
                               .WithDecline()
                               .WithDeclineReason(OLD_DECLINE_REASON_1)
                               .WithDeclineReason(OLD_DECLINE_REASON_2)
                               .WithDeclineReason(OLD_DECLINE_REASON_3)
                               .WithDialogOnComplete()
                               .WithDocumentToolbarDownloadButton()
                               .WithHandOverLinkHref(OLD_HAND_OVER_LINK_HREF)
                               .WithHandOverLinkText(OLD_HAND_OVER_LINK_TEXT)
                               .WithHandOverLinkTooltip(OLD_HAND_OVER_LINK_TOOL_TIP)
                               .WithInPerson()
                               .WithOptOut()
                               .WithOptOutReason(OLD_OPT_OUT_REASON_1)
                               .WithOptOutReason(OLD_OPT_OUT_REASON_2)
                               .WithOptOutReason(OLD_OPT_OUT_REASON_3)
                               .WithWatermark()
                               .WithCeremonyLayoutSettings(layoutSettingsToCreate)
                               .Build();

            packageToCreate = PackageBuilder.NewPackageNamed(OLD_PACKAGE_NAME)
                              .DescribedAs(OLD_DESCRIPTION)
                              .WithEmailMessage(OLD_EMAIL_MESSAGE)
                              .ExpiresOn(OLD_EXPIRY_DATE)
                              .WithLanguage(OLD_LANGUAGE)
                              .WithVisibility(OLD_VISIBILITY)
                              .WithNotarized(OLD_NOTARIZED)
                              .WithAutomaticCompletion()
                              .WithSettings(settingsToCreate)
                              .Build();

            packageId = ossClient.CreatePackage(packageToCreate);

            createdPackage        = ossClient.GetPackage(packageId);
            createdSettings       = createdPackage.Settings;
            createdLayoutSettings = createdSettings.CeremonyLayoutSettings;

            layoutSettingsToUpdate = CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                     .WithoutBreadCrumbs()
                                     .WithoutGlobalConfirmButton()
                                     .WithoutGlobalDownloadButton()
                                     .WithoutGlobalNavigation()
                                     .WithoutGlobalSaveAsLayoutButton()
                                     .WithLogoImageLink(NEW_LOGO_IMAGE_LINK)
                                     .WithLogoImageSource(NEW_LOGO_IMAGE_SOURCE)
                                     .WithoutNavigator()
                                     .WithoutProgressBar()
                                     .WithoutSessionBar()
                                     .WithoutTitle()
                                     .Build();

            settingsToUpdate = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                               .WithoutCaptureText()
                               .WithDecline()
                               .WithDeclineReason(NEW_DECLINE_REASON_1)
                               .WithDeclineReason(NEW_DECLINE_REASON_2)
                               .WithDeclineReason(NEW_DECLINE_REASON_3)
                               .WithoutDialogOnComplete()
                               .WithoutDocumentToolbarDownloadButton()
                               .WithHandOverLinkHref(NEW_HAND_OVER_LINK_HREF)
                               .WithHandOverLinkText(NEW_HAND_OVER_LINK_TEXT)
                               .WithHandOverLinkTooltip(NEW_HAND_OVER_LINK_TOOL_TIP)
                               .WithoutInPerson()
                               .WithoutOptOut()
                               .WithOptOutReason(NEW_OPT_OUT_REASON_1)
                               .WithOptOutReason(NEW_OPT_OUT_REASON_2)
                               .WithOptOutReason(NEW_OPT_OUT_REASON_3)
                               .WithoutWatermark()
                               .WithCeremonyLayoutSettings(layoutSettingsToUpdate)
                               .Build();

            packageToUpdate = PackageBuilder.NewPackageNamed(NEW_PACKAGE_NAME)
                              .WithEmailMessage(NEW_EMAIL_MESSAGE)
                              .ExpiresOn(NEW_EXPIRY_DATE)
                              .WithLanguage(NEW_LANGUAGE)
                              .WithVisibility(NEW_VISIBILITY)
                              .WithNotarized(NEW_NOTARIZED)
                              .WithoutAutomaticCompletion()
                              .WithSettings(settingsToUpdate)
                              .Build();

            ossClient.UpdatePackage(packageId, packageToUpdate);

            updatedPackage        = ossClient.GetPackage(packageId);
            updatedSettings       = updatedPackage.Settings;
            updatedLayoutSettings = updatedSettings.CeremonyLayoutSettings;
        }
        override public void Execute()
        {
            sentLayoutSettings = CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                 .WithBreadCrumbs()
                                 .WithGlobalConfirmButton()
                                 .WithGlobalDownloadButton()
                                 .WithGlobalNavigation()
                                 .WithGlobalSaveAsLayoutButton()
                                 .WithIFrame()
                                 .WithLogoImageLink("old logo image link")
                                 .WithLogoImageSource("old logo image source")
                                 .WithNavigator()
                                 .WithProgressBar()
                                 .WithSessionBar()
                                 .WithTitle()
                                 .Build();

            sentSettings = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                           .WithCaptureText()
                           .WithDecline()
                           .WithDialogOnComplete()
                           .WithDocumentToolbarDownloadButton()
                           .WithHandOverLinkHref("http://www.old.ca")
                           .WithHandOverLinkText("old hand over link text")
                           .WithHandOverLinkTooltip("old hand over link tool tip")
                           .WithInPerson()
                           .WithOptOut()
                           .WithOptOutReason("old opt out reason #1")
                           .WithOptOutReason("old opt out reason #2")
                           .WithOptOutReason("old opt out reason #3")
                           .WithWatermark()
                           .WithCeremonyLayoutSettings(sentLayoutSettings)
                           .Build();

            sentPackage = PackageBuilder.NewPackageNamed("Old Package Name")
                          .DescribedAs("Old Description")
                          .WithEmailMessage("Old Email Message")
                          .ExpiresOn(DateTime.Now.AddMonths(1))
                          .WithLanguage(CultureInfo.GetCultureInfo("en"))
                          .WithAutomaticCompletion()
                          .WithSettings(sentSettings)
                          .Build();

            packageId = eslClient.CreatePackage(sentPackage);

            updatedLayoutSettings = CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                    .WithoutBreadCrumbs()
                                    .WithoutGlobalConfirmButton()
                                    .WithoutGlobalDownloadButton()
                                    .WithoutGlobalNavigation()
                                    .WithoutGlobalSaveAsLayoutButton()
                                    .WithoutIFrame()
                                    .WithLogoImageLink("new logo image link")
                                    .WithLogoImageSource("new logo image source")
                                    .WithoutNavigator()
                                    .WithoutProgressBar()
                                    .WithoutSessionBar()
                                    .WithoutTitle()
                                    .Build();

            updatedSettings = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                              .WithoutCaptureText()
                              .WithoutDecline()
                              .WithoutDialogOnComplete()
                              .WithoutDocumentToolbarDownloadButton()
                              .WithHandOverLinkHref("http://www.new.ca")
                              .WithHandOverLinkText("new hand over link text")
                              .WithHandOverLinkTooltip("new hand over link tool tip")
                              .WithoutInPerson()
                              .WithoutOptOut()
                              .WithOptOutReason("new opt out reason #1")
                              .WithOptOutReason("new opt out reason #2")
                              .WithOptOutReason("new opt out reason #3")
                              .WithoutWatermark()
                              .WithCeremonyLayoutSettings(updatedLayoutSettings)
                              .Build();

            updatedPackage = PackageBuilder.NewPackageNamed("New Package Name")
                             .WithEmailMessage("New Email Message")
                             .ExpiresOn(DateTime.Now.AddMonths(2))
                             .WithLanguage(CultureInfo.GetCultureInfo("fr"))
                             .WithoutAutomaticCompletion()
                             .WithSettings(updatedSettings)
                             .Build();

            eslClient.UpdatePackage(packageId, updatedPackage);

            retrievedPackage        = eslClient.GetPackage(packageId);
            retrievedSettings       = retrievedPackage.Settings;
            retrievedLayoutSettings = retrievedSettings.CeremonyLayoutSettings;
        }
Esempio n. 3
0
        override public void Execute()
        {
            DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed("BrandingBarConfigurationExample " + DateTime.Now)
                                                .DescribedAs("This is a package created using the e-SignLive SDK")
                                                .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                                                              .WithoutOptOut()
                                                              .WithoutDocumentToolbarDownloadButton()
                                                              .WithCeremonyLayoutSettings(CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                                                                          .WithoutGlobalNavigation()
                                                                                          .WithoutGlobalDownloadButton()))
                                                .WithSigner(SignerBuilder.NewSignerWithEmail(email1)
                                                            .WithCustomId("Client1")
                                                            .WithFirstName("John")
                                                            .WithLastName("Smith")
                                                            .WithTitle("Managing Director")
                                                            .WithCompany("Acme Inc."))
                                                .WithDocument(DocumentBuilder.NewDocumentNamed("First Document")
                                                              .FromStream(fileStream1, DocumentType.PDF)
                                                              .WithSignature(SignatureBuilder.SignatureFor(email1)
                                                                             .OnPage(0)
                                                                             .AtPosition(100, 100)))
                                                .Build();

            packageId = eslClient.CreatePackage(superDuperPackage);
            eslClient.SendPackage(packageId);
            retrievedPackage = eslClient.GetPackage(packageId);
        }
        override public void Execute()
        {
            DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed("DocumentPackageSettingsExample " + DateTime.Now)
                                                .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                                                              .WithInPerson()
                                                              .WithoutLanguageDropDown()
                                                              .DisableFirstAffidavit()
                                                              .DisableSecondAffidavit()
                                                              .HideOwnerInPersonDropDown()
                                                              .WithDecline()
                                                              .WithOptOut()
                                                              .WithDeclineReason(DECLINE_REASON_1)
                                                              .WithDeclineReason(DECLINE_REASON_2)
                                                              .WithDeclineReason(DECLINE_REASON_3)
                                                              .WithOptOutReason(OPT_OUT_REASON_1)
                                                              .WithOptOutReason(OPT_OUT_REASON_2)
                                                              .WithOptOutReason(OPT_OUT_REASON_3)
                                                              .WithHandOverLinkHref("http://www.google.ca")
                                                              .WithHandOverLinkText("click here")
                                                              .WithHandOverLinkTooltip("link tooltip")
                                                              .WithCeremonyLayoutSettings(CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                                                                          .WithoutGlobalConfirmButton()
                                                                                          .WithoutGlobalDownloadButton()
                                                                                          .WithoutGlobalSaveAsLayoutButton()))
                                                .WithSigner(SignerBuilder.NewSignerWithEmail(email1)
                                                            .WithFirstName("John")
                                                            .WithLastName("Smith"))
                                                .WithDocument(DocumentBuilder.NewDocumentNamed("First Document")
                                                              .FromStream(fileStream1, DocumentType.PDF)
                                                              .WithSignature(SignatureBuilder.SignatureFor(email1)
                                                                             .OnPage(0)
                                                                             .AtPosition(100, 100)))
                                                .Build();

            packageId        = eslClient.CreateAndSendPackage(superDuperPackage);
            retrievedPackage = eslClient.GetPackage(packageId);
        }
Esempio n. 5
0
        private Silanis.ESL.SDK.DocumentPackageSettings CreateTypicalSDKDocumentPackageSettings()
        {
            Silanis.ESL.SDK.DocumentPackageSettings sdkDocumentPackageSettings = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                                                                                 .WithInPerson()
                                                                                 .WithAda()
                                                                                 .WithoutDecline()
                                                                                 .WithOptOut()
                                                                                 .WithoutWatermark()
                                                                                 .WithoutCaptureText()
                                                                                 .DisableFirstAffidavit()
                                                                                 .DisableSecondAffidavit()
                                                                                 .HideOwnerInPersonDropDown()
                                                                                 .WithoutLanguageDropDown()
                                                                                 .WithDeclineReason("Decline reason One")
                                                                                 .WithDeclineReason("Decline reason Two")
                                                                                 .WithDeclineReason("Decline reason Three")
                                                                                 .WithoutDeclineOther()
                                                                                 .WithOptOutReason("Reason One")
                                                                                 .WithOptOutReason("Reason Two")
                                                                                 .WithOptOutReason("Reason Three")
                                                                                 .WithoutOptOutOther()
                                                                                 .WithHandOverLinkHref("http://www.google.ca")
                                                                                 .WithHandOverLinkText("click here")
                                                                                 .WithHandOverLinkTooltip("link tooltip")
                                                                                 .WithDialogOnComplete()
                                                                                 .WithCeremonyLayoutSettings(CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                                                                                             .WithoutGlobalDownloadButton()
                                                                                                             .WithoutGlobalConfirmButton()
                                                                                                             .WithoutGlobalSaveAsLayoutButton()
                                                                                                             )
                                                                                 .Build();

            return(sdkDocumentPackageSettings);
        }
Esempio n. 6
0
        private OneSpanSign.Sdk.DocumentPackageSettings CreateTypicalSDKDocumentPackageSettings()
        {
            OneSpanSign.Sdk.DocumentPackageSettings sdkDocumentPackageSettings = DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                                                                                 .WithInPerson()
                                                                                 .WithAda()
                                                                                 .WithFontSize(36)
                                                                                 .WithEnforceCaptureSignature()
                                                                                 .WithoutDecline()
                                                                                 .WithOptOut()
                                                                                 .WithoutWatermark()
                                                                                 .WithoutCaptureText()
                                                                                 .WithoutLeftMenuExpand()
                                                                                 .DisableFirstAffidavit()
                                                                                 .DisableSecondAffidavit()
                                                                                 .HideOwnerInPersonDropDown()
                                                                                 .WithoutLanguageDropDown()
                                                                                 .WithDeclineReason("Decline reason One")
                                                                                 .WithDeclineReason("Decline reason Two")
                                                                                 .WithDeclineReason("Decline reason Three")
                                                                                 .WithoutDeclineOther()
                                                                                 .WithOptOutReason("Reason One")
                                                                                 .WithOptOutReason("Reason Two")
                                                                                 .WithOptOutReason("Reason Three")
                                                                                 .WithoutOptOutOther()
                                                                                 .WithHandOverLinkHref("http://www.google.ca")
                                                                                 .WithHandOverLinkText("click here")
                                                                                 .WithHandOverLinkTooltip("link tooltip")
                                                                                 .WithDialogOnComplete()
                                                                                 .WithDefaultTimeBasedExpiry()
                                                                                 .WithRemainingDays(14)
                                                                                 .WithMaxAttachmentFiles(2)
                                                                                 .WithCeremonyLayoutSettings(CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                                                                                             .WithoutGlobalDownloadButton()
                                                                                                             .WithoutGlobalConfirmButton()
                                                                                                             .WithoutGlobalSaveAsLayoutButton()
                                                                                                             )
                                                                                 .Build();

            return(sdkDocumentPackageSettings);
        }
Esempio n. 7
0
        override public void Execute()
        {
            DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed("DocumentPackageSettingsExample " + DateTime.Now)
                                                .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                                                              .WithInPerson()
                                                              .WithoutDecline()
                                                              .WithOptOut()
                                                              .WithOptOutReason("Reason One")
                                                              .WithOptOutReason("Reason Two")
                                                              .WithOptOutReason("Reason Three")
                                                              .WithHandOverLinkHref("http://www.google.ca")
                                                              .WithHandOverLinkText("click here")
                                                              .WithHandOverLinkTooltip("link tooltip")
                                                              .WithCeremonyLayoutSettings(CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                                                                          .WithoutGlobalConfirmButton()
                                                                                          .WithoutGlobalDownloadButton()
                                                                                          .WithoutGlobalSaveAsLayoutButton()))
                                                .WithSigner(SignerBuilder.NewSignerWithEmail(email1)
                                                            .WithFirstName("John")
                                                            .WithLastName("Smith"))
                                                .WithDocument(DocumentBuilder.NewDocumentNamed("First Document")
                                                              .FromStream(fileStream1, DocumentType.PDF)
                                                              .WithSignature(SignatureBuilder.SignatureFor(email1)
                                                                             .OnPage(0)
                                                                             .AtPosition(100, 100)))
                                                .Build();

            eslClient.CreateAndSendPackage(superDuperPackage);
        }
Esempio n. 8
0
        override public void Execute()
        {
            DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed(PackageName)
                                                .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                                                              .WithInPerson()
                                                              .WithoutLanguageDropDown()
                                                              .DisableFirstAffidavit()
                                                              .DisableSecondAffidavit()
                                                              .HideOwnerInPersonDropDown()
                                                              .WithDecline()
                                                              .WithOptOut()
                                                              .WithLeftMenuExpand()
                                                              .WithEnforceCaptureSignature()
                                                              .WithDeclineReason(DECLINE_REASON_1)
                                                              .WithDeclineReason(DECLINE_REASON_2)
                                                              .WithDeclineReason(DECLINE_REASON_3)
                                                              .WithoutDeclineOther()
                                                              .WithOptOutReason(OPT_OUT_REASON_1)
                                                              .WithOptOutReason(OPT_OUT_REASON_2)
                                                              .WithOptOutReason(OPT_OUT_REASON_3)
                                                              .WithoutOptOutOther()
                                                              .WithFontSize(FONT_SIZE)
                                                              .WithHandOverLinkHref("http://www.google.ca")
                                                              .WithHandOverLinkText("click here")
                                                              .WithHandOverLinkTooltip("link tooltip")
                                                              .WithDefaultTimeBasedExpiry()
                                                              .WithRemainingDays(EXPIRE_IN_DAYS)
                                                              .WithCeremonyLayoutSettings(CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                                                                          .WithoutGlobalConfirmButton()
                                                                                          .WithoutGlobalDownloadButton()
                                                                                          .WithoutGlobalSaveAsLayoutButton()))
                                                .WithSigner(SignerBuilder.NewSignerWithEmail(email1)
                                                            .WithFirstName("John")
                                                            .WithLastName("Smith"))
                                                .WithDocument(DocumentBuilder.NewDocumentNamed("First Document")
                                                              .FromStream(fileStream1, DocumentType.PDF)
                                                              .WithSignature(SignatureBuilder.SignatureFor(email1)
                                                                             .OnPage(0)
                                                                             .AtPosition(100, 100)))
                                                .Build();

            packageId        = ossClient.CreateAndSendPackage(superDuperPackage);
            retrievedPackage = ossClient.GetPackage(packageId);
        }
        public static void Main(string[] args)
        {
            FileInfo        file              = new FileInfo(Directory.GetCurrentDirectory() + "/src/document.pdf");
            EslClient       eslClient         = new EslClient(apiToken, baseUrl);
            DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed("DocumentPackageSettings " + DateTime.Now)
                                                .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings()
                                                              .WithInPerson()
                                                              .WithoutDecline()
                                                              .WithOptOut()
                                                              .WithOptOutReason("Reason One")
                                                              .WithOptOutReason("Reason Two")
                                                              .WithOptOutReason("Reason Three")
                                                              .WithHandOverLinkHref("http://www.google.ca")
                                                              .WithHandOverLinkText("click here")
                                                              .WithHandOverLinkTooltip("link tooltip")
                                                              .WithCeremonyLayoutSettings(CeremonyLayoutSettingsBuilder.NewCeremonyLayoutSettings()
                                                                                          .WithoutProgressBar()
                                                                                          .WithoutSessionBar()
                                                                                          .WithoutGlobalNavigation()
                                                                                          .WithoutBreadCrumbs()))
                                                .WithSigner(SignerBuilder.NewSignerWithEmail("*****@*****.**")
                                                            .WithFirstName("John")
                                                            .WithLastName("Smith"))
                                                .WithDocument(DocumentBuilder.NewDocumentNamed("First Document")
                                                              .FromFile(file.FullName)
                                                              .WithSignature(SignatureBuilder.SignatureFor("*****@*****.**")
                                                                             .OnPage(0)
                                                                             .AtPosition(100, 100)))
                                                .Build();

            PackageId       packageId     = eslClient.CreatePackage(superDuperPackage);
            DocumentPackage customPackage = eslClient.GetPackage(packageId);
        }