class ApplicationKtaInviteServiceImpl extends InviteService<ApplicationKtaInvite> implements ApplicationKtaInviteService {

    @Override
    @Transactional
    public ServiceResult<Void> saveKtaInvite(ApplicationKtaInviteResource inviteResource) {
        return validateKtaApplication(inviteResource, EDIT_EMAIL_FIELD).andOnSuccess(validated -> {
            ApplicationKtaInvite invite = mapKtaInviteResourceToKtaInvite(inviteResource);
            applicationKtaInviteRepository.save(invite);
            return applicationInviteNotificationService.inviteKta(invite);
        });
    }

}