updateUserWithHttpInfo method

Future<Response> updateUserWithHttpInfo(
  1. String userId,
  2. MmUpdateUserRequest mmUpdateUserRequest
)

Update a user

Update a user by providing the user object. The fields that can be updated are defined in the request body, all other provided fields will be ignored. Any fields not included in the request body will be set to null or reverted to default values. ##### Permissions Must be logged in as the user being updated or have the edit_other_users permission.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> updateUserWithHttpInfo(
  String userId,
  MmUpdateUserRequest mmUpdateUserRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/users/{user_id}'.replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody = mmUpdateUserRequest;

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

  const contentTypes = <String>['application/json'];

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