hellosign / hellosign-dotnet-sdk

A .NET SDK for the HelloSign API
MIT License
26 stars 29 forks source link

AllowDecline on TemplateSignatureRequest class is not translated into actual request (Status: Ready for Merge) #113

Open andre-engelbrecht opened 2 years ago

andre-engelbrecht commented 2 years ago

Problem description:

The TemplateSignatureRequest class has a boolean property for AllowDecline, but in the CreateUnclaimedDraft method, this property is not added to the actual request to HelloSign's API, and thus has no effect.

Steps to reproduce:

Create a new (embedded) signature request using the CreateUnclaimedDraft method with AllowDecline = true. When you try to sign this request using the generated URL, there is no option to decline.

SDK Version

1.3.0 - there is no newer version available.

Solution to resolve

Add the following code to the CreateUnclaimedDraft method

if (signatureRequest.AllowDecline)
{
    restRequest.AddParameter("allow_decline", "1");
}

Status

Ready for Merge Link to PR: https://github.com/hellosign/hellosign-dotnet-sdk/pull/114