changeUserGroupWithHttpInfo method

Future<Response> changeUserGroupWithHttpInfo(
  1. String account,
  2. String user,
  3. ChangeUserGroupRequest changeUserGroupRequest
)

Change group

Change a user's group relationship. This will immediately transfer the user resource to the new group. Changing the user's group will not retroactively change the group of its licenses or of its machines.

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 updated.

  • ChangeUserGroupRequest changeUserGroupRequest (required):

Implementation

Future<Response> changeUserGroupWithHttpInfo(String account, String user, ChangeUserGroupRequest changeUserGroupRequest,) async {
  // ignore: prefer_const_declarations
  final path = r'/accounts/{account}/users/{user}/group'
    .replaceAll('{account}', account)
    .replaceAll('{user}', user);

  // ignore: prefer_final_locals
  Object? postBody = changeUserGroupRequest;

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

  const contentTypes = <String>['application/vnd.api+json'];


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