public Group Build() { Group result = new Group(); result.Id = id; result.Email = email; result.Created = created; result.Updated = updated; result.Name = name; result.EmailMembers = emailMembers; foreach( GroupMember groupMember in members ) { result.Members.Add( groupMember ); } return result; }
public Group Build() { Support.LogMethodEntry(); Group result = new Group(); result.Id = id; result.Email = email; result.Created = created; result.Updated = updated; result.Name = name; result.EmailMembers = emailMembers; foreach( GroupMember groupMember in members ) { result.Members.Add( groupMember ); } Support.LogMethodExit(result); return result; }
public GroupConverter( Silanis.ESL.API.Group apiGroup ) { this.apiGroup = apiGroup; sdkGroup = null; }
public GroupConverter( Group group ) { sdkGroup = group; apiGroup = null; }
override public void Execute() { inviteUsersToMyAccount(); displayAccountGroupsAndMembers(); Group emptyGroup = GroupBuilder.NewGroup(Guid.NewGuid().ToString()) .WithId(new GroupId(Guid.NewGuid().ToString())) .WithEmail("*****@*****.**") .WithoutIndividualMemberEmailing() .Build(); createdEmptyGroup = eslClient.GroupService.CreateGroup(emptyGroup); List<GroupMember> retrievedEmptyGroup = eslClient.GroupService.GetGroupMembers(createdEmptyGroup.Id); GroupMember addMember = eslClient.GroupService.AddMember(createdEmptyGroup.Id, GroupMemberBuilder.NewGroupMember(email1) .AsMemberType(GroupMemberType.MANAGER) .Build()); Group inviteMember = eslClient.GroupService.InviteMember(createdEmptyGroup.Id, GroupMemberBuilder.NewGroupMember(email3) .AsMemberType(GroupMemberType.MANAGER) .Build()); Console.Out.WriteLine("GroupId: " + createdEmptyGroup.Id.Id); retrievedEmptyGroup = eslClient.GroupService.GetGroupMembers(createdEmptyGroup.Id); Group group1 = GroupBuilder.NewGroup(Guid.NewGuid().ToString()) .WithId(new GroupId(Guid.NewGuid().ToString())) .WithMember(GroupMemberBuilder.NewGroupMember(email1) .AsMemberType(GroupMemberType.MANAGER)) .WithMember(GroupMemberBuilder.NewGroupMember(email3) .AsMemberType(GroupMemberType.MANAGER)) .WithEmail("*****@*****.**") .WithIndividualMemberEmailing() .Build(); createdGroup1 = eslClient.GroupService.CreateGroup(group1); Console.Out.WriteLine("GroupId #1: " + createdGroup1.Id.Id); eslClient.GroupService.AddMember( createdGroup1.Id, GroupMemberBuilder.NewGroupMember( email3 ) .AsMemberType( GroupMemberType.MANAGER ) .Build() ); eslClient.GroupService.AddMember(createdGroup1.Id, GroupMemberBuilder.NewGroupMember(email4) .AsMemberType(GroupMemberType.REGULAR) .Build()); retrievedGroup1 = eslClient.GroupService.GetGroup(createdGroup1.Id); Group group2 = GroupBuilder.NewGroup(Guid.NewGuid().ToString()) .WithMember(GroupMemberBuilder.NewGroupMember(email2) .AsMemberType(GroupMemberType.MANAGER) ) .WithEmail("*****@*****.**") .WithIndividualMemberEmailing() .Build(); createdGroup2 = eslClient.GroupService.CreateGroup(group2); retrievedGroup2 = eslClient.GroupService.GetGroup(createdGroup2.Id); Console.Out.WriteLine("GroupId #2: " + createdGroup2.Id.Id); Group group3 = GroupBuilder.NewGroup(Guid.NewGuid().ToString()) .WithMember(GroupMemberBuilder.NewGroupMember(email3) .AsMemberType(GroupMemberType.MANAGER) ) .WithEmail("*****@*****.**") .WithIndividualMemberEmailing() .Build(); createdGroup3 = eslClient.GroupService.CreateGroup(group3); Console.Out.WriteLine("GroupId #3: " + createdGroup3.Id.Id); retrievedGroup3 = eslClient.GroupService.GetGroup(createdGroup3.Id); allGroupsBeforeDelete = eslClient.GroupService.GetMyGroups(); eslClient.GroupService.DeleteGroup(createdGroup2.Id); allGroupsAfterDelete = eslClient.GroupService.GetMyGroups(); Group updatedGroup = GroupBuilder.NewGroup(Guid.NewGuid().ToString()) .WithMember(GroupMemberBuilder.NewGroupMember(email2) .AsMemberType(GroupMemberType.MANAGER) ) .WithMember(GroupMemberBuilder.NewGroupMember(email3) .AsMemberType(GroupMemberType.REGULAR) ) .WithMember(GroupMemberBuilder.NewGroupMember(email4) .AsMemberType(GroupMemberType.REGULAR) ) .WithEmail("*****@*****.**") .WithIndividualMemberEmailing() .Build(); createdGroup3Updated = eslClient.GroupService.UpdateGroup(updatedGroup, createdGroup3.Id); groupMemberEmailsAfterUpdate = eslClient.GroupService.GetGroupMemberEmails(createdGroup3Updated.Id); DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed("GroupManagementExample " + DateTime.Now.ToString()) .WithSigner(SignerBuilder.NewSignerFromGroup(createdGroup1.Id) .CanChangeSigner() .DeliverSignedDocumentsByEmail()) .WithDocument(DocumentBuilder.NewDocumentNamed("First Document") .FromStream(fileStream1, DocumentType.PDF) .WithSignature(SignatureBuilder.SignatureFor(createdGroup1.Id) .OnPage(0) .AtPosition(100, 100))) .Build(); PackageId packageId = eslClient.CreatePackage(superDuperPackage); eslClient.SendPackage(packageId); eslClient.PackageService.NotifySigner(packageId, createdGroup1.Id); DocumentPackage result = eslClient.GetPackage(packageId); }