wink-sdk-travel-agent 0.0.3__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.
Potentially problematic release.
This version of wink-sdk-travel-agent might be problematic. Click here for more details.
- wink_sdk_travel_agent/__init__.py +129 -0
- wink_sdk_travel_agent/api/__init__.py +5 -0
- wink_sdk_travel_agent/api/travel_agent_api.py +1985 -0
- wink_sdk_travel_agent/api_client.py +798 -0
- wink_sdk_travel_agent/api_response.py +21 -0
- wink_sdk_travel_agent/configuration.py +459 -0
- wink_sdk_travel_agent/exceptions.py +200 -0
- wink_sdk_travel_agent/models/__init__.py +112 -0
- wink_sdk_travel_agent/models/address_agent.py +110 -0
- wink_sdk_travel_agent/models/agent_booking_request_agent.py +145 -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 +98 -0
- wink_sdk_travel_agent/models/bed_agent.py +91 -0
- wink_sdk_travel_agent/models/bedroom_agent.py +105 -0
- wink_sdk_travel_agent/models/bedroom_configuration_agent.py +100 -0
- wink_sdk_travel_agent/models/beneficiary_agent.py +162 -0
- wink_sdk_travel_agent/models/beneficiary_charge_agent.py +97 -0
- wink_sdk_travel_agent/models/booking_agent.py +378 -0
- wink_sdk_travel_agent/models/booking_ancillary_agent.py +153 -0
- wink_sdk_travel_agent/models/booking_confirmations_agent.py +109 -0
- wink_sdk_travel_agent/models/booking_contract_agent.py +592 -0
- wink_sdk_travel_agent/models/booking_contract_item_agent.py +214 -0
- wink_sdk_travel_agent/models/booking_contract_payment_details_agent.py +131 -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_user_agent.py +100 -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 +97 -0
- wink_sdk_travel_agent/models/cancellation_policy_agent.py +166 -0
- wink_sdk_travel_agent/models/cancellation_policy_exception_agent.py +99 -0
- wink_sdk_travel_agent/models/cancellation_policy_exceptions_agent.py +96 -0
- wink_sdk_travel_agent/models/child_agent.py +91 -0
- wink_sdk_travel_agent/models/commissionable_entry_agent.py +101 -0
- wink_sdk_travel_agent/models/company_agent.py +160 -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/create_agent_booking400_response.py +141 -0
- wink_sdk_travel_agent/models/create_agent_booking_request_agent.py +104 -0
- wink_sdk_travel_agent/models/custom_monetary_amount.py +90 -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 +192 -0
- wink_sdk_travel_agent/models/engine_configuration_theme_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 +101 -0
- wink_sdk_travel_agent/models/general_manager_agent.py +104 -0
- wink_sdk_travel_agent/models/generic_error_message.py +96 -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/group_descriptor_agent.py +110 -0
- wink_sdk_travel_agent/models/guest_room_agent.py +258 -0
- wink_sdk_travel_agent/models/guest_user_agent.py +106 -0
- wink_sdk_travel_agent/models/hotel_on_map_agent.py +272 -0
- wink_sdk_travel_agent/models/image_attribution_agent.py +90 -0
- wink_sdk_travel_agent/models/localized_description_agent.py +91 -0
- wink_sdk_travel_agent/models/localized_price_agent.py +162 -0
- wink_sdk_travel_agent/models/page_booking_view_agent.py +128 -0
- wink_sdk_travel_agent/models/pageable_object_agent.py +106 -0
- wink_sdk_travel_agent/models/payout_agent.py +152 -0
- wink_sdk_travel_agent/models/payout_fee_agent.py +114 -0
- wink_sdk_travel_agent/models/pending_refund_agent.py +99 -0
- wink_sdk_travel_agent/models/personal_agent.py +155 -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_user_agent.py +100 -0
- wink_sdk_travel_agent/models/property_policy_agent.py +149 -0
- wink_sdk_travel_agent/models/quote_agent.py +94 -0
- wink_sdk_travel_agent/models/rate_plan_agent.py +172 -0
- wink_sdk_travel_agent/models/rate_plan_level_fee_agent.py +111 -0
- wink_sdk_travel_agent/models/refund_agent.py +166 -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 +101 -0
- wink_sdk_travel_agent/models/review_user_agent.py +98 -0
- wink_sdk_travel_agent/models/room_configuration_agent.py +99 -0
- wink_sdk_travel_agent/models/room_stay_agent.py +184 -0
- wink_sdk_travel_agent/models/simple_date_time_itinerary_agent.py +108 -0
- wink_sdk_travel_agent/models/simple_description_agent.py +93 -0
- wink_sdk_travel_agent/models/simple_multimedia_agent.py +154 -0
- wink_sdk_travel_agent/models/social_agent.py +102 -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/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_sub_country_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 +120 -0
- wink_sdk_travel_agent/models/upsert_travel_agent_request_agent.py +90 -0
- wink_sdk_travel_agent/py.typed +0 -0
- wink_sdk_travel_agent/rest.py +258 -0
- wink_sdk_travel_agent-0.0.3.dist-info/LICENSE +201 -0
- wink_sdk_travel_agent-0.0.3.dist-info/METADATA +17 -0
- wink_sdk_travel_agent-0.0.3.dist-info/RECORD +110 -0
- wink_sdk_travel_agent-0.0.3.dist-info/WHEEL +5 -0
- wink_sdk_travel_agent-0.0.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,378 @@
|
|
|
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.7.10
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
24
|
+
from wink_sdk_travel_agent.models.address_agent import AddressAgent
|
|
25
|
+
from wink_sdk_travel_agent.models.booking_ancillary_agent import BookingAncillaryAgent
|
|
26
|
+
from wink_sdk_travel_agent.models.booking_contract_agent import BookingContractAgent
|
|
27
|
+
from wink_sdk_travel_agent.models.booking_user_agent import BookingUserAgent
|
|
28
|
+
from wink_sdk_travel_agent.models.booking_user_session_agent import BookingUserSessionAgent
|
|
29
|
+
from wink_sdk_travel_agent.models.commissionable_entry_agent import CommissionableEntryAgent
|
|
30
|
+
from wink_sdk_travel_agent.models.contact_agent import ContactAgent
|
|
31
|
+
from wink_sdk_travel_agent.models.custom_monetary_amount import CustomMonetaryAmount
|
|
32
|
+
from wink_sdk_travel_agent.models.engine_configuration_booking_report_agent import EngineConfigurationBookingReportAgent
|
|
33
|
+
from wink_sdk_travel_agent.models.hotel_on_map_agent import HotelOnMapAgent
|
|
34
|
+
from wink_sdk_travel_agent.models.reporting_ancillary_agent import ReportingAncillaryAgent
|
|
35
|
+
from wink_sdk_travel_agent.models.reporting_daily_rate_agent import ReportingDailyRateAgent
|
|
36
|
+
from wink_sdk_travel_agent.models.reporting_extra_charge_agent import ReportingExtraChargeAgent
|
|
37
|
+
from wink_sdk_travel_agent.models.review_agent import ReviewAgent
|
|
38
|
+
from wink_sdk_travel_agent.models.room_stay_agent import RoomStayAgent
|
|
39
|
+
from wink_sdk_travel_agent.models.social_agent import SocialAgent
|
|
40
|
+
from typing import Optional, Set
|
|
41
|
+
from typing_extensions import Self
|
|
42
|
+
|
|
43
|
+
class BookingAgent(BaseModel):
|
|
44
|
+
"""
|
|
45
|
+
Booking data object
|
|
46
|
+
""" # noqa: E501
|
|
47
|
+
creation: Optional[StrictStr] = Field(default='NORMAL', description="Communicates whether the booking was created normally or if it failed or was just for testing.")
|
|
48
|
+
var_date: datetime = Field(description="Date and time the booking was made.", alias="date")
|
|
49
|
+
group_identifier: StrictStr = Field(description="Unique record identifier for the collection of bookings that were made at the same time.", alias="groupIdentifier")
|
|
50
|
+
identifier: StrictStr = Field(description="Unique record identifier")
|
|
51
|
+
engine_configuration: EngineConfigurationBookingReportAgent = Field(alias="engineConfiguration")
|
|
52
|
+
booking_code: StrictStr = Field(description="Unique user-friendly booking geoname. This code should be used when corresponding with travelers.", alias="bookingCode")
|
|
53
|
+
user: BookingUserAgent
|
|
54
|
+
user_session: BookingUserSessionAgent = Field(alias="userSession")
|
|
55
|
+
server_url: StrictStr = Field(description="The URL the booking occurred", alias="serverUrl")
|
|
56
|
+
contact_info: ContactAgent = Field(alias="contactInfo")
|
|
57
|
+
address: AddressAgent
|
|
58
|
+
socials: Optional[List[SocialAgent]] = Field(default=None, description="List of all social network account property has for the traveler to get in touch.")
|
|
59
|
+
review: Optional[ReviewAgent] = None
|
|
60
|
+
email_header_logo_url: StrictStr = Field(description="Full url of the image logo optimized for emails", alias="emailHeaderLogoUrl")
|
|
61
|
+
logo_identifier: Optional[StrictStr] = Field(default=None, description="Logo cloudinary identifier for potential reuse", alias="logoIdentifier")
|
|
62
|
+
hotel: HotelOnMapAgent
|
|
63
|
+
room_stay: Optional[RoomStayAgent] = Field(default=None, alias="roomStay")
|
|
64
|
+
special_requests: Optional[StrictStr] = Field(default=None, description="Free text where the traveler can add a message to the property.", alias="specialRequests")
|
|
65
|
+
comment: Optional[StrictStr] = Field(default=None, description="Internal comment field the platform can add and make available to channel manager partners.")
|
|
66
|
+
early_check_in_charge: Optional[CustomMonetaryAmount] = Field(default=None, alias="earlyCheckInCharge")
|
|
67
|
+
late_check_out_charge: Optional[CustomMonetaryAmount] = Field(default=None, alias="lateCheckOutCharge")
|
|
68
|
+
early_check_in_charge_percent: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Early check-in charge calculated in percent of first room night price.", alias="earlyCheckInChargePercent")
|
|
69
|
+
late_check_out_charge_percent: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Early check-in charge calculated in percent of first room night price.", alias="lateCheckOutChargePercent")
|
|
70
|
+
hotel_image_url: StrictStr = Field(description="Absolute URL of hotel image that can be used as-is", alias="hotelImageUrl")
|
|
71
|
+
room_image_url: StrictStr = Field(description="Absolute URL of room image that can be used as-is", alias="roomImageUrl")
|
|
72
|
+
commission_list: Optional[List[CommissionableEntryAgent]] = Field(default=None, description="List of all travel inventory entries that are due a commission to the affiliate.", alias="commissionList")
|
|
73
|
+
ancillary_list: Optional[List[BookingAncillaryAgent]] = Field(default=None, alias="ancillaryList")
|
|
74
|
+
booking_contract: Optional[BookingContractAgent] = Field(default=None, alias="bookingContract")
|
|
75
|
+
static_map_image_url: Optional[StrictStr] = Field(default=None, description="Url of map image that can be sent via email", alias="staticMapImageUrl")
|
|
76
|
+
static_map_url: Optional[StrictStr] = Field(default=None, description="Url of map image location on Google Maps", alias="staticMapUrl")
|
|
77
|
+
cancellable_by_supplier: Optional[StrictBool] = Field(default=None, description="Whether the booking can still be cancelled completely by the supplier.", alias="cancellableBySupplier")
|
|
78
|
+
cancellable_by_traveler: Optional[StrictBool] = Field(default=None, description="Whether the booking can still be cancelled completely by the traveller.", alias="cancellableByTraveler")
|
|
79
|
+
has_add_ons: Optional[StrictBool] = Field(default=None, description="Convenience data point to check if any add-on offers are in this booking.", alias="hasAddOns")
|
|
80
|
+
status: Optional[StrictStr] = Field(default=None, description="Convenience data point to show which status the booking currently has.")
|
|
81
|
+
rate_source: Optional[StrictStr] = Field(default=None, description="Rate origin. This is usually the property channel manager.", alias="rateSource")
|
|
82
|
+
cancellable_by_agent: Optional[StrictBool] = Field(default=None, description="Whether the booking can still be cancelled completely by the agent.", alias="cancellableByAgent")
|
|
83
|
+
meeting_rooms: Optional[List[BookingAncillaryAgent]] = Field(default=None, description="Meeting room reservation records.", alias="meetingRooms")
|
|
84
|
+
restaurants: Optional[List[BookingAncillaryAgent]] = Field(default=None, description="Restaurant reservation records.")
|
|
85
|
+
spas: Optional[List[BookingAncillaryAgent]] = Field(default=None, description="Spa reservation records.")
|
|
86
|
+
activities: Optional[List[BookingAncillaryAgent]] = Field(default=None, description="Activity reservation records.")
|
|
87
|
+
attractions: Optional[List[BookingAncillaryAgent]] = Field(default=None, description="Attraction reservation records.")
|
|
88
|
+
places: Optional[List[BookingAncillaryAgent]] = Field(default=None, description="Place reservation records.")
|
|
89
|
+
room_type_ancillaries: Optional[List[BookingAncillaryAgent]] = Field(default=None, description="Room type ancillary records.", alias="roomTypeAncillaries")
|
|
90
|
+
add_ons: Optional[List[BookingAncillaryAgent]] = Field(default=None, description="Add-on records.", alias="addOns")
|
|
91
|
+
full_address: Optional[StrictStr] = Field(default=None, description="Convenience data point to return the full hotel address.", alias="fullAddress")
|
|
92
|
+
has_breakfast: Optional[StrictBool] = Field(default=None, description="Convenience data point to get to breakfast quickly.", alias="hasBreakfast")
|
|
93
|
+
has_brunch: Optional[StrictBool] = Field(default=None, description="Convenience data point to get to brunch quickly.", alias="hasBrunch")
|
|
94
|
+
has_lunch: Optional[StrictBool] = Field(default=None, description="Convenience data point to get to lunch quickly.", alias="hasLunch")
|
|
95
|
+
has_dinner: Optional[StrictBool] = Field(default=None, description="Convenience data point to get to dinner quickly.", alias="hasDinner")
|
|
96
|
+
has_all_inclusive: Optional[StrictBool] = Field(default=None, description="Convenience data point to get to all-inclusive quickly.", alias="hasAllInclusive")
|
|
97
|
+
has_all_inclusive_plus_alcohol: Optional[StrictBool] = Field(default=None, description="Convenience data point to get to all-inclusive with alcohol quickly.", alias="hasAllInclusivePlusAlcohol")
|
|
98
|
+
has_room_type_ancillaries: Optional[StrictBool] = Field(default=None, description="Convenience data point to check if any room type ancillaries are in this booking.", alias="hasRoomTypeAncillaries")
|
|
99
|
+
has_food: Optional[StrictBool] = Field(default=None, description="Convenience data point to check if any food is included in this booking.", alias="hasFood")
|
|
100
|
+
has_restaurants: Optional[StrictBool] = Field(default=None, description="Convenience data point to check if any restaurant reservations are included in this booking.", alias="hasRestaurants")
|
|
101
|
+
has_meeting_rooms: Optional[StrictBool] = Field(default=None, description="Convenience data point to check if any meeting room reservations are included in this booking.", alias="hasMeetingRooms")
|
|
102
|
+
has_spas: Optional[StrictBool] = Field(default=None, description="Convenience data point to check if any spa reservations are included in this booking.", alias="hasSpas")
|
|
103
|
+
has_activities: Optional[StrictBool] = Field(default=None, description="Convenience data point to check if any activity reservations are included in this booking.", alias="hasActivities")
|
|
104
|
+
has_attractions: Optional[StrictBool] = Field(default=None, description="Convenience data point to check if any attractions reservations are included in this booking.", alias="hasAttractions")
|
|
105
|
+
has_places: Optional[StrictBool] = Field(default=None, description="Convenience data point to check if any place reservations are included in this booking.", alias="hasPlaces")
|
|
106
|
+
reporting_daily_rate_list: Optional[List[ReportingDailyRateAgent]] = Field(default=None, alias="reportingDailyRateList")
|
|
107
|
+
reporting_ancillary_list: Optional[List[ReportingAncillaryAgent]] = Field(default=None, alias="reportingAncillaryList")
|
|
108
|
+
reporting_extra_charge_list: Optional[List[ReportingExtraChargeAgent]] = Field(default=None, alias="reportingExtraChargeList")
|
|
109
|
+
__properties: ClassVar[List[str]] = ["creation", "date", "groupIdentifier", "identifier", "engineConfiguration", "bookingCode", "user", "userSession", "serverUrl", "contactInfo", "address", "socials", "review", "emailHeaderLogoUrl", "logoIdentifier", "hotel", "roomStay", "specialRequests", "comment", "earlyCheckInCharge", "lateCheckOutCharge", "earlyCheckInChargePercent", "lateCheckOutChargePercent", "hotelImageUrl", "roomImageUrl", "commissionList", "ancillaryList", "bookingContract", "staticMapImageUrl", "staticMapUrl", "cancellableBySupplier", "cancellableByTraveler", "hasAddOns", "status", "rateSource", "cancellableByAgent", "meetingRooms", "restaurants", "spas", "activities", "attractions", "places", "roomTypeAncillaries", "addOns", "fullAddress", "hasBreakfast", "hasBrunch", "hasLunch", "hasDinner", "hasAllInclusive", "hasAllInclusivePlusAlcohol", "hasRoomTypeAncillaries", "hasFood", "hasRestaurants", "hasMeetingRooms", "hasSpas", "hasActivities", "hasAttractions", "hasPlaces", "reportingDailyRateList", "reportingAncillaryList", "reportingExtraChargeList"]
|
|
110
|
+
|
|
111
|
+
@field_validator('creation')
|
|
112
|
+
def creation_validate_enum(cls, value):
|
|
113
|
+
"""Validates the enum"""
|
|
114
|
+
if value is None:
|
|
115
|
+
return value
|
|
116
|
+
|
|
117
|
+
if value not in set(['NORMAL', 'TEST', 'FAILED']):
|
|
118
|
+
raise ValueError("must be one of enum values ('NORMAL', 'TEST', 'FAILED')")
|
|
119
|
+
return value
|
|
120
|
+
|
|
121
|
+
@field_validator('status')
|
|
122
|
+
def status_validate_enum(cls, value):
|
|
123
|
+
"""Validates the enum"""
|
|
124
|
+
if value is None:
|
|
125
|
+
return value
|
|
126
|
+
|
|
127
|
+
if value not in set(['CANCELLED_BY_HOTEL', 'CANCELLED_BY_GUEST', 'CANCELLED_BY_ADMIN', 'CANCELLED_BY_SALES_CHANNEL', 'PAST', 'FUTURE', 'CANCELLED_BY_ACQUIRER', 'ACTIVE', 'FAILED']):
|
|
128
|
+
raise ValueError("must be one of enum values ('CANCELLED_BY_HOTEL', 'CANCELLED_BY_GUEST', 'CANCELLED_BY_ADMIN', 'CANCELLED_BY_SALES_CHANNEL', 'PAST', 'FUTURE', 'CANCELLED_BY_ACQUIRER', 'ACTIVE', 'FAILED')")
|
|
129
|
+
return value
|
|
130
|
+
|
|
131
|
+
model_config = ConfigDict(
|
|
132
|
+
populate_by_name=True,
|
|
133
|
+
validate_assignment=True,
|
|
134
|
+
protected_namespaces=(),
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def to_str(self) -> str:
|
|
139
|
+
"""Returns the string representation of the model using alias"""
|
|
140
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
141
|
+
|
|
142
|
+
def to_json(self) -> str:
|
|
143
|
+
"""Returns the JSON representation of the model using alias"""
|
|
144
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
145
|
+
return json.dumps(self.to_dict())
|
|
146
|
+
|
|
147
|
+
@classmethod
|
|
148
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
149
|
+
"""Create an instance of BookingAgent from a JSON string"""
|
|
150
|
+
return cls.from_dict(json.loads(json_str))
|
|
151
|
+
|
|
152
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
153
|
+
"""Return the dictionary representation of the model using alias.
|
|
154
|
+
|
|
155
|
+
This has the following differences from calling pydantic's
|
|
156
|
+
`self.model_dump(by_alias=True)`:
|
|
157
|
+
|
|
158
|
+
* `None` is only added to the output dict for nullable fields that
|
|
159
|
+
were set at model initialization. Other fields with value `None`
|
|
160
|
+
are ignored.
|
|
161
|
+
"""
|
|
162
|
+
excluded_fields: Set[str] = set([
|
|
163
|
+
])
|
|
164
|
+
|
|
165
|
+
_dict = self.model_dump(
|
|
166
|
+
by_alias=True,
|
|
167
|
+
exclude=excluded_fields,
|
|
168
|
+
exclude_none=True,
|
|
169
|
+
)
|
|
170
|
+
# override the default output from pydantic by calling `to_dict()` of engine_configuration
|
|
171
|
+
if self.engine_configuration:
|
|
172
|
+
_dict['engineConfiguration'] = self.engine_configuration.to_dict()
|
|
173
|
+
# override the default output from pydantic by calling `to_dict()` of user
|
|
174
|
+
if self.user:
|
|
175
|
+
_dict['user'] = self.user.to_dict()
|
|
176
|
+
# override the default output from pydantic by calling `to_dict()` of user_session
|
|
177
|
+
if self.user_session:
|
|
178
|
+
_dict['userSession'] = self.user_session.to_dict()
|
|
179
|
+
# override the default output from pydantic by calling `to_dict()` of contact_info
|
|
180
|
+
if self.contact_info:
|
|
181
|
+
_dict['contactInfo'] = self.contact_info.to_dict()
|
|
182
|
+
# override the default output from pydantic by calling `to_dict()` of address
|
|
183
|
+
if self.address:
|
|
184
|
+
_dict['address'] = self.address.to_dict()
|
|
185
|
+
# override the default output from pydantic by calling `to_dict()` of each item in socials (list)
|
|
186
|
+
_items = []
|
|
187
|
+
if self.socials:
|
|
188
|
+
for _item_socials in self.socials:
|
|
189
|
+
if _item_socials:
|
|
190
|
+
_items.append(_item_socials.to_dict())
|
|
191
|
+
_dict['socials'] = _items
|
|
192
|
+
# override the default output from pydantic by calling `to_dict()` of review
|
|
193
|
+
if self.review:
|
|
194
|
+
_dict['review'] = self.review.to_dict()
|
|
195
|
+
# override the default output from pydantic by calling `to_dict()` of hotel
|
|
196
|
+
if self.hotel:
|
|
197
|
+
_dict['hotel'] = self.hotel.to_dict()
|
|
198
|
+
# override the default output from pydantic by calling `to_dict()` of room_stay
|
|
199
|
+
if self.room_stay:
|
|
200
|
+
_dict['roomStay'] = self.room_stay.to_dict()
|
|
201
|
+
# override the default output from pydantic by calling `to_dict()` of early_check_in_charge
|
|
202
|
+
if self.early_check_in_charge:
|
|
203
|
+
_dict['earlyCheckInCharge'] = self.early_check_in_charge.to_dict()
|
|
204
|
+
# override the default output from pydantic by calling `to_dict()` of late_check_out_charge
|
|
205
|
+
if self.late_check_out_charge:
|
|
206
|
+
_dict['lateCheckOutCharge'] = self.late_check_out_charge.to_dict()
|
|
207
|
+
# override the default output from pydantic by calling `to_dict()` of each item in commission_list (list)
|
|
208
|
+
_items = []
|
|
209
|
+
if self.commission_list:
|
|
210
|
+
for _item_commission_list in self.commission_list:
|
|
211
|
+
if _item_commission_list:
|
|
212
|
+
_items.append(_item_commission_list.to_dict())
|
|
213
|
+
_dict['commissionList'] = _items
|
|
214
|
+
# override the default output from pydantic by calling `to_dict()` of each item in ancillary_list (list)
|
|
215
|
+
_items = []
|
|
216
|
+
if self.ancillary_list:
|
|
217
|
+
for _item_ancillary_list in self.ancillary_list:
|
|
218
|
+
if _item_ancillary_list:
|
|
219
|
+
_items.append(_item_ancillary_list.to_dict())
|
|
220
|
+
_dict['ancillaryList'] = _items
|
|
221
|
+
# override the default output from pydantic by calling `to_dict()` of booking_contract
|
|
222
|
+
if self.booking_contract:
|
|
223
|
+
_dict['bookingContract'] = self.booking_contract.to_dict()
|
|
224
|
+
# override the default output from pydantic by calling `to_dict()` of each item in meeting_rooms (list)
|
|
225
|
+
_items = []
|
|
226
|
+
if self.meeting_rooms:
|
|
227
|
+
for _item_meeting_rooms in self.meeting_rooms:
|
|
228
|
+
if _item_meeting_rooms:
|
|
229
|
+
_items.append(_item_meeting_rooms.to_dict())
|
|
230
|
+
_dict['meetingRooms'] = _items
|
|
231
|
+
# override the default output from pydantic by calling `to_dict()` of each item in restaurants (list)
|
|
232
|
+
_items = []
|
|
233
|
+
if self.restaurants:
|
|
234
|
+
for _item_restaurants in self.restaurants:
|
|
235
|
+
if _item_restaurants:
|
|
236
|
+
_items.append(_item_restaurants.to_dict())
|
|
237
|
+
_dict['restaurants'] = _items
|
|
238
|
+
# override the default output from pydantic by calling `to_dict()` of each item in spas (list)
|
|
239
|
+
_items = []
|
|
240
|
+
if self.spas:
|
|
241
|
+
for _item_spas in self.spas:
|
|
242
|
+
if _item_spas:
|
|
243
|
+
_items.append(_item_spas.to_dict())
|
|
244
|
+
_dict['spas'] = _items
|
|
245
|
+
# override the default output from pydantic by calling `to_dict()` of each item in activities (list)
|
|
246
|
+
_items = []
|
|
247
|
+
if self.activities:
|
|
248
|
+
for _item_activities in self.activities:
|
|
249
|
+
if _item_activities:
|
|
250
|
+
_items.append(_item_activities.to_dict())
|
|
251
|
+
_dict['activities'] = _items
|
|
252
|
+
# override the default output from pydantic by calling `to_dict()` of each item in attractions (list)
|
|
253
|
+
_items = []
|
|
254
|
+
if self.attractions:
|
|
255
|
+
for _item_attractions in self.attractions:
|
|
256
|
+
if _item_attractions:
|
|
257
|
+
_items.append(_item_attractions.to_dict())
|
|
258
|
+
_dict['attractions'] = _items
|
|
259
|
+
# override the default output from pydantic by calling `to_dict()` of each item in places (list)
|
|
260
|
+
_items = []
|
|
261
|
+
if self.places:
|
|
262
|
+
for _item_places in self.places:
|
|
263
|
+
if _item_places:
|
|
264
|
+
_items.append(_item_places.to_dict())
|
|
265
|
+
_dict['places'] = _items
|
|
266
|
+
# override the default output from pydantic by calling `to_dict()` of each item in room_type_ancillaries (list)
|
|
267
|
+
_items = []
|
|
268
|
+
if self.room_type_ancillaries:
|
|
269
|
+
for _item_room_type_ancillaries in self.room_type_ancillaries:
|
|
270
|
+
if _item_room_type_ancillaries:
|
|
271
|
+
_items.append(_item_room_type_ancillaries.to_dict())
|
|
272
|
+
_dict['roomTypeAncillaries'] = _items
|
|
273
|
+
# override the default output from pydantic by calling `to_dict()` of each item in add_ons (list)
|
|
274
|
+
_items = []
|
|
275
|
+
if self.add_ons:
|
|
276
|
+
for _item_add_ons in self.add_ons:
|
|
277
|
+
if _item_add_ons:
|
|
278
|
+
_items.append(_item_add_ons.to_dict())
|
|
279
|
+
_dict['addOns'] = _items
|
|
280
|
+
# override the default output from pydantic by calling `to_dict()` of each item in reporting_daily_rate_list (list)
|
|
281
|
+
_items = []
|
|
282
|
+
if self.reporting_daily_rate_list:
|
|
283
|
+
for _item_reporting_daily_rate_list in self.reporting_daily_rate_list:
|
|
284
|
+
if _item_reporting_daily_rate_list:
|
|
285
|
+
_items.append(_item_reporting_daily_rate_list.to_dict())
|
|
286
|
+
_dict['reportingDailyRateList'] = _items
|
|
287
|
+
# override the default output from pydantic by calling `to_dict()` of each item in reporting_ancillary_list (list)
|
|
288
|
+
_items = []
|
|
289
|
+
if self.reporting_ancillary_list:
|
|
290
|
+
for _item_reporting_ancillary_list in self.reporting_ancillary_list:
|
|
291
|
+
if _item_reporting_ancillary_list:
|
|
292
|
+
_items.append(_item_reporting_ancillary_list.to_dict())
|
|
293
|
+
_dict['reportingAncillaryList'] = _items
|
|
294
|
+
# override the default output from pydantic by calling `to_dict()` of each item in reporting_extra_charge_list (list)
|
|
295
|
+
_items = []
|
|
296
|
+
if self.reporting_extra_charge_list:
|
|
297
|
+
for _item_reporting_extra_charge_list in self.reporting_extra_charge_list:
|
|
298
|
+
if _item_reporting_extra_charge_list:
|
|
299
|
+
_items.append(_item_reporting_extra_charge_list.to_dict())
|
|
300
|
+
_dict['reportingExtraChargeList'] = _items
|
|
301
|
+
return _dict
|
|
302
|
+
|
|
303
|
+
@classmethod
|
|
304
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
305
|
+
"""Create an instance of BookingAgent from a dict"""
|
|
306
|
+
if obj is None:
|
|
307
|
+
return None
|
|
308
|
+
|
|
309
|
+
if not isinstance(obj, dict):
|
|
310
|
+
return cls.model_validate(obj)
|
|
311
|
+
|
|
312
|
+
_obj = cls.model_validate({
|
|
313
|
+
"creation": obj.get("creation") if obj.get("creation") is not None else 'NORMAL',
|
|
314
|
+
"date": obj.get("date"),
|
|
315
|
+
"groupIdentifier": obj.get("groupIdentifier"),
|
|
316
|
+
"identifier": obj.get("identifier"),
|
|
317
|
+
"engineConfiguration": EngineConfigurationBookingReportAgent.from_dict(obj["engineConfiguration"]) if obj.get("engineConfiguration") is not None else None,
|
|
318
|
+
"bookingCode": obj.get("bookingCode"),
|
|
319
|
+
"user": BookingUserAgent.from_dict(obj["user"]) if obj.get("user") is not None else None,
|
|
320
|
+
"userSession": BookingUserSessionAgent.from_dict(obj["userSession"]) if obj.get("userSession") is not None else None,
|
|
321
|
+
"serverUrl": obj.get("serverUrl"),
|
|
322
|
+
"contactInfo": ContactAgent.from_dict(obj["contactInfo"]) if obj.get("contactInfo") is not None else None,
|
|
323
|
+
"address": AddressAgent.from_dict(obj["address"]) if obj.get("address") is not None else None,
|
|
324
|
+
"socials": [SocialAgent.from_dict(_item) for _item in obj["socials"]] if obj.get("socials") is not None else None,
|
|
325
|
+
"review": ReviewAgent.from_dict(obj["review"]) if obj.get("review") is not None else None,
|
|
326
|
+
"emailHeaderLogoUrl": obj.get("emailHeaderLogoUrl"),
|
|
327
|
+
"logoIdentifier": obj.get("logoIdentifier"),
|
|
328
|
+
"hotel": HotelOnMapAgent.from_dict(obj["hotel"]) if obj.get("hotel") is not None else None,
|
|
329
|
+
"roomStay": RoomStayAgent.from_dict(obj["roomStay"]) if obj.get("roomStay") is not None else None,
|
|
330
|
+
"specialRequests": obj.get("specialRequests"),
|
|
331
|
+
"comment": obj.get("comment"),
|
|
332
|
+
"earlyCheckInCharge": CustomMonetaryAmount.from_dict(obj["earlyCheckInCharge"]) if obj.get("earlyCheckInCharge") is not None else None,
|
|
333
|
+
"lateCheckOutCharge": CustomMonetaryAmount.from_dict(obj["lateCheckOutCharge"]) if obj.get("lateCheckOutCharge") is not None else None,
|
|
334
|
+
"earlyCheckInChargePercent": obj.get("earlyCheckInChargePercent"),
|
|
335
|
+
"lateCheckOutChargePercent": obj.get("lateCheckOutChargePercent"),
|
|
336
|
+
"hotelImageUrl": obj.get("hotelImageUrl"),
|
|
337
|
+
"roomImageUrl": obj.get("roomImageUrl"),
|
|
338
|
+
"commissionList": [CommissionableEntryAgent.from_dict(_item) for _item in obj["commissionList"]] if obj.get("commissionList") is not None else None,
|
|
339
|
+
"ancillaryList": [BookingAncillaryAgent.from_dict(_item) for _item in obj["ancillaryList"]] if obj.get("ancillaryList") is not None else None,
|
|
340
|
+
"bookingContract": BookingContractAgent.from_dict(obj["bookingContract"]) if obj.get("bookingContract") is not None else None,
|
|
341
|
+
"staticMapImageUrl": obj.get("staticMapImageUrl"),
|
|
342
|
+
"staticMapUrl": obj.get("staticMapUrl"),
|
|
343
|
+
"cancellableBySupplier": obj.get("cancellableBySupplier"),
|
|
344
|
+
"cancellableByTraveler": obj.get("cancellableByTraveler"),
|
|
345
|
+
"hasAddOns": obj.get("hasAddOns"),
|
|
346
|
+
"status": obj.get("status"),
|
|
347
|
+
"rateSource": obj.get("rateSource"),
|
|
348
|
+
"cancellableByAgent": obj.get("cancellableByAgent"),
|
|
349
|
+
"meetingRooms": [BookingAncillaryAgent.from_dict(_item) for _item in obj["meetingRooms"]] if obj.get("meetingRooms") is not None else None,
|
|
350
|
+
"restaurants": [BookingAncillaryAgent.from_dict(_item) for _item in obj["restaurants"]] if obj.get("restaurants") is not None else None,
|
|
351
|
+
"spas": [BookingAncillaryAgent.from_dict(_item) for _item in obj["spas"]] if obj.get("spas") is not None else None,
|
|
352
|
+
"activities": [BookingAncillaryAgent.from_dict(_item) for _item in obj["activities"]] if obj.get("activities") is not None else None,
|
|
353
|
+
"attractions": [BookingAncillaryAgent.from_dict(_item) for _item in obj["attractions"]] if obj.get("attractions") is not None else None,
|
|
354
|
+
"places": [BookingAncillaryAgent.from_dict(_item) for _item in obj["places"]] if obj.get("places") is not None else None,
|
|
355
|
+
"roomTypeAncillaries": [BookingAncillaryAgent.from_dict(_item) for _item in obj["roomTypeAncillaries"]] if obj.get("roomTypeAncillaries") is not None else None,
|
|
356
|
+
"addOns": [BookingAncillaryAgent.from_dict(_item) for _item in obj["addOns"]] if obj.get("addOns") is not None else None,
|
|
357
|
+
"fullAddress": obj.get("fullAddress"),
|
|
358
|
+
"hasBreakfast": obj.get("hasBreakfast"),
|
|
359
|
+
"hasBrunch": obj.get("hasBrunch"),
|
|
360
|
+
"hasLunch": obj.get("hasLunch"),
|
|
361
|
+
"hasDinner": obj.get("hasDinner"),
|
|
362
|
+
"hasAllInclusive": obj.get("hasAllInclusive"),
|
|
363
|
+
"hasAllInclusivePlusAlcohol": obj.get("hasAllInclusivePlusAlcohol"),
|
|
364
|
+
"hasRoomTypeAncillaries": obj.get("hasRoomTypeAncillaries"),
|
|
365
|
+
"hasFood": obj.get("hasFood"),
|
|
366
|
+
"hasRestaurants": obj.get("hasRestaurants"),
|
|
367
|
+
"hasMeetingRooms": obj.get("hasMeetingRooms"),
|
|
368
|
+
"hasSpas": obj.get("hasSpas"),
|
|
369
|
+
"hasActivities": obj.get("hasActivities"),
|
|
370
|
+
"hasAttractions": obj.get("hasAttractions"),
|
|
371
|
+
"hasPlaces": obj.get("hasPlaces"),
|
|
372
|
+
"reportingDailyRateList": [ReportingDailyRateAgent.from_dict(_item) for _item in obj["reportingDailyRateList"]] if obj.get("reportingDailyRateList") is not None else None,
|
|
373
|
+
"reportingAncillaryList": [ReportingAncillaryAgent.from_dict(_item) for _item in obj["reportingAncillaryList"]] if obj.get("reportingAncillaryList") is not None else None,
|
|
374
|
+
"reportingExtraChargeList": [ReportingExtraChargeAgent.from_dict(_item) for _item in obj["reportingExtraChargeList"]] if obj.get("reportingExtraChargeList") is not None else None
|
|
375
|
+
})
|
|
376
|
+
return _obj
|
|
377
|
+
|
|
378
|
+
|
|
@@ -0,0 +1,153 @@
|
|
|
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.7.10
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
24
|
+
from wink_sdk_travel_agent.models.address_agent import AddressAgent
|
|
25
|
+
from wink_sdk_travel_agent.models.contact_agent import ContactAgent
|
|
26
|
+
from wink_sdk_travel_agent.models.localized_price_agent import LocalizedPriceAgent
|
|
27
|
+
from typing import Optional, Set
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
|
|
30
|
+
class BookingAncillaryAgent(BaseModel):
|
|
31
|
+
"""
|
|
32
|
+
Add-on records.
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
identifier: StrictStr = Field(description="Ancillary identifier")
|
|
35
|
+
hotel_identifier: StrictStr = Field(description="Hotel identifier", alias="hotelIdentifier")
|
|
36
|
+
type_identifier: StrictStr = Field(description="Travel blocking identifier", alias="typeIdentifier")
|
|
37
|
+
transactional_travel_inventory_identifier: StrictStr = Field(description="Travel blocking identifier", alias="transactionalTravelInventoryIdentifier")
|
|
38
|
+
name: StrictStr = Field(description="Name of blocking")
|
|
39
|
+
pricing_type: StrictStr = Field(description="Pricing type", alias="pricingType")
|
|
40
|
+
type: StrictStr = Field(description="Inventory type")
|
|
41
|
+
price: LocalizedPriceAgent
|
|
42
|
+
start_date: datetime = Field(description="Date start time when reservation was made for.", alias="startDate")
|
|
43
|
+
end_date: datetime = Field(description="Date end time when reservation was made for.", alias="endDate")
|
|
44
|
+
attendees: StrictInt = Field(description="Number of guests that are part of this reservation.")
|
|
45
|
+
image_identifier: StrictStr = Field(description="Cloudinary image identifier", alias="imageIdentifier")
|
|
46
|
+
image_url: StrictStr = Field(description="Absolute URL to image of blocking", alias="imageUrl")
|
|
47
|
+
localized_name: StrictStr = Field(description="Name of travel blocking in traveler language (if available). Defaults to English.", alias="localizedName")
|
|
48
|
+
localized_description: StrictStr = Field(description="Description of travel blocking in traveler language (if available). Defaults to English.", alias="localizedDescription")
|
|
49
|
+
contact: ContactAgent
|
|
50
|
+
address: AddressAgent
|
|
51
|
+
commissionable: StrictBool
|
|
52
|
+
mandatory: StrictBool
|
|
53
|
+
commission: Union[StrictFloat, StrictInt]
|
|
54
|
+
__properties: ClassVar[List[str]] = ["identifier", "hotelIdentifier", "typeIdentifier", "transactionalTravelInventoryIdentifier", "name", "pricingType", "type", "price", "startDate", "endDate", "attendees", "imageIdentifier", "imageUrl", "localizedName", "localizedDescription", "contact", "address", "commissionable", "mandatory", "commission"]
|
|
55
|
+
|
|
56
|
+
@field_validator('pricing_type')
|
|
57
|
+
def pricing_type_validate_enum(cls, value):
|
|
58
|
+
"""Validates the enum"""
|
|
59
|
+
if value not in set(['PER_STAY', 'PER_DAY', 'PER_NIGHT', 'PER_USE', 'PER_HOUR', 'PER_PERSON', 'PER_PERSON_PER_NIGHT', 'PER_PERSON_PER_HOUR', 'PER_ADULT', 'PER_ADULT_PER_NIGHT', 'PER_ADULT_PER_HOUR', 'PER_CHILD', 'PER_CHILD_PER_NIGHT', 'PER_CHILD_PER_HOUR']):
|
|
60
|
+
raise ValueError("must be one of enum values ('PER_STAY', 'PER_DAY', 'PER_NIGHT', 'PER_USE', 'PER_HOUR', 'PER_PERSON', 'PER_PERSON_PER_NIGHT', 'PER_PERSON_PER_HOUR', 'PER_ADULT', 'PER_ADULT_PER_NIGHT', 'PER_ADULT_PER_HOUR', 'PER_CHILD', 'PER_CHILD_PER_NIGHT', 'PER_CHILD_PER_HOUR')")
|
|
61
|
+
return value
|
|
62
|
+
|
|
63
|
+
@field_validator('type')
|
|
64
|
+
def type_validate_enum(cls, value):
|
|
65
|
+
"""Validates the enum"""
|
|
66
|
+
if value not in set(['ROOM_TYPE_ANCILLARY', 'ADD_ON', 'MEETING_ROOM', 'SPA', 'RESTAURANT', 'ACTIVITY', 'ATTRACTION', 'PLACE']):
|
|
67
|
+
raise ValueError("must be one of enum values ('ROOM_TYPE_ANCILLARY', 'ADD_ON', 'MEETING_ROOM', 'SPA', 'RESTAURANT', 'ACTIVITY', 'ATTRACTION', 'PLACE')")
|
|
68
|
+
return value
|
|
69
|
+
|
|
70
|
+
model_config = ConfigDict(
|
|
71
|
+
populate_by_name=True,
|
|
72
|
+
validate_assignment=True,
|
|
73
|
+
protected_namespaces=(),
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def to_str(self) -> str:
|
|
78
|
+
"""Returns the string representation of the model using alias"""
|
|
79
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
80
|
+
|
|
81
|
+
def to_json(self) -> str:
|
|
82
|
+
"""Returns the JSON representation of the model using alias"""
|
|
83
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
84
|
+
return json.dumps(self.to_dict())
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of BookingAncillaryAgent from a JSON string"""
|
|
89
|
+
return cls.from_dict(json.loads(json_str))
|
|
90
|
+
|
|
91
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
92
|
+
"""Return the dictionary representation of the model using alias.
|
|
93
|
+
|
|
94
|
+
This has the following differences from calling pydantic's
|
|
95
|
+
`self.model_dump(by_alias=True)`:
|
|
96
|
+
|
|
97
|
+
* `None` is only added to the output dict for nullable fields that
|
|
98
|
+
were set at model initialization. Other fields with value `None`
|
|
99
|
+
are ignored.
|
|
100
|
+
"""
|
|
101
|
+
excluded_fields: Set[str] = set([
|
|
102
|
+
])
|
|
103
|
+
|
|
104
|
+
_dict = self.model_dump(
|
|
105
|
+
by_alias=True,
|
|
106
|
+
exclude=excluded_fields,
|
|
107
|
+
exclude_none=True,
|
|
108
|
+
)
|
|
109
|
+
# override the default output from pydantic by calling `to_dict()` of price
|
|
110
|
+
if self.price:
|
|
111
|
+
_dict['price'] = self.price.to_dict()
|
|
112
|
+
# override the default output from pydantic by calling `to_dict()` of contact
|
|
113
|
+
if self.contact:
|
|
114
|
+
_dict['contact'] = self.contact.to_dict()
|
|
115
|
+
# override the default output from pydantic by calling `to_dict()` of address
|
|
116
|
+
if self.address:
|
|
117
|
+
_dict['address'] = self.address.to_dict()
|
|
118
|
+
return _dict
|
|
119
|
+
|
|
120
|
+
@classmethod
|
|
121
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
122
|
+
"""Create an instance of BookingAncillaryAgent from a dict"""
|
|
123
|
+
if obj is None:
|
|
124
|
+
return None
|
|
125
|
+
|
|
126
|
+
if not isinstance(obj, dict):
|
|
127
|
+
return cls.model_validate(obj)
|
|
128
|
+
|
|
129
|
+
_obj = cls.model_validate({
|
|
130
|
+
"identifier": obj.get("identifier"),
|
|
131
|
+
"hotelIdentifier": obj.get("hotelIdentifier"),
|
|
132
|
+
"typeIdentifier": obj.get("typeIdentifier"),
|
|
133
|
+
"transactionalTravelInventoryIdentifier": obj.get("transactionalTravelInventoryIdentifier"),
|
|
134
|
+
"name": obj.get("name"),
|
|
135
|
+
"pricingType": obj.get("pricingType"),
|
|
136
|
+
"type": obj.get("type"),
|
|
137
|
+
"price": LocalizedPriceAgent.from_dict(obj["price"]) if obj.get("price") is not None else None,
|
|
138
|
+
"startDate": obj.get("startDate"),
|
|
139
|
+
"endDate": obj.get("endDate"),
|
|
140
|
+
"attendees": obj.get("attendees") if obj.get("attendees") is not None else 1,
|
|
141
|
+
"imageIdentifier": obj.get("imageIdentifier"),
|
|
142
|
+
"imageUrl": obj.get("imageUrl"),
|
|
143
|
+
"localizedName": obj.get("localizedName"),
|
|
144
|
+
"localizedDescription": obj.get("localizedDescription"),
|
|
145
|
+
"contact": ContactAgent.from_dict(obj["contact"]) if obj.get("contact") is not None else None,
|
|
146
|
+
"address": AddressAgent.from_dict(obj["address"]) if obj.get("address") is not None else None,
|
|
147
|
+
"commissionable": obj.get("commissionable"),
|
|
148
|
+
"mandatory": obj.get("mandatory"),
|
|
149
|
+
"commission": obj.get("commission")
|
|
150
|
+
})
|
|
151
|
+
return _obj
|
|
152
|
+
|
|
153
|
+
|