public Task <ServiceSlot> AddServiceSlotAsync(ServiceSlot slot) { _eventValidator.ValidateEventExists(slot.EventId); _serviceSlotValidator.ValidateServiceProviderTypeExists(slot.TypeId); _eventValidator.CanUpdateEvent(slot.EventId); _serviceSlotValidator.ValidateServiceProviderSlotProperties(slot); return(null); }
public void CanAcceptAgreement(int eventId, int spsId) { try { _eventValidator.CanUpdateEvent(eventId); } catch (Exception e) { throw new ForbiddenException("User doesnt have permission to update ServiceAgreement", Guid.Parse(ServiceAgreementErrorCodes.NO_UPDATE_PERMISSIONS), e); } }
public Task <ServiceAgreement> CreateServiceAgreement(int eventId, int spsId, int serviceId) { _eventValidator.ValidateEventExists(eventId); _serviceSlotValidator.ValidateServiceProviderSlotExists(eventId, spsId); _agreementValidator.ValidateAgreementDoesntExist(eventId, spsId); _eventServiceModelValidator.ValidateEventServiceModelExists(serviceId); _eventValidator.CanUpdateEvent(eventId); return(null); }
public Task <Location> UpdateLocationForEventAsync(int eventId, Location location) { _eventValidator.ValidateEventExists(eventId); _eventValidator.CanUpdateEvent(eventId); return(null); }