override public void Execute() { senderEmail = System.Guid.NewGuid().ToString() + "@e-signlive.com"; senderEmail = senderEmail.Replace("-", ""); eslClient.AccountService.InviteUser( AccountMemberBuilder.NewAccountMember(senderEmail) .WithFirstName("firstName") .WithLastName("lastName") .WithCompany("company") .WithTitle("title") .WithLanguage("language") .WithPhoneNumber("phoneNumber") .Build() ); SenderInfo senderInfo = SenderInfoBuilder.NewSenderInfo(senderEmail) .WithName(SENDER_FIRST_NAME, SENDER_SECOND_NAME) .WithTitle(SENDER_TITLE) .WithCompany(SENDER_COMPANY) .Build(); package = PackageBuilder.NewPackageNamed("CustomSenderInfoExample " + DateTime.Now) .WithSenderInfo(senderInfo) .DescribedAs("This is a package created using the e-SignLive SDK") .ExpiresOn(DateTime.Now.AddMonths(1)) .WithEmailMessage("This message should be delivered to all signers") .Build(); packageId = eslClient.CreatePackage(package); }
override public void Execute() { accountMember1 = AccountMemberBuilder.NewAccountMember(email1) .WithFirstName("firstName1") .WithLastName("lastName1") .WithCompany("company1") .WithTitle("title1") .WithLanguage("language1") .WithPhoneNumber("phoneNumber1") .WithTimezoneId("GMT") .WithStatus(SenderStatus.ACTIVE) .Build(); accountMember2 = AccountMemberBuilder.NewAccountMember(email2) .WithFirstName("firstName2") .WithLastName("lastName2") .WithCompany("company2") .WithTitle("title2") .WithLanguage("language2") .WithPhoneNumber("phoneNumber2") .WithStatus(SenderStatus.ACTIVE) .Build(); accountMember3 = AccountMemberBuilder.NewAccountMember(email3) .WithFirstName("firstName3") .WithLastName("lastName3") .WithCompany("company3") .WithTitle("title3") .WithLanguage("language3") .WithPhoneNumber("phoneNumber3") .WithStatus(SenderStatus.ACTIVE) .Build(); Sender createdSender1 = eslClient.AccountService.InviteUser(accountMember1); Sender createdSender2 = eslClient.AccountService.InviteUser(accountMember2); Sender createdSender3 = eslClient.AccountService.InviteUser(accountMember3); retrievedSender1 = eslClient.AccountService.GetSender(createdSender1.Id); retrievedSender2 = eslClient.AccountService.GetSender(createdSender2.Id); retrievedSender3 = eslClient.AccountService.GetSender(createdSender3.Id); eslClient.AccountService.SendInvite(createdSender1.Id); eslClient.AccountService.DeleteSender(createdSender2.Id); updatedSenderInfo = SenderInfoBuilder.NewSenderInfo(email3) .WithName("updatedFirstName", "updatedLastName") .WithCompany("updatedCompany") .WithTitle("updatedTitle") .WithTimezoneId("Canada/Mountain") .Build(); eslClient.AccountService.UpdateSender(updatedSenderInfo, createdSender3.Id); retrievedUpdatedSender3 = eslClient.AccountService.GetSender(createdSender3.Id); // Get senders in account IDictionary <string, Sender> senders = eslClient.AccountService.GetSenders(Direction.ASCENDING, new PageRequest(1, 100)); }
override public void Execute() { this.senderEmail = GetRandomEmail(); // Invite the sender to account eslClient.AccountService.InviteUser(AccountMemberBuilder.NewAccountMember(senderEmail) .WithFirstName("firstName") .WithLastName("lastName") .WithCompany("company") .WithTitle("title") .WithPhoneNumber("phoneNumber") .WithStatus(SenderStatus.ACTIVE) .Build() ); // Create the template specifying the sender DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed(PackageName) .DescribedAs("This is a package created using the eSignLive SDK") .WithEmailMessage("This message should be delivered to all signers") .WithSenderInfo(SenderInfoBuilder.NewSenderInfo(senderEmail) .WithName(SENDER_FIRST_NAME, SENDER_LAST_NAME) .WithTitle(SENDER_TITLE) .WithCompany(SENDER_COMPANY) .Build()) .WithSigner(SignerBuilder.NewSignerWithEmail(email1) .WithFirstName("Patty") .WithLastName("Galant")) .WithDocument(DocumentBuilder.NewDocumentNamed("First Document") .WithId("documentId") .FromStream(fileStream1, DocumentType.PDF) .WithSignature(SignatureBuilder.SignatureFor(senderEmail) .AtPosition(200, 200) .OnPage(0)) .WithSignature(SignatureBuilder.SignatureFor(email1) .AtPosition(200, 400) .OnPage(0))) .Build(); // Create a template on behalf of another sender templateId = eslClient.CreateTemplate(superDuperPackage); DocumentPackage packageFromTemplate = PackageBuilder.NewPackageNamed("PackageFromTemplateOnBehalfOfSender" + DateTime.Now) .WithSenderInfo(SenderInfoBuilder.NewSenderInfo(senderEmail) .WithName(SENDER_FIRST_NAME, SENDER_LAST_NAME) .WithTitle(SENDER_TITLE) .WithCompany(SENDER_COMPANY) .Build()) .WithDocument(DocumentBuilder.NewDocumentNamed("Second Document") .WithId("documentId2") .FromStream(fileStream2, DocumentType.PDF)) .Build(); // Create package from template on behalf of another sender packageId = eslClient.CreatePackageFromTemplate(templateId, packageFromTemplate); retrievedPackage = eslClient.GetPackage(packageId); }
public void DefaultBuildCase() { SenderInfo senderInfo = SenderInfoBuilder.NewSenderInfo("*****@*****.**") .WithName("firstName", "lastName") .WithCompany("company") .WithTitle("title") .Build(); Assert.IsNotNull(senderInfo); Assert.AreEqual("firstName", senderInfo.FirstName); Assert.AreEqual("lastName", senderInfo.LastName); Assert.AreEqual("company", senderInfo.Company); Assert.AreEqual("title", senderInfo.Title); }
internal PackageBuilder(Silanis.ESL.API.Package package) { this.id = new PackageId(package.Id); this.packageName = package.Name; this.autocomplete = package.Autocomplete; this.description = package.Description; this.expiryDate = package.Due; this.status = ConvertPackageStatus(package.Status); this.emailMessage = package.EmailMessage; this.settings = new DocumentPackageSettingsBuilder(package.Settings).build(); this.senderInfo = new SenderConverter(package.Sender).ToSDKSenderInfo(); this.attributes = new DocumentPackageAttributes(package.Data); foreach (Silanis.ESL.API.Role role in package.Roles) { if (role.Signers.Count == 0) { continue; } if (role.Signers[0].Group != null) { WithSigner(SignerBuilder.NewSignerFromGroup(new GroupId(role.Signers[0].Group.Id))); } else { WithSigner(SignerBuilder.NewSignerFromAPISigner(role).Build()); if (role.Type == Silanis.ESL.API.RoleType.SENDER) { Silanis.ESL.API.Signer senderSigner = role.Signers[0]; WithSenderInfo(SenderInfoBuilder.NewSenderInfo(senderSigner.Email) .WithName(senderSigner.FirstName, senderSigner.LastName) .WithCompany(senderSigner.Company) .WithTitle(senderSigner.Title)); } } } foreach (Silanis.ESL.API.Document apiDocument in package.Documents) { Document document = DocumentBuilder.NewDocumentFromAPIDocument(apiDocument, package).Build(); WithDocument(document); } }
private PackageId CreatePackageWithCustomSender(string PackageSenderEmail) { SenderInfo customSenderInfo = SenderInfoBuilder.NewSenderInfo(PackageSenderEmail) .WithName("firstName", "lastName") .WithTitle("title") .WithCompany("company") .Build(); DocumentPackage customSenderPackage = PackageBuilder.NewPackageNamed("DesignerRedirectForPackageSenderExample " + DateTime.Now) .WithSenderInfo(customSenderInfo) .DescribedAs("This is a package created using the e-SignLive SDK") .ExpiresOn(DateTime.Now.AddMonths(1)) .WithEmailMessage("This message should be delivered to all signers") .WithDocument(DocumentBuilder.NewDocumentNamed("First Document") .FromStream(fileStream, DocumentType.PDF) .WithId("doc1")) .Build(); PackageId customSenderPackageId = eslClient.CreatePackage(customSenderPackage); return(customSenderPackageId); }
override public void Execute() { eslClient.AccountService.InviteUser( AccountMemberBuilder.NewAccountMember(senderEmail) .WithFirstName("firstName") .WithLastName("lastName") .WithCompany("company") .WithTitle("title") .WithLanguage("language") .WithPhoneNumber("phoneNumber") .Build() ); SenderInfo customSenderInfo = SenderInfoBuilder.NewSenderInfo(senderEmail) .WithName("firstName", "lastName") .WithTitle("title") .WithCompany("company") .Build(); DocumentPackage customSenderPackage = PackageBuilder.NewPackageNamed(PackageName) .WithSenderInfo(customSenderInfo) .DescribedAs("This is a package created using the eSignLive SDK") .ExpiresOn(DateTime.Now.AddMonths(1)) .WithEmailMessage("This message should be delivered to all signers") .WithDocument(DocumentBuilder.NewDocumentNamed("First Document") .FromStream(fileStream1, DocumentType.PDF) .WithSignature(SignatureBuilder.SignatureFor(senderEmail) .OnPage(0) .AtPosition(100, 100))) .Build(); PackageId packageId = eslClient.CreatePackage(customSenderPackage); string userAuthenticationToken = eslClient.AuthenticationTokenService.CreateUserAuthenticationToken(); generatedLinkToPackageViewForSender = authenticationClient.BuildRedirectToPackageViewForSender(userAuthenticationToken, packageId); System.Console.WriteLine("PackageView redirect url: " + generatedLinkToPackageViewForSender); }
override public void Execute() { senderEmail = System.Guid.NewGuid().ToString().Replace("-", "") + "@e-signlive.com"; ossClient.AccountService.InviteUser( AccountMemberBuilder.NewAccountMember(senderEmail) .WithFirstName("firstName") .WithLastName("lastName") .WithCompany("company") .WithTitle("title") .WithLanguage("language") .WithPhoneNumber("phoneNumber") .Build() ); DocumentPackage template = PackageBuilder.NewPackageNamed("CustomSenderInfoInCreateNewTemplateExample: " + DateTime.Now) .DescribedAs("This is a template created using the eSignLive SDK") .WithEmailMessage("This message should be delivered to all signers") .WithSigner(SignerBuilder.NewSignerPlaceholder(new Placeholder("PlaceholderId1"))) .WithDocument(DocumentBuilder.NewDocumentNamed("First Document") .FromStream(fileStream1, DocumentType.PDF) .WithSignature(SignatureBuilder.SignatureFor(new Placeholder("PlaceholderId1")) .OnPage(0) .AtPosition(100, 100) ) ) .Build(); templateId = ossClient.CreateTemplate(template); packageId = ossClient.CreatePackageFromTemplate(templateId, PackageBuilder.NewPackageNamed(PackageName) .WithSenderInfo(SenderInfoBuilder.NewSenderInfo(senderEmail) .WithName(SENDER_FIRST_NAME, SENDER_SECOND_NAME) .WithTitle(SENDER_TITLE) .WithCompany(SENDER_COMPANY)) .Build()); retrievedPackage = ossClient.GetPackage(packageId); }
override public void Execute() { senderEmail = System.Guid.NewGuid().ToString().Replace("-", "") + "@e-signlive.com"; eslClient.AccountService.InviteUser( AccountMemberBuilder.NewAccountMember(senderEmail) .WithFirstName("firstName") .WithLastName("lastName") .WithCompany("company") .WithTitle("title") .WithLanguage("fr") .WithPhoneNumber("phoneNumber") .WithStatus(SenderStatus.ACTIVE) .Build() ); SenderInfo senderInfo = SenderInfoBuilder.NewSenderInfo(senderEmail) .WithName(SENDER_FIRST_NAME, SENDER_SECOND_NAME) .WithTitle(SENDER_TITLE) .WithCompany(SENDER_COMPANY) .Build(); package = PackageBuilder.NewPackageNamed(PackageName) .WithSenderInfo(senderInfo) .DescribedAs("This is a package created using the eSignLive SDK") .ExpiresOn(DateTime.Now.AddMonths(1)) .WithEmailMessage("This message should be delivered to all signers") .WithDocument(DocumentBuilder.NewDocumentNamed("First Document") .FromStream(fileStream1, DocumentType.PDF) .WithId("doc1")) .Build(); packageId = eslClient.CreatePackage(package); eslClient.DownloadDocument(packageId, "doc1"); retrievedPackage = eslClient.GetPackage(packageId); Console.WriteLine("Downloaded document"); }
public void Execute() { String apiKey = "your_api_key"; String apiUrl = "https://sandbox.esignlive.com/api"; EslClient eslClient = new EslClient(apiKey, apiUrl); DocumentPackage pkg = PackageBuilder.NewPackageNamed("New Package") .WithSigner(SignerBuilder.NewSignerWithEmail("*****@*****.**") .WithFirstName("Shruti") .WithLastName("Mukherjee")) .WithDocument(DocumentBuilder.NewDocumentNamed("document 1") .FromFile("your_file_path") .WithSignature(SignatureBuilder.SignatureFor("*****@*****.**") .OnPage(0) .AtPosition(100, 100) .WithSize(250, 75))) .WithSenderInfo(SenderInfoBuilder.NewSenderInfo("your_sender_email")) .WithVisibility(Visibility.ACCOUNT) //only works for templates .Build(); PackageId packageId = eslClient.CreatePackageOneStep(pkg); //package creation //PackageId templateId = eslClient.CreateTemplate(pkg); //template creation }