Skip to content

Commit

Permalink
Merge pull request #9 from docusign/1.2.2-v1-22.3.01.00
Browse files Browse the repository at this point in the history
Version 1.2.2 release
  • Loading branch information
RajRele authored Oct 28, 2022
2 parents 1127058 + 9fdf63b commit df074b2
Show file tree
Hide file tree
Showing 31 changed files with 5,598 additions and 2,067 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# DocuSign Click C# Client Changelog
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.

## [v1.2.2] - Click API v1-22.3.01.00 - 2022-10-28
### Changed
- Added support for version v1-22.3.01.00 of the DocuSign Click API.
- Updated the SDK release version.

## [1.1.0] - Click API v1-21.4.01 - 2021-12-09
### Changed
- Added support for version v1-21.4.01 of the DocuSign Click API.
Expand Down
2,618 changes: 2,618 additions & 0 deletions sdk/.doxygenconfig

Large diffs are not rendered by default.

1,692 changes: 925 additions & 767 deletions sdk/src/DocuSign.Click/Api/AccountsApi.cs

Large diffs are not rendered by default.

1,166 changes: 16 additions & 1,150 deletions sdk/src/DocuSign.Click/Client/ApiClient.cs

Large diffs are not rendered by default.

113 changes: 56 additions & 57 deletions sdk/src/DocuSign.Click/Client/ApiException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,75 +8,74 @@
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/

using RestSharp;

using System;
using System.Collections.Generic;
using System.Linq;

namespace DocuSign.Click.Client
{
/// <summary>
/// <summary>
/// API Exception
/// </summary>
public class ApiException : Exception
{
/// <summary>
/// Gets or sets the error code (HTTP status code)
/// </summary>
/// <value>The error code (HTTP status code).</value>
public int ErrorCode { get; set; }
public class ApiException : Exception
{
/// <summary>
/// Gets or sets the error code (HTTP status code)
/// </summary>
/// <value>The error code (HTTP status code).</value>
public int ErrorCode { get; set; }

/// <summary>
/// Gets or sets the error content (body json object)
/// </summary>
/// <value>The error content (Http response body).</value>
public dynamic ErrorContent { get; private set; }
/// <summary>
/// Gets or sets the error content (body json object)
/// </summary>
/// <value>The error content (Http response body).</value>
public dynamic ErrorContent { get; private set; }

/// <summary>
/// Gets or sets the error message
/// </summary>
/// <value>The error message.</value>
public string ErrorMessage { get; set; }
/// <summary>
/// Gets or sets the error message
/// </summary>
/// <value>The error message.</value>
public string ErrorMessage { get; set; }

/// <summary>
/// Gets or sets the HTTP headers
/// </summary>
/// <value>HTTP headers</value>
public IDictionary<string, string> Headers { get; private set; }
/// <summary>
/// Gets or sets the HTTP headers
/// </summary>
/// <value>HTTP headers</value>
public IDictionary<string, string> Headers { get; private set; }

/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
public ApiException() {}
/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
public ApiException() { }

/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
/// <param name="errorCode">HTTP status code.</param>
/// <param name="message">Error message.</param>
public ApiException(int errorCode, string message) : base(message)
{
this.ErrorCode = errorCode;
this.ErrorMessage = message;
}

/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
/// <param name="errorCode">HTTP status code.</param>
/// <param name="message">Error message.</param>
/// <param name="errorContent">Error content.</param>
/// <param name="response">IRestResponse object.</param>
public ApiException(int errorCode, string message, dynamic errorContent = null, IRestResponse response = null) : base(message)
{
this.ErrorCode = errorCode;
this.ErrorContent = errorContent;
if (response != null && response.Headers != null)
{
this.ErrorMessage = response.ErrorMessage;
this.Headers = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString());
}
}
}
/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
/// <param name="errorCode">HTTP status code.</param>
/// <param name="message">Error message.</param>
public ApiException(int errorCode, string message) : base(message)
{
this.ErrorCode = errorCode;
this.ErrorMessage = message;
}

/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
/// <param name="errorCode">HTTP status code.</param>
/// <param name="message">Error message.</param>
/// <param name="errorContent">Error content.</param>
/// <param name="response">DocuSignResponse object.</param>
public ApiException(int errorCode, string message, dynamic errorContent = null, DocuSignResponse response = null) : base(message)
{
this.ErrorCode = errorCode;
this.ErrorContent = errorContent;
if (response != null && response.Headers != null)
{
this.ErrorMessage = response.ErrorMessage;
this.Headers = response.Headers.ToDictionary(x => x.Key, x => x.Value.ToString());
}
}
}
}
43 changes: 26 additions & 17 deletions sdk/src/DocuSign.Click/Client/Auth/OAuth.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
using System.IO;
/*
* DocuSign Click API
*
* DocuSign Click lets you capture consent to standard agreement terms with a single click: terms and conditions, terms of service, terms of use, privacy policies, and more. The Click API lets you include this customizable clickwrap solution in your DocuSign integrations.
*
* OpenAPI spec version: v1
* Contact: [email protected]
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/

using System.IO;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using RestSharp;
using System.Text;
using System.Collections.Generic;
using System;
Expand Down Expand Up @@ -41,20 +50,20 @@ public class OAuth
// JWT Grant Type
public const string Grant_Type_JWT = "urn:ietf:params:oauth:grant-type:jwt-bearer";

// /**
// *
// * UserInfo model with the following properties:
// * <br><b>sub</b>: the user ID GUID.
// * <br><b>accounts</b>: this is list of DocuSign accounts associated with the current user.
// * <br><b>name</b>: the user's full name.
// * <br><b>givenName</b>: the user's given name.
// * <br><b>familyName</b>: the user's family name.
// * <br><b>email</b>: the user's email address.
// * <br><b>created</b>: the UTC DateTime when the user login was created.
// *
// * @see Account
// *
// */
/**
*
* UserInfo model with the following properties:
* <br /><b>sub</b>: the user ID GUID.
* <br /><b>accounts</b>: this is list of DocuSign accounts associated with the current user.
* <br /><b>name</b>: the user's full name.
* <br /><b>givenName</b>: the user's given name.
* <br /><b>familyName</b>: the user's family name.
* <br /><b>email</b>: the user's email address.
* <br /><b>created</b>: the UTC DateTime when the user login was created.
*
* @see Account
*
*/
[DataContract]
public class UserInfo : IEquatable<UserInfo>, IValidatableObject
{
Expand Down Expand Up @@ -624,4 +633,4 @@ public class OAuthToken
public int? expires_in { get; set; }
}
}
}
}
50 changes: 48 additions & 2 deletions sdk/src/DocuSign.Click/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class Configuration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "1.1.0";
public const string Version = "1.2.2";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand All @@ -35,6 +35,8 @@ public class Configuration
// ReSharper disable once InconsistentNaming
public const string ISO8601_DATETIME_FORMAT = "o";

public const int DefaultTimeoutValue = 100000;

#endregion Constants

#region Static Members
Expand Down Expand Up @@ -102,7 +104,7 @@ static Configuration()
/// </summary>
public Configuration(string basePath = "https://www.docusign.net/clickapi")
{
UserAgent = "Swagger-Codegen/"+ Version +"/csharp";
UserAgent = $"C#/{Version}/{_getFrameworkVersion()}";
BasePath = basePath ?? "https://www.docusign.net/clickapi";
DefaultHeader = new ConcurrentDictionary<string, string>();
ApiKey = new ConcurrentDictionary<string, string>();
Expand Down Expand Up @@ -310,6 +312,50 @@ public void AddApiKeyPrefix(string key, string value)
{
ApiKeyPrefix[key] = value;
}

/// <summary>
/// Trims the CLR version description
/// </summary>
/// <param name="longVersionDescription">The original, longer version of the CLR version description</param>
/// <returns></returns>
string _trimVersionDescription(string longVersionDescription)
{
if (string.IsNullOrEmpty(longVersionDescription)) { return string.Empty; }
var trimmedVersionDescription = longVersionDescription;
var longVersionDescriptionBits = longVersionDescription.Split(' ');
if (longVersionDescriptionBits?.Length > 1)
{
string trimmedVersionNumber = string.Empty;
string versionNumber = longVersionDescriptionBits[longVersionDescriptionBits.Length - 1];
var versionNumberBits = versionNumber.Split('.');
if (versionNumberBits?.Length > 2)
{
var trimmedRevisionNumber = versionNumberBits[2].Substring(0, 1);
trimmedVersionNumber = string.Join(".", versionNumberBits[0], versionNumberBits[1], trimmedRevisionNumber);
}
else
{
trimmedVersionNumber = versionNumber;
}
var clrType = longVersionDescription.Substring(0, longVersionDescription.LastIndexOf(" "));
trimmedVersionDescription = string.Format("{0} {1}", clrType, trimmedVersionNumber);
trimmedVersionDescription = trimmedVersionDescription.ToUpper().Replace(".NET FRAMEWORK", "FW").Replace(".NET CORE", "Core").Trim();
}
return trimmedVersionDescription;
}

/// <summary>
/// Identifies the CLR version for logging purposes.
/// </summary>
/// <returns></returns>
string _getFrameworkVersion()
{
#if NET452
return ".NET Framework";
#else
return _trimVersionDescription(System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription);
#endif
}

#endregion Methods
}
Expand Down
Loading

0 comments on commit df074b2

Please sign in to comment.