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.

Files changed (110) hide show
  1. wink_sdk_travel_agent/__init__.py +129 -0
  2. wink_sdk_travel_agent/api/__init__.py +5 -0
  3. wink_sdk_travel_agent/api/travel_agent_api.py +1985 -0
  4. wink_sdk_travel_agent/api_client.py +798 -0
  5. wink_sdk_travel_agent/api_response.py +21 -0
  6. wink_sdk_travel_agent/configuration.py +459 -0
  7. wink_sdk_travel_agent/exceptions.py +200 -0
  8. wink_sdk_travel_agent/models/__init__.py +112 -0
  9. wink_sdk_travel_agent/models/address_agent.py +110 -0
  10. wink_sdk_travel_agent/models/agent_booking_request_agent.py +145 -0
  11. wink_sdk_travel_agent/models/aggregate_descriptor_agent.py +100 -0
  12. wink_sdk_travel_agent/models/ancillary_request_agent.py +111 -0
  13. wink_sdk_travel_agent/models/authenticated_user_agent.py +98 -0
  14. wink_sdk_travel_agent/models/bed_agent.py +91 -0
  15. wink_sdk_travel_agent/models/bedroom_agent.py +105 -0
  16. wink_sdk_travel_agent/models/bedroom_configuration_agent.py +100 -0
  17. wink_sdk_travel_agent/models/beneficiary_agent.py +162 -0
  18. wink_sdk_travel_agent/models/beneficiary_charge_agent.py +97 -0
  19. wink_sdk_travel_agent/models/booking_agent.py +378 -0
  20. wink_sdk_travel_agent/models/booking_ancillary_agent.py +153 -0
  21. wink_sdk_travel_agent/models/booking_confirmations_agent.py +109 -0
  22. wink_sdk_travel_agent/models/booking_contract_agent.py +592 -0
  23. wink_sdk_travel_agent/models/booking_contract_item_agent.py +214 -0
  24. wink_sdk_travel_agent/models/booking_contract_payment_details_agent.py +131 -0
  25. wink_sdk_travel_agent/models/booking_itinerary_agent.py +113 -0
  26. wink_sdk_travel_agent/models/booking_itinerary_room_configuration_agent.py +98 -0
  27. wink_sdk_travel_agent/models/booking_itinerary_room_configuration_child_agent.py +90 -0
  28. wink_sdk_travel_agent/models/booking_user_agent.py +100 -0
  29. wink_sdk_travel_agent/models/booking_user_request_agent.py +96 -0
  30. wink_sdk_travel_agent/models/booking_user_session_agent.py +112 -0
  31. wink_sdk_travel_agent/models/booking_view_agent.py +101 -0
  32. wink_sdk_travel_agent/models/boolean_response_agent.py +90 -0
  33. wink_sdk_travel_agent/models/cancellation_detail_agent.py +97 -0
  34. wink_sdk_travel_agent/models/cancellation_policy_agent.py +166 -0
  35. wink_sdk_travel_agent/models/cancellation_policy_exception_agent.py +99 -0
  36. wink_sdk_travel_agent/models/cancellation_policy_exceptions_agent.py +96 -0
  37. wink_sdk_travel_agent/models/child_agent.py +91 -0
  38. wink_sdk_travel_agent/models/commissionable_entry_agent.py +101 -0
  39. wink_sdk_travel_agent/models/company_agent.py +160 -0
  40. wink_sdk_travel_agent/models/company_user_agent.py +114 -0
  41. wink_sdk_travel_agent/models/company_view_agent.py +101 -0
  42. wink_sdk_travel_agent/models/composite_filter_descriptor_agent.py +108 -0
  43. wink_sdk_travel_agent/models/contact_agent.py +104 -0
  44. wink_sdk_travel_agent/models/country_agent.py +100 -0
  45. wink_sdk_travel_agent/models/create_agent_booking400_response.py +141 -0
  46. wink_sdk_travel_agent/models/create_agent_booking_request_agent.py +104 -0
  47. wink_sdk_travel_agent/models/custom_monetary_amount.py +90 -0
  48. wink_sdk_travel_agent/models/daily_rate_agent.py +115 -0
  49. wink_sdk_travel_agent/models/dow_pattern_group_agent.py +102 -0
  50. wink_sdk_travel_agent/models/engine_configuration_booking_report_agent.py +192 -0
  51. wink_sdk_travel_agent/models/engine_configuration_theme_agent.py +108 -0
  52. wink_sdk_travel_agent/models/extra_charge_agent.py +103 -0
  53. wink_sdk_travel_agent/models/extra_charges_agent.py +112 -0
  54. wink_sdk_travel_agent/models/fee_agent.py +105 -0
  55. wink_sdk_travel_agent/models/filter_descriptor_agent.py +101 -0
  56. wink_sdk_travel_agent/models/general_manager_agent.py +104 -0
  57. wink_sdk_travel_agent/models/generic_error_message.py +96 -0
  58. wink_sdk_travel_agent/models/geo_json_point_agent.py +94 -0
  59. wink_sdk_travel_agent/models/geo_name_agent.py +136 -0
  60. wink_sdk_travel_agent/models/group_descriptor_agent.py +110 -0
  61. wink_sdk_travel_agent/models/guest_room_agent.py +258 -0
  62. wink_sdk_travel_agent/models/guest_user_agent.py +106 -0
  63. wink_sdk_travel_agent/models/hotel_on_map_agent.py +272 -0
  64. wink_sdk_travel_agent/models/image_attribution_agent.py +90 -0
  65. wink_sdk_travel_agent/models/localized_description_agent.py +91 -0
  66. wink_sdk_travel_agent/models/localized_price_agent.py +162 -0
  67. wink_sdk_travel_agent/models/page_booking_view_agent.py +128 -0
  68. wink_sdk_travel_agent/models/pageable_object_agent.py +106 -0
  69. wink_sdk_travel_agent/models/payout_agent.py +152 -0
  70. wink_sdk_travel_agent/models/payout_fee_agent.py +114 -0
  71. wink_sdk_travel_agent/models/pending_refund_agent.py +99 -0
  72. wink_sdk_travel_agent/models/personal_agent.py +155 -0
  73. wink_sdk_travel_agent/models/pet_info_dto_agent.py +90 -0
  74. wink_sdk_travel_agent/models/preferences_agent.py +128 -0
  75. wink_sdk_travel_agent/models/profile_agent.py +110 -0
  76. wink_sdk_travel_agent/models/profile_user_agent.py +100 -0
  77. wink_sdk_travel_agent/models/property_policy_agent.py +149 -0
  78. wink_sdk_travel_agent/models/quote_agent.py +94 -0
  79. wink_sdk_travel_agent/models/rate_plan_agent.py +172 -0
  80. wink_sdk_travel_agent/models/rate_plan_level_fee_agent.py +111 -0
  81. wink_sdk_travel_agent/models/refund_agent.py +166 -0
  82. wink_sdk_travel_agent/models/reporting_ancillary_agent.py +108 -0
  83. wink_sdk_travel_agent/models/reporting_daily_rate_agent.py +99 -0
  84. wink_sdk_travel_agent/models/reporting_extra_charge_agent.py +98 -0
  85. wink_sdk_travel_agent/models/review_agent.py +133 -0
  86. wink_sdk_travel_agent/models/review_answer_agent.py +101 -0
  87. wink_sdk_travel_agent/models/review_user_agent.py +98 -0
  88. wink_sdk_travel_agent/models/room_configuration_agent.py +99 -0
  89. wink_sdk_travel_agent/models/room_stay_agent.py +184 -0
  90. wink_sdk_travel_agent/models/simple_date_time_itinerary_agent.py +108 -0
  91. wink_sdk_travel_agent/models/simple_description_agent.py +93 -0
  92. wink_sdk_travel_agent/models/simple_multimedia_agent.py +154 -0
  93. wink_sdk_travel_agent/models/social_agent.py +102 -0
  94. wink_sdk_travel_agent/models/sort_descriptor_agent.py +100 -0
  95. wink_sdk_travel_agent/models/sort_object.py +96 -0
  96. wink_sdk_travel_agent/models/state_agent.py +117 -0
  97. wink_sdk_travel_agent/models/stay_rate_agent.py +209 -0
  98. wink_sdk_travel_agent/models/sub_country_agent.py +92 -0
  99. wink_sdk_travel_agent/models/sub_sub_country_agent.py +92 -0
  100. wink_sdk_travel_agent/models/supplier_contract_item_policy_agent.py +170 -0
  101. wink_sdk_travel_agent/models/travel_agent_agent.py +90 -0
  102. wink_sdk_travel_agent/models/travel_inventory_recognition_agent.py +120 -0
  103. wink_sdk_travel_agent/models/upsert_travel_agent_request_agent.py +90 -0
  104. wink_sdk_travel_agent/py.typed +0 -0
  105. wink_sdk_travel_agent/rest.py +258 -0
  106. wink_sdk_travel_agent-0.0.3.dist-info/LICENSE +201 -0
  107. wink_sdk_travel_agent-0.0.3.dist-info/METADATA +17 -0
  108. wink_sdk_travel_agent-0.0.3.dist-info/RECORD +110 -0
  109. wink_sdk_travel_agent-0.0.3.dist-info/WHEEL +5 -0
  110. wink_sdk_travel_agent-0.0.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,94 @@
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 pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Union
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class QuoteAgent(BaseModel):
27
+ """
28
+ The quote used to create totalCapturePrice.
29
+ """ # noqa: E501
30
+ source: StrictStr = Field(description="Source")
31
+ target: StrictStr = Field(description="Target")
32
+ exchange_rate: Union[StrictFloat, StrictInt] = Field(description="Exchange rate", alias="exchangeRate")
33
+ timestamp: StrictInt = Field(description="Timestamp")
34
+ __properties: ClassVar[List[str]] = ["source", "target", "exchangeRate", "timestamp"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of QuoteAgent from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of QuoteAgent from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate({
87
+ "source": obj.get("source"),
88
+ "target": obj.get("target"),
89
+ "exchangeRate": obj.get("exchangeRate"),
90
+ "timestamp": obj.get("timestamp")
91
+ })
92
+ return _obj
93
+
94
+
@@ -0,0 +1,172 @@
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 date
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
23
+ from typing import Any, ClassVar, Dict, List, Optional
24
+ from wink_sdk_travel_agent.models.cancellation_policy_agent import CancellationPolicyAgent
25
+ from wink_sdk_travel_agent.models.cancellation_policy_exceptions_agent import CancellationPolicyExceptionsAgent
26
+ from wink_sdk_travel_agent.models.dow_pattern_group_agent import DowPatternGroupAgent
27
+ from typing import Optional, Set
28
+ from typing_extensions import Self
29
+
30
+ class RatePlanAgent(BaseModel):
31
+ """
32
+ Rate plan used for this stay
33
+ """ # noqa: E501
34
+ identifier: StrictStr = Field(description="Rate plan identifier")
35
+ hotel_identifier: StrictStr = Field(description="Hotel Identifier", alias="hotelIdentifier")
36
+ name: StrictStr = Field(description="Provides the name of the rate plan.")
37
+ prepaid: StrictBool = Field(description="When true, indicates if the rate is a prepaid rate.")
38
+ breakfast: StrictBool = Field(description="When true, indicates breakfast is included.")
39
+ brunch: StrictBool = Field(description="When true, indicates brunch is included.")
40
+ lunch: StrictBool = Field(description="When true, indicates lunch is included.")
41
+ dinner: StrictBool = Field(description="When true, indicates dinner is included.")
42
+ all_inclusive: StrictBool = Field(description="Everything included except alcohol", alias="allInclusive")
43
+ all_inclusive_plus_alcohol: StrictBool = Field(description="Everything included with alcohol", alias="allInclusivePlusAlcohol")
44
+ sell_start_date: Optional[date] = Field(default=None, description="Set a start date for when to start selling this rate. When sellStartDate and sellEndDate are set, this rate is only available for sale within that date range.", alias="sellStartDate")
45
+ sell_end_date: Optional[date] = Field(default=None, description="Set an end date for when to finish selling this rate. When sellStartDate and sellEndDate are set, this rate is only available for sale within that date range.", alias="sellEndDate")
46
+ stay_start_date: Optional[date] = Field(default=None, description="Set a start date for when the guest can visit. When stayStartDate and stayEndDate are set, this rate is only available for stay within that date range.", alias="stayStartDate")
47
+ stay_end_date: Optional[date] = Field(default=None, description="Set an end date for when the guest can visit. When stayStartDate and stayEndDate are set, this rate is only available for stay within that date range.", alias="stayEndDate")
48
+ loyalty_points_accrue: Optional[StrictBool] = Field(default=False, description="Property honors loyalty points with this rate plan.", alias="loyaltyPointsAccrue")
49
+ max_advance_booking_offset: Optional[StrictInt] = Field(default=None, description="Maximum days before the arrival date for which this rate plan may be booked.", alias="maxAdvanceBookingOffset")
50
+ min_advance_booking_offset: Optional[StrictInt] = Field(default=None, description="Minimum days before the arrival date for which this rate plan may be booked.", alias="minAdvanceBookingOffset")
51
+ min_total_occupancy: Optional[StrictInt] = Field(default=None, description="Defines the minimum number of total occupants required for this rate plan.", alias="minTotalOccupancy")
52
+ max_total_occupancy: Optional[StrictInt] = Field(default=None, description="Defines the maximum number of total occupants required for this rate plan.", alias="maxTotalOccupancy")
53
+ min_los: Optional[StrictInt] = Field(default=None, description="Indicates the minimum length of stay required for this rate plan.", alias="minLOS")
54
+ max_los: Optional[StrictInt] = Field(default=None, description="Indicates the maximum length of stay.", alias="maxLOS")
55
+ min_age: Optional[StrictInt] = Field(default=None, description="The minimum age to qualify for this rate plan.", alias="minAge")
56
+ max_age: Optional[StrictInt] = Field(default=None, description="The maximum age to qualify for this rate plan.", alias="maxAge")
57
+ available_days_of_week: Optional[DowPatternGroupAgent] = Field(default=None, alias="availableDaysOfWeek")
58
+ arrival_days_of_week: Optional[DowPatternGroupAgent] = Field(default=None, alias="arrivalDaysOfWeek")
59
+ departure_days_of_week: Optional[DowPatternGroupAgent] = Field(default=None, alias="departureDaysOfWeek")
60
+ required_days_of_week: Optional[DowPatternGroupAgent] = Field(default=None, alias="requiredDaysOfWeek")
61
+ early_check_in_charge: Optional[Dict[str, Any]] = Field(default=None, alias="earlyCheckInCharge")
62
+ late_check_out_charge: Optional[Dict[str, Any]] = Field(default=None, alias="lateCheckOutCharge")
63
+ cancellation_policy_identifier: StrictStr = Field(description="The cancellation policy for this rate plan.", alias="cancellationPolicyIdentifier")
64
+ cancellation_policy: Optional[CancellationPolicyAgent] = Field(default=None, alias="cancellationPolicy")
65
+ cancellation_policy_exceptions: Optional[CancellationPolicyExceptionsAgent] = Field(default=None, alias="cancellationPolicyExceptions")
66
+ __properties: ClassVar[List[str]] = ["identifier", "hotelIdentifier", "name", "prepaid", "breakfast", "brunch", "lunch", "dinner", "allInclusive", "allInclusivePlusAlcohol", "sellStartDate", "sellEndDate", "stayStartDate", "stayEndDate", "loyaltyPointsAccrue", "maxAdvanceBookingOffset", "minAdvanceBookingOffset", "minTotalOccupancy", "maxTotalOccupancy", "minLOS", "maxLOS", "minAge", "maxAge", "availableDaysOfWeek", "arrivalDaysOfWeek", "departureDaysOfWeek", "requiredDaysOfWeek", "earlyCheckInCharge", "lateCheckOutCharge", "cancellationPolicyIdentifier", "cancellationPolicy", "cancellationPolicyExceptions"]
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 RatePlanAgent 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 available_days_of_week
108
+ if self.available_days_of_week:
109
+ _dict['availableDaysOfWeek'] = self.available_days_of_week.to_dict()
110
+ # override the default output from pydantic by calling `to_dict()` of arrival_days_of_week
111
+ if self.arrival_days_of_week:
112
+ _dict['arrivalDaysOfWeek'] = self.arrival_days_of_week.to_dict()
113
+ # override the default output from pydantic by calling `to_dict()` of departure_days_of_week
114
+ if self.departure_days_of_week:
115
+ _dict['departureDaysOfWeek'] = self.departure_days_of_week.to_dict()
116
+ # override the default output from pydantic by calling `to_dict()` of required_days_of_week
117
+ if self.required_days_of_week:
118
+ _dict['requiredDaysOfWeek'] = self.required_days_of_week.to_dict()
119
+ # override the default output from pydantic by calling `to_dict()` of cancellation_policy
120
+ if self.cancellation_policy:
121
+ _dict['cancellationPolicy'] = self.cancellation_policy.to_dict()
122
+ # override the default output from pydantic by calling `to_dict()` of cancellation_policy_exceptions
123
+ if self.cancellation_policy_exceptions:
124
+ _dict['cancellationPolicyExceptions'] = self.cancellation_policy_exceptions.to_dict()
125
+ return _dict
126
+
127
+ @classmethod
128
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
129
+ """Create an instance of RatePlanAgent from a dict"""
130
+ if obj is None:
131
+ return None
132
+
133
+ if not isinstance(obj, dict):
134
+ return cls.model_validate(obj)
135
+
136
+ _obj = cls.model_validate({
137
+ "identifier": obj.get("identifier"),
138
+ "hotelIdentifier": obj.get("hotelIdentifier"),
139
+ "name": obj.get("name"),
140
+ "prepaid": obj.get("prepaid") if obj.get("prepaid") is not None else False,
141
+ "breakfast": obj.get("breakfast") if obj.get("breakfast") is not None else False,
142
+ "brunch": obj.get("brunch") if obj.get("brunch") is not None else False,
143
+ "lunch": obj.get("lunch") if obj.get("lunch") is not None else False,
144
+ "dinner": obj.get("dinner") if obj.get("dinner") is not None else False,
145
+ "allInclusive": obj.get("allInclusive") if obj.get("allInclusive") is not None else False,
146
+ "allInclusivePlusAlcohol": obj.get("allInclusivePlusAlcohol") if obj.get("allInclusivePlusAlcohol") is not None else False,
147
+ "sellStartDate": obj.get("sellStartDate"),
148
+ "sellEndDate": obj.get("sellEndDate"),
149
+ "stayStartDate": obj.get("stayStartDate"),
150
+ "stayEndDate": obj.get("stayEndDate"),
151
+ "loyaltyPointsAccrue": obj.get("loyaltyPointsAccrue") if obj.get("loyaltyPointsAccrue") is not None else False,
152
+ "maxAdvanceBookingOffset": obj.get("maxAdvanceBookingOffset"),
153
+ "minAdvanceBookingOffset": obj.get("minAdvanceBookingOffset"),
154
+ "minTotalOccupancy": obj.get("minTotalOccupancy"),
155
+ "maxTotalOccupancy": obj.get("maxTotalOccupancy"),
156
+ "minLOS": obj.get("minLOS"),
157
+ "maxLOS": obj.get("maxLOS"),
158
+ "minAge": obj.get("minAge"),
159
+ "maxAge": obj.get("maxAge"),
160
+ "availableDaysOfWeek": DowPatternGroupAgent.from_dict(obj["availableDaysOfWeek"]) if obj.get("availableDaysOfWeek") is not None else None,
161
+ "arrivalDaysOfWeek": DowPatternGroupAgent.from_dict(obj["arrivalDaysOfWeek"]) if obj.get("arrivalDaysOfWeek") is not None else None,
162
+ "departureDaysOfWeek": DowPatternGroupAgent.from_dict(obj["departureDaysOfWeek"]) if obj.get("departureDaysOfWeek") is not None else None,
163
+ "requiredDaysOfWeek": DowPatternGroupAgent.from_dict(obj["requiredDaysOfWeek"]) if obj.get("requiredDaysOfWeek") is not None else None,
164
+ "earlyCheckInCharge": obj.get("earlyCheckInCharge"),
165
+ "lateCheckOutCharge": obj.get("lateCheckOutCharge"),
166
+ "cancellationPolicyIdentifier": obj.get("cancellationPolicyIdentifier"),
167
+ "cancellationPolicy": CancellationPolicyAgent.from_dict(obj["cancellationPolicy"]) if obj.get("cancellationPolicy") is not None else None,
168
+ "cancellationPolicyExceptions": CancellationPolicyExceptionsAgent.from_dict(obj["cancellationPolicyExceptions"]) if obj.get("cancellationPolicyExceptions") is not None else None
169
+ })
170
+ return _obj
171
+
172
+
@@ -0,0 +1,111 @@
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 pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List
23
+ from wink_sdk_travel_agent.models.custom_monetary_amount import CustomMonetaryAmount
24
+ from wink_sdk_travel_agent.models.localized_description_agent import LocalizedDescriptionAgent
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class RatePlanLevelFeeAgent(BaseModel):
29
+ """
30
+ What the guest is paying extra for
31
+ """ # noqa: E501
32
+ descriptions: List[LocalizedDescriptionAgent] = Field(description="List of localized descriptions for this fee.")
33
+ fixed_amount: CustomMonetaryAmount = Field(alias="fixedAmount")
34
+ type: StrictStr = Field(description="Rate plan fee type")
35
+ __properties: ClassVar[List[str]] = ["descriptions", "fixedAmount", "type"]
36
+
37
+ @field_validator('type')
38
+ def type_validate_enum(cls, value):
39
+ """Validates the enum"""
40
+ if value not in set(['PER_DAY', 'PER_STAY', 'PER_PERSON_PER_DAY', 'PER_PERSON_PER_STAY']):
41
+ raise ValueError("must be one of enum values ('PER_DAY', 'PER_STAY', 'PER_PERSON_PER_DAY', 'PER_PERSON_PER_STAY')")
42
+ return value
43
+
44
+ model_config = ConfigDict(
45
+ populate_by_name=True,
46
+ validate_assignment=True,
47
+ protected_namespaces=(),
48
+ )
49
+
50
+
51
+ def to_str(self) -> str:
52
+ """Returns the string representation of the model using alias"""
53
+ return pprint.pformat(self.model_dump(by_alias=True))
54
+
55
+ def to_json(self) -> str:
56
+ """Returns the JSON representation of the model using alias"""
57
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
58
+ return json.dumps(self.to_dict())
59
+
60
+ @classmethod
61
+ def from_json(cls, json_str: str) -> Optional[Self]:
62
+ """Create an instance of RatePlanLevelFeeAgent from a JSON string"""
63
+ return cls.from_dict(json.loads(json_str))
64
+
65
+ def to_dict(self) -> Dict[str, Any]:
66
+ """Return the dictionary representation of the model using alias.
67
+
68
+ This has the following differences from calling pydantic's
69
+ `self.model_dump(by_alias=True)`:
70
+
71
+ * `None` is only added to the output dict for nullable fields that
72
+ were set at model initialization. Other fields with value `None`
73
+ are ignored.
74
+ """
75
+ excluded_fields: Set[str] = set([
76
+ ])
77
+
78
+ _dict = self.model_dump(
79
+ by_alias=True,
80
+ exclude=excluded_fields,
81
+ exclude_none=True,
82
+ )
83
+ # override the default output from pydantic by calling `to_dict()` of each item in descriptions (list)
84
+ _items = []
85
+ if self.descriptions:
86
+ for _item_descriptions in self.descriptions:
87
+ if _item_descriptions:
88
+ _items.append(_item_descriptions.to_dict())
89
+ _dict['descriptions'] = _items
90
+ # override the default output from pydantic by calling `to_dict()` of fixed_amount
91
+ if self.fixed_amount:
92
+ _dict['fixedAmount'] = self.fixed_amount.to_dict()
93
+ return _dict
94
+
95
+ @classmethod
96
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
97
+ """Create an instance of RatePlanLevelFeeAgent from a dict"""
98
+ if obj is None:
99
+ return None
100
+
101
+ if not isinstance(obj, dict):
102
+ return cls.model_validate(obj)
103
+
104
+ _obj = cls.model_validate({
105
+ "descriptions": [LocalizedDescriptionAgent.from_dict(_item) for _item in obj["descriptions"]] if obj.get("descriptions") is not None else None,
106
+ "fixedAmount": CustomMonetaryAmount.from_dict(obj["fixedAmount"]) if obj.get("fixedAmount") is not None else None,
107
+ "type": obj.get("type")
108
+ })
109
+ return _obj
110
+
111
+
@@ -0,0 +1,166 @@
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, StrictInt, StrictStr, field_validator
23
+ from typing import Any, ClassVar, Dict, List, Optional
24
+ from wink_sdk_travel_agent.models.custom_monetary_amount import CustomMonetaryAmount
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class RefundAgent(BaseModel):
29
+ """
30
+ Refund objects allow you to refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.
31
+ """ # noqa: E501
32
+ identifier: StrictStr = Field(description="A unique identifier")
33
+ acquirer_refund_identifier: Optional[StrictStr] = Field(default=None, description="The acquirer refund identifier. Will get attached once it comes in on the webhook.", alias="acquirerRefundIdentifier")
34
+ requested_by_identifier: Optional[StrictStr] = Field(default=None, description="The SSO person / entity that requested the refund.", alias="requestedByIdentifier")
35
+ refund: CustomMonetaryAmount
36
+ created: datetime = Field(description="When the amount was refunded")
37
+ description: StrictStr = Field(description="A description of the refund that can be displayed to booker")
38
+ reason_type: StrictStr = Field(description="A description of the refund that can be displayed to booker", alias="reasonType")
39
+ cancel_on_refund: StrictStr = Field(description="Whether to cancel the booking alongside requesting a refund.", alias="cancelOnRefund")
40
+ status_type: StrictStr = Field(description="Status of the refund", alias="statusType")
41
+ request_type: StrictStr = Field(description="The entity making the refund request", alias="requestType")
42
+ request_status: StrictStr = Field(description="Status of the refund request", alias="requestStatus")
43
+ request_response: StrictStr = Field(description="Admin may choose to respond to the refund request made by the hotel", alias="requestResponse")
44
+ receipt_url: Optional[StrictStr] = Field(default=None, description="This is the receipt url that contains a friendly web confirmation page. Comes in on the webhook.", alias="receiptUrl")
45
+ retries: Optional[StrictInt] = Field(default=0, description="In case a TripPay admin has to go in and re-send the refund request to Stripe, we want to not to the same calculations again when a retry is executed so we keep track of retries here.")
46
+ allocation: Optional[StrictStr] = Field(default='EQUAL_DISTRIBUTION', description="The type of refund determines how the funds are deducted each beneficiary.")
47
+ __properties: ClassVar[List[str]] = ["identifier", "acquirerRefundIdentifier", "requestedByIdentifier", "refund", "created", "description", "reasonType", "cancelOnRefund", "statusType", "requestType", "requestStatus", "requestResponse", "receiptUrl", "retries", "allocation"]
48
+
49
+ @field_validator('reason_type')
50
+ def reason_type_validate_enum(cls, value):
51
+ """Validates the enum"""
52
+ if value not in set(['DUPLICATE', 'FRAUDULENT', 'REQUESTED_BY_CUSTOMER', 'GUEST_COMPLAINT', 'GUEST_BOOKED_INCORRECT_DATE', 'GUEST_SICK', 'OVERBOOKING', 'EMERGENCY', 'FLIGHT_CANCELLED', 'DEATH_IN_FAMILY', 'OTHER', 'EXPIRED_UNCAPTURED_CHARGE']):
53
+ raise ValueError("must be one of enum values ('DUPLICATE', 'FRAUDULENT', 'REQUESTED_BY_CUSTOMER', 'GUEST_COMPLAINT', 'GUEST_BOOKED_INCORRECT_DATE', 'GUEST_SICK', 'OVERBOOKING', 'EMERGENCY', 'FLIGHT_CANCELLED', 'DEATH_IN_FAMILY', 'OTHER', 'EXPIRED_UNCAPTURED_CHARGE')")
54
+ return value
55
+
56
+ @field_validator('cancel_on_refund')
57
+ def cancel_on_refund_validate_enum(cls, value):
58
+ """Validates the enum"""
59
+ if value not in set(['NONE', 'CANCEL_ON_SUCCESSFUL_REFUND', 'CANCEL_REGARDLESS']):
60
+ raise ValueError("must be one of enum values ('NONE', 'CANCEL_ON_SUCCESSFUL_REFUND', 'CANCEL_REGARDLESS')")
61
+ return value
62
+
63
+ @field_validator('status_type')
64
+ def status_type_validate_enum(cls, value):
65
+ """Validates the enum"""
66
+ if value not in set(['PENDING', 'SUCCEEDED', 'CANCELED', 'REQUIRES_ACTION', 'FAILED']):
67
+ raise ValueError("must be one of enum values ('PENDING', 'SUCCEEDED', 'CANCELED', 'REQUIRES_ACTION', 'FAILED')")
68
+ return value
69
+
70
+ @field_validator('request_type')
71
+ def request_type_validate_enum(cls, value):
72
+ """Validates the enum"""
73
+ if value not in set(['BY_SUPPLIER', 'BY_ADMIN', 'BY_STRIPE', 'BY_SYSTEM', 'BY_AGENT']):
74
+ raise ValueError("must be one of enum values ('BY_SUPPLIER', 'BY_ADMIN', 'BY_STRIPE', 'BY_SYSTEM', 'BY_AGENT')")
75
+ return value
76
+
77
+ @field_validator('request_status')
78
+ def request_status_validate_enum(cls, value):
79
+ """Validates the enum"""
80
+ if value not in set(['PENDING', 'APPROVED', 'REJECTED']):
81
+ raise ValueError("must be one of enum values ('PENDING', 'APPROVED', 'REJECTED')")
82
+ return value
83
+
84
+ @field_validator('allocation')
85
+ def allocation_validate_enum(cls, value):
86
+ """Validates the enum"""
87
+ if value is None:
88
+ return value
89
+
90
+ if value not in set(['FROM_SALE_ONLY', 'EQUAL_DISTRIBUTION', 'CUSTOMERS_ONLY']):
91
+ raise ValueError("must be one of enum values ('FROM_SALE_ONLY', 'EQUAL_DISTRIBUTION', 'CUSTOMERS_ONLY')")
92
+ return value
93
+
94
+ model_config = ConfigDict(
95
+ populate_by_name=True,
96
+ validate_assignment=True,
97
+ protected_namespaces=(),
98
+ )
99
+
100
+
101
+ def to_str(self) -> str:
102
+ """Returns the string representation of the model using alias"""
103
+ return pprint.pformat(self.model_dump(by_alias=True))
104
+
105
+ def to_json(self) -> str:
106
+ """Returns the JSON representation of the model using alias"""
107
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
108
+ return json.dumps(self.to_dict())
109
+
110
+ @classmethod
111
+ def from_json(cls, json_str: str) -> Optional[Self]:
112
+ """Create an instance of RefundAgent from a JSON string"""
113
+ return cls.from_dict(json.loads(json_str))
114
+
115
+ def to_dict(self) -> Dict[str, Any]:
116
+ """Return the dictionary representation of the model using alias.
117
+
118
+ This has the following differences from calling pydantic's
119
+ `self.model_dump(by_alias=True)`:
120
+
121
+ * `None` is only added to the output dict for nullable fields that
122
+ were set at model initialization. Other fields with value `None`
123
+ are ignored.
124
+ """
125
+ excluded_fields: Set[str] = set([
126
+ ])
127
+
128
+ _dict = self.model_dump(
129
+ by_alias=True,
130
+ exclude=excluded_fields,
131
+ exclude_none=True,
132
+ )
133
+ # override the default output from pydantic by calling `to_dict()` of refund
134
+ if self.refund:
135
+ _dict['refund'] = self.refund.to_dict()
136
+ return _dict
137
+
138
+ @classmethod
139
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
140
+ """Create an instance of RefundAgent from a dict"""
141
+ if obj is None:
142
+ return None
143
+
144
+ if not isinstance(obj, dict):
145
+ return cls.model_validate(obj)
146
+
147
+ _obj = cls.model_validate({
148
+ "identifier": obj.get("identifier"),
149
+ "acquirerRefundIdentifier": obj.get("acquirerRefundIdentifier"),
150
+ "requestedByIdentifier": obj.get("requestedByIdentifier"),
151
+ "refund": CustomMonetaryAmount.from_dict(obj["refund"]) if obj.get("refund") is not None else None,
152
+ "created": obj.get("created"),
153
+ "description": obj.get("description"),
154
+ "reasonType": obj.get("reasonType"),
155
+ "cancelOnRefund": obj.get("cancelOnRefund"),
156
+ "statusType": obj.get("statusType"),
157
+ "requestType": obj.get("requestType"),
158
+ "requestStatus": obj.get("requestStatus"),
159
+ "requestResponse": obj.get("requestResponse"),
160
+ "receiptUrl": obj.get("receiptUrl"),
161
+ "retries": obj.get("retries") if obj.get("retries") is not None else 0,
162
+ "allocation": obj.get("allocation") if obj.get("allocation") is not None else 'EQUAL_DISTRIBUTION'
163
+ })
164
+ return _obj
165
+
166
+