public async Task CreateAndSendSignatureJob() { ClientConfiguration clientConfiguration = null; //As initialized earlier var directClient = new DirectClient(clientConfiguration); var documentToSign = new Document( "Subject of Message", "This is the content", FileType.Pdf, @"C:\Path\ToDocument\File.pdf"); var exitUrls = new ExitUrls( new Uri("http://redirectUrl.no/onCompletion"), new Uri("http://redirectUrl.no/onCancellation"), new Uri("http://redirectUrl.no/onError") ); var job = new Job( documentToSign, new Signer(new PersonalIdentificationNumber("12345678910")), "SendersReferenceToSignatureJob", exitUrls ); var directJobResponse = await directClient.Create(job); }
public async Task CreateAndSendSignatureJob() { ClientConfiguration clientConfiguration = null; //As initialized earlier var directClient = new DirectClient(clientConfiguration); var documentToSign = new Document( "Subject of Message", "This is the content", FileType.Pdf, @"C:\Path\ToDocument\File.pdf"); var exitUrls = new ExitUrls( new Uri("http://redirectUrl.no/onCompletion"), new Uri("http://redirectUrl.no/onCancellation"), new Uri("http://redirectUrl.no/onError") ); var signers = new List <Signer> { new Signer(new PersonalIdentificationNumber("12345678910")), new Signer(new PersonalIdentificationNumber("10987654321")) }; var job = new Job(documentToSign, signers, "SendersReferenceToSignatureJob", exitUrls); var directJobResponse = await directClient.Create(job); }
public async Task SpecifyingQueues() { ClientConfiguration clientConfiguration = null; // As initialized earlier var directClient = new DirectClient(clientConfiguration); var organizationNumber = "123456789"; var sender = new Sender(organizationNumber, new PollingQueue("CustomPollingQueue")); Document documentToSign = null; // As initialized earlier ExitUrls exitUrls = null; // As initialized earlier var signer = new PersonalIdentificationNumber("00000000000"); var job = new Job( documentToSign, new List <Signer> { new Signer(signer) }, "SendersReferenceToSignatureJob", exitUrls, sender, StatusRetrievalMethod.Polling ); await directClient.Create(job); var changedJob = await directClient.GetStatusChange(sender); }
public static exiturls ToDataTransferObject(ExitUrls exitUrls) { return(new exiturls { completionurl = exitUrls.CompletionUrl.ToString(), errorurl = exitUrls.ErrorUrl.ToString(), rejectionurl = exitUrls.RejectionUrl.ToString() }); }
public void Simple_contructor() { //Arrange var completionUrl = new Uri("http://localhost/completion"); var cancellationUrl = new Uri("http://localhost/cancellation"); var errorUrl = new Uri("http://localhost/error"); //Act var exitUrls = new ExitUrls(completionUrl, cancellationUrl, errorUrl); //Assert Assert.Equal(completionUrl, exitUrls.CompletionUrl); Assert.Equal(cancellationUrl, exitUrls.RejectionUrl); Assert.Equal(errorUrl, exitUrls.ErrorUrl); }