diff --git a/src/alpine_bits_python/alpine_bits_helpers.py b/src/alpine_bits_python/alpine_bits_helpers.py index 76f91ae..41fbb9f 100644 --- a/src/alpine_bits_python/alpine_bits_helpers.py +++ b/src/alpine_bits_python/alpine_bits_helpers.py @@ -73,6 +73,8 @@ RetrieveRoomStays = OtaResRetrieveRs.ReservationsList.HotelReservation.RoomStays NotifHotelReservation = OtaHotelResNotifRq.HotelReservations.HotelReservation RetrieveHotelReservation = OtaResRetrieveRs.ReservationsList.HotelReservation +from .const import RESERVATION_ID_TYPE + # Enum to specify which OTA message type to use class OtaMessageType(Enum): @@ -80,11 +82,6 @@ class OtaMessageType(Enum): RETRIEVE = "retrieve" # For OtaResRetrieveRs -RESERVATION_ID_TYPE: str = ( - "13" # Default reservation ID type for Reservation. 14 would be cancellation -) - - @dataclass class KidsAgeData: """Data class to hold information about children's ages.""" diff --git a/src/alpine_bits_python/const.py b/src/alpine_bits_python/const.py index e69de29..743289d 100644 --- a/src/alpine_bits_python/const.py +++ b/src/alpine_bits_python/const.py @@ -0,0 +1,3 @@ +RESERVATION_ID_TYPE: str = ( + "13" # Default reservation ID type for Reservation. 14 would be cancellation +) diff --git a/src/alpine_bits_python/models.py b/src/alpine_bits_python/models.py deleted file mode 100644 index 359fcc0..0000000 --- a/src/alpine_bits_python/models.py +++ /dev/null @@ -1,73 +0,0 @@ -from typing import Any - -from pydantic import BaseModel, Field - - -class AlpineBitsHandshakeRequest(BaseModel): - """Model for AlpineBits handshake request data""" - - action: str = Field( - ..., description="Action parameter, typically 'OTA_Ping:Handshaking'" - ) - request_xml: str | None = Field(None, description="XML request document") - - -class ContactName(BaseModel): - """Contact name structure""" - - first: str | None = None - last: str | None = None - - -class ContactAddress(BaseModel): - """Contact address structure""" - - street: str | None = None - city: str | None = None - state: str | None = None - country: str | None = None - postalCode: str | None = None - - -class Contact(BaseModel): - """Contact information from Wix form""" - - name: ContactName | None = None - email: str | None = None - locale: str | None = None - company: str | None = None - birthdate: str | None = None - labelKeys: dict[str, Any] | None = None - contactId: str | None = None - address: ContactAddress | None = None - jobTitle: str | None = None - imageUrl: str | None = None - updatedDate: str | None = None - phone: str | None = None - createdDate: str | None = None - - -class SubmissionPdf(BaseModel): - """PDF submission structure""" - - url: str | None = None - filename: str | None = None - - -class WixFormSubmission(BaseModel): - """Model for Wix form submission data""" - - formName: str - submissions: list[dict[str, Any]] = Field(default_factory=list) - submissionTime: str - formFieldMask: list[str] = Field(default_factory=list) - submissionId: str - contactId: str - submissionsLink: str - submissionPdf: SubmissionPdf | None = None - formId: str - contact: Contact | None = None - - # Dynamic form fields - these will capture all field:* entries - class Config: - extra = "allow" # Allow additional fields not defined in the model diff --git a/src/alpine_bits_python/reservations.py b/src/alpine_bits_python/reservations.py deleted file mode 100644 index 5c8f238..0000000 --- a/src/alpine_bits_python/reservations.py +++ /dev/null @@ -1,2 +0,0 @@ -def parse_form(form: dict): - pass diff --git a/tests/test_alpine_bits_helper.py b/tests/test_alpine_bits_helper.py index a3f4e0c..da083d2 100644 --- a/tests/test_alpine_bits_helper.py +++ b/tests/test_alpine_bits_helper.py @@ -1,4 +1,3 @@ - import pytest from alpine_bits_python.alpine_bits_helpers import (