Skip to content

Add Ability to Resend Invites #153

@SimonEvans482

Description

@SimonEvans482

I have added this to my local copy, but thought may be useful for others to include in release.

Need to add a property for Field_Request_Id to the ISignNowField interface (and the Field class):

        /// <summary>
        /// Field Request ID - Needed for Resend Invite
        /// </summary>
        [JsonProperty("field_request_id")]
        public string Field_Request_Id { get; }

This ID can then be retrieved from a Document and used for the Resend API call

ISignInvite Interface:

        /// <summary>
        /// ReSends a Role Based Invite to the Specified Invite ID.
        /// </summary>
        /// <param name="inviteFieldId">The Role identity to resend the invitation to.</param>
        /// <param name="cancellationToken">Propagates notification that operations should be canceled.</param>
        /// <returns></returns>
        Task ReSendRoleBasedInviteAsync(string inviteFieldId, CancellationToken cancellationToken = default);

UserServices.cs:

        /// <inheritdoc cref="ISignInvite.ReSendRoleBasedInviteAsync(string, CancellationToken)" />
        /// <exception cref="ArgumentException">Invalid format of <paramref name="inviteFieldId"/>.</exception>
        public async Task ReSendRoleBasedInviteAsync(string inviteFieldId, CancellationToken cancellationToken = default)
        {
            await ProcessReSendRoleBasedInviteAsync($"/fieldinvite/{inviteFieldId.ValidateId()}/resend", cancellationToken).ConfigureAwait(false);
        }
        private async Task ProcessReSendRoleBasedInviteAsync(string inviteFieldId,CancellationToken cancellationToken)
        {
            var requestOptions = new PutHttpRequestOptions
            {
                RequestUrl = new Uri(ApiBaseUrl, inviteFieldId),
                Token = Token
            };

            await SignNowClient.RequestAsync(requestOptions, cancellationToken).ConfigureAwait(false);
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions