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,130 @@
|
|
|
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
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from uuid import UUID
|
|
25
|
+
from wink_sdk_travel_agent.models.cancellation_policy_exceptions_agent import CancellationPolicyExceptionsAgent
|
|
26
|
+
from wink_sdk_travel_agent.models.cancellation_policy_lightweight_agent import CancellationPolicyLightweightAgent
|
|
27
|
+
from typing import Optional, Set
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
|
|
30
|
+
class RoomConfigurationPriceRatePlanAgent(BaseModel):
|
|
31
|
+
"""
|
|
32
|
+
RoomConfigurationPriceRatePlanAgent
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
identifier: UUID = Field(description="Rate plan identifier")
|
|
35
|
+
name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Provides the name of the rate plan.")
|
|
36
|
+
breakfast: StrictBool = Field(description="When true, indicates breakfast is included.")
|
|
37
|
+
brunch: StrictBool = Field(description="When true, indicates brunch is included.")
|
|
38
|
+
lunch: StrictBool = Field(description="When true, indicates lunch is included.")
|
|
39
|
+
dinner: StrictBool = Field(description="When true, indicates dinner is included.")
|
|
40
|
+
all_inclusive: StrictBool = Field(description="Everything included except alcohol", alias="allInclusive")
|
|
41
|
+
all_inclusive_plus_alcohol: StrictBool = Field(description="Everything included with alcohol", alias="allInclusivePlusAlcohol")
|
|
42
|
+
early_check_in_charge: Optional[Any] = Field(default=None, alias="earlyCheckInCharge")
|
|
43
|
+
late_check_out_charge: Optional[Any] = Field(default=None, alias="lateCheckOutCharge")
|
|
44
|
+
cancellation_policy: Optional[CancellationPolicyLightweightAgent] = Field(default=None, description="The cancellation policy for this rate plan.", alias="cancellationPolicy")
|
|
45
|
+
cancellation_policy_exceptions: Optional[CancellationPolicyExceptionsAgent] = Field(default=None, description="Allows a property to dynamically use another cancellation policy for a specific date range", alias="cancellationPolicyExceptions")
|
|
46
|
+
__properties: ClassVar[List[str]] = ["identifier", "name", "breakfast", "brunch", "lunch", "dinner", "allInclusive", "allInclusivePlusAlcohol", "earlyCheckInCharge", "lateCheckOutCharge", "cancellationPolicy", "cancellationPolicyExceptions"]
|
|
47
|
+
|
|
48
|
+
model_config = ConfigDict(
|
|
49
|
+
populate_by_name=True,
|
|
50
|
+
validate_assignment=True,
|
|
51
|
+
protected_namespaces=(),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def to_str(self) -> str:
|
|
56
|
+
"""Returns the string representation of the model using alias"""
|
|
57
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
58
|
+
|
|
59
|
+
def to_json(self) -> str:
|
|
60
|
+
"""Returns the JSON representation of the model using alias"""
|
|
61
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
62
|
+
return json.dumps(self.to_dict())
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
66
|
+
"""Create an instance of RoomConfigurationPriceRatePlanAgent from a JSON string"""
|
|
67
|
+
return cls.from_dict(json.loads(json_str))
|
|
68
|
+
|
|
69
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
70
|
+
"""Return the dictionary representation of the model using alias.
|
|
71
|
+
|
|
72
|
+
This has the following differences from calling pydantic's
|
|
73
|
+
`self.model_dump(by_alias=True)`:
|
|
74
|
+
|
|
75
|
+
* `None` is only added to the output dict for nullable fields that
|
|
76
|
+
were set at model initialization. Other fields with value `None`
|
|
77
|
+
are ignored.
|
|
78
|
+
"""
|
|
79
|
+
excluded_fields: Set[str] = set([
|
|
80
|
+
])
|
|
81
|
+
|
|
82
|
+
_dict = self.model_dump(
|
|
83
|
+
by_alias=True,
|
|
84
|
+
exclude=excluded_fields,
|
|
85
|
+
exclude_none=True,
|
|
86
|
+
)
|
|
87
|
+
# override the default output from pydantic by calling `to_dict()` of cancellation_policy
|
|
88
|
+
if self.cancellation_policy:
|
|
89
|
+
_dict['cancellationPolicy'] = self.cancellation_policy.to_dict()
|
|
90
|
+
# override the default output from pydantic by calling `to_dict()` of cancellation_policy_exceptions
|
|
91
|
+
if self.cancellation_policy_exceptions:
|
|
92
|
+
_dict['cancellationPolicyExceptions'] = self.cancellation_policy_exceptions.to_dict()
|
|
93
|
+
# set to None if early_check_in_charge (nullable) is None
|
|
94
|
+
# and model_fields_set contains the field
|
|
95
|
+
if self.early_check_in_charge is None and "early_check_in_charge" in self.model_fields_set:
|
|
96
|
+
_dict['earlyCheckInCharge'] = None
|
|
97
|
+
|
|
98
|
+
# set to None if late_check_out_charge (nullable) is None
|
|
99
|
+
# and model_fields_set contains the field
|
|
100
|
+
if self.late_check_out_charge is None and "late_check_out_charge" in self.model_fields_set:
|
|
101
|
+
_dict['lateCheckOutCharge'] = None
|
|
102
|
+
|
|
103
|
+
return _dict
|
|
104
|
+
|
|
105
|
+
@classmethod
|
|
106
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
107
|
+
"""Create an instance of RoomConfigurationPriceRatePlanAgent from a dict"""
|
|
108
|
+
if obj is None:
|
|
109
|
+
return None
|
|
110
|
+
|
|
111
|
+
if not isinstance(obj, dict):
|
|
112
|
+
return cls.model_validate(obj)
|
|
113
|
+
|
|
114
|
+
_obj = cls.model_validate({
|
|
115
|
+
"identifier": obj.get("identifier"),
|
|
116
|
+
"name": obj.get("name"),
|
|
117
|
+
"breakfast": obj.get("breakfast") if obj.get("breakfast") is not None else False,
|
|
118
|
+
"brunch": obj.get("brunch") if obj.get("brunch") is not None else False,
|
|
119
|
+
"lunch": obj.get("lunch") if obj.get("lunch") is not None else False,
|
|
120
|
+
"dinner": obj.get("dinner") if obj.get("dinner") is not None else False,
|
|
121
|
+
"allInclusive": obj.get("allInclusive") if obj.get("allInclusive") is not None else False,
|
|
122
|
+
"allInclusivePlusAlcohol": obj.get("allInclusivePlusAlcohol") if obj.get("allInclusivePlusAlcohol") is not None else False,
|
|
123
|
+
"earlyCheckInCharge": obj.get("earlyCheckInCharge"),
|
|
124
|
+
"lateCheckOutCharge": obj.get("lateCheckOutCharge"),
|
|
125
|
+
"cancellationPolicy": CancellationPolicyLightweightAgent.from_dict(obj["cancellationPolicy"]) if obj.get("cancellationPolicy") is not None else None,
|
|
126
|
+
"cancellationPolicyExceptions": CancellationPolicyExceptionsAgent.from_dict(obj["cancellationPolicyExceptions"]) if obj.get("cancellationPolicyExceptions") is not None else None
|
|
127
|
+
})
|
|
128
|
+
return _obj
|
|
129
|
+
|
|
130
|
+
|
|
@@ -0,0 +1,183 @@
|
|
|
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 datetime import date
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
from uuid import UUID
|
|
26
|
+
from wink_sdk_travel_agent.models.bedroom_configuration_agent import BedroomConfigurationAgent
|
|
27
|
+
from wink_sdk_travel_agent.models.cancellation_policy_lightweight_agent import CancellationPolicyLightweightAgent
|
|
28
|
+
from wink_sdk_travel_agent.models.custom_monetary_amount import CustomMonetaryAmount
|
|
29
|
+
from wink_sdk_travel_agent.models.extra_charges_agent import ExtraChargesAgent
|
|
30
|
+
from wink_sdk_travel_agent.models.guest_room_lightweight_agent import GuestRoomLightweightAgent
|
|
31
|
+
from wink_sdk_travel_agent.models.perk_lightweight_agent import PerkLightweightAgent
|
|
32
|
+
from wink_sdk_travel_agent.models.property_policy_agent import PropertyPolicyAgent
|
|
33
|
+
from wink_sdk_travel_agent.models.room_configuration_price_rate_plan_agent import RoomConfigurationPriceRatePlanAgent
|
|
34
|
+
from wink_sdk_travel_agent.models.stay_rate_agent import StayRateAgent
|
|
35
|
+
from typing import Optional, Set
|
|
36
|
+
from typing_extensions import Self
|
|
37
|
+
|
|
38
|
+
class RoomStayAgent(BaseModel):
|
|
39
|
+
"""
|
|
40
|
+
RoomStayAgent
|
|
41
|
+
""" # noqa: E501
|
|
42
|
+
policy: PropertyPolicyAgent = Field(description="Property policy information.")
|
|
43
|
+
room: GuestRoomLightweightAgent = Field(description="Guest room details.")
|
|
44
|
+
rooms: StrictInt = Field(description="Number of rooms. Always 1 since we switched to creating one booking per room.")
|
|
45
|
+
bedroom_configuration: BedroomConfigurationAgent = Field(description="Desired bedroom layout", alias="bedroomConfiguration")
|
|
46
|
+
adults: StrictInt = Field(description="The actual amount of adults as determined by the hotel's policy.")
|
|
47
|
+
children: StrictInt = Field(description="The actual amount of children as determined by the hotel's policy.")
|
|
48
|
+
start_date: date = Field(description="Stay start date", alias="startDate")
|
|
49
|
+
end_date: date = Field(description="Stay end date", alias="endDate")
|
|
50
|
+
price: StayRateAgent = Field(description="Price details")
|
|
51
|
+
room_rate_identifier: UUID = Field(description="Master rate identifier", alias="roomRateIdentifier")
|
|
52
|
+
room_rate_internal_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Master rate internal name", alias="roomRateInternalName")
|
|
53
|
+
rate_plan: RoomConfigurationPriceRatePlanAgent = Field(description="Rate plan used for this stay", alias="ratePlan")
|
|
54
|
+
perk_types: Optional[List[PerkLightweightAgent]] = Field(default=None, description="List of perks that came with the master rate", alias="perkTypes")
|
|
55
|
+
extra_charges: ExtraChargesAgent = Field(description="Rate plan-level extra charges", alias="extraCharges")
|
|
56
|
+
active_cancellation_policy: CancellationPolicyLightweightAgent = Field(description="Based on the itinerary, the cancellation policy could be taken directly from the rate plan or it could be a policy exception also listed on the rate plan", alias="activeCancellationPolicy")
|
|
57
|
+
cancellable: Optional[StrictBool] = None
|
|
58
|
+
cancellable_by_hotel: Optional[StrictBool] = Field(default=None, alias="cancellableByHotel")
|
|
59
|
+
cancellable_with_potential_charge: Optional[StrictBool] = Field(default=None, alias="cancellableWithPotentialCharge")
|
|
60
|
+
rate_source: Optional[StrictStr] = Field(default=None, alias="rateSource")
|
|
61
|
+
room_nights: Optional[StrictInt] = Field(default=None, description="Total number of nights the guest stays at the hotel. -1 indicates there is an error.", alias="roomNights")
|
|
62
|
+
source_total: Optional[CustomMonetaryAmount] = Field(default=None, alias="sourceTotal")
|
|
63
|
+
user_specified_currency_total: Optional[CustomMonetaryAmount] = Field(default=None, alias="userSpecifiedCurrencyTotal")
|
|
64
|
+
internal_total: Optional[CustomMonetaryAmount] = Field(default=None, alias="internalTotal")
|
|
65
|
+
guests: Optional[StrictInt] = None
|
|
66
|
+
__properties: ClassVar[List[str]] = ["policy", "room", "rooms", "bedroomConfiguration", "adults", "children", "startDate", "endDate", "price", "roomRateIdentifier", "roomRateInternalName", "ratePlan", "perkTypes", "extraCharges", "activeCancellationPolicy", "cancellable", "cancellableByHotel", "cancellableWithPotentialCharge", "rateSource", "roomNights", "sourceTotal", "userSpecifiedCurrencyTotal", "internalTotal", "guests"]
|
|
67
|
+
|
|
68
|
+
model_config = ConfigDict(
|
|
69
|
+
populate_by_name=True,
|
|
70
|
+
validate_assignment=True,
|
|
71
|
+
protected_namespaces=(),
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def to_str(self) -> str:
|
|
76
|
+
"""Returns the string representation of the model using alias"""
|
|
77
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
78
|
+
|
|
79
|
+
def to_json(self) -> str:
|
|
80
|
+
"""Returns the JSON representation of the model using alias"""
|
|
81
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
82
|
+
return json.dumps(self.to_dict())
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of RoomStayAgent from a JSON string"""
|
|
87
|
+
return cls.from_dict(json.loads(json_str))
|
|
88
|
+
|
|
89
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
90
|
+
"""Return the dictionary representation of the model using alias.
|
|
91
|
+
|
|
92
|
+
This has the following differences from calling pydantic's
|
|
93
|
+
`self.model_dump(by_alias=True)`:
|
|
94
|
+
|
|
95
|
+
* `None` is only added to the output dict for nullable fields that
|
|
96
|
+
were set at model initialization. Other fields with value `None`
|
|
97
|
+
are ignored.
|
|
98
|
+
"""
|
|
99
|
+
excluded_fields: Set[str] = set([
|
|
100
|
+
])
|
|
101
|
+
|
|
102
|
+
_dict = self.model_dump(
|
|
103
|
+
by_alias=True,
|
|
104
|
+
exclude=excluded_fields,
|
|
105
|
+
exclude_none=True,
|
|
106
|
+
)
|
|
107
|
+
# override the default output from pydantic by calling `to_dict()` of policy
|
|
108
|
+
if self.policy:
|
|
109
|
+
_dict['policy'] = self.policy.to_dict()
|
|
110
|
+
# override the default output from pydantic by calling `to_dict()` of room
|
|
111
|
+
if self.room:
|
|
112
|
+
_dict['room'] = self.room.to_dict()
|
|
113
|
+
# override the default output from pydantic by calling `to_dict()` of bedroom_configuration
|
|
114
|
+
if self.bedroom_configuration:
|
|
115
|
+
_dict['bedroomConfiguration'] = self.bedroom_configuration.to_dict()
|
|
116
|
+
# override the default output from pydantic by calling `to_dict()` of price
|
|
117
|
+
if self.price:
|
|
118
|
+
_dict['price'] = self.price.to_dict()
|
|
119
|
+
# override the default output from pydantic by calling `to_dict()` of rate_plan
|
|
120
|
+
if self.rate_plan:
|
|
121
|
+
_dict['ratePlan'] = self.rate_plan.to_dict()
|
|
122
|
+
# override the default output from pydantic by calling `to_dict()` of each item in perk_types (list)
|
|
123
|
+
_items = []
|
|
124
|
+
if self.perk_types:
|
|
125
|
+
for _item_perk_types in self.perk_types:
|
|
126
|
+
if _item_perk_types:
|
|
127
|
+
_items.append(_item_perk_types.to_dict())
|
|
128
|
+
_dict['perkTypes'] = _items
|
|
129
|
+
# override the default output from pydantic by calling `to_dict()` of extra_charges
|
|
130
|
+
if self.extra_charges:
|
|
131
|
+
_dict['extraCharges'] = self.extra_charges.to_dict()
|
|
132
|
+
# override the default output from pydantic by calling `to_dict()` of active_cancellation_policy
|
|
133
|
+
if self.active_cancellation_policy:
|
|
134
|
+
_dict['activeCancellationPolicy'] = self.active_cancellation_policy.to_dict()
|
|
135
|
+
# override the default output from pydantic by calling `to_dict()` of source_total
|
|
136
|
+
if self.source_total:
|
|
137
|
+
_dict['sourceTotal'] = self.source_total.to_dict()
|
|
138
|
+
# override the default output from pydantic by calling `to_dict()` of user_specified_currency_total
|
|
139
|
+
if self.user_specified_currency_total:
|
|
140
|
+
_dict['userSpecifiedCurrencyTotal'] = self.user_specified_currency_total.to_dict()
|
|
141
|
+
# override the default output from pydantic by calling `to_dict()` of internal_total
|
|
142
|
+
if self.internal_total:
|
|
143
|
+
_dict['internalTotal'] = self.internal_total.to_dict()
|
|
144
|
+
return _dict
|
|
145
|
+
|
|
146
|
+
@classmethod
|
|
147
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
148
|
+
"""Create an instance of RoomStayAgent from a dict"""
|
|
149
|
+
if obj is None:
|
|
150
|
+
return None
|
|
151
|
+
|
|
152
|
+
if not isinstance(obj, dict):
|
|
153
|
+
return cls.model_validate(obj)
|
|
154
|
+
|
|
155
|
+
_obj = cls.model_validate({
|
|
156
|
+
"policy": PropertyPolicyAgent.from_dict(obj["policy"]) if obj.get("policy") is not None else None,
|
|
157
|
+
"room": GuestRoomLightweightAgent.from_dict(obj["room"]) if obj.get("room") is not None else None,
|
|
158
|
+
"rooms": obj.get("rooms") if obj.get("rooms") is not None else 1,
|
|
159
|
+
"bedroomConfiguration": BedroomConfigurationAgent.from_dict(obj["bedroomConfiguration"]) if obj.get("bedroomConfiguration") is not None else None,
|
|
160
|
+
"adults": obj.get("adults") if obj.get("adults") is not None else 2,
|
|
161
|
+
"children": obj.get("children") if obj.get("children") is not None else 0,
|
|
162
|
+
"startDate": obj.get("startDate"),
|
|
163
|
+
"endDate": obj.get("endDate"),
|
|
164
|
+
"price": StayRateAgent.from_dict(obj["price"]) if obj.get("price") is not None else None,
|
|
165
|
+
"roomRateIdentifier": obj.get("roomRateIdentifier"),
|
|
166
|
+
"roomRateInternalName": obj.get("roomRateInternalName"),
|
|
167
|
+
"ratePlan": RoomConfigurationPriceRatePlanAgent.from_dict(obj["ratePlan"]) if obj.get("ratePlan") is not None else None,
|
|
168
|
+
"perkTypes": [PerkLightweightAgent.from_dict(_item) for _item in obj["perkTypes"]] if obj.get("perkTypes") is not None else None,
|
|
169
|
+
"extraCharges": ExtraChargesAgent.from_dict(obj["extraCharges"]) if obj.get("extraCharges") is not None else None,
|
|
170
|
+
"activeCancellationPolicy": CancellationPolicyLightweightAgent.from_dict(obj["activeCancellationPolicy"]) if obj.get("activeCancellationPolicy") is not None else None,
|
|
171
|
+
"cancellable": obj.get("cancellable"),
|
|
172
|
+
"cancellableByHotel": obj.get("cancellableByHotel"),
|
|
173
|
+
"cancellableWithPotentialCharge": obj.get("cancellableWithPotentialCharge"),
|
|
174
|
+
"rateSource": obj.get("rateSource"),
|
|
175
|
+
"roomNights": obj.get("roomNights"),
|
|
176
|
+
"sourceTotal": CustomMonetaryAmount.from_dict(obj["sourceTotal"]) if obj.get("sourceTotal") is not None else None,
|
|
177
|
+
"userSpecifiedCurrencyTotal": CustomMonetaryAmount.from_dict(obj["userSpecifiedCurrencyTotal"]) if obj.get("userSpecifiedCurrencyTotal") is not None else None,
|
|
178
|
+
"internalTotal": CustomMonetaryAmount.from_dict(obj["internalTotal"]) if obj.get("internalTotal") is not None else None,
|
|
179
|
+
"guests": obj.get("guests")
|
|
180
|
+
})
|
|
181
|
+
return _obj
|
|
182
|
+
|
|
183
|
+
|
|
@@ -0,0 +1,109 @@
|
|
|
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, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class SimpleAddressAgent(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Address information
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
address1: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Address line 1")
|
|
32
|
+
address2: Optional[StrictStr] = Field(default=None, description="Address line 2")
|
|
33
|
+
state: Optional[StrictStr] = Field(default=None, description="State")
|
|
34
|
+
postal_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Postal / zip code", alias="postalCode")
|
|
35
|
+
county: Optional[StrictStr] = Field(default=None, description="County")
|
|
36
|
+
city: Annotated[str, Field(min_length=1, strict=True)] = Field(description="City name")
|
|
37
|
+
country_code: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Country", alias="countryCode")
|
|
38
|
+
country: Optional[StrictStr] = Field(default=None, description="Country")
|
|
39
|
+
full_address: Optional[StrictStr] = Field(default=None, description="Address 1, Address 2, City, State, Postal / Zip code, Country", alias="fullAddress")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["address1", "address2", "state", "postalCode", "county", "city", "countryCode", "country", "fullAddress"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of SimpleAddressAgent from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
73
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
74
|
+
"""
|
|
75
|
+
excluded_fields: Set[str] = set([
|
|
76
|
+
"country",
|
|
77
|
+
"full_address",
|
|
78
|
+
])
|
|
79
|
+
|
|
80
|
+
_dict = self.model_dump(
|
|
81
|
+
by_alias=True,
|
|
82
|
+
exclude=excluded_fields,
|
|
83
|
+
exclude_none=True,
|
|
84
|
+
)
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of SimpleAddressAgent from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"address1": obj.get("address1"),
|
|
98
|
+
"address2": obj.get("address2"),
|
|
99
|
+
"state": obj.get("state"),
|
|
100
|
+
"postalCode": obj.get("postalCode"),
|
|
101
|
+
"county": obj.get("county"),
|
|
102
|
+
"city": obj.get("city"),
|
|
103
|
+
"countryCode": obj.get("countryCode"),
|
|
104
|
+
"country": obj.get("country"),
|
|
105
|
+
"fullAddress": obj.get("fullAddress")
|
|
106
|
+
})
|
|
107
|
+
return _obj
|
|
108
|
+
|
|
109
|
+
|
|
@@ -0,0 +1,108 @@
|
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing_extensions import Annotated
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class SimpleDateTimeItineraryAgent(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
SimpleDateTimeItinerary outlines stay dates, number of adults and children
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
start_date: datetime = Field(description="Start date", alias="startDate")
|
|
33
|
+
end_date: datetime = Field(description="End date", alias="endDate")
|
|
34
|
+
adults: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of adults")
|
|
35
|
+
children: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of children")
|
|
36
|
+
hours: Optional[StrictInt] = Field(default=None, description="Number of hours between start and end dates. Used for itineraries that require bookings that occur within hours and not days. E.g. Meeting room reservation.")
|
|
37
|
+
nights: Optional[StrictInt] = Field(default=None, description="Total number of room nights")
|
|
38
|
+
guests: Optional[StrictInt] = Field(default=None, description="Total number of adults and children")
|
|
39
|
+
__properties: ClassVar[List[str]] = ["startDate", "endDate", "adults", "children", "hours", "nights", "guests"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of SimpleDateTimeItineraryAgent from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
72
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
73
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
74
|
+
"""
|
|
75
|
+
excluded_fields: Set[str] = set([
|
|
76
|
+
"hours",
|
|
77
|
+
"nights",
|
|
78
|
+
"guests",
|
|
79
|
+
])
|
|
80
|
+
|
|
81
|
+
_dict = self.model_dump(
|
|
82
|
+
by_alias=True,
|
|
83
|
+
exclude=excluded_fields,
|
|
84
|
+
exclude_none=True,
|
|
85
|
+
)
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of SimpleDateTimeItineraryAgent from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
96
|
+
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"startDate": obj.get("startDate"),
|
|
99
|
+
"endDate": obj.get("endDate"),
|
|
100
|
+
"adults": obj.get("adults"),
|
|
101
|
+
"children": obj.get("children"),
|
|
102
|
+
"hours": obj.get("hours"),
|
|
103
|
+
"nights": obj.get("nights"),
|
|
104
|
+
"guests": obj.get("guests")
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
|
107
|
+
|
|
108
|
+
|