Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Add signature_request/remove and fix template/add_user #85

Merged
merged 2 commits into from
May 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/HelloSign/HelloSign.cs
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,19 @@ public void CancelSignatureRequest(string signatureRequestId)
Execute(request);
}

/// <summary>
/// Remove the specified Signature Request.
/// </summary>
/// <param name="signatureRequestId"></param>
public void RemoveSignatureRequest(string signatureRequestId)
{
RequireAuthentication();

var request = new RestRequest("signature_request/remove/{id}", Method.POST);
request.AddUrlSegment("id", signatureRequestId);
Execute(request);
}

/// <summary>
/// Download a Signature Request as a merged PDF (or a ZIP of unmerged
/// PDFs) and get the byte array.
Expand Down Expand Up @@ -848,7 +861,7 @@ private Template _ModifyTemplatePermission(string templateId, bool isGrant, stri
throw new ArgumentException("Specify accountId OR emailAddress, but not both");
}

var request = new RestRequest("template/{action}_user/{id}");
var request = new RestRequest("template/{action}_user/{id}", Method.POST);
request.AddUrlSegment("action", (isGrant) ? "add" : "remove");
request.AddUrlSegment("id", templateId);
if (accountId != null)
Expand Down