public DocumentPackageSettings Build() { DocumentPackageSettings result = new DocumentPackageSettings(); result.EnableInPerson = enableInPerson; result.EnableOptOut = enableOptOut; result.EnableDecline = enableDecline; result.HideWatermark = hideWatermark; result.HideCaptureText = hideCaptureText; foreach (string declineReason in declineReasons) { result.DeclineReasons.Add(declineReason); } foreach (string optOutReason in optOutReasons) { result.OptOutReasons.Add(optOutReason); } result.MaxAuthAttempts = maxAuthAttempts; result.ShowDownloadButton = showDocumentToolbarDownloadButton; result.ShowDialogOnComplete = showDialogOnComplete; result.ShowLanguageDropDown = showLanguageDropDown; result.EnableFirstAffidavit = enableFirstAffidavit; result.EnableSecondAffidavit = enableSecondAffidavit; result.ShowOwnerInPersonDropDown = showOwnerInPersonDropDown; result.DisableDeclineOther = disableDeclineOther; result.DisableOptOutOther = disableOptOutOther; result.LinkHref = linkHref; result.LinkText = linkText; result.LinkTooltip = linkTooltip; result.CeremonyLayoutSettings = ceremonyLayoutSettings; return(result); }
public void ConvertSDKToAPI() { sdkPackageSettings1 = CreateTypicalSDKDocumentPackageSettings(); apiPackageSettings1 = new DocumentPackageSettingsConverter(sdkPackageSettings1).toAPIPackageSettings(); Assert.IsNotNull(apiPackageSettings1); Assert.AreEqual(apiPackageSettings1.Ceremony.InPerson, sdkPackageSettings1.EnableInPerson); Assert.AreEqual(apiPackageSettings1.Ceremony.Ada, sdkPackageSettings1.Ada); Assert.AreEqual(apiPackageSettings1.Ceremony.DeclineButton, sdkPackageSettings1.EnableDecline); Assert.AreEqual(apiPackageSettings1.Ceremony.OptOutButton, sdkPackageSettings1.EnableOptOut); Assert.AreEqual(apiPackageSettings1.Ceremony.DeclineReasons[0], sdkPackageSettings1.DeclineReasons[0]); Assert.AreEqual(apiPackageSettings1.Ceremony.DeclineReasons[1], sdkPackageSettings1.DeclineReasons[1]); Assert.AreEqual(apiPackageSettings1.Ceremony.DeclineReasons[2], sdkPackageSettings1.DeclineReasons[2]); Assert.AreEqual(apiPackageSettings1.Ceremony.DisableDeclineOther, sdkPackageSettings1.DisableDeclineOther); Assert.AreEqual(apiPackageSettings1.Ceremony.OptOutReasons[0], sdkPackageSettings1.OptOutReasons[0]); Assert.AreEqual(apiPackageSettings1.Ceremony.OptOutReasons[1], sdkPackageSettings1.OptOutReasons[1]); Assert.AreEqual(apiPackageSettings1.Ceremony.OptOutReasons[2], sdkPackageSettings1.OptOutReasons[2]); Assert.AreEqual(apiPackageSettings1.Ceremony.DisableOptOutOther, sdkPackageSettings1.DisableOptOutOther); Assert.AreEqual(apiPackageSettings1.Ceremony.HandOver.Href, sdkPackageSettings1.LinkHref); Assert.AreEqual(apiPackageSettings1.Ceremony.HandOver.Text, sdkPackageSettings1.LinkText); Assert.AreEqual(apiPackageSettings1.Ceremony.HandOver.Title, sdkPackageSettings1.LinkTooltip); Assert.AreEqual(apiPackageSettings1.Ceremony.HideCaptureText, sdkPackageSettings1.HideCaptureText); Assert.AreEqual(apiPackageSettings1.Ceremony.HideWatermark, sdkPackageSettings1.HideWatermark); Assert.AreEqual(apiPackageSettings1.Ceremony.MaxAuthFailsAllowed, sdkPackageSettings1.MaxAuthAttempts); Assert.AreEqual(apiPackageSettings1.Ceremony.Layout.Header.GlobalActions.Download, sdkPackageSettings1.CeremonyLayoutSettings.ShowGlobalDownloadButton); Assert.AreEqual(apiPackageSettings1.Ceremony.Layout.Header.GlobalActions.Confirm, sdkPackageSettings1.CeremonyLayoutSettings.ShowGlobalConfirmButton); Assert.AreEqual(apiPackageSettings1.Ceremony.Layout.Header.GlobalActions.SaveAsLayout, sdkPackageSettings1.CeremonyLayoutSettings.ShowGlobalSaveAsLayoutButton); Assert.AreEqual(apiPackageSettings1.Ceremony.HideLanguageDropdown, !sdkPackageSettings1.ShowLanguageDropDown); Assert.AreEqual(apiPackageSettings1.Ceremony.HidePackageOwnerInPerson, !sdkPackageSettings1.ShowOwnerInPersonDropDown); Assert.AreEqual(apiPackageSettings1.Ceremony.DisableFirstInPersonAffidavit, !sdkPackageSettings1.EnableFirstAffidavit); Assert.AreEqual(apiPackageSettings1.Ceremony.DisableSecondInPersonAffidavit, !sdkPackageSettings1.EnableSecondAffidavit); }
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); }
public DocumentPackageSettings build() { Support.LogMethodEntry(); DocumentPackageSettings result = new DocumentPackageSettings(); result.EnableInPerson = enableInPerson; result.EnableOptOut = enableOptOut; result.EnableDecline = enableDecline; result.HideWatermark = hideWatermark; result.HideCaptureText = hideCaptureText; foreach (string reason in optOutReasons) { result.OptOutReasons.Add(reason); } result.MaxAuthAttempts = maxAuthAttempts; result.ShowDownloadButton = showDocumentToolbarDownloadButton; result.ShowDialogOnComplete = showDialogOnComplete; result.LinkHref = linkHref; result.LinkText = linkText; result.LinkTooltip = linkTooltip; result.CeremonyLayoutSettings = ceremonyLayoutSettings; Support.LogMethodExit(result); return(result); }
public DocumentPackageSettings Build() { DocumentPackageSettings result = new DocumentPackageSettings (); result.EnableInPerson = enableInPerson; result.EnableOptOut = enableOptOut; result.EnableDecline = enableDecline; result.HideWatermark = hideWatermark; result.HideCaptureText = hideCaptureText; foreach ( string reason in optOutReasons ) result.OptOutReasons.Add( reason ); result.MaxAuthAttempts = maxAuthAttempts; result.ShowDownloadButton = showDocumentToolbarDownloadButton; result.ShowDialogOnComplete = showDialogOnComplete; result.ShowLanguageDropDown = showLanguageDropDown; result.EnableFirstAffidavit = enableFirstAffidavit; result.EnableSecondAffidavit = enableSecondAffidavit; result.ShowOwnerInPersonDropDown = showOwnerInPersonDropDown; result.LinkHref = linkHref; result.LinkText = linkText; result.LinkTooltip = linkTooltip; result.CeremonyLayoutSettings = ceremonyLayoutSettings; return result; }
public void ConvertNullSDKToAPI() { sdkPackageSettings1 = null; converter = new DocumentPackageSettingsConverter(sdkPackageSettings1); Assert.IsNull(converter.toAPIPackageSettings()); }
public DocumentPackageSettingsConverter(DocumentPackageSettings settings) { sdkSettings = settings; }
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; }
public DocumentPackageSettings build() { Support.LogMethodEntry(); DocumentPackageSettings result = new DocumentPackageSettings (); result.EnableInPerson = enableInPerson; result.EnableOptOut = enableOptOut; result.EnableDecline = enableDecline; result.HideWatermark = hideWatermark; result.HideCaptureText = hideCaptureText; foreach ( string reason in optOutReasons ) result.OptOutReasons.Add( reason ); result.MaxAuthAttempts = maxAuthAttempts; result.ShowDownloadButton = showDocumentToolbarDownloadButton; result.ShowDialogOnComplete = showDialogOnComplete; result.LinkHref = linkHref; result.LinkText = linkText; result.LinkTooltip = linkTooltip; result.CeremonyLayoutSettings = ceremonyLayoutSettings; Support.LogMethodExit(result); return result; }