Skip to content

Commit e326563

Browse files
committed
added tags to few SDK's methods
1 parent 22d6183 commit e326563

File tree

10 files changed

+34
-17
lines changed

10 files changed

+34
-17
lines changed

JWT-Console/JWT-Console.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="DocuSign.eSign.dll" Version="8.4.0" />
32+
<PackageReference Include="DocuSign.eSign.dll" Version="8.5.0" />
3333
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
3434
<PackageReference Include="System.Runtime.Caching" Version="7.0.0" />
3535
</ItemGroup>

Quick_ACG/Quick_ACG.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
<ItemGroup>
5050
<PackageReference Include="DocuSign.Admin" Version="2.0.2" />
51-
<PackageReference Include="DocuSign.eSign.dll" Version="8.4.0" />
51+
<PackageReference Include="DocuSign.eSign.dll" Version="8.5.0" />
5252
<PackageReference Include="Microsoft.AspNetCore.Session" Version="2.3.0" />
5353
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
5454
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.10">

launcher-csharp.Tests/launcher-csharp.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<ItemGroup>
2727
<PackageReference Include="DocuSign.Admin" Version="2.0.2" />
28-
<PackageReference Include="DocuSign.eSign.dll" Version="8.4.0" />
28+
<PackageReference Include="DocuSign.eSign.dll" Version="8.5.0" />
2929
<PackageReference Include="FluentAssertions" Version="8.4.0" />
3030
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
3131
<PackageReference Include="xunit" Version="2.9.3" />

launcher-csharp/Admin/Controllers/RetrieveDocuSignProfileByEmailAddress.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ public ActionResult RetriveProfileByEmail(string email)
3838
string accessToken = this.RequestItemsService.User.AccessToken;
3939
string basePath = this.RequestItemsService.Session.AdminApiBasePath;
4040

41-
UsersDrilldownResponse profileWithSearchedEmail = DocuSign.Admin.Examples.RetrieveDocuSignProfileByEmailAddress.
41+
ApiResponse<UsersDrilldownResponse> profileWithSearchedEmail = DocuSign.Admin.Examples.RetrieveDocuSignProfileByEmailAddress.
4242
GetDocuSignProfileByEmailAdress(basePath, accessToken, organizationId, email);
43+
this.GetHttpInfo(profileWithSearchedEmail.Headers);
4344

4445
this.ViewBag.h1 = this.CodeExampleText.ExampleName;
4546
this.ViewBag.message = this.CodeExampleText.ResultsPageText;
46-
this.ViewBag.Locals.Json = JsonConvert.SerializeObject(profileWithSearchedEmail, Formatting.Indented);
47+
this.ViewBag.Locals.Json = JsonConvert.SerializeObject(profileWithSearchedEmail.Data, Formatting.Indented);
4748

4849
return this.View("example_done");
4950
}

launcher-csharp/Admin/Examples/RetrieveDocuSignProfileByEmailAddress.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class RetrieveDocuSignProfileByEmailAddress
1919
/// <param name="orgId">DocuSign Organization Id (GUID)</param>
2020
/// <param name="email">Email adress (string)</param>
2121
/// <returns>DocuSign profile, that has the searched email</returns>
22-
public static UsersDrilldownResponse GetDocuSignProfileByEmailAdress(
22+
public static ApiResponse<UsersDrilldownResponse> GetDocuSignProfileByEmailAdress(
2323
string basePath,
2424
string accessToken,
2525
Guid? orgId,
@@ -37,7 +37,7 @@ public static UsersDrilldownResponse GetDocuSignProfileByEmailAdress(
3737
email = email,
3838
};
3939

40-
UsersDrilldownResponse userWithSearchedEmail = usersApi.GetUserDSProfilesByEmail(orgId, retrieveUserOptions);
40+
ApiResponse<UsersDrilldownResponse> userWithSearchedEmail = usersApi.GetUserDSProfilesByEmailWithHttpInfo(orgId, retrieveUserOptions);
4141
//ds-snippet-end:Admin6Step3
4242
return userWithSearchedEmail;
4343
}

launcher-csharp/Click/Controllers/ActivateClickwrap.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ public ActionResult Activate(string clickwrapData)
4545

4646
// Call the Click API to activate a clickwrap
4747
var clickWrap = DocuSign.Click.Examples.ActivateClickwrap.Update(clickwrapId, clickwrapVersion, basePath, accessToken, accountId);
48+
this.GetHttpInfo(clickWrap.Headers);
4849

4950
// Show results
5051
this.ViewBag.h1 = this.CodeExampleText.ExampleName;
5152
this.ViewBag.message = this.CodeExampleText.ResultsPageText;
52-
this.ViewBag.Locals.Json = JsonConvert.SerializeObject(clickWrap, Formatting.Indented);
53+
this.ViewBag.Locals.Json = JsonConvert.SerializeObject(clickWrap.Data, Formatting.Indented);
5354

5455
return this.View("example_done");
5556
}
@@ -73,10 +74,12 @@ protected override void InitializeInternal()
7374
var accountId = this.RequestItemsService.Session.AccountId;
7475

7576
var inactiveClickwraps = DocuSign.Click.Examples.ActivateClickwrap.GetClickwrapsByStatus(basePath, accessToken, accountId, "inactive");
77+
this.GetHttpInfo(inactiveClickwraps.Headers);
7678
var draftClickwraps = DocuSign.Click.Examples.ActivateClickwrap.GetClickwrapsByStatus(basePath, accessToken, accountId, "draft");
77-
inactiveClickwraps.Clickwraps.AddRange(draftClickwraps.Clickwraps);
79+
this.GetHttpInfo(draftClickwraps.Headers);
80+
inactiveClickwraps.Data.Clickwraps.AddRange(draftClickwraps.Data.Clickwraps);
7881

79-
this.ViewBag.ClickwrapsData = inactiveClickwraps;
82+
this.ViewBag.ClickwrapsData = inactiveClickwraps.Data;
8083
this.ViewBag.AccountId = this.RequestItemsService.Session.AccountId;
8184
}
8285
}

launcher-csharp/Click/Examples/ActivateClickwrap.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class ActivateClickwrap
1919
/// <param name="accessToken">Access Token for API call (OAuth)</param>
2020
/// <param name="accountId">The DocuSign Account ID (GUID or short version) for which the APIs call would be made</param>
2121
/// <returns>The summary response of the activated clickwrap</returns>
22-
public static ClickwrapVersionSummaryResponse Update(string clickwrapId, string clickwrapVersion, string basePath, string accessToken, string accountId)
22+
public static ApiResponse<ClickwrapVersionSummaryResponse> Update(string clickwrapId, string clickwrapVersion, string basePath, string accessToken, string accountId)
2323
{
2424
//ds-snippet-start:Click2Step2
2525
var docuSignClient = new DocuSignClient(basePath);
@@ -32,7 +32,7 @@ public static ClickwrapVersionSummaryResponse Update(string clickwrapId, string
3232
//ds-snippet-end:Click2Step3
3333

3434
//ds-snippet-start:Click2Step4
35-
return clickAccountApi.UpdateClickwrapVersion(accountId, clickwrapId, clickwrapVersion, clickwrapRequest);
35+
return clickAccountApi.UpdateClickwrapVersionWithHttpInfo(accountId, clickwrapId, clickwrapVersion, clickwrapRequest);
3636
//ds-snippet-end:Click2Step4
3737
}
3838

@@ -57,15 +57,15 @@ public static ClickwrapRequest BuildUpdateClickwrapVersionRequest()
5757
/// <param name="accountId">Account id</param>
5858
/// <param name="status">Status</param>
5959
/// <returns>ClickwrapVersionsResponse</returns>
60-
public static ClickwrapVersionsResponse GetClickwrapsByStatus(string basePath, string accessToken, string accountId, string status)
60+
public static ApiResponse<ClickwrapVersionsResponse> GetClickwrapsByStatus(string basePath, string accessToken, string accountId, string status)
6161
{
6262
var docuSignClient = new DocuSignClient(basePath);
6363
docuSignClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
6464
var clickAccountApi = new AccountsApi(docuSignClient);
6565
var options = new AccountsApi.GetClickwrapsOptions();
6666
options.status = status;
6767

68-
return clickAccountApi.GetClickwraps(accountId, options);
68+
return clickAccountApi.GetClickwrapsWithHttpInfo(accountId, options);
6969
}
7070
}
7171
}

launcher-csharp/eSignature/Controllers/CreateBrand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ public IActionResult Create(string brandName, string defaultBrandLanguage)
5151
{
5252
// Call the Examples API method to create a new brand
5353
var results = global::ESignature.Examples.CreateBrand.Create(brandName, defaultBrandLanguage, accessToken, basePath, accountId);
54+
this.GetHttpInfo(results.Headers);
5455
this.ViewBag.h1 = this.CodeExampleText.ExampleName;
55-
this.ViewBag.message = string.Format(this.CodeExampleText.ResultsPageText, results.Brands[0].BrandId);
56+
this.ViewBag.message = string.Format(this.CodeExampleText.ResultsPageText, results.Data.Brands[0].BrandId);
5657
}
5758
catch (ApiException apiException)
5859
{

launcher-csharp/eSignature/Controllers/EgController.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace DocuSign.CodeExamples.Controllers
66
{
77
using System;
8+
using System.Collections.Generic;
89
using System.Text.RegularExpressions;
910
using DocuSign.CodeExamples.Common;
1011
using DocuSign.CodeExamples.ESignature.Models;
@@ -145,5 +146,16 @@ protected bool CheckToken(int bufferMin = 60)
145146
{
146147
return this.RequestItemsService.CheckToken(bufferMin);
147148
}
149+
150+
protected void GetHttpInfo(IDictionary<string, string> headers)
151+
{
152+
headers.TryGetValue("X-RateLimit-Remaining", out string remaining);
153+
headers.TryGetValue("X-RateLimit-Reset", out string reset);
154+
155+
DateTime resetDate = DateTimeOffset.FromUnixTimeSeconds(long.Parse(reset)).UtcDateTime;
156+
157+
Console.WriteLine("API calls remaining: " + remaining);
158+
Console.WriteLine("Next Reset: " + resetDate);
159+
}
148160
}
149161
}

launcher-csharp/eSignature/Examples/CreateBrand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static class CreateBrand
1919
/// <param name="basePath">BasePath for API calls (URI)</param>
2020
/// <param name="accountId">The DocuSign Account ID (GUID or short version) for which the APIs call would be made</param>
2121
/// <returns>A brand</returns>
22-
public static BrandsResponse Create(string brandName, string defaultBrandLanguage, string accessToken, string basePath, string accountId)
22+
public static ApiResponse<BrandsResponse> Create(string brandName, string defaultBrandLanguage, string accessToken, string basePath, string accountId)
2323
{
2424
// Construct your API headers
2525
//ds-snippet-start:eSign28Step2
@@ -40,7 +40,7 @@ public static BrandsResponse Create(string brandName, string defaultBrandLanguag
4040
//ds-snippet-start:eSign28Step4
4141
AccountsApi accountsApi = new AccountsApi(docuSignClient);
4242

43-
return accountsApi.CreateBrand(accountId, newBrand);
43+
return accountsApi.CreateBrandWithHttpInfo(accountId, newBrand);
4444
//ds-snippet-end:eSign28Step4
4545
}
4646
}

0 commit comments

Comments
 (0)