Wish I had the time to do this in Groovy / natively...
But for now- I'll run this on a raspberry pi and have it interact with Hubitat via the Maker API.
Sets lock codes to the last 4 digits of a guest phone number and also changes the mode at your defined check in time.
Deletes the code and changes the mode at your defined check out time.
Requires nodejs and ideally something like pm2 to keep it running full time.