updateSysadminUserProfile method

Future<void> updateSysadminUserProfile(
  1. String userId, {
  2. String? firstName,
  3. String? lastName,
  4. Map<String, dynamic>? metadata,
  5. Map<String, String>? annotations,
})

Implementation

Future<void> updateSysadminUserProfile(
  String userId, {
  String? firstName,
  String? lastName,
  Map<String, dynamic>? metadata,
  Map<String, String>? annotations,
}) async {
  final response = await httpClient.put(
    Uri.parse('$baseUrl/accounts/sysadmin/users/${Uri.encodeComponent(userId)}'),
    body: jsonEncode({'first_name': ?firstName, 'last_name': ?lastName, 'metadata': ?metadata, 'annotations': ?annotations}),
  );
  _checkProfileResponse(response);
}