[16.0] [FIX] pms-api-rest: add new endpoint to create reservations belonging…#232
Merged
DarioLodeiros merged 1 commit into16.0-mig-pmsfrom Jun 17, 2025
Conversation
… to existent folio
de3b870 to
ae282e0
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces two main changes: an update to the
PmsReservationInfodatamodel to make thereservationLinesfield optional and nullable, and the addition of a new method to create folio reservations via a REST API endpoint. These changes enhance flexibility in handling reservation data and expand the API's functionality.Updates to
PmsReservationInfodatamodel:reservationLinesfield in thePmsReservationInfodatamodel to make it optional (required=False) and nullable (allow_none=True), aligning it with other fields likeservicesfor consistency. (pms_api_rest/datamodels/pms_reservation.py, pms_api_rest/datamodels/pms_reservation.pyL107-R109)New API functionality:
create_folio_reservationsmethod inPmsFolioServiceto allow creating reservations for a folio via a new POST endpoint (/p/<int:folio_id>/reservations). This method validates the folio, checks user access, and creates reservation records using the provided data. (pms_api_rest/services/pms_folio_service.py, pms_api_rest/services/pms_folio_service.pyR699-R744)… to existent folio