updateUser method
Updates the properties of an existing user in a Wickr network. This operation allows you to modify the user's name, password, security group membership, and invite code settings.
May throw BadRequestError.
May throw ForbiddenError.
May throw InternalServerError.
May throw RateLimitError.
May throw ResourceNotFoundError.
May throw UnauthorizedError.
May throw ValidationError.
Parameter networkId :
The ID of the Wickr network containing the user to update.
Parameter userId :
The unique identifier of the user to update.
Parameter userDetails :
An object containing the user details to be updated, such as name,
password, security groups, and invite code settings.
Implementation
Future<UpdateUserResponse> updateUser({
required String networkId,
required String userId,
UpdateUserDetails? userDetails,
}) async {
final $payload = <String, dynamic>{
'userId': userId,
if (userDetails != null) 'userDetails': userDetails,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/networks/${Uri.encodeComponent(networkId)}/users',
exceptionFnMap: _exceptionFns,
);
return UpdateUserResponse.fromJson(response);
}