updateMembershipStatus method
Update Team Membership Status
Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.
If the request is successful, a session for the user is automatically created.
Implementation
Future<models.Membership> updateMembershipStatus(
{required String teamId,
required String membershipId,
required String userId,
required String secret}) async {
final String path = '/teams/{teamId}/memberships/{membershipId}/status'
.replaceAll('{teamId}', teamId)
.replaceAll('{membershipId}', membershipId);
final Map<String, dynamic> params = {
'userId': userId,
'secret': secret,
};
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);
}