/// <summary> /// Accepts a pending organization invitation for the specified user /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='invitationToken'> /// The app invitation token that was sent to the user /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task AcceptAsync(this IOrgInvitations operations, string invitationToken, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.AcceptWithHttpMessagesAsync(invitationToken, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Removes a user's invitation to an organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='email'> /// The email address of the user to send the password reset mail to. /// </param> public static void UnnamedMethod(this IOrgInvitations operations, string orgName, string email) { operations.UnnamedMethodAsync(orgName, email).GetAwaiter().GetResult(); }
/// <summary> /// Gets the pending invitations for the organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <OrganizationInvitationSimpleDetailResponse> > ListPendingAsync(this IOrgInvitations operations, string orgName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListPendingWithHttpMessagesAsync(orgName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Accepts a pending organization invitation for the specified user /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='invitationToken'> /// The app invitation token that was sent to the user /// </param> public static void Accept(this IOrgInvitations operations, string invitationToken) { operations.AcceptAsync(invitationToken).GetAwaiter().GetResult(); }
/// <summary> /// Removes a user's invitation to an organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='userEmail'> /// The email of the user whose invitation should be removed /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IOrgInvitations operations, string orgName, UserEmailRequest userEmail = default(UserEmailRequest), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(orgName, userEmail, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets the pending invitations for the organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> public static IList <OrganizationInvitationSimpleDetailResponse> ListPending(this IOrgInvitations operations, string orgName) { return(operations.ListPendingAsync(orgName).GetAwaiter().GetResult()); }
/// <summary> /// Removes a user's invitation to an organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='userEmail'> /// The email of the user whose invitation should be removed /// </param> public static void Delete(this IOrgInvitations operations, string orgName, UserEmailRequest userEmail = default(UserEmailRequest)) { operations.DeleteAsync(orgName, userEmail).GetAwaiter().GetResult(); }
/// <summary> /// Allows the role of an invited user to be changed /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='email'> /// The email address of the user to send the password reset mail to. /// </param> /// <param name='userRole'> /// The new role of the user /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateAsync(this IOrgInvitations operations, string orgName, string email, OrganizationUserPatchRequest userRole, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateWithHttpMessagesAsync(orgName, email, userRole, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Allows the role of an invited user to be changed /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='email'> /// The email address of the user to send the password reset mail to. /// </param> /// <param name='userRole'> /// The new role of the user /// </param> public static void Update(this IOrgInvitations operations, string orgName, string email, OrganizationUserPatchRequest userRole) { operations.UpdateAsync(orgName, email, userRole).GetAwaiter().GetResult(); }
/// <summary> /// Cancels an existing organization invitation for the user and sends a new /// one /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='email'> /// The email address of the user to send the password reset mail to. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task SendNewInvitationAsync(this IOrgInvitations operations, string orgName, string email, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.SendNewInvitationWithHttpMessagesAsync(orgName, email, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Cancels an existing organization invitation for the user and sends a new /// one /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='email'> /// The email address of the user to send the password reset mail to. /// </param> public static void SendNewInvitation(this IOrgInvitations operations, string orgName, string email) { operations.SendNewInvitationAsync(orgName, email).GetAwaiter().GetResult(); }