public async Task<SignatureRequest> SendWithReusableFormAsync(SignatureRequestSendReusableFormRequest request) { SignatureRequestWrapper signatureRequestWrapper = await helloSignService.MakeRequestAsync<SignatureRequestWrapper>( settings.HelloSignSettings.Endpoints.SignatureRequest.SendForm, request); return signatureRequestWrapper.SignatureRequest; }
public async Task SendWithReusableFormTest() { if (string.IsNullOrEmpty(Config.ReuseableFormId)) { Assert.Inconclusive("Config.ReuseableFormId must be set to run this test. Reuseable Forms have been deprecated though, so unless for legacy purposes, ignore and use templates"); } SignatureRequestSendReusableFormRequest sendRequest = new SignatureRequestSendReusableFormRequest { TestMode = 1, ReusableFormId = Config.ReuseableFormId, Title = "Test Title", Subject = "Test Subject", Message = "Test Message", Signers = new Dictionary<string, SignatureRequestSignerRoleRequest>() { { "Test", new SignatureRequestSignerRoleRequest { Name = "Bob", EmailAddress = "*****@*****.**" } }, { "Test 2", new SignatureRequestSignerRoleRequest { Name = "Mary", EmailAddress = "*****@*****.**" } } } }; SignatureRequest signatureRequest = await client.SignatureRequest.SendWithReusableFormAsync(sendRequest); Assert.IsNotNull(signatureRequest); try { Assert.IsTrue(signatureRequest.Title == sendRequest.Title); Assert.IsTrue(signatureRequest.Subject == sendRequest.Subject); Assert.IsTrue(signatureRequest.Message == sendRequest.Message); } finally { var result = await client.SignatureRequest.CancelAsync(signatureRequest.SignatureRequestId); Assert.IsTrue(result); } }
public async Task<List<SignatureRequest>> CreateEmbeddedWithReusableFormAsync(SignatureRequestSendReusableFormRequest request) { return await helloSignService.MakeRequestAsync<List<SignatureRequest>>( settings.HelloSignSettings.Endpoints.SignatureRequest.CreateEmbeddedWithReusableForm, request); }