updateMembershipRoles method
Update Membership Roles
Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about roles and permissions.
Implementation
Future<models.Membership> updateMembershipRoles(
{required String teamId,
required String membershipId,
required List<String> roles}) async {
final String path = '/teams/{teamId}/memberships/{membershipId}'
.replaceAll('{teamId}', teamId)
.replaceAll('{membershipId}', membershipId);
final Map<String, dynamic> params = {
'roles': roles,
};
final Map<String, String> headers = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.patch,
path: path, params: params, headers: headers);
return models.Membership.fromMap(res.data);
}