Skip to content

[16.0] [FIX] pms-api-rest: add new endpoint to create reservations belonging…#232

Merged
DarioLodeiros merged 1 commit into16.0-mig-pmsfrom
16.0-pms_api_rest_update_folio_add_reservations
Jun 17, 2025
Merged

[16.0] [FIX] pms-api-rest: add new endpoint to create reservations belonging…#232
DarioLodeiros merged 1 commit into16.0-mig-pmsfrom
16.0-pms_api_rest_update_folio_add_reservations

Conversation

@miguelpadin
Copy link

This pull request introduces two main changes: an update to the PmsReservationInfo datamodel to make the reservationLines field 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 PmsReservationInfo datamodel:

  • Modified the reservationLines field in the PmsReservationInfo datamodel to make it optional (required=False) and nullable (allow_none=True), aligning it with other fields like services for consistency. (pms_api_rest/datamodels/pms_reservation.py, pms_api_rest/datamodels/pms_reservation.pyL107-R109)

New API functionality:

  • Added the create_folio_reservations method in PmsFolioService to 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

@miguelpadin miguelpadin force-pushed the 16.0-pms_api_rest_update_folio_add_reservations branch from de3b870 to ae282e0 Compare June 16, 2025 11:32
@DarioLodeiros DarioLodeiros merged commit b1eca7d into 16.0-mig-pms Jun 17, 2025
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants