updateTeamMemberSchemeRolesWithHttpInfo method

Future<Response> updateTeamMemberSchemeRolesWithHttpInfo(
  1. String teamId,
  2. String userId,
  3. MmUpdateTeamMemberSchemeRolesRequest mmUpdateTeamMemberSchemeRolesRequest
)

Update the scheme-derived roles of a team member.

Update a team member's scheme_admin/scheme_user properties. Typically this should either be scheme_admin=false, scheme_user=true for ordinary team member, or scheme_admin=true, scheme_user=true for a team admin. Minimum server version: 5.0 ##### Permissions Must be authenticated and have the manage_team_roles permission.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> updateTeamMemberSchemeRolesWithHttpInfo(
  String teamId,
  String userId,
  MmUpdateTeamMemberSchemeRolesRequest mmUpdateTeamMemberSchemeRolesRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/teams/{team_id}/members/{user_id}/schemeRoles'
      .replaceAll('{team_id}', teamId)
      .replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody = mmUpdateTeamMemberSchemeRolesRequest;

  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,
  );
}