Box.V2.Managers.BoxUsersManager.DeleteEnterpriseUserAsync C# (CSharp) Method

DeleteEnterpriseUserAsync() public method

Deletes a user in an enterprise account.
public DeleteEnterpriseUserAsync ( string userId, bool notify, bool force ) : Task
userId string Id of the user.
notify bool Determines if the destination user should receive email notification of the transfer.
force bool Whether or not the user should be deleted even if this user still own files.
return Task
        public async Task<BoxUser> DeleteEnterpriseUserAsync(string userId, bool notify, bool force)
        {
            BoxRequest request = new BoxRequest(_config.UserEndpointUri, userId)
                .Param("notify", notify.ToString())
                .Param("force", force.ToString())
                .Method(RequestMethod.Delete);

            IBoxResponse<BoxUser> response = await ToResponseAsync<BoxUser>(request).ConfigureAwait(false);

            return response.ResponseObject;
        }