-
Notifications
You must be signed in to change notification settings - Fork 12
/
CreateFreeformInviteToSignTheDocument.cs
32 lines (30 loc) · 1.23 KB
/
CreateFreeformInviteToSignTheDocument.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Threading.Tasks;
using SignNow.Net.Model;
namespace SignNow.Net.Examples.Invites
{
public static partial class InviteExamples
{
/// <summary>
/// Create a freeform invite to the document for signature.
/// </summary>
/// <param name="document">signNow document you’d like to have signed</param>
/// <param name="email">The email of the invitee.</param>
/// <param name="signNowContext">signNow container with services.</param>
/// <returns>
/// <see cref="InviteResponse"/> which contains an Identity of invite request.
/// </returns>
public static async Task<InviteResponse> CreateFreeformInviteToSignTheDocument(SignNowDocument document, string email, SignNowContext signNowContext)
{
// Create freeform invite
var invite = new FreeFormSignInvite(email)
{
Message = $"{email} invited you to sign the document {document.Name}",
Subject = "The subject of the Email"
};
// Creating Invite request
return await signNowContext.Invites
.CreateInviteAsync(document.Id, invite)
.ConfigureAwait(false);
}
}
}