banUserWithHttpInfo method

Future<Response> banUserWithHttpInfo(
  1. String account,
  2. String user
)

Ban user

Action to ban a user. Banned users cannot authenticate with the API, and all licenses the user owns will have a BANNED status.

Note: This method returns the HTTP Response.

Parameters:

  • String account (required): The identifier (UUID) or slug of your Keygen account.

  • String user (required): The identifier (UUID) or email of the user to be retrieved.

Implementation

Future<Response> banUserWithHttpInfo(String account, String user,) async {
  // ignore: prefer_const_declarations
  final path = r'/accounts/{account}/users/{user}/actions/ban'
    .replaceAll('{account}', account)
    .replaceAll('{user}', user);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}