Created
February 19, 2018 18:09
-
-
Save eldavido/fd55a6839ab3eadea266dbb4d4b78540 to your computer and use it in GitHub Desktop.
Can a reservation check in?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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