rejectInvitation method

Future<RejectInvitationResponse> rejectInvitation({
  1. required String invitationId,
})

Reject an invitation

invitationId The ID of the invitation to reject

Implementation

Future<RejectInvitationResponse> rejectInvitation({required String invitationId}) async {
  try {
    final response = await dio.post(
      "/organization/reject-invitation",
      data: {"invitationId": invitationId},
      options: await getOptions(isTokenRequired: true),
    );
    return RejectInvitationResponse.fromJson(response.data);
  } catch (e) {
    final message = getErrorMessage(e);
    if (message == null) rethrow;
    throw message;
  }
}