From b3469921b34f008bb27423adcf8dec4a01c164c8 Mon Sep 17 00:00:00 2001 From: Wade Wegner Date: Fri, 30 Jan 2015 13:09:54 -0700 Subject: [PATCH] Added support for get envelopes; updated WADL and Siena doc --- siena/DocuSign-Sample.siena | Bin 17826 -> 20306 bytes src/DocuSign.FunctionalTests/Tests.cs | 12 ++++++ .../Controllers/EnvelopesController.cs | 26 ++++++++++++ src/DocuSign.Web/DocuSign.Web.csproj | 1 + src/DocuSign.Web/microservice.json | 3 +- src/DocuSign/DocuSign.csproj | 1 + src/DocuSign/DocuSignClient.cs | 39 +++++++++++++++++- src/DocuSign/Models/Envelopes.cs | 19 +++++++++ wadl/DocuSign.xml | 38 +++++++++++++++-- 9 files changed, 134 insertions(+), 5 deletions(-) create mode 100644 src/DocuSign.Web/Controllers/EnvelopesController.cs create mode 100644 src/DocuSign/Models/Envelopes.cs diff --git a/siena/DocuSign-Sample.siena b/siena/DocuSign-Sample.siena index 0d983c2fff3a76e1079f217f518e9f76ebde5a16..7bf39a1f880cdf067893c38e6aac4cd0e4c6fb86 100644 GIT binary patch delta 10288 zcmY+KWl$Ya)2(qixVr>*2p%A~yF+j%xLc4xLU6a>5ZvA6;O_1Y!9BR#(@T z5D*uCAR$oxrbyVkTDe-8yRcZhIM|=*Bf6~e*1j>;ml}+pCbQ~y8q_}fP+xTtZ_shn zJ!_U=Q}=LN(y5O24l3@0!2{hyRNc_=0+I@n<|@J-(Ca9if}Ek7-YJa^Pc+xxXy2bY z?)R<2zR`9dI$w-`0$OVwGB(^V@;bZFSTnrXK04TWUc)jcC!hDuZuZvxPCkc>+JJiG zOKe_v<$r(!I%Yd&yTD>y7M0J1ruT~WuA^eBpL{4&Ywu)q_9~ROdCIk*ab8}-%)X=@GsWBjL8!bEdM^` z*EuZYLbL$?YEkN3eHs%5laqOT@D&bjWsl#~wmX!64>I-lw+gTgK}4xAlSm2hj-V05 z?%CAiT%zodlb3LZtoUJNV z2I&1F>AfZ4(VwfY5|JDn5d7f`4tP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NOaJ9-2Q1J@d5-k-Z>)X1Cz?15Qx>1Wx{-YTH_i$lYO)Vry0ARbgZYWW zcHfMmtYdgLP_BOC4lF_&s5tO`Qohr{P~eVzMedWlPzFTsvHs!z!G8%q&S`7ITi|VM z_`lE|8ar@z;VeRqHPG`ftceW(A^$4-zovH4Sn-s!M^U;Lol$2MXJIkm4!Rb#6z9}= z+17=7GRG`BPvwo=9uTso{DamSX3h?V^gTmb5Jnoz6A}0L5%*l*-E0r=Zx5*nWh9~b z$3$|#{Qm$77XDu^`ESe%0V%TnbE2Y14p&MFaZ;rCXBGQ*wL%IhRebyI|630X4DR1l j_`f5J48lo+4|!2U|ECRIi5zZ_62hbeLfn-6r|5qGQ>7=m diff --git a/src/DocuSign.FunctionalTests/Tests.cs b/src/DocuSign.FunctionalTests/Tests.cs index c587739..03056ba 100644 --- a/src/DocuSign.FunctionalTests/Tests.cs +++ b/src/DocuSign.FunctionalTests/Tests.cs @@ -66,6 +66,18 @@ namespace DocuSign.FunctionalTests Assert.IsNotNull(templates); } + [Test] + public async void GetEnvelopes() + { + var auth = new AuthenticationClient(_username, _password, _integratorKey); + await auth.LoginInformationAsync(); + + var client = new DocuSignClient(auth); + var envelopes = await client.GetEnvelopesAsync(DateTime.Now.AddDays(-100)); + + Assert.IsNotNull(envelopes); + } + [Test] public async void GetEnvelopeInformation() { diff --git a/src/DocuSign.Web/Controllers/EnvelopesController.cs b/src/DocuSign.Web/Controllers/EnvelopesController.cs new file mode 100644 index 0000000..300e090 --- /dev/null +++ b/src/DocuSign.Web/Controllers/EnvelopesController.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using System.Web.Http; +using DocuSign.Models; +using DocuSign.Web.Utils; + +namespace DocuSign.Web.Controllers +{ + public class EnvelopesController : DocuSignController + { + // GET api/envelope/ + public async Task Get([FromUri]DateTime fromDate) + { + await CheckAuthInfo(); + var client = new DocuSignClient(BaseUrl, DocuSignCredentials); + + var envelopes = await client.GetEnvelopesAsync(fromDate); + + return envelopes; + } + } +} diff --git a/src/DocuSign.Web/DocuSign.Web.csproj b/src/DocuSign.Web/DocuSign.Web.csproj index a7e052a..3928ae2 100644 --- a/src/DocuSign.Web/DocuSign.Web.csproj +++ b/src/DocuSign.Web/DocuSign.Web.csproj @@ -156,6 +156,7 @@ + diff --git a/src/DocuSign.Web/microservice.json b/src/DocuSign.Web/microservice.json index cecc7bd..56c350f 100644 --- a/src/DocuSign.Web/microservice.json +++ b/src/DocuSign.Web/microservice.json @@ -1,11 +1,12 @@ { "id": "DocuSign", - "version": "0.0.12", + "version": "0.0.13", "authors": "Wade Wegner", "description": "DocuSign services and website upload tool", "name": "DocuSign", "endpoints": { "apiDefinition": "/swagger/api-docs/Envelope", + "apiDefinition": "/swagger/api-docs/Envelopes", "apiDefinition": "/swagger/api-docs/Recipient", "apiDefinition": "/swagger/api-docs/SignatureDocument", "apiDefinition": "/swagger/api-docs/SignatureTemplate", diff --git a/src/DocuSign/DocuSign.csproj b/src/DocuSign/DocuSign.csproj index 443721a..8929a2b 100644 --- a/src/DocuSign/DocuSign.csproj +++ b/src/DocuSign/DocuSign.csproj @@ -53,6 +53,7 @@ + diff --git a/src/DocuSign/DocuSignClient.cs b/src/DocuSign/DocuSignClient.cs index 1e227de..925dfc6 100644 --- a/src/DocuSign/DocuSignClient.cs +++ b/src/DocuSign/DocuSignClient.cs @@ -42,6 +42,44 @@ namespace DocuSign _httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); } + public async Task GetEnvelopesAsync(DateTime fromDate) + { + var currMonth = fromDate.Month; + var currDay = fromDate.Day; + var currYear = fromDate.Year; + + if (currMonth != 1) + { + currMonth -= 1; + } + else + { + // special case for january + currMonth = 12; + currYear -= 1; + } + + var url = _baseUrl + "/envelopes?from_date=" + currMonth + "%2F" + currDay + "%2F" + currYear; + + var request = new HttpRequestMessage + { + Method = HttpMethod.Get, + RequestUri = new Uri(url) + }; + + var responseMessage = await _httpClient.SendAsync(request).ConfigureAwait(false); + var response = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); + + if (responseMessage.IsSuccessStatusCode) + { + var envelopes = JsonConvert.DeserializeObject(response); + return envelopes; + } + + // implement exception + return null; + } + public async Task GetTemplatesAsync() { var url = _baseUrl + "/templates"; @@ -57,7 +95,6 @@ namespace DocuSign if (responseMessage.IsSuccessStatusCode) { - var jObject = JObject.Parse(response); var envelope = JsonConvert.DeserializeObject(response); return envelope; } diff --git a/src/DocuSign/Models/Envelopes.cs b/src/DocuSign/Models/Envelopes.cs new file mode 100644 index 0000000..10511d0 --- /dev/null +++ b/src/DocuSign/Models/Envelopes.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DocuSign.Models +{ + public class Envelopes + { + public string resultSetSize { get; set; } + public string totalSetSize { get; set; } + public string startPosition { get; set; } + public string endPosition { get; set; } + public string nextUri { get; set; } + public string previousUri { get; set; } + public List envelopes { get; set; } + } +} diff --git a/wadl/DocuSign.xml b/wadl/DocuSign.xml index 5f4abf0..e4cb505 100644 --- a/wadl/DocuSign.xml +++ b/wadl/DocuSign.xml @@ -80,10 +80,32 @@ + + + + + + + + + + + + + + + + + + + + + + + - @@ -101,8 +123,18 @@ - - + + + + + + + + + + + +