Skip to content

Instantly share code, notes, and snippets.

@eldavido
Created February 19, 2018 18:09
Show Gist options
  • Save eldavido/fd55a6839ab3eadea266dbb4d4b78540 to your computer and use it in GitHub Desktop.
Save eldavido/fd55a6839ab3eadea266dbb4d4b78540 to your computer and use it in GitHub Desktop.
Can a reservation check in?
public virtual CheckInRequestResult CanCheckIn(EventHydrationContext ehc, IClock clock,
ReservationFolioState fs) {
if (State == ReservationState.CheckedIn) {
return CheckInRequestResult.AlreadyCheckedIn;
}
if (State != ReservationState.Open) {
return CheckInRequestResult.NoOpenReservation;
}
if (!IsAllowableCheckinTime(clock)) {
return CheckInRequestResult.TooEarlyToCheckin;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment