Example #1
0
 /// <summary>
 /// Associates/dissociates the given user with/from an organization unit based
 /// on toggle parameter.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Users or Users.Write.
 ///
 /// Required permissions: Users.Edit.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// &lt;para /&gt;Toggle - States whether to associate or to dissociate the
 /// organization unit with/from the user.
 /// &lt;para /&gt;OrganizationUnitId - The id of the organization unit to be
 /// associated/dissociated.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task ToggleOrganizationUnitByIdAsync(this IUsers operations, long key, UsersToggleOrganizationUnitParameters body = default(UsersToggleOrganizationUnitParameters), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.ToggleOrganizationUnitByIdWithHttpMessagesAsync(key, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Example #2
0
 /// <summary>
 /// Associates/dissociates the given user with/from an organization unit based
 /// on toggle parameter.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Users or Users.Write.
 ///
 /// Required permissions: Users.Edit.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// &lt;para /&gt;Toggle - States whether to associate or to dissociate the
 /// organization unit with/from the user.
 /// &lt;para /&gt;OrganizationUnitId - The id of the organization unit to be
 /// associated/dissociated.
 /// </param>
 public static void ToggleOrganizationUnitById(this IUsers operations, long key, UsersToggleOrganizationUnitParameters body = default(UsersToggleOrganizationUnitParameters))
 {
     operations.ToggleOrganizationUnitByIdAsync(key, body).GetAwaiter().GetResult();
 }