CAL-861 use InvitationResource instead of use the Invitation class directly in rest-api