Skip to content

Commit

Permalink
(GH-176) Add the Meetings.DeleteRegistrantAsync method
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed Feb 18, 2022
1 parent 03284bb commit 5da44a2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Source/ZoomNet/Resources/IMeetings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,18 @@ public interface IMeetings
/// </returns>
Task<RegistrantInfo> AddRegistrantAsync(long meetingId, string email, string firstName, string lastName, string address = null, string city = null, Country? country = null, string postalCode = null, string stateOrProvince = null, string phoneNumber = null, string industry = null, string organization = null, string jobTitle = null, string timeFrame = null, RoleInPurchaseProcess? role = null, NumberOfEmployees? employees = null, string comments = null, IEnumerable<RegistrationAnswer> questionAnswers = null, Language? language = null, bool autoApprove = false, string occurrenceId = null, CancellationToken cancellationToken = default);

/// <summary>
/// Delete a meeting registrant.
/// </summary>
/// <param name="meetingId">The meeting ID.</param>
/// <param name="registrantId">The registrant id.</param>
/// <param name="occurrenceId">The meeting occurrence id.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// The async task.
/// </returns>
Task DeleteRegistrantAsync(long meetingId, string registrantId, string occurrenceId = null, CancellationToken cancellationToken = default);

/// <summary>
/// Retrieve a meeting registrant.
/// </summary>
Expand Down
19 changes: 19 additions & 0 deletions Source/ZoomNet/Resources/Meetings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,25 @@ public Task<RegistrantInfo> AddRegistrantAsync(long meetingId, string email, str
.AsObject<RegistrantInfo>();
}

/// <summary>
/// Delete a meeting registrant.
/// </summary>
/// <param name="meetingId">The meeting ID.</param>
/// <param name="registrantId">The registrant id.</param>
/// <param name="occurrenceId">The meeting occurrence id.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>
/// The async task.
/// </returns>
public Task DeleteRegistrantAsync(long meetingId, string registrantId, string occurrenceId = null, CancellationToken cancellationToken = default)
{
return _client
.DeleteAsync($"meetings/{meetingId}/registrants/{registrantId}")
.WithArgument("occurence_id", occurrenceId)
.WithCancellationToken(cancellationToken)
.AsMessage();
}

/// <summary>
/// Retrieve a meeting registrant.
/// </summary>
Expand Down

0 comments on commit 5da44a2

Please sign in to comment.