wink-sdk-travel-agent 0.0.55__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wink_sdk_travel_agent/__init__.py +229 -0
- wink_sdk_travel_agent/api/__init__.py +6 -0
- wink_sdk_travel_agent/api/analytics_api.py +671 -0
- wink_sdk_travel_agent/api/travel_agent_api.py +1668 -0
- wink_sdk_travel_agent/api_client.py +805 -0
- wink_sdk_travel_agent/api_response.py +21 -0
- wink_sdk_travel_agent/configuration.py +582 -0
- wink_sdk_travel_agent/exceptions.py +217 -0
- wink_sdk_travel_agent/models/__init__.py +106 -0
- wink_sdk_travel_agent/models/address_agent.py +111 -0
- wink_sdk_travel_agent/models/affiliate_account_agent.py +181 -0
- wink_sdk_travel_agent/models/affiliate_account_user_agent.py +115 -0
- wink_sdk_travel_agent/models/agent_booking_request_agent.py +130 -0
- wink_sdk_travel_agent/models/aggregate_descriptor_agent.py +100 -0
- wink_sdk_travel_agent/models/ancillary_request_agent.py +111 -0
- wink_sdk_travel_agent/models/authenticated_user_agent.py +100 -0
- wink_sdk_travel_agent/models/bed_agent.py +91 -0
- wink_sdk_travel_agent/models/bedroom_agent.py +106 -0
- wink_sdk_travel_agent/models/bedroom_configuration_agent.py +102 -0
- wink_sdk_travel_agent/models/beneficiary_agent.py +156 -0
- wink_sdk_travel_agent/models/beneficiary_charge_agent.py +97 -0
- wink_sdk_travel_agent/models/booking_agent.py +342 -0
- wink_sdk_travel_agent/models/booking_analytics_supplier.py +96 -0
- wink_sdk_travel_agent/models/booking_ancillary_agent.py +155 -0
- wink_sdk_travel_agent/models/booking_confirmations_agent.py +101 -0
- wink_sdk_travel_agent/models/booking_contract_agent.py +697 -0
- wink_sdk_travel_agent/models/booking_contract_item_agent.py +206 -0
- wink_sdk_travel_agent/models/booking_contract_payment_details_agent.py +124 -0
- wink_sdk_travel_agent/models/booking_itinerary_agent.py +113 -0
- wink_sdk_travel_agent/models/booking_itinerary_room_configuration_agent.py +98 -0
- wink_sdk_travel_agent/models/booking_itinerary_room_configuration_child_agent.py +90 -0
- wink_sdk_travel_agent/models/booking_overview_request_supplier.py +97 -0
- wink_sdk_travel_agent/models/booking_user_agent.py +102 -0
- wink_sdk_travel_agent/models/booking_user_request_agent.py +96 -0
- wink_sdk_travel_agent/models/booking_user_session_agent.py +112 -0
- wink_sdk_travel_agent/models/booking_view_agent.py +101 -0
- wink_sdk_travel_agent/models/boolean_response_agent.py +90 -0
- wink_sdk_travel_agent/models/cancellation_detail_agent.py +98 -0
- wink_sdk_travel_agent/models/cancellation_policy_agent.py +166 -0
- wink_sdk_travel_agent/models/cancellation_policy_exception_agent.py +100 -0
- wink_sdk_travel_agent/models/cancellation_policy_exceptions_agent.py +97 -0
- wink_sdk_travel_agent/models/cancellation_policy_lightweight_agent.py +167 -0
- wink_sdk_travel_agent/models/chart_category_axis_supplier.py +88 -0
- wink_sdk_travel_agent/models/chart_legend_supplier.py +88 -0
- wink_sdk_travel_agent/models/chart_series_supplier.py +90 -0
- wink_sdk_travel_agent/models/chart_title_supplier.py +88 -0
- wink_sdk_travel_agent/models/child_agent.py +91 -0
- wink_sdk_travel_agent/models/commissionable_entry_agent.py +102 -0
- wink_sdk_travel_agent/models/company_agent.py +176 -0
- wink_sdk_travel_agent/models/company_user_agent.py +114 -0
- wink_sdk_travel_agent/models/company_view_agent.py +101 -0
- wink_sdk_travel_agent/models/composite_filter_descriptor_agent.py +108 -0
- wink_sdk_travel_agent/models/contact_agent.py +104 -0
- wink_sdk_travel_agent/models/country_agent.py +100 -0
- wink_sdk_travel_agent/models/country_lightweight_agent.py +100 -0
- wink_sdk_travel_agent/models/create_agent_booking400_response.py +141 -0
- wink_sdk_travel_agent/models/create_agent_booking_request_agent.py +105 -0
- wink_sdk_travel_agent/models/custom_monetary_amount.py +91 -0
- wink_sdk_travel_agent/models/customization_lightweight_agent.py +232 -0
- wink_sdk_travel_agent/models/customization_theme_colors_agent.py +108 -0
- wink_sdk_travel_agent/models/daily_rate_agent.py +115 -0
- wink_sdk_travel_agent/models/dow_pattern_group_agent.py +102 -0
- wink_sdk_travel_agent/models/engine_configuration_booking_report_agent.py +230 -0
- wink_sdk_travel_agent/models/engine_configuration_theme_agent.py +108 -0
- wink_sdk_travel_agent/models/engine_configuration_theme_colors_agent.py +108 -0
- wink_sdk_travel_agent/models/extra_charge_agent.py +103 -0
- wink_sdk_travel_agent/models/extra_charges_agent.py +112 -0
- wink_sdk_travel_agent/models/fee_agent.py +105 -0
- wink_sdk_travel_agent/models/filter_descriptor_agent.py +107 -0
- wink_sdk_travel_agent/models/general_manager_agent.py +104 -0
- wink_sdk_travel_agent/models/generic_error_message.py +94 -0
- wink_sdk_travel_agent/models/geo_json_point_agent.py +94 -0
- wink_sdk_travel_agent/models/geo_name_agent.py +136 -0
- wink_sdk_travel_agent/models/geo_name_lightweight_agent.py +136 -0
- wink_sdk_travel_agent/models/group_descriptor_agent.py +110 -0
- wink_sdk_travel_agent/models/grouped_booking_sales_metrics_supplier_details.py +110 -0
- wink_sdk_travel_agent/models/guest_room_agent.py +258 -0
- wink_sdk_travel_agent/models/guest_room_lightweight_agent.py +259 -0
- wink_sdk_travel_agent/models/guest_user_agent.py +108 -0
- wink_sdk_travel_agent/models/hotel_on_map_agent.py +270 -0
- wink_sdk_travel_agent/models/image_attribution_agent.py +91 -0
- wink_sdk_travel_agent/models/line_chart_supplier.py +122 -0
- wink_sdk_travel_agent/models/localized_description_agent.py +109 -0
- wink_sdk_travel_agent/models/localized_price_agent.py +162 -0
- wink_sdk_travel_agent/models/managed_by_entity_agent.py +103 -0
- wink_sdk_travel_agent/models/managed_by_entity_rules_agent.py +95 -0
- wink_sdk_travel_agent/models/media_author_attribution_agent.py +91 -0
- wink_sdk_travel_agent/models/online_presence_agent.py +112 -0
- wink_sdk_travel_agent/models/page_booking_agent.py +124 -0
- wink_sdk_travel_agent/models/page_booking_view_agent.py +124 -0
- wink_sdk_travel_agent/models/pageable_object_agent.py +102 -0
- wink_sdk_travel_agent/models/payout_agent.py +158 -0
- wink_sdk_travel_agent/models/payout_fee_agent.py +116 -0
- wink_sdk_travel_agent/models/pending_refund_agent.py +99 -0
- wink_sdk_travel_agent/models/perk_lightweight_agent.py +105 -0
- wink_sdk_travel_agent/models/personal_agent.py +139 -0
- wink_sdk_travel_agent/models/pet_info_dto_agent.py +90 -0
- wink_sdk_travel_agent/models/preferences_agent.py +128 -0
- wink_sdk_travel_agent/models/profile_agent.py +110 -0
- wink_sdk_travel_agent/models/profile_lightweight_agent.py +111 -0
- wink_sdk_travel_agent/models/profile_user_agent.py +100 -0
- wink_sdk_travel_agent/models/property_aggregate_lightweight_agent.py +245 -0
- wink_sdk_travel_agent/models/property_policy_agent.py +150 -0
- wink_sdk_travel_agent/models/quote_agent.py +94 -0
- wink_sdk_travel_agent/models/quote_lightweight_agent.py +95 -0
- wink_sdk_travel_agent/models/rate_plan_agent.py +172 -0
- wink_sdk_travel_agent/models/rate_plan_level_fee_agent.py +112 -0
- wink_sdk_travel_agent/models/refund_agent.py +167 -0
- wink_sdk_travel_agent/models/reporting_ancillary_agent.py +108 -0
- wink_sdk_travel_agent/models/reporting_daily_rate_agent.py +99 -0
- wink_sdk_travel_agent/models/reporting_extra_charge_agent.py +98 -0
- wink_sdk_travel_agent/models/review_agent.py +133 -0
- wink_sdk_travel_agent/models/review_answer_agent.py +102 -0
- wink_sdk_travel_agent/models/review_lightweight_agent.py +134 -0
- wink_sdk_travel_agent/models/review_user_agent.py +99 -0
- wink_sdk_travel_agent/models/room_configuration_agent.py +99 -0
- wink_sdk_travel_agent/models/room_configuration_price_rate_plan_agent.py +130 -0
- wink_sdk_travel_agent/models/room_stay_agent.py +183 -0
- wink_sdk_travel_agent/models/simple_address_agent.py +109 -0
- wink_sdk_travel_agent/models/simple_date_time_itinerary_agent.py +108 -0
- wink_sdk_travel_agent/models/simple_description_agent.py +111 -0
- wink_sdk_travel_agent/models/simple_multimedia_agent.py +156 -0
- wink_sdk_travel_agent/models/social_agent.py +100 -0
- wink_sdk_travel_agent/models/sort_descriptor_agent.py +100 -0
- wink_sdk_travel_agent/models/sort_object.py +96 -0
- wink_sdk_travel_agent/models/sort_object_agent.py +92 -0
- wink_sdk_travel_agent/models/state_agent.py +117 -0
- wink_sdk_travel_agent/models/stay_rate_agent.py +209 -0
- wink_sdk_travel_agent/models/sub_country_agent.py +92 -0
- wink_sdk_travel_agent/models/sub_country_lightweight_agent.py +92 -0
- wink_sdk_travel_agent/models/sub_sub_country_agent.py +92 -0
- wink_sdk_travel_agent/models/sub_sub_country_lightweight_agent.py +92 -0
- wink_sdk_travel_agent/models/supplier_contract_item_policy_agent.py +170 -0
- wink_sdk_travel_agent/models/travel_agent_agent.py +90 -0
- wink_sdk_travel_agent/models/travel_inventory_recognition_agent.py +121 -0
- wink_sdk_travel_agent/models/upsert_travel_agent_request_agent.py +90 -0
- wink_sdk_travel_agent/models/wink_booking_contract_agent.py +697 -0
- wink_sdk_travel_agent/py.typed +0 -0
- wink_sdk_travel_agent/rest.py +259 -0
- wink_sdk_travel_agent-0.0.55.dist-info/METADATA +539 -0
- wink_sdk_travel_agent-0.0.55.dist-info/RECORD +144 -0
- wink_sdk_travel_agent-0.0.55.dist-info/WHEEL +5 -0
- wink_sdk_travel_agent-0.0.55.dist-info/licenses/LICENSE +201 -0
- wink_sdk_travel_agent-0.0.55.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Wink API
|
|
5
|
+
|
|
6
|
+
# Introduction Welcome to the Wink API - A programmer-friendly way to manage, sell and book travel blocking on the Wink platform. The API gives you all the tools you need to ready your properties and blocking for sale across 1000s of our native sales channels. Integrators, affiliates, travel agents and content creators have the ability search for your travel blocking and promote / sell it in a wide variety of ways. # Integrations We have already integrated with the most well-known channel managers so you don't have to. To see our current integrations, please go to https://extranet.wink.travel and scroll to Connectivity section. Once your properties are set up, you can finish the setup by mapping your property to Wink using your channel manager partner portal. If your properties don't have a channel manager, you can easily manage rates and availability with this API. # Intended Audience Programmers are [most likely] a requirement to start integrating with Wink. Companies and organizations that would most benefit from integrating with us are new and existing travel companies that have relationships with suppliers and that need an advanced system from which to manage their travel blocking and get that same blocking out to as many eyeballs as possible at the lowest price possible. - Hotel chains - Hotel brands - Travel tech companies - Destination sites - Integrators - Aggregators - Destination management companies - Travel agencies - OTAs ## APIs Not every integrator needs every API. For that reason, we have separated APIs into context. ### Test API - [Ping](/ping): The Ping API is a quick test endpoint to verify that your credentials work Wink. ### Common APIs - [Notifications](/notifications): The Notifications API is a way for us to stay in touch with your user, property or affiliate account. - [User Settings](/user-settings): The User Settings API exposes endpoints to allow 3rd party integrators to communicate with Wink. ### Consume APIs Consume endpoints are for developers who want to find existing travel blocking and either book it or use it to advertise through one of their Wink affiliate accounts. - [Configuration](/engine-client): A single endpoint to retrieve whitelabel + customization information for the booking engine. - [Lookup](/lookup): All APIs related to locating blocking by region, locale and property flags. - [Inventory](/blocking): All APIs related to retrieve known travel blocking as it was found using the Lookup API.. - [Booking](/booking): All APIs related to creating bookings on the platform. - [Travel Agent](/travel-agent): The Travel Agent API exposes endpoints to manage agent-facilitated bookings. ### Produce APIs Produce endpoints are for developers who want to create and manage travel blocking. #### Property - [Property registration](/extranet/property/register): As a producer, this is, oftentimes, where you start your journey. These endpoints let you create properties on Wink. - [Property](/extranet/property): This collection of property endpoints are mostly management endpoints that let you display, change status and similar for your existing properties. - [Facilities](/extranet/facilities): This collection of endpoints let you manage facilities; such as room types. - [Experiences](/extranet/experiences): This collection of endpoints let you manage experiences, such as activities. - [Monetize](/extranet/monetize): The Monetize API exposes endpoints for managing cancellation polies, rate plans, promotions and more on Wink. - [Distribution](/extranet/distribution): The Distribution API exposes endpoints for sales channels, connecting with affiliates, managing rates and blocking calendars and more on Wink. - [Property Booking](/extranet/booking): The Property Booking API exposes endpoints for managing bookings and reviews at the property-level. #### Affiliate - [Affiliate](/affiliate): This collection of affiliate endpoints are mostly management endpoints that let you display, change status and similar for your existing accounts. - [Browse](/affiliate/browse): The Browse API exposes endpoints for affiliates to find suppliers and blocking to sell. - [Inventory](/affiliate/blocking): The Inventory API exposes endpoints for affiliates to manage the blocking they want to sell and how they want to sell it. - [Sales Channel](/affiliate/sales-channel): The Sales Channel API exposes endpoints for affiliates to manage existing sales channels as well as find new ones. - [WinkLinks](/affiliate/winklinks): The WinkLinks API exposes endpoints for affiliates to manage their WinkLinks page. #### Rate provider - [Channel manager](/channel-manager): The Channel Manager API enables external channel manager partners to map, exchange rate / availability information with us as well as be informed of bookings that occur on the Wink platform for one of their properties. ### Taxonomy APIs Taxonomy endpoints are for developers who want to consume and produce travel blocking and need taxonomies of standard and non-standard codes for blocking types, classes, statuses etc. - [Reference](/reactive): All APIs related to retrieving platform-supported taxonomies. ### Insight APIs Insight endpoints do exactly what the name implies - They offer platform-level insight into the activities of producers and consumers. - [Analytics](/analytics): All APIs related to tracking metrics across a wide variety of data source segments including, more entertaining, leaderboard metrics. ### Payment APIs Payment endpoints are for developers who want to purchase travel blocking. This can be done via the API as a registered Travel Agent or using our API in conjunction with our PCI compliant reactive widget for all other entities. - [TripPay](/reactive): All APIs related to TripPay account management, booking, mapping and integration features. ## SDKs We are actively working on supporting the most used languages out there. If you don't see your language here, reach out to us with a request to officially add your language. In the meantime, if you want to roll your own SDK, you can do so by downloading the OpenAPI spec and using one of the many available OpenAPI generators available: [https://openapi-generator.tech/docs/generators](https://openapi-generator.tech/docs/generators). - Java SDK [https://github.com/wink-travel/wink-sdk-java](https://github.com/wink-travel/wink-sdk-java) ## Usage These features are made available to you via a [REST API](https://en.wikipedia.org/wiki/Representational_state_transfer). This API is language agnostic. ## Versioning We chose to version our endpoints in a way that we hope affects your integration minimally. You request the version of our API you wish to work with via the `Wink-Version` header. When it's time for you to upgrade, you only have to change the version number to get access to our updated endpoints. ## Release history - Follow updates on Github: https://github.com/wink-travel/wink-sdk-java/blob/master/CHANGELOG.md # Travel Agent API The Travel Agent API exposes endpoints to manage agent-facilitated bookings. This API lets you: 1. Travel Agent: Manage agent entity. 2. Booking: Create / Manage bookings Browse the endpoints in the left navigation bar to get started.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 30.9.11
|
|
9
|
+
Contact: bjorn@wink.travel
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from wink_sdk_travel_agent.models.address_agent import AddressAgent
|
|
25
|
+
from wink_sdk_travel_agent.models.bedroom_configuration_agent import BedroomConfigurationAgent
|
|
26
|
+
from wink_sdk_travel_agent.models.contact_agent import ContactAgent
|
|
27
|
+
from wink_sdk_travel_agent.models.geo_json_point_agent import GeoJsonPointAgent
|
|
28
|
+
from wink_sdk_travel_agent.models.simple_description_agent import SimpleDescriptionAgent
|
|
29
|
+
from wink_sdk_travel_agent.models.simple_multimedia_agent import SimpleMultimediaAgent
|
|
30
|
+
from wink_sdk_travel_agent.models.social_agent import SocialAgent
|
|
31
|
+
from wink_sdk_travel_agent.models.travel_inventory_recognition_agent import TravelInventoryRecognitionAgent
|
|
32
|
+
from typing import Optional, Set
|
|
33
|
+
from typing_extensions import Self
|
|
34
|
+
|
|
35
|
+
class GuestRoomAgent(BaseModel):
|
|
36
|
+
"""
|
|
37
|
+
Guest room details.
|
|
38
|
+
""" # noqa: E501
|
|
39
|
+
identifier: StrictStr = Field(description="Unique record identifier")
|
|
40
|
+
hotel_identifier: StrictStr = Field(description="Hotel identifier.", alias="hotelIdentifier")
|
|
41
|
+
featured_ind: StrictBool = Field(description="Indicates whether this blocking is featured. Use this flag as a way to signify that this blocking is special.", alias="featuredInd")
|
|
42
|
+
lifestyle_type: Optional[StrictStr] = Field(default=None, description="Indicate the type of lifestyle this blocking should be associated with.", alias="lifestyleType")
|
|
43
|
+
location: GeoJsonPointAgent
|
|
44
|
+
descriptions: List[SimpleDescriptionAgent] = Field(description="Localized descriptions describing blocking.")
|
|
45
|
+
multimedias: List[SimpleMultimediaAgent] = Field(description="List of images / videos of blocking.")
|
|
46
|
+
contact: ContactAgent
|
|
47
|
+
address: AddressAgent
|
|
48
|
+
commissionable: StrictBool = Field(description="Indicate whether sales channels receive commission for selling this blocking.")
|
|
49
|
+
name: StrictStr = Field(description="Internal name of blocking.")
|
|
50
|
+
proximity_code: StrictStr = Field(description="Supported OTA specification `PRX` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="proximityCode")
|
|
51
|
+
sort: Optional[StrictInt] = Field(default=None, description="Use this property to sort an blocking in a list of activities.")
|
|
52
|
+
min_age_appropriate_code: Optional[StrictStr] = Field(default=None, description="Supported OTA specification `AQC` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="minAgeAppropriateCode")
|
|
53
|
+
bookable: StrictBool = Field(description="Indicates if this blocking can be added to a booking or if it is read-only marketing material only.")
|
|
54
|
+
active: StrictBool = Field(description="Modify blocking availability with this flag.")
|
|
55
|
+
disability_features: Optional[List[StrictStr]] = Field(default=None, description="Supported OTA specification `PHY` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="disabilityFeatures")
|
|
56
|
+
security_features: Optional[List[StrictStr]] = Field(default=None, description="Supported OTA specification `SEC` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="securityFeatures")
|
|
57
|
+
socials: Optional[List[SocialAgent]] = Field(default=None, description="Social network accounts for blocking (if applicable).")
|
|
58
|
+
price_point: StrictStr = Field(description="Level of expensiveness.", alias="pricePoint")
|
|
59
|
+
recognition_list: Optional[List[TravelInventoryRecognitionAgent]] = Field(default=None, description="Inventory-level recognition.", alias="recognitionList")
|
|
60
|
+
max_occupancy: Annotated[int, Field(strict=True, ge=1)] = Field(description="Maximum number of guest allowed in a room type.", alias="maxOccupancy")
|
|
61
|
+
min_occupancy: Annotated[int, Field(strict=True, ge=1)] = Field(description="Minimum number of guests allowed in a room type.", alias="minOccupancy")
|
|
62
|
+
quantity: Annotated[int, Field(strict=True, ge=1)] = Field(description="Defines the number of rooms of this type")
|
|
63
|
+
non_smoking: StrictBool = Field(description="Non-smoking indicator", alias="nonSmoking")
|
|
64
|
+
bedroom_configuration_list: List[BedroomConfigurationAgent] = Field(description="A room type can have more than one bed configuration.", alias="bedroomConfigurationList")
|
|
65
|
+
size: Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]] = Field(description="Number of square meters that defines the size of this room type.")
|
|
66
|
+
max_adult_occupancy: Annotated[int, Field(strict=True, ge=1)] = Field(description="Maximum number of adults allowed in a room type.", alias="maxAdultOccupancy")
|
|
67
|
+
max_child_occupancy: Annotated[int, Field(strict=True, ge=0)] = Field(description="Maximum number of children allowed in a room type.", alias="maxChildOccupancy")
|
|
68
|
+
bathroom_count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of bathrooms", alias="bathroomCount")
|
|
69
|
+
living_room_count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of living rooms", alias="livingRoomCount")
|
|
70
|
+
max_rollaways: Annotated[int, Field(strict=True, ge=0)] = Field(description="Maximum number of rollaway beds allowed in this room type.", alias="maxRollaways")
|
|
71
|
+
room_category: StrictStr = Field(description="Indicates the category of the room. Typical values would be Moderate, Standard, or Deluxe. Supported OTA specification `SEG` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="roomCategory")
|
|
72
|
+
floor: Optional[StrictStr] = Field(default=None, description="Floor an which a room is located")
|
|
73
|
+
room_location_code: StrictStr = Field(description="Indicates the location of the room within the hotel structure. Typical values would be \"Near Exit\",\"Close to elevator\", \"Low Floor\" or \"High Floor\". Supported OTA specification `RLT` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="roomLocationCode")
|
|
74
|
+
room_view_code: StrictStr = Field(description="Indicates the view of the room. Typical values would be \"Ocean view\", \"Pool view\" or \"Garden View\". Supported OTA specification `RVT` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="roomViewCode")
|
|
75
|
+
composite: StrictBool = Field(description="Indicates that the room (suite) is a composite of smaller units.")
|
|
76
|
+
composite_count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of rooms of this room type that makes up a larger unit (composite) such as a two bedroom suite could be comprised of two king rooms plus other room types. A 0 means disabled.", alias="compositeCount")
|
|
77
|
+
room_classification_code: StrictStr = Field(description="Specifies the room classification (e.g., cabin, apartment). Supported OTA specification `GRI` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="roomClassificationCode")
|
|
78
|
+
room_architecture_code: StrictStr = Field(description="Specifies the architectural style of a room. Supported OTA specification `ARC` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="roomArchitectureCode")
|
|
79
|
+
room_gender: Optional[StrictStr] = Field(default='Unknown', description="Used to request or specify a gender assignment for a room. Note: Typically used by Hosteliers.", alias="roomGender")
|
|
80
|
+
shared_room_ind: StrictBool = Field(description="If TRUE, the room requires or has sharing available. Note: Typically used by Hosteliers.", alias="sharedRoomInd")
|
|
81
|
+
max_cribs: Annotated[int, Field(strict=True, ge=0)] = Field(description="Maximum number of cribs allowed in a room type.", alias="maxCribs")
|
|
82
|
+
amenities: Optional[List[StrictStr]] = Field(default=None, description="Collection of room amenity items available to the guest. Supported OTA specification `RMA` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)")
|
|
83
|
+
included_adult_occupancy: Annotated[int, Field(strict=True, ge=0)] = Field(description="The number of pax the room price was meant for", alias="includedAdultOccupancy")
|
|
84
|
+
included_child_occupancy: Annotated[int, Field(strict=True, ge=0)] = Field(description="The number of children the room price was meant for", alias="includedChildOccupancy")
|
|
85
|
+
__properties: ClassVar[List[str]] = ["identifier", "hotelIdentifier", "featuredInd", "lifestyleType", "location", "descriptions", "multimedias", "contact", "address", "commissionable", "name", "proximityCode", "sort", "minAgeAppropriateCode", "bookable", "active", "disabilityFeatures", "securityFeatures", "socials", "pricePoint", "recognitionList", "maxOccupancy", "minOccupancy", "quantity", "nonSmoking", "bedroomConfigurationList", "size", "maxAdultOccupancy", "maxChildOccupancy", "bathroomCount", "livingRoomCount", "maxRollaways", "roomCategory", "floor", "roomLocationCode", "roomViewCode", "composite", "compositeCount", "roomClassificationCode", "roomArchitectureCode", "roomGender", "sharedRoomInd", "maxCribs", "amenities", "includedAdultOccupancy", "includedChildOccupancy"]
|
|
86
|
+
|
|
87
|
+
@field_validator('lifestyle_type')
|
|
88
|
+
def lifestyle_type_validate_enum(cls, value):
|
|
89
|
+
"""Validates the enum"""
|
|
90
|
+
if value is None:
|
|
91
|
+
return value
|
|
92
|
+
|
|
93
|
+
if value not in set(['LIFESTYLE_HEALTH_FITNESS', 'LIFESTYLE_RELAX', 'LIFESTYLE_ADULT_ONLY', 'LIFESTYLE_ADVENTURE', 'LIFESTYLE_BUSINESS', 'LIFESTYLE_LGBT', 'LIFESTYLE_SINGLE_PARENT', 'LIFESTYLE_SOLO_FEMALE', 'LIFESTYLE_BEAUTY', 'LIFESTYLE_FOODIE', 'LIFESTYLE_FAMILY', 'LIFESTYLE_ROMANCE', 'LIFESTYLE_COUPLE', 'LIFESTYLE_SOLO', 'LIFESTYLE_BACKPACKER', 'LIFESTYLE_SHOPPING', 'LIFESTYLE_SPORTS', 'LIFESTYLE_MOUNTAIN', 'LIFESTYLE_BEACH', 'LIFESTYLE_CITY', 'LIFESTYLE_COUNTRY', 'LIFESTYLE_CULTURE', 'LIFESTYLE_ECO']):
|
|
94
|
+
raise ValueError("must be one of enum values ('LIFESTYLE_HEALTH_FITNESS', 'LIFESTYLE_RELAX', 'LIFESTYLE_ADULT_ONLY', 'LIFESTYLE_ADVENTURE', 'LIFESTYLE_BUSINESS', 'LIFESTYLE_LGBT', 'LIFESTYLE_SINGLE_PARENT', 'LIFESTYLE_SOLO_FEMALE', 'LIFESTYLE_BEAUTY', 'LIFESTYLE_FOODIE', 'LIFESTYLE_FAMILY', 'LIFESTYLE_ROMANCE', 'LIFESTYLE_COUPLE', 'LIFESTYLE_SOLO', 'LIFESTYLE_BACKPACKER', 'LIFESTYLE_SHOPPING', 'LIFESTYLE_SPORTS', 'LIFESTYLE_MOUNTAIN', 'LIFESTYLE_BEACH', 'LIFESTYLE_CITY', 'LIFESTYLE_COUNTRY', 'LIFESTYLE_CULTURE', 'LIFESTYLE_ECO')")
|
|
95
|
+
return value
|
|
96
|
+
|
|
97
|
+
@field_validator('price_point')
|
|
98
|
+
def price_point_validate_enum(cls, value):
|
|
99
|
+
"""Validates the enum"""
|
|
100
|
+
if value not in set(['HALF', 'ONE', 'ONE_HALF', 'TWO', 'TWO_HALF', 'THREE', 'THREE_HALF', 'FOUR', 'FOUR_HALF', 'FIVE']):
|
|
101
|
+
raise ValueError("must be one of enum values ('HALF', 'ONE', 'ONE_HALF', 'TWO', 'TWO_HALF', 'THREE', 'THREE_HALF', 'FOUR', 'FOUR_HALF', 'FIVE')")
|
|
102
|
+
return value
|
|
103
|
+
|
|
104
|
+
@field_validator('room_gender')
|
|
105
|
+
def room_gender_validate_enum(cls, value):
|
|
106
|
+
"""Validates the enum"""
|
|
107
|
+
if value is None:
|
|
108
|
+
return value
|
|
109
|
+
|
|
110
|
+
if value not in set(['Male', 'Female', 'MaleAndFemale', 'Unknown']):
|
|
111
|
+
raise ValueError("must be one of enum values ('Male', 'Female', 'MaleAndFemale', 'Unknown')")
|
|
112
|
+
return value
|
|
113
|
+
|
|
114
|
+
model_config = ConfigDict(
|
|
115
|
+
populate_by_name=True,
|
|
116
|
+
validate_assignment=True,
|
|
117
|
+
protected_namespaces=(),
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def to_str(self) -> str:
|
|
122
|
+
"""Returns the string representation of the model using alias"""
|
|
123
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
124
|
+
|
|
125
|
+
def to_json(self) -> str:
|
|
126
|
+
"""Returns the JSON representation of the model using alias"""
|
|
127
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
128
|
+
return json.dumps(self.to_dict())
|
|
129
|
+
|
|
130
|
+
@classmethod
|
|
131
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
132
|
+
"""Create an instance of GuestRoomAgent from a JSON string"""
|
|
133
|
+
return cls.from_dict(json.loads(json_str))
|
|
134
|
+
|
|
135
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
136
|
+
"""Return the dictionary representation of the model using alias.
|
|
137
|
+
|
|
138
|
+
This has the following differences from calling pydantic's
|
|
139
|
+
`self.model_dump(by_alias=True)`:
|
|
140
|
+
|
|
141
|
+
* `None` is only added to the output dict for nullable fields that
|
|
142
|
+
were set at model initialization. Other fields with value `None`
|
|
143
|
+
are ignored.
|
|
144
|
+
"""
|
|
145
|
+
excluded_fields: Set[str] = set([
|
|
146
|
+
])
|
|
147
|
+
|
|
148
|
+
_dict = self.model_dump(
|
|
149
|
+
by_alias=True,
|
|
150
|
+
exclude=excluded_fields,
|
|
151
|
+
exclude_none=True,
|
|
152
|
+
)
|
|
153
|
+
# override the default output from pydantic by calling `to_dict()` of location
|
|
154
|
+
if self.location:
|
|
155
|
+
_dict['location'] = self.location.to_dict()
|
|
156
|
+
# override the default output from pydantic by calling `to_dict()` of each item in descriptions (list)
|
|
157
|
+
_items = []
|
|
158
|
+
if self.descriptions:
|
|
159
|
+
for _item_descriptions in self.descriptions:
|
|
160
|
+
if _item_descriptions:
|
|
161
|
+
_items.append(_item_descriptions.to_dict())
|
|
162
|
+
_dict['descriptions'] = _items
|
|
163
|
+
# override the default output from pydantic by calling `to_dict()` of each item in multimedias (list)
|
|
164
|
+
_items = []
|
|
165
|
+
if self.multimedias:
|
|
166
|
+
for _item_multimedias in self.multimedias:
|
|
167
|
+
if _item_multimedias:
|
|
168
|
+
_items.append(_item_multimedias.to_dict())
|
|
169
|
+
_dict['multimedias'] = _items
|
|
170
|
+
# override the default output from pydantic by calling `to_dict()` of contact
|
|
171
|
+
if self.contact:
|
|
172
|
+
_dict['contact'] = self.contact.to_dict()
|
|
173
|
+
# override the default output from pydantic by calling `to_dict()` of address
|
|
174
|
+
if self.address:
|
|
175
|
+
_dict['address'] = self.address.to_dict()
|
|
176
|
+
# override the default output from pydantic by calling `to_dict()` of each item in socials (list)
|
|
177
|
+
_items = []
|
|
178
|
+
if self.socials:
|
|
179
|
+
for _item_socials in self.socials:
|
|
180
|
+
if _item_socials:
|
|
181
|
+
_items.append(_item_socials.to_dict())
|
|
182
|
+
_dict['socials'] = _items
|
|
183
|
+
# override the default output from pydantic by calling `to_dict()` of each item in recognition_list (list)
|
|
184
|
+
_items = []
|
|
185
|
+
if self.recognition_list:
|
|
186
|
+
for _item_recognition_list in self.recognition_list:
|
|
187
|
+
if _item_recognition_list:
|
|
188
|
+
_items.append(_item_recognition_list.to_dict())
|
|
189
|
+
_dict['recognitionList'] = _items
|
|
190
|
+
# override the default output from pydantic by calling `to_dict()` of each item in bedroom_configuration_list (list)
|
|
191
|
+
_items = []
|
|
192
|
+
if self.bedroom_configuration_list:
|
|
193
|
+
for _item_bedroom_configuration_list in self.bedroom_configuration_list:
|
|
194
|
+
if _item_bedroom_configuration_list:
|
|
195
|
+
_items.append(_item_bedroom_configuration_list.to_dict())
|
|
196
|
+
_dict['bedroomConfigurationList'] = _items
|
|
197
|
+
return _dict
|
|
198
|
+
|
|
199
|
+
@classmethod
|
|
200
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
201
|
+
"""Create an instance of GuestRoomAgent from a dict"""
|
|
202
|
+
if obj is None:
|
|
203
|
+
return None
|
|
204
|
+
|
|
205
|
+
if not isinstance(obj, dict):
|
|
206
|
+
return cls.model_validate(obj)
|
|
207
|
+
|
|
208
|
+
_obj = cls.model_validate({
|
|
209
|
+
"identifier": obj.get("identifier"),
|
|
210
|
+
"hotelIdentifier": obj.get("hotelIdentifier"),
|
|
211
|
+
"featuredInd": obj.get("featuredInd"),
|
|
212
|
+
"lifestyleType": obj.get("lifestyleType"),
|
|
213
|
+
"location": GeoJsonPointAgent.from_dict(obj["location"]) if obj.get("location") is not None else None,
|
|
214
|
+
"descriptions": [SimpleDescriptionAgent.from_dict(_item) for _item in obj["descriptions"]] if obj.get("descriptions") is not None else None,
|
|
215
|
+
"multimedias": [SimpleMultimediaAgent.from_dict(_item) for _item in obj["multimedias"]] if obj.get("multimedias") is not None else None,
|
|
216
|
+
"contact": ContactAgent.from_dict(obj["contact"]) if obj.get("contact") is not None else None,
|
|
217
|
+
"address": AddressAgent.from_dict(obj["address"]) if obj.get("address") is not None else None,
|
|
218
|
+
"commissionable": obj.get("commissionable") if obj.get("commissionable") is not None else True,
|
|
219
|
+
"name": obj.get("name"),
|
|
220
|
+
"proximityCode": obj.get("proximityCode"),
|
|
221
|
+
"sort": obj.get("sort"),
|
|
222
|
+
"minAgeAppropriateCode": obj.get("minAgeAppropriateCode"),
|
|
223
|
+
"bookable": obj.get("bookable") if obj.get("bookable") is not None else True,
|
|
224
|
+
"active": obj.get("active") if obj.get("active") is not None else True,
|
|
225
|
+
"disabilityFeatures": obj.get("disabilityFeatures"),
|
|
226
|
+
"securityFeatures": obj.get("securityFeatures"),
|
|
227
|
+
"socials": [SocialAgent.from_dict(_item) for _item in obj["socials"]] if obj.get("socials") is not None else None,
|
|
228
|
+
"pricePoint": obj.get("pricePoint") if obj.get("pricePoint") is not None else 'THREE',
|
|
229
|
+
"recognitionList": [TravelInventoryRecognitionAgent.from_dict(_item) for _item in obj["recognitionList"]] if obj.get("recognitionList") is not None else None,
|
|
230
|
+
"maxOccupancy": obj.get("maxOccupancy") if obj.get("maxOccupancy") is not None else 2,
|
|
231
|
+
"minOccupancy": obj.get("minOccupancy") if obj.get("minOccupancy") is not None else 1,
|
|
232
|
+
"quantity": obj.get("quantity"),
|
|
233
|
+
"nonSmoking": obj.get("nonSmoking"),
|
|
234
|
+
"bedroomConfigurationList": [BedroomConfigurationAgent.from_dict(_item) for _item in obj["bedroomConfigurationList"]] if obj.get("bedroomConfigurationList") is not None else None,
|
|
235
|
+
"size": obj.get("size"),
|
|
236
|
+
"maxAdultOccupancy": obj.get("maxAdultOccupancy") if obj.get("maxAdultOccupancy") is not None else 2,
|
|
237
|
+
"maxChildOccupancy": obj.get("maxChildOccupancy") if obj.get("maxChildOccupancy") is not None else 0,
|
|
238
|
+
"bathroomCount": obj.get("bathroomCount") if obj.get("bathroomCount") is not None else 1,
|
|
239
|
+
"livingRoomCount": obj.get("livingRoomCount") if obj.get("livingRoomCount") is not None else 1,
|
|
240
|
+
"maxRollaways": obj.get("maxRollaways") if obj.get("maxRollaways") is not None else 0,
|
|
241
|
+
"roomCategory": obj.get("roomCategory"),
|
|
242
|
+
"floor": obj.get("floor"),
|
|
243
|
+
"roomLocationCode": obj.get("roomLocationCode"),
|
|
244
|
+
"roomViewCode": obj.get("roomViewCode"),
|
|
245
|
+
"composite": obj.get("composite") if obj.get("composite") is not None else False,
|
|
246
|
+
"compositeCount": obj.get("compositeCount") if obj.get("compositeCount") is not None else 0,
|
|
247
|
+
"roomClassificationCode": obj.get("roomClassificationCode"),
|
|
248
|
+
"roomArchitectureCode": obj.get("roomArchitectureCode"),
|
|
249
|
+
"roomGender": obj.get("roomGender") if obj.get("roomGender") is not None else 'Unknown',
|
|
250
|
+
"sharedRoomInd": obj.get("sharedRoomInd") if obj.get("sharedRoomInd") is not None else False,
|
|
251
|
+
"maxCribs": obj.get("maxCribs") if obj.get("maxCribs") is not None else 0,
|
|
252
|
+
"amenities": obj.get("amenities"),
|
|
253
|
+
"includedAdultOccupancy": obj.get("includedAdultOccupancy") if obj.get("includedAdultOccupancy") is not None else 2,
|
|
254
|
+
"includedChildOccupancy": obj.get("includedChildOccupancy") if obj.get("includedChildOccupancy") is not None else 0
|
|
255
|
+
})
|
|
256
|
+
return _obj
|
|
257
|
+
|
|
258
|
+
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Wink API
|
|
5
|
+
|
|
6
|
+
# Introduction Welcome to the Wink API - A programmer-friendly way to manage, sell and book travel inventory on the Wink platform. The API gives you all the tools you need to ready your properties and inventory for sale across 1000s of our native sales channels. Integrators, affiliates, travel agents and content creators have the ability search for your travel inventory and promote / sell it in a wide variety of ways. # Integrations We have already integrated with the most well-known channel managers so you don't have to. To see our current integrations, please go to https://extranet.wink.travel and scroll to Connectivity section. Once your properties are set up, you can finish the setup by mapping your property to Wink using your channel manager partner portal. If your properties don't have a channel manager, you can easily manage rates and availability with this API. # Intended Audience Programmers are [most likely] a requirement to start integrating with Wink. Companies and organizations that would most benefit from integrating with us are new and existing travel companies that have relationships with suppliers and that need an advanced system from which to manage their travel inventory and get that same inventory out to as many eyeballs as possible at the lowest price possible. - Hotel chains - Hotel brands - Travel tech companies - Destination sites - Integrators - Aggregators - Destination management companies - Travel agencies - OTAs ## APIs Not every integrator needs every API. For that reason, we have separated APIs into context. ### Test API - [Ping](/ping): The Ping API is a quick test endpoint to verify that your credentials work Wink. ### Common APIs - [Notifications](/notifications): The Notifications API is a way for us to stay in touch with your user, property or affiliate account. - [User Settings](/user-settings): The User Settings API exposes endpoints to allow 3rd party integrators to communicate with Wink. ### Consume APIs Consume endpoints are for developers who want to find existing travel inventory and either book it or use it to advertise through one of their Wink affiliate accounts. - [Configuration](/customization-client): A single endpoint to retrieve whitelabel + customization information for the booking customization. - [Lookup](/lookup): All APIs related to locating inventory by region, locale and property flags. - [Inventory](/inventory): All APIs related to retrieve known travel inventory as it was found using the Lookup API.. - [Booking](/booking): All APIs related to creating bookings on the platform. - [Travel Agent](/travel-agent): The Travel Agent API exposes endpoints to manage agent-facilitated bookings. ### Produce APIs Produce endpoints are for developers who want to create and manage travel inventory. #### Property - [Property registration](/extranet/property/register): As a producer, this is, oftentimes, where you start your journey. These endpoints let you create properties on Wink. - [Property](/extranet/property): This collection of property endpoints are mostly management endpoints that let you display, change status and similar for your existing properties. - [Facilities](/extranet/facilities): This collection of endpoints let you manage facilities; such as room types. - [Experiences](/extranet/experiences): This collection of endpoints let you manage experiences, such as activities. - [Monetize](/extranet/monetize): The Monetize API exposes endpoints for managing cancellation polies, rate plans, promotions and more on Wink. - [Distribution](/extranet/distribution): The Distribution API exposes endpoints for sales channels, connecting with affiliates, managing rates and inventory calendars and more on Wink. - [Property Booking](/extranet/booking): The Property Booking API exposes endpoints for managing bookings and reviews at the property-level. #### Affiliate - [Affiliate](/affiliate): This collection of affiliate endpoints are mostly management endpoints that let you display, change status and similar for your existing accounts. - [Browse](/affiliate/browse): The Browse API exposes endpoints for affiliates to find suppliers and inventory to sell. - [Inventory](/affiliate/inventory): The Inventory API exposes endpoints for affiliates to manage the inventory they want to sell and how they want to sell it. - [Sales Channel](/affiliate/sales-channel): The Sales Channel API exposes endpoints for affiliates to manage existing sales channels as well as find new ones. - [WinkLinks](/affiliate/winklinks): The WinkLinks API exposes endpoints for affiliates to manage their WinkLinks page. #### Rate provider - [Channel manager](/channel-manager): The Channel Manager API enables external channel manager partners to map, exchange rate / availability information with us as well as be informed of bookings that occur on the Wink platform for one of their properties. ### Taxonomy APIs Taxonomy endpoints are for developers who want to consume and produce travel inventory and need taxonomies of standard and non-standard codes for inventory types, classes, statuses etc. - [Reference](/reference): All APIs related to retrieving platform-supported taxonomies. ### Insight APIs Insight endpoints do exactly what the name implies - They offer platform-level insight into the activities of producers and consumers. - [Analytics](/analytics): All APIs related to tracking metrics across a wide variety of data source segments including, more entertaining, leaderboard metrics. ### Payment APIs Payment endpoints are for developers who want to purchase travel inventory. This can be done via the API as a registered Travel Agent or using our API in conjunction with our PCI compliant payment widget for all other entities. - [TripPay](/payment): All APIs related to TripPay account management, booking, mapping and integration features. ## SDKs We are actively working on supporting the most used languages out there. If you don't see your language here, reach out to us with a request to officially add your language. In the meantime, if you want to roll your own SDK, you can do so by downloading the OpenAPI spec and using one of the many available OpenAPI generators available: [https://openapi-generator.tech/docs/generators](https://openapi-generator.tech/docs/generators). - Java SDK [https://github.com/wink-travel/wink-sdk-java](https://github.com/wink-travel/wink-sdk-java) ## Usage These features are made available to you via a [REST API](https://en.wikipedia.org/wiki/Representational_state_transfer). This API is language agnostic. ## Versioning We chose to version our endpoints in a way that we hope affects your integration minimally. You request the version of our API you wish to work with via the `Wink-Version` header. When it's time for you to upgrade, you only have to change the version number to get access to our updated endpoints. ## Release history - Follow updates on Github: https://github.com/wink-travel/wink-sdk-java/blob/master/CHANGELOG.md # Travel Agent API The Travel Agent API exposes endpoints to manage agent-facilitated bookings. This API lets you: 1. Travel Agent: Manage agent entity. 2. Booking: Create / Manage bookings Browse the endpoints in the left navigation bar to get started.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 30.29.0
|
|
9
|
+
Contact: bjorn@wink.travel
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from uuid import UUID
|
|
25
|
+
from wink_sdk_travel_agent.models.bedroom_configuration_agent import BedroomConfigurationAgent
|
|
26
|
+
from wink_sdk_travel_agent.models.contact_agent import ContactAgent
|
|
27
|
+
from wink_sdk_travel_agent.models.geo_json_point_agent import GeoJsonPointAgent
|
|
28
|
+
from wink_sdk_travel_agent.models.simple_address_agent import SimpleAddressAgent
|
|
29
|
+
from wink_sdk_travel_agent.models.simple_description_agent import SimpleDescriptionAgent
|
|
30
|
+
from wink_sdk_travel_agent.models.simple_multimedia_agent import SimpleMultimediaAgent
|
|
31
|
+
from wink_sdk_travel_agent.models.social_agent import SocialAgent
|
|
32
|
+
from wink_sdk_travel_agent.models.travel_inventory_recognition_agent import TravelInventoryRecognitionAgent
|
|
33
|
+
from typing import Optional, Set
|
|
34
|
+
from typing_extensions import Self
|
|
35
|
+
|
|
36
|
+
class GuestRoomLightweightAgent(BaseModel):
|
|
37
|
+
"""
|
|
38
|
+
GuestRoomLightweightAgent
|
|
39
|
+
""" # noqa: E501
|
|
40
|
+
identifier: UUID = Field(description="Unique record identifier")
|
|
41
|
+
hotel_identifier: UUID = Field(description="Hotel identifier.", alias="hotelIdentifier")
|
|
42
|
+
featured_ind: StrictBool = Field(description="Indicates whether this inventory is featured. Use this flag as a way to signify that this inventory is special.", alias="featuredInd")
|
|
43
|
+
lifestyle_type: Optional[StrictStr] = Field(default=None, description="Indicate the type of lifestyle this blocking should be associated with.", alias="lifestyleType")
|
|
44
|
+
location: GeoJsonPointAgent = Field(description="Geo-location point where blocking takes place. Defaults to location of property.")
|
|
45
|
+
descriptions: Annotated[List[SimpleDescriptionAgent], Field(min_length=1)]
|
|
46
|
+
multimedias: Annotated[List[SimpleMultimediaAgent], Field(min_length=1)]
|
|
47
|
+
contact: ContactAgent = Field(description="Associate a contact person for this blocking (if applicable).")
|
|
48
|
+
address: SimpleAddressAgent = Field(description="Defaults to property address.")
|
|
49
|
+
commissionable: StrictBool = Field(description="Indicate whether sales channels receive commission for selling this blocking.")
|
|
50
|
+
name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Internal name of inventory.")
|
|
51
|
+
proximity_code: StrictStr = Field(description="Supported OTA specification `PRX` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="proximityCode")
|
|
52
|
+
sort: Optional[StrictInt] = Field(default=None, description="Use this property to sort an blocking in a list of activities.")
|
|
53
|
+
min_age_appropriate_code: Optional[StrictStr] = Field(default=None, description="Supported OTA specification `AQC` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="minAgeAppropriateCode")
|
|
54
|
+
bookable: StrictBool = Field(description="Indicates if this blocking can be added to a booking or if it is read-only marketing material only.")
|
|
55
|
+
active: StrictBool = Field(description="Modify blocking availability with this flag.")
|
|
56
|
+
disability_features: Optional[List[StrictStr]] = Field(default=None, alias="disabilityFeatures")
|
|
57
|
+
security_features: Optional[List[StrictStr]] = Field(default=None, alias="securityFeatures")
|
|
58
|
+
socials: Optional[List[SocialAgent]] = None
|
|
59
|
+
price_point: StrictStr = Field(description="Level of expensiveness.", alias="pricePoint")
|
|
60
|
+
recognition_list: Optional[List[TravelInventoryRecognitionAgent]] = Field(default=None, alias="recognitionList")
|
|
61
|
+
max_occupancy: Annotated[int, Field(strict=True, ge=1)] = Field(description="Maximum number of guest allowed in a room type.", alias="maxOccupancy")
|
|
62
|
+
min_occupancy: Annotated[int, Field(strict=True, ge=1)] = Field(description="Minimum number of guests allowed in a room type.", alias="minOccupancy")
|
|
63
|
+
quantity: Annotated[int, Field(strict=True, ge=1)] = Field(description="Defines the number of rooms of this type")
|
|
64
|
+
non_smoking: StrictBool = Field(description="Non-smoking indicator", alias="nonSmoking")
|
|
65
|
+
bedroom_configuration_list: Annotated[List[BedroomConfigurationAgent], Field(min_length=1)] = Field(alias="bedroomConfigurationList")
|
|
66
|
+
size: Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]] = Field(description="Number of square meters that defines the size of this room type.")
|
|
67
|
+
max_adult_occupancy: Annotated[int, Field(strict=True, ge=1)] = Field(description="Maximum number of adults allowed in a room type.", alias="maxAdultOccupancy")
|
|
68
|
+
max_child_occupancy: Annotated[int, Field(strict=True, ge=0)] = Field(description="Maximum number of children allowed in a room type.", alias="maxChildOccupancy")
|
|
69
|
+
bathroom_count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of bathrooms", alias="bathroomCount")
|
|
70
|
+
living_room_count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of living rooms", alias="livingRoomCount")
|
|
71
|
+
max_rollaways: Annotated[int, Field(strict=True, ge=0)] = Field(description="Maximum number of rollaway beds allowed in this room type.", alias="maxRollaways")
|
|
72
|
+
room_category: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Indicates the category of the room. Typical values would be Moderate, Standard, or Deluxe. Supported OTA specification `SEG` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="roomCategory")
|
|
73
|
+
floor: Optional[StrictStr] = Field(default=None, description="Floor an which a room is located")
|
|
74
|
+
room_location_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Indicates the location of the room within the hotel structure. Typical values would be \"Near Exit\",\"Close to elevator\", \"Low Floor\" or \"High Floor\". Supported OTA specification `RLT` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="roomLocationCode")
|
|
75
|
+
room_view_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Indicates the view of the room. Typical values would be \"Ocean view\", \"Pool view\" or \"Garden View\". Supported OTA specification `RVT` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="roomViewCode")
|
|
76
|
+
composite: StrictBool = Field(description="Indicates that the room (suite) is a composite of smaller units.")
|
|
77
|
+
composite_count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of rooms of this room type that makes up a larger unit (composite) such as a two bedroom suite could be comprised of two king rooms plus other room types. A 0 means disabled.", alias="compositeCount")
|
|
78
|
+
room_classification_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Specifies the room classification (e.g., cabin, apartment). Supported OTA specification `GRI` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="roomClassificationCode")
|
|
79
|
+
room_architecture_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Specifies the architectural style of a room. Supported OTA specification `ARC` code. See [OTA geoname data](#operation/showAvailableCodesForCategory)", alias="roomArchitectureCode")
|
|
80
|
+
room_gender: Optional[StrictStr] = Field(default='Unknown', description="Used to request or specify a gender assignment for a room. Note: Typically used by Hosteliers.", alias="roomGender")
|
|
81
|
+
shared_room_ind: StrictBool = Field(description="If TRUE, the room requires or has sharing available. Note: Typically used by Hosteliers.", alias="sharedRoomInd")
|
|
82
|
+
max_cribs: Annotated[int, Field(strict=True, ge=0)] = Field(description="Maximum number of cribs allowed in a room type.", alias="maxCribs")
|
|
83
|
+
amenities: Optional[List[StrictStr]] = None
|
|
84
|
+
included_adult_occupancy: Annotated[int, Field(strict=True, ge=0)] = Field(description="The number of pax the room price was meant for", alias="includedAdultOccupancy")
|
|
85
|
+
included_child_occupancy: Annotated[int, Field(strict=True, ge=0)] = Field(description="The number of children the room price was meant for", alias="includedChildOccupancy")
|
|
86
|
+
__properties: ClassVar[List[str]] = ["identifier", "hotelIdentifier", "featuredInd", "lifestyleType", "location", "descriptions", "multimedias", "contact", "address", "commissionable", "name", "proximityCode", "sort", "minAgeAppropriateCode", "bookable", "active", "disabilityFeatures", "securityFeatures", "socials", "pricePoint", "recognitionList", "maxOccupancy", "minOccupancy", "quantity", "nonSmoking", "bedroomConfigurationList", "size", "maxAdultOccupancy", "maxChildOccupancy", "bathroomCount", "livingRoomCount", "maxRollaways", "roomCategory", "floor", "roomLocationCode", "roomViewCode", "composite", "compositeCount", "roomClassificationCode", "roomArchitectureCode", "roomGender", "sharedRoomInd", "maxCribs", "amenities", "includedAdultOccupancy", "includedChildOccupancy"]
|
|
87
|
+
|
|
88
|
+
@field_validator('lifestyle_type')
|
|
89
|
+
def lifestyle_type_validate_enum(cls, value):
|
|
90
|
+
"""Validates the enum"""
|
|
91
|
+
if value is None:
|
|
92
|
+
return value
|
|
93
|
+
|
|
94
|
+
if value not in set(['LIFESTYLE_HEALTH_FITNESS', 'LIFESTYLE_RELAX', 'LIFESTYLE_ADULT_ONLY', 'LIFESTYLE_ADVENTURE', 'LIFESTYLE_BUSINESS', 'LIFESTYLE_LGBT', 'LIFESTYLE_SINGLE_PARENT', 'LIFESTYLE_SOLO_FEMALE', 'LIFESTYLE_BEAUTY', 'LIFESTYLE_FOODIE', 'LIFESTYLE_FAMILY', 'LIFESTYLE_ROMANCE', 'LIFESTYLE_COUPLE', 'LIFESTYLE_SOLO', 'LIFESTYLE_BACKPACKER', 'LIFESTYLE_SHOPPING', 'LIFESTYLE_SPORTS', 'LIFESTYLE_MOUNTAIN', 'LIFESTYLE_BEACH', 'LIFESTYLE_CITY', 'LIFESTYLE_COUNTRY', 'LIFESTYLE_CULTURE', 'LIFESTYLE_ECO']):
|
|
95
|
+
raise ValueError("must be one of enum values ('LIFESTYLE_HEALTH_FITNESS', 'LIFESTYLE_RELAX', 'LIFESTYLE_ADULT_ONLY', 'LIFESTYLE_ADVENTURE', 'LIFESTYLE_BUSINESS', 'LIFESTYLE_LGBT', 'LIFESTYLE_SINGLE_PARENT', 'LIFESTYLE_SOLO_FEMALE', 'LIFESTYLE_BEAUTY', 'LIFESTYLE_FOODIE', 'LIFESTYLE_FAMILY', 'LIFESTYLE_ROMANCE', 'LIFESTYLE_COUPLE', 'LIFESTYLE_SOLO', 'LIFESTYLE_BACKPACKER', 'LIFESTYLE_SHOPPING', 'LIFESTYLE_SPORTS', 'LIFESTYLE_MOUNTAIN', 'LIFESTYLE_BEACH', 'LIFESTYLE_CITY', 'LIFESTYLE_COUNTRY', 'LIFESTYLE_CULTURE', 'LIFESTYLE_ECO')")
|
|
96
|
+
return value
|
|
97
|
+
|
|
98
|
+
@field_validator('price_point')
|
|
99
|
+
def price_point_validate_enum(cls, value):
|
|
100
|
+
"""Validates the enum"""
|
|
101
|
+
if value not in set(['HALF', 'ONE', 'ONE_HALF', 'TWO', 'TWO_HALF', 'THREE', 'THREE_HALF', 'FOUR', 'FOUR_HALF', 'FIVE']):
|
|
102
|
+
raise ValueError("must be one of enum values ('HALF', 'ONE', 'ONE_HALF', 'TWO', 'TWO_HALF', 'THREE', 'THREE_HALF', 'FOUR', 'FOUR_HALF', 'FIVE')")
|
|
103
|
+
return value
|
|
104
|
+
|
|
105
|
+
@field_validator('room_gender')
|
|
106
|
+
def room_gender_validate_enum(cls, value):
|
|
107
|
+
"""Validates the enum"""
|
|
108
|
+
if value is None:
|
|
109
|
+
return value
|
|
110
|
+
|
|
111
|
+
if value not in set(['Male', 'Female', 'MaleAndFemale', 'Unknown']):
|
|
112
|
+
raise ValueError("must be one of enum values ('Male', 'Female', 'MaleAndFemale', 'Unknown')")
|
|
113
|
+
return value
|
|
114
|
+
|
|
115
|
+
model_config = ConfigDict(
|
|
116
|
+
populate_by_name=True,
|
|
117
|
+
validate_assignment=True,
|
|
118
|
+
protected_namespaces=(),
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def to_str(self) -> str:
|
|
123
|
+
"""Returns the string representation of the model using alias"""
|
|
124
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
125
|
+
|
|
126
|
+
def to_json(self) -> str:
|
|
127
|
+
"""Returns the JSON representation of the model using alias"""
|
|
128
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
129
|
+
return json.dumps(self.to_dict())
|
|
130
|
+
|
|
131
|
+
@classmethod
|
|
132
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
133
|
+
"""Create an instance of GuestRoomLightweightAgent from a JSON string"""
|
|
134
|
+
return cls.from_dict(json.loads(json_str))
|
|
135
|
+
|
|
136
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
137
|
+
"""Return the dictionary representation of the model using alias.
|
|
138
|
+
|
|
139
|
+
This has the following differences from calling pydantic's
|
|
140
|
+
`self.model_dump(by_alias=True)`:
|
|
141
|
+
|
|
142
|
+
* `None` is only added to the output dict for nullable fields that
|
|
143
|
+
were set at model initialization. Other fields with value `None`
|
|
144
|
+
are ignored.
|
|
145
|
+
"""
|
|
146
|
+
excluded_fields: Set[str] = set([
|
|
147
|
+
])
|
|
148
|
+
|
|
149
|
+
_dict = self.model_dump(
|
|
150
|
+
by_alias=True,
|
|
151
|
+
exclude=excluded_fields,
|
|
152
|
+
exclude_none=True,
|
|
153
|
+
)
|
|
154
|
+
# override the default output from pydantic by calling `to_dict()` of location
|
|
155
|
+
if self.location:
|
|
156
|
+
_dict['location'] = self.location.to_dict()
|
|
157
|
+
# override the default output from pydantic by calling `to_dict()` of each item in descriptions (list)
|
|
158
|
+
_items = []
|
|
159
|
+
if self.descriptions:
|
|
160
|
+
for _item_descriptions in self.descriptions:
|
|
161
|
+
if _item_descriptions:
|
|
162
|
+
_items.append(_item_descriptions.to_dict())
|
|
163
|
+
_dict['descriptions'] = _items
|
|
164
|
+
# override the default output from pydantic by calling `to_dict()` of each item in multimedias (list)
|
|
165
|
+
_items = []
|
|
166
|
+
if self.multimedias:
|
|
167
|
+
for _item_multimedias in self.multimedias:
|
|
168
|
+
if _item_multimedias:
|
|
169
|
+
_items.append(_item_multimedias.to_dict())
|
|
170
|
+
_dict['multimedias'] = _items
|
|
171
|
+
# override the default output from pydantic by calling `to_dict()` of contact
|
|
172
|
+
if self.contact:
|
|
173
|
+
_dict['contact'] = self.contact.to_dict()
|
|
174
|
+
# override the default output from pydantic by calling `to_dict()` of address
|
|
175
|
+
if self.address:
|
|
176
|
+
_dict['address'] = self.address.to_dict()
|
|
177
|
+
# override the default output from pydantic by calling `to_dict()` of each item in socials (list)
|
|
178
|
+
_items = []
|
|
179
|
+
if self.socials:
|
|
180
|
+
for _item_socials in self.socials:
|
|
181
|
+
if _item_socials:
|
|
182
|
+
_items.append(_item_socials.to_dict())
|
|
183
|
+
_dict['socials'] = _items
|
|
184
|
+
# override the default output from pydantic by calling `to_dict()` of each item in recognition_list (list)
|
|
185
|
+
_items = []
|
|
186
|
+
if self.recognition_list:
|
|
187
|
+
for _item_recognition_list in self.recognition_list:
|
|
188
|
+
if _item_recognition_list:
|
|
189
|
+
_items.append(_item_recognition_list.to_dict())
|
|
190
|
+
_dict['recognitionList'] = _items
|
|
191
|
+
# override the default output from pydantic by calling `to_dict()` of each item in bedroom_configuration_list (list)
|
|
192
|
+
_items = []
|
|
193
|
+
if self.bedroom_configuration_list:
|
|
194
|
+
for _item_bedroom_configuration_list in self.bedroom_configuration_list:
|
|
195
|
+
if _item_bedroom_configuration_list:
|
|
196
|
+
_items.append(_item_bedroom_configuration_list.to_dict())
|
|
197
|
+
_dict['bedroomConfigurationList'] = _items
|
|
198
|
+
return _dict
|
|
199
|
+
|
|
200
|
+
@classmethod
|
|
201
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
202
|
+
"""Create an instance of GuestRoomLightweightAgent from a dict"""
|
|
203
|
+
if obj is None:
|
|
204
|
+
return None
|
|
205
|
+
|
|
206
|
+
if not isinstance(obj, dict):
|
|
207
|
+
return cls.model_validate(obj)
|
|
208
|
+
|
|
209
|
+
_obj = cls.model_validate({
|
|
210
|
+
"identifier": obj.get("identifier"),
|
|
211
|
+
"hotelIdentifier": obj.get("hotelIdentifier"),
|
|
212
|
+
"featuredInd": obj.get("featuredInd"),
|
|
213
|
+
"lifestyleType": obj.get("lifestyleType"),
|
|
214
|
+
"location": GeoJsonPointAgent.from_dict(obj["location"]) if obj.get("location") is not None else None,
|
|
215
|
+
"descriptions": [SimpleDescriptionAgent.from_dict(_item) for _item in obj["descriptions"]] if obj.get("descriptions") is not None else None,
|
|
216
|
+
"multimedias": [SimpleMultimediaAgent.from_dict(_item) for _item in obj["multimedias"]] if obj.get("multimedias") is not None else None,
|
|
217
|
+
"contact": ContactAgent.from_dict(obj["contact"]) if obj.get("contact") is not None else None,
|
|
218
|
+
"address": SimpleAddressAgent.from_dict(obj["address"]) if obj.get("address") is not None else None,
|
|
219
|
+
"commissionable": obj.get("commissionable") if obj.get("commissionable") is not None else True,
|
|
220
|
+
"name": obj.get("name"),
|
|
221
|
+
"proximityCode": obj.get("proximityCode"),
|
|
222
|
+
"sort": obj.get("sort"),
|
|
223
|
+
"minAgeAppropriateCode": obj.get("minAgeAppropriateCode"),
|
|
224
|
+
"bookable": obj.get("bookable") if obj.get("bookable") is not None else True,
|
|
225
|
+
"active": obj.get("active") if obj.get("active") is not None else True,
|
|
226
|
+
"disabilityFeatures": obj.get("disabilityFeatures"),
|
|
227
|
+
"securityFeatures": obj.get("securityFeatures"),
|
|
228
|
+
"socials": [SocialAgent.from_dict(_item) for _item in obj["socials"]] if obj.get("socials") is not None else None,
|
|
229
|
+
"pricePoint": obj.get("pricePoint") if obj.get("pricePoint") is not None else 'THREE',
|
|
230
|
+
"recognitionList": [TravelInventoryRecognitionAgent.from_dict(_item) for _item in obj["recognitionList"]] if obj.get("recognitionList") is not None else None,
|
|
231
|
+
"maxOccupancy": obj.get("maxOccupancy") if obj.get("maxOccupancy") is not None else 2,
|
|
232
|
+
"minOccupancy": obj.get("minOccupancy") if obj.get("minOccupancy") is not None else 1,
|
|
233
|
+
"quantity": obj.get("quantity"),
|
|
234
|
+
"nonSmoking": obj.get("nonSmoking"),
|
|
235
|
+
"bedroomConfigurationList": [BedroomConfigurationAgent.from_dict(_item) for _item in obj["bedroomConfigurationList"]] if obj.get("bedroomConfigurationList") is not None else None,
|
|
236
|
+
"size": obj.get("size"),
|
|
237
|
+
"maxAdultOccupancy": obj.get("maxAdultOccupancy") if obj.get("maxAdultOccupancy") is not None else 2,
|
|
238
|
+
"maxChildOccupancy": obj.get("maxChildOccupancy") if obj.get("maxChildOccupancy") is not None else 0,
|
|
239
|
+
"bathroomCount": obj.get("bathroomCount") if obj.get("bathroomCount") is not None else 1,
|
|
240
|
+
"livingRoomCount": obj.get("livingRoomCount") if obj.get("livingRoomCount") is not None else 1,
|
|
241
|
+
"maxRollaways": obj.get("maxRollaways") if obj.get("maxRollaways") is not None else 0,
|
|
242
|
+
"roomCategory": obj.get("roomCategory"),
|
|
243
|
+
"floor": obj.get("floor"),
|
|
244
|
+
"roomLocationCode": obj.get("roomLocationCode"),
|
|
245
|
+
"roomViewCode": obj.get("roomViewCode"),
|
|
246
|
+
"composite": obj.get("composite") if obj.get("composite") is not None else False,
|
|
247
|
+
"compositeCount": obj.get("compositeCount") if obj.get("compositeCount") is not None else 0,
|
|
248
|
+
"roomClassificationCode": obj.get("roomClassificationCode"),
|
|
249
|
+
"roomArchitectureCode": obj.get("roomArchitectureCode"),
|
|
250
|
+
"roomGender": obj.get("roomGender") if obj.get("roomGender") is not None else 'Unknown',
|
|
251
|
+
"sharedRoomInd": obj.get("sharedRoomInd") if obj.get("sharedRoomInd") is not None else False,
|
|
252
|
+
"maxCribs": obj.get("maxCribs") if obj.get("maxCribs") is not None else 0,
|
|
253
|
+
"amenities": obj.get("amenities"),
|
|
254
|
+
"includedAdultOccupancy": obj.get("includedAdultOccupancy") if obj.get("includedAdultOccupancy") is not None else 2,
|
|
255
|
+
"includedChildOccupancy": obj.get("includedChildOccupancy") if obj.get("includedChildOccupancy") is not None else 0
|
|
256
|
+
})
|
|
257
|
+
return _obj
|
|
258
|
+
|
|
259
|
+
|