updateTeamMemberRolesWithHttpInfo method

Future<Response> updateTeamMemberRolesWithHttpInfo(
  1. String teamId,
  2. String userId,
  3. MmUpdateUserRolesRequest mmUpdateUserRolesRequest
)

Update a team member roles

Update a team member roles. Valid team roles are "team_user", "team_admin" or both of them. Overwrites any previously assigned team roles. ##### Permissions Must be authenticated and have the manage_team_roles permission.

Note: This method returns the HTTP Response.

Parameters:

  • String teamId (required): Team GUID

  • String userId (required): User GUID

  • MmUpdateUserRolesRequest mmUpdateUserRolesRequest (required): Space-delimited team roles to assign to the user

Implementation

Future<Response> updateTeamMemberRolesWithHttpInfo(
  String teamId,
  String userId,
  MmUpdateUserRolesRequest mmUpdateUserRolesRequest,
) async {
  // ignore: prefer_const_declarations
  final path =
      r'/teams/{team_id}/members/{user_id}/roles'.replaceAll('{team_id}', teamId).replaceAll('{user_id}', userId);

  // ignore: prefer_final_locals
  Object? postBody = mmUpdateUserRolesRequest;

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