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,1985 @@
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
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictStr, field_validator
21
+ from typing import Any, Dict, Optional
22
+ from typing_extensions import Annotated
23
+ from wink_sdk_travel_agent.models.booking_confirmations_agent import BookingConfirmationsAgent
24
+ from wink_sdk_travel_agent.models.booking_view_agent import BookingViewAgent
25
+ from wink_sdk_travel_agent.models.boolean_response_agent import BooleanResponseAgent
26
+ from wink_sdk_travel_agent.models.cancellation_detail_agent import CancellationDetailAgent
27
+ from wink_sdk_travel_agent.models.company_view_agent import CompanyViewAgent
28
+ from wink_sdk_travel_agent.models.create_agent_booking_request_agent import CreateAgentBookingRequestAgent
29
+ from wink_sdk_travel_agent.models.page_booking_view_agent import PageBookingViewAgent
30
+ from wink_sdk_travel_agent.models.state_agent import StateAgent
31
+ from wink_sdk_travel_agent.models.upsert_travel_agent_request_agent import UpsertTravelAgentRequestAgent
32
+
33
+ from wink_sdk_travel_agent.api_client import ApiClient, RequestSerialized
34
+ from wink_sdk_travel_agent.api_response import ApiResponse
35
+ from wink_sdk_travel_agent.rest import RESTResponseType
36
+
37
+
38
+ class TravelAgentApi:
39
+ """NOTE: This class is auto generated by OpenAPI Generator
40
+ Ref: https://openapi-generator.tech
41
+
42
+ Do not edit the class manually.
43
+ """
44
+
45
+ def __init__(self, api_client=None) -> None:
46
+ if api_client is None:
47
+ api_client = ApiClient.get_default()
48
+ self.api_client = api_client
49
+
50
+
51
+ @validate_call
52
+ def cancel_booking_as_travel_agent(
53
+ self,
54
+ company_identifier: Annotated[StrictStr, Field(description="Cancel booking owned by company identifier")],
55
+ booking_identifier: Annotated[StrictStr, Field(description="Cancel booking by identifier")],
56
+ cancellation_detail_agent: CancellationDetailAgent,
57
+ wink_version: Optional[StrictStr] = None,
58
+ _request_timeout: Union[
59
+ None,
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Tuple[
62
+ Annotated[StrictFloat, Field(gt=0)],
63
+ Annotated[StrictFloat, Field(gt=0)]
64
+ ]
65
+ ] = None,
66
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
67
+ _content_type: Optional[StrictStr] = None,
68
+ _headers: Optional[Dict[StrictStr, Any]] = None,
69
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
70
+ ) -> BookingViewAgent:
71
+ """Cancel Booking
72
+
73
+ Cancel a booking by its booking identifier
74
+
75
+ :param company_identifier: Cancel booking owned by company identifier (required)
76
+ :type company_identifier: str
77
+ :param booking_identifier: Cancel booking by identifier (required)
78
+ :type booking_identifier: str
79
+ :param cancellation_detail_agent: (required)
80
+ :type cancellation_detail_agent: CancellationDetailAgent
81
+ :param wink_version:
82
+ :type wink_version: str
83
+ :param _request_timeout: timeout setting for this request. If one
84
+ number provided, it will be total request
85
+ timeout. It can also be a pair (tuple) of
86
+ (connection, read) timeouts.
87
+ :type _request_timeout: int, tuple(int, int), optional
88
+ :param _request_auth: set to override the auth_settings for an a single
89
+ request; this effectively ignores the
90
+ authentication in the spec for a single request.
91
+ :type _request_auth: dict, optional
92
+ :param _content_type: force content-type for the request.
93
+ :type _content_type: str, Optional
94
+ :param _headers: set to override the headers for a single
95
+ request; this effectively ignores the headers
96
+ in the spec for a single request.
97
+ :type _headers: dict, optional
98
+ :param _host_index: set to override the host_index for a single
99
+ request; this effectively ignores the host_index
100
+ in the spec for a single request.
101
+ :type _host_index: int, optional
102
+ :return: Returns the result object.
103
+ """ # noqa: E501
104
+
105
+ _param = self._cancel_booking_as_travel_agent_serialize(
106
+ company_identifier=company_identifier,
107
+ booking_identifier=booking_identifier,
108
+ cancellation_detail_agent=cancellation_detail_agent,
109
+ wink_version=wink_version,
110
+ _request_auth=_request_auth,
111
+ _content_type=_content_type,
112
+ _headers=_headers,
113
+ _host_index=_host_index
114
+ )
115
+
116
+ _response_types_map: Dict[str, Optional[str]] = {
117
+ '500': "GenericErrorMessage",
118
+ '403': "GenericErrorMessage",
119
+ '401': "GenericErrorMessage",
120
+ '400': "CreateAgentBooking400Response",
121
+ '200': "BookingViewAgent",
122
+ }
123
+ response_data = self.api_client.call_api(
124
+ *_param,
125
+ _request_timeout=_request_timeout
126
+ )
127
+ response_data.read()
128
+ return self.api_client.response_deserialize(
129
+ response_data=response_data,
130
+ response_types_map=_response_types_map,
131
+ ).data
132
+
133
+
134
+ @validate_call
135
+ def cancel_booking_as_travel_agent_with_http_info(
136
+ self,
137
+ company_identifier: Annotated[StrictStr, Field(description="Cancel booking owned by company identifier")],
138
+ booking_identifier: Annotated[StrictStr, Field(description="Cancel booking by identifier")],
139
+ cancellation_detail_agent: CancellationDetailAgent,
140
+ wink_version: Optional[StrictStr] = None,
141
+ _request_timeout: Union[
142
+ None,
143
+ Annotated[StrictFloat, Field(gt=0)],
144
+ Tuple[
145
+ Annotated[StrictFloat, Field(gt=0)],
146
+ Annotated[StrictFloat, Field(gt=0)]
147
+ ]
148
+ ] = None,
149
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
150
+ _content_type: Optional[StrictStr] = None,
151
+ _headers: Optional[Dict[StrictStr, Any]] = None,
152
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
153
+ ) -> ApiResponse[BookingViewAgent]:
154
+ """Cancel Booking
155
+
156
+ Cancel a booking by its booking identifier
157
+
158
+ :param company_identifier: Cancel booking owned by company identifier (required)
159
+ :type company_identifier: str
160
+ :param booking_identifier: Cancel booking by identifier (required)
161
+ :type booking_identifier: str
162
+ :param cancellation_detail_agent: (required)
163
+ :type cancellation_detail_agent: CancellationDetailAgent
164
+ :param wink_version:
165
+ :type wink_version: str
166
+ :param _request_timeout: timeout setting for this request. If one
167
+ number provided, it will be total request
168
+ timeout. It can also be a pair (tuple) of
169
+ (connection, read) timeouts.
170
+ :type _request_timeout: int, tuple(int, int), optional
171
+ :param _request_auth: set to override the auth_settings for an a single
172
+ request; this effectively ignores the
173
+ authentication in the spec for a single request.
174
+ :type _request_auth: dict, optional
175
+ :param _content_type: force content-type for the request.
176
+ :type _content_type: str, Optional
177
+ :param _headers: set to override the headers for a single
178
+ request; this effectively ignores the headers
179
+ in the spec for a single request.
180
+ :type _headers: dict, optional
181
+ :param _host_index: set to override the host_index for a single
182
+ request; this effectively ignores the host_index
183
+ in the spec for a single request.
184
+ :type _host_index: int, optional
185
+ :return: Returns the result object.
186
+ """ # noqa: E501
187
+
188
+ _param = self._cancel_booking_as_travel_agent_serialize(
189
+ company_identifier=company_identifier,
190
+ booking_identifier=booking_identifier,
191
+ cancellation_detail_agent=cancellation_detail_agent,
192
+ wink_version=wink_version,
193
+ _request_auth=_request_auth,
194
+ _content_type=_content_type,
195
+ _headers=_headers,
196
+ _host_index=_host_index
197
+ )
198
+
199
+ _response_types_map: Dict[str, Optional[str]] = {
200
+ '500': "GenericErrorMessage",
201
+ '403': "GenericErrorMessage",
202
+ '401': "GenericErrorMessage",
203
+ '400': "CreateAgentBooking400Response",
204
+ '200': "BookingViewAgent",
205
+ }
206
+ response_data = self.api_client.call_api(
207
+ *_param,
208
+ _request_timeout=_request_timeout
209
+ )
210
+ response_data.read()
211
+ return self.api_client.response_deserialize(
212
+ response_data=response_data,
213
+ response_types_map=_response_types_map,
214
+ )
215
+
216
+
217
+ @validate_call
218
+ def cancel_booking_as_travel_agent_without_preload_content(
219
+ self,
220
+ company_identifier: Annotated[StrictStr, Field(description="Cancel booking owned by company identifier")],
221
+ booking_identifier: Annotated[StrictStr, Field(description="Cancel booking by identifier")],
222
+ cancellation_detail_agent: CancellationDetailAgent,
223
+ wink_version: Optional[StrictStr] = None,
224
+ _request_timeout: Union[
225
+ None,
226
+ Annotated[StrictFloat, Field(gt=0)],
227
+ Tuple[
228
+ Annotated[StrictFloat, Field(gt=0)],
229
+ Annotated[StrictFloat, Field(gt=0)]
230
+ ]
231
+ ] = None,
232
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
233
+ _content_type: Optional[StrictStr] = None,
234
+ _headers: Optional[Dict[StrictStr, Any]] = None,
235
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
236
+ ) -> RESTResponseType:
237
+ """Cancel Booking
238
+
239
+ Cancel a booking by its booking identifier
240
+
241
+ :param company_identifier: Cancel booking owned by company identifier (required)
242
+ :type company_identifier: str
243
+ :param booking_identifier: Cancel booking by identifier (required)
244
+ :type booking_identifier: str
245
+ :param cancellation_detail_agent: (required)
246
+ :type cancellation_detail_agent: CancellationDetailAgent
247
+ :param wink_version:
248
+ :type wink_version: str
249
+ :param _request_timeout: timeout setting for this request. If one
250
+ number provided, it will be total request
251
+ timeout. It can also be a pair (tuple) of
252
+ (connection, read) timeouts.
253
+ :type _request_timeout: int, tuple(int, int), optional
254
+ :param _request_auth: set to override the auth_settings for an a single
255
+ request; this effectively ignores the
256
+ authentication in the spec for a single request.
257
+ :type _request_auth: dict, optional
258
+ :param _content_type: force content-type for the request.
259
+ :type _content_type: str, Optional
260
+ :param _headers: set to override the headers for a single
261
+ request; this effectively ignores the headers
262
+ in the spec for a single request.
263
+ :type _headers: dict, optional
264
+ :param _host_index: set to override the host_index for a single
265
+ request; this effectively ignores the host_index
266
+ in the spec for a single request.
267
+ :type _host_index: int, optional
268
+ :return: Returns the result object.
269
+ """ # noqa: E501
270
+
271
+ _param = self._cancel_booking_as_travel_agent_serialize(
272
+ company_identifier=company_identifier,
273
+ booking_identifier=booking_identifier,
274
+ cancellation_detail_agent=cancellation_detail_agent,
275
+ wink_version=wink_version,
276
+ _request_auth=_request_auth,
277
+ _content_type=_content_type,
278
+ _headers=_headers,
279
+ _host_index=_host_index
280
+ )
281
+
282
+ _response_types_map: Dict[str, Optional[str]] = {
283
+ '500': "GenericErrorMessage",
284
+ '403': "GenericErrorMessage",
285
+ '401': "GenericErrorMessage",
286
+ '400': "CreateAgentBooking400Response",
287
+ '200': "BookingViewAgent",
288
+ }
289
+ response_data = self.api_client.call_api(
290
+ *_param,
291
+ _request_timeout=_request_timeout
292
+ )
293
+ return response_data.response
294
+
295
+
296
+ def _cancel_booking_as_travel_agent_serialize(
297
+ self,
298
+ company_identifier,
299
+ booking_identifier,
300
+ cancellation_detail_agent,
301
+ wink_version,
302
+ _request_auth,
303
+ _content_type,
304
+ _headers,
305
+ _host_index,
306
+ ) -> RequestSerialized:
307
+
308
+ _host = None
309
+
310
+ _collection_formats: Dict[str, str] = {
311
+ }
312
+
313
+ _path_params: Dict[str, str] = {}
314
+ _query_params: List[Tuple[str, str]] = []
315
+ _header_params: Dict[str, Optional[str]] = _headers or {}
316
+ _form_params: List[Tuple[str, str]] = []
317
+ _files: Dict[
318
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
319
+ ] = {}
320
+ _body_params: Optional[bytes] = None
321
+
322
+ # process the path parameters
323
+ if company_identifier is not None:
324
+ _path_params['companyIdentifier'] = company_identifier
325
+ if booking_identifier is not None:
326
+ _path_params['bookingIdentifier'] = booking_identifier
327
+ # process the query parameters
328
+ # process the header parameters
329
+ if wink_version is not None:
330
+ _header_params['Wink-Version'] = wink_version
331
+ # process the form parameters
332
+ # process the body parameter
333
+ if cancellation_detail_agent is not None:
334
+ _body_params = cancellation_detail_agent
335
+
336
+
337
+ # set the HTTP header `Accept`
338
+ if 'Accept' not in _header_params:
339
+ _header_params['Accept'] = self.api_client.select_header_accept(
340
+ [
341
+ 'application/json',
342
+ 'application/xml',
343
+ 'text/xml',
344
+ 'text/plain',
345
+ '*/*'
346
+ ]
347
+ )
348
+
349
+ # set the HTTP header `Content-Type`
350
+ if _content_type:
351
+ _header_params['Content-Type'] = _content_type
352
+ else:
353
+ _default_content_type = (
354
+ self.api_client.select_header_content_type(
355
+ [
356
+ 'application/json'
357
+ ]
358
+ )
359
+ )
360
+ if _default_content_type is not None:
361
+ _header_params['Content-Type'] = _default_content_type
362
+
363
+ # authentication setting
364
+ _auth_settings: List[str] = [
365
+ 'oauth2ClientCredentials'
366
+ ]
367
+
368
+ return self.api_client.param_serialize(
369
+ method='PATCH',
370
+ resource_path='/api/affiliate/{companyIdentifier}/booking/{bookingIdentifier}',
371
+ path_params=_path_params,
372
+ query_params=_query_params,
373
+ header_params=_header_params,
374
+ body=_body_params,
375
+ post_params=_form_params,
376
+ files=_files,
377
+ auth_settings=_auth_settings,
378
+ collection_formats=_collection_formats,
379
+ _host=_host,
380
+ _request_auth=_request_auth
381
+ )
382
+
383
+
384
+
385
+
386
+ @validate_call
387
+ def create_agent_booking(
388
+ self,
389
+ create_agent_booking_request_agent: CreateAgentBookingRequestAgent,
390
+ wink_version: Optional[StrictStr] = None,
391
+ _request_timeout: Union[
392
+ None,
393
+ Annotated[StrictFloat, Field(gt=0)],
394
+ Tuple[
395
+ Annotated[StrictFloat, Field(gt=0)],
396
+ Annotated[StrictFloat, Field(gt=0)]
397
+ ]
398
+ ] = None,
399
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
400
+ _content_type: Optional[StrictStr] = None,
401
+ _headers: Optional[Dict[StrictStr, Any]] = None,
402
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
403
+ ) -> BookingConfirmationsAgent:
404
+ """Create Agent Booking
405
+
406
+ Create agent booking. Expects the agent to be a registered agent with TripPay and have available funds to cover the booking amount.
407
+
408
+ :param create_agent_booking_request_agent: (required)
409
+ :type create_agent_booking_request_agent: CreateAgentBookingRequestAgent
410
+ :param wink_version:
411
+ :type wink_version: str
412
+ :param _request_timeout: timeout setting for this request. If one
413
+ number provided, it will be total request
414
+ timeout. It can also be a pair (tuple) of
415
+ (connection, read) timeouts.
416
+ :type _request_timeout: int, tuple(int, int), optional
417
+ :param _request_auth: set to override the auth_settings for an a single
418
+ request; this effectively ignores the
419
+ authentication in the spec for a single request.
420
+ :type _request_auth: dict, optional
421
+ :param _content_type: force content-type for the request.
422
+ :type _content_type: str, Optional
423
+ :param _headers: set to override the headers for a single
424
+ request; this effectively ignores the headers
425
+ in the spec for a single request.
426
+ :type _headers: dict, optional
427
+ :param _host_index: set to override the host_index for a single
428
+ request; this effectively ignores the host_index
429
+ in the spec for a single request.
430
+ :type _host_index: int, optional
431
+ :return: Returns the result object.
432
+ """ # noqa: E501
433
+
434
+ _param = self._create_agent_booking_serialize(
435
+ create_agent_booking_request_agent=create_agent_booking_request_agent,
436
+ wink_version=wink_version,
437
+ _request_auth=_request_auth,
438
+ _content_type=_content_type,
439
+ _headers=_headers,
440
+ _host_index=_host_index
441
+ )
442
+
443
+ _response_types_map: Dict[str, Optional[str]] = {
444
+ '500': "GenericErrorMessage",
445
+ '403': "GenericErrorMessage",
446
+ '401': "GenericErrorMessage",
447
+ '400': "CreateAgentBooking400Response",
448
+ '201': "BookingConfirmationsAgent",
449
+ }
450
+ response_data = self.api_client.call_api(
451
+ *_param,
452
+ _request_timeout=_request_timeout
453
+ )
454
+ response_data.read()
455
+ return self.api_client.response_deserialize(
456
+ response_data=response_data,
457
+ response_types_map=_response_types_map,
458
+ ).data
459
+
460
+
461
+ @validate_call
462
+ def create_agent_booking_with_http_info(
463
+ self,
464
+ create_agent_booking_request_agent: CreateAgentBookingRequestAgent,
465
+ wink_version: Optional[StrictStr] = None,
466
+ _request_timeout: Union[
467
+ None,
468
+ Annotated[StrictFloat, Field(gt=0)],
469
+ Tuple[
470
+ Annotated[StrictFloat, Field(gt=0)],
471
+ Annotated[StrictFloat, Field(gt=0)]
472
+ ]
473
+ ] = None,
474
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
475
+ _content_type: Optional[StrictStr] = None,
476
+ _headers: Optional[Dict[StrictStr, Any]] = None,
477
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
478
+ ) -> ApiResponse[BookingConfirmationsAgent]:
479
+ """Create Agent Booking
480
+
481
+ Create agent booking. Expects the agent to be a registered agent with TripPay and have available funds to cover the booking amount.
482
+
483
+ :param create_agent_booking_request_agent: (required)
484
+ :type create_agent_booking_request_agent: CreateAgentBookingRequestAgent
485
+ :param wink_version:
486
+ :type wink_version: str
487
+ :param _request_timeout: timeout setting for this request. If one
488
+ number provided, it will be total request
489
+ timeout. It can also be a pair (tuple) of
490
+ (connection, read) timeouts.
491
+ :type _request_timeout: int, tuple(int, int), optional
492
+ :param _request_auth: set to override the auth_settings for an a single
493
+ request; this effectively ignores the
494
+ authentication in the spec for a single request.
495
+ :type _request_auth: dict, optional
496
+ :param _content_type: force content-type for the request.
497
+ :type _content_type: str, Optional
498
+ :param _headers: set to override the headers for a single
499
+ request; this effectively ignores the headers
500
+ in the spec for a single request.
501
+ :type _headers: dict, optional
502
+ :param _host_index: set to override the host_index for a single
503
+ request; this effectively ignores the host_index
504
+ in the spec for a single request.
505
+ :type _host_index: int, optional
506
+ :return: Returns the result object.
507
+ """ # noqa: E501
508
+
509
+ _param = self._create_agent_booking_serialize(
510
+ create_agent_booking_request_agent=create_agent_booking_request_agent,
511
+ wink_version=wink_version,
512
+ _request_auth=_request_auth,
513
+ _content_type=_content_type,
514
+ _headers=_headers,
515
+ _host_index=_host_index
516
+ )
517
+
518
+ _response_types_map: Dict[str, Optional[str]] = {
519
+ '500': "GenericErrorMessage",
520
+ '403': "GenericErrorMessage",
521
+ '401': "GenericErrorMessage",
522
+ '400': "CreateAgentBooking400Response",
523
+ '201': "BookingConfirmationsAgent",
524
+ }
525
+ response_data = self.api_client.call_api(
526
+ *_param,
527
+ _request_timeout=_request_timeout
528
+ )
529
+ response_data.read()
530
+ return self.api_client.response_deserialize(
531
+ response_data=response_data,
532
+ response_types_map=_response_types_map,
533
+ )
534
+
535
+
536
+ @validate_call
537
+ def create_agent_booking_without_preload_content(
538
+ self,
539
+ create_agent_booking_request_agent: CreateAgentBookingRequestAgent,
540
+ wink_version: Optional[StrictStr] = None,
541
+ _request_timeout: Union[
542
+ None,
543
+ Annotated[StrictFloat, Field(gt=0)],
544
+ Tuple[
545
+ Annotated[StrictFloat, Field(gt=0)],
546
+ Annotated[StrictFloat, Field(gt=0)]
547
+ ]
548
+ ] = None,
549
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
550
+ _content_type: Optional[StrictStr] = None,
551
+ _headers: Optional[Dict[StrictStr, Any]] = None,
552
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
553
+ ) -> RESTResponseType:
554
+ """Create Agent Booking
555
+
556
+ Create agent booking. Expects the agent to be a registered agent with TripPay and have available funds to cover the booking amount.
557
+
558
+ :param create_agent_booking_request_agent: (required)
559
+ :type create_agent_booking_request_agent: CreateAgentBookingRequestAgent
560
+ :param wink_version:
561
+ :type wink_version: str
562
+ :param _request_timeout: timeout setting for this request. If one
563
+ number provided, it will be total request
564
+ timeout. It can also be a pair (tuple) of
565
+ (connection, read) timeouts.
566
+ :type _request_timeout: int, tuple(int, int), optional
567
+ :param _request_auth: set to override the auth_settings for an a single
568
+ request; this effectively ignores the
569
+ authentication in the spec for a single request.
570
+ :type _request_auth: dict, optional
571
+ :param _content_type: force content-type for the request.
572
+ :type _content_type: str, Optional
573
+ :param _headers: set to override the headers for a single
574
+ request; this effectively ignores the headers
575
+ in the spec for a single request.
576
+ :type _headers: dict, optional
577
+ :param _host_index: set to override the host_index for a single
578
+ request; this effectively ignores the host_index
579
+ in the spec for a single request.
580
+ :type _host_index: int, optional
581
+ :return: Returns the result object.
582
+ """ # noqa: E501
583
+
584
+ _param = self._create_agent_booking_serialize(
585
+ create_agent_booking_request_agent=create_agent_booking_request_agent,
586
+ wink_version=wink_version,
587
+ _request_auth=_request_auth,
588
+ _content_type=_content_type,
589
+ _headers=_headers,
590
+ _host_index=_host_index
591
+ )
592
+
593
+ _response_types_map: Dict[str, Optional[str]] = {
594
+ '500': "GenericErrorMessage",
595
+ '403': "GenericErrorMessage",
596
+ '401': "GenericErrorMessage",
597
+ '400': "CreateAgentBooking400Response",
598
+ '201': "BookingConfirmationsAgent",
599
+ }
600
+ response_data = self.api_client.call_api(
601
+ *_param,
602
+ _request_timeout=_request_timeout
603
+ )
604
+ return response_data.response
605
+
606
+
607
+ def _create_agent_booking_serialize(
608
+ self,
609
+ create_agent_booking_request_agent,
610
+ wink_version,
611
+ _request_auth,
612
+ _content_type,
613
+ _headers,
614
+ _host_index,
615
+ ) -> RequestSerialized:
616
+
617
+ _host = None
618
+
619
+ _collection_formats: Dict[str, str] = {
620
+ }
621
+
622
+ _path_params: Dict[str, str] = {}
623
+ _query_params: List[Tuple[str, str]] = []
624
+ _header_params: Dict[str, Optional[str]] = _headers or {}
625
+ _form_params: List[Tuple[str, str]] = []
626
+ _files: Dict[
627
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
628
+ ] = {}
629
+ _body_params: Optional[bytes] = None
630
+
631
+ # process the path parameters
632
+ # process the query parameters
633
+ # process the header parameters
634
+ if wink_version is not None:
635
+ _header_params['Wink-Version'] = wink_version
636
+ # process the form parameters
637
+ # process the body parameter
638
+ if create_agent_booking_request_agent is not None:
639
+ _body_params = create_agent_booking_request_agent
640
+
641
+
642
+ # set the HTTP header `Accept`
643
+ if 'Accept' not in _header_params:
644
+ _header_params['Accept'] = self.api_client.select_header_accept(
645
+ [
646
+ 'application/json',
647
+ 'application/xml',
648
+ 'text/xml',
649
+ 'text/plain',
650
+ '*/*'
651
+ ]
652
+ )
653
+
654
+ # set the HTTP header `Content-Type`
655
+ if _content_type:
656
+ _header_params['Content-Type'] = _content_type
657
+ else:
658
+ _default_content_type = (
659
+ self.api_client.select_header_content_type(
660
+ [
661
+ 'application/json'
662
+ ]
663
+ )
664
+ )
665
+ if _default_content_type is not None:
666
+ _header_params['Content-Type'] = _default_content_type
667
+
668
+ # authentication setting
669
+ _auth_settings: List[str] = [
670
+ 'oauth2ClientCredentials'
671
+ ]
672
+
673
+ return self.api_client.param_serialize(
674
+ method='POST',
675
+ resource_path='/api/booking/agent',
676
+ path_params=_path_params,
677
+ query_params=_query_params,
678
+ header_params=_header_params,
679
+ body=_body_params,
680
+ post_params=_form_params,
681
+ files=_files,
682
+ auth_settings=_auth_settings,
683
+ collection_formats=_collection_formats,
684
+ _host=_host,
685
+ _request_auth=_request_auth
686
+ )
687
+
688
+
689
+
690
+
691
+ @validate_call
692
+ def resend_booking_confirmation_email_as_travel_agent(
693
+ self,
694
+ company_identifier: Annotated[StrictStr, Field(description="Resend booking owned by company identifier")],
695
+ booking_identifier: Annotated[StrictStr, Field(description="Resend booking by identifier")],
696
+ body: Annotated[Dict[str, Any], Field(description="Empty request body")],
697
+ wink_version: Optional[StrictStr] = None,
698
+ _request_timeout: Union[
699
+ None,
700
+ Annotated[StrictFloat, Field(gt=0)],
701
+ Tuple[
702
+ Annotated[StrictFloat, Field(gt=0)],
703
+ Annotated[StrictFloat, Field(gt=0)]
704
+ ]
705
+ ] = None,
706
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
707
+ _content_type: Optional[StrictStr] = None,
708
+ _headers: Optional[Dict[StrictStr, Any]] = None,
709
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
710
+ ) -> BooleanResponseAgent:
711
+ """Resend Booking Confirmation
712
+
713
+ Resends booking confirmation email to traveler.
714
+
715
+ :param company_identifier: Resend booking owned by company identifier (required)
716
+ :type company_identifier: str
717
+ :param booking_identifier: Resend booking by identifier (required)
718
+ :type booking_identifier: str
719
+ :param body: Empty request body (required)
720
+ :type body: object
721
+ :param wink_version:
722
+ :type wink_version: str
723
+ :param _request_timeout: timeout setting for this request. If one
724
+ number provided, it will be total request
725
+ timeout. It can also be a pair (tuple) of
726
+ (connection, read) timeouts.
727
+ :type _request_timeout: int, tuple(int, int), optional
728
+ :param _request_auth: set to override the auth_settings for an a single
729
+ request; this effectively ignores the
730
+ authentication in the spec for a single request.
731
+ :type _request_auth: dict, optional
732
+ :param _content_type: force content-type for the request.
733
+ :type _content_type: str, Optional
734
+ :param _headers: set to override the headers for a single
735
+ request; this effectively ignores the headers
736
+ in the spec for a single request.
737
+ :type _headers: dict, optional
738
+ :param _host_index: set to override the host_index for a single
739
+ request; this effectively ignores the host_index
740
+ in the spec for a single request.
741
+ :type _host_index: int, optional
742
+ :return: Returns the result object.
743
+ """ # noqa: E501
744
+
745
+ _param = self._resend_booking_confirmation_email_as_travel_agent_serialize(
746
+ company_identifier=company_identifier,
747
+ booking_identifier=booking_identifier,
748
+ body=body,
749
+ wink_version=wink_version,
750
+ _request_auth=_request_auth,
751
+ _content_type=_content_type,
752
+ _headers=_headers,
753
+ _host_index=_host_index
754
+ )
755
+
756
+ _response_types_map: Dict[str, Optional[str]] = {
757
+ '500': "GenericErrorMessage",
758
+ '403': "GenericErrorMessage",
759
+ '401': "GenericErrorMessage",
760
+ '400': "CreateAgentBooking400Response",
761
+ '200': "BooleanResponseAgent",
762
+ }
763
+ response_data = self.api_client.call_api(
764
+ *_param,
765
+ _request_timeout=_request_timeout
766
+ )
767
+ response_data.read()
768
+ return self.api_client.response_deserialize(
769
+ response_data=response_data,
770
+ response_types_map=_response_types_map,
771
+ ).data
772
+
773
+
774
+ @validate_call
775
+ def resend_booking_confirmation_email_as_travel_agent_with_http_info(
776
+ self,
777
+ company_identifier: Annotated[StrictStr, Field(description="Resend booking owned by company identifier")],
778
+ booking_identifier: Annotated[StrictStr, Field(description="Resend booking by identifier")],
779
+ body: Annotated[Dict[str, Any], Field(description="Empty request body")],
780
+ wink_version: Optional[StrictStr] = None,
781
+ _request_timeout: Union[
782
+ None,
783
+ Annotated[StrictFloat, Field(gt=0)],
784
+ Tuple[
785
+ Annotated[StrictFloat, Field(gt=0)],
786
+ Annotated[StrictFloat, Field(gt=0)]
787
+ ]
788
+ ] = None,
789
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
790
+ _content_type: Optional[StrictStr] = None,
791
+ _headers: Optional[Dict[StrictStr, Any]] = None,
792
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
793
+ ) -> ApiResponse[BooleanResponseAgent]:
794
+ """Resend Booking Confirmation
795
+
796
+ Resends booking confirmation email to traveler.
797
+
798
+ :param company_identifier: Resend booking owned by company identifier (required)
799
+ :type company_identifier: str
800
+ :param booking_identifier: Resend booking by identifier (required)
801
+ :type booking_identifier: str
802
+ :param body: Empty request body (required)
803
+ :type body: object
804
+ :param wink_version:
805
+ :type wink_version: str
806
+ :param _request_timeout: timeout setting for this request. If one
807
+ number provided, it will be total request
808
+ timeout. It can also be a pair (tuple) of
809
+ (connection, read) timeouts.
810
+ :type _request_timeout: int, tuple(int, int), optional
811
+ :param _request_auth: set to override the auth_settings for an a single
812
+ request; this effectively ignores the
813
+ authentication in the spec for a single request.
814
+ :type _request_auth: dict, optional
815
+ :param _content_type: force content-type for the request.
816
+ :type _content_type: str, Optional
817
+ :param _headers: set to override the headers for a single
818
+ request; this effectively ignores the headers
819
+ in the spec for a single request.
820
+ :type _headers: dict, optional
821
+ :param _host_index: set to override the host_index for a single
822
+ request; this effectively ignores the host_index
823
+ in the spec for a single request.
824
+ :type _host_index: int, optional
825
+ :return: Returns the result object.
826
+ """ # noqa: E501
827
+
828
+ _param = self._resend_booking_confirmation_email_as_travel_agent_serialize(
829
+ company_identifier=company_identifier,
830
+ booking_identifier=booking_identifier,
831
+ body=body,
832
+ wink_version=wink_version,
833
+ _request_auth=_request_auth,
834
+ _content_type=_content_type,
835
+ _headers=_headers,
836
+ _host_index=_host_index
837
+ )
838
+
839
+ _response_types_map: Dict[str, Optional[str]] = {
840
+ '500': "GenericErrorMessage",
841
+ '403': "GenericErrorMessage",
842
+ '401': "GenericErrorMessage",
843
+ '400': "CreateAgentBooking400Response",
844
+ '200': "BooleanResponseAgent",
845
+ }
846
+ response_data = self.api_client.call_api(
847
+ *_param,
848
+ _request_timeout=_request_timeout
849
+ )
850
+ response_data.read()
851
+ return self.api_client.response_deserialize(
852
+ response_data=response_data,
853
+ response_types_map=_response_types_map,
854
+ )
855
+
856
+
857
+ @validate_call
858
+ def resend_booking_confirmation_email_as_travel_agent_without_preload_content(
859
+ self,
860
+ company_identifier: Annotated[StrictStr, Field(description="Resend booking owned by company identifier")],
861
+ booking_identifier: Annotated[StrictStr, Field(description="Resend booking by identifier")],
862
+ body: Annotated[Dict[str, Any], Field(description="Empty request body")],
863
+ wink_version: Optional[StrictStr] = None,
864
+ _request_timeout: Union[
865
+ None,
866
+ Annotated[StrictFloat, Field(gt=0)],
867
+ Tuple[
868
+ Annotated[StrictFloat, Field(gt=0)],
869
+ Annotated[StrictFloat, Field(gt=0)]
870
+ ]
871
+ ] = None,
872
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
873
+ _content_type: Optional[StrictStr] = None,
874
+ _headers: Optional[Dict[StrictStr, Any]] = None,
875
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
876
+ ) -> RESTResponseType:
877
+ """Resend Booking Confirmation
878
+
879
+ Resends booking confirmation email to traveler.
880
+
881
+ :param company_identifier: Resend booking owned by company identifier (required)
882
+ :type company_identifier: str
883
+ :param booking_identifier: Resend booking by identifier (required)
884
+ :type booking_identifier: str
885
+ :param body: Empty request body (required)
886
+ :type body: object
887
+ :param wink_version:
888
+ :type wink_version: str
889
+ :param _request_timeout: timeout setting for this request. If one
890
+ number provided, it will be total request
891
+ timeout. It can also be a pair (tuple) of
892
+ (connection, read) timeouts.
893
+ :type _request_timeout: int, tuple(int, int), optional
894
+ :param _request_auth: set to override the auth_settings for an a single
895
+ request; this effectively ignores the
896
+ authentication in the spec for a single request.
897
+ :type _request_auth: dict, optional
898
+ :param _content_type: force content-type for the request.
899
+ :type _content_type: str, Optional
900
+ :param _headers: set to override the headers for a single
901
+ request; this effectively ignores the headers
902
+ in the spec for a single request.
903
+ :type _headers: dict, optional
904
+ :param _host_index: set to override the host_index for a single
905
+ request; this effectively ignores the host_index
906
+ in the spec for a single request.
907
+ :type _host_index: int, optional
908
+ :return: Returns the result object.
909
+ """ # noqa: E501
910
+
911
+ _param = self._resend_booking_confirmation_email_as_travel_agent_serialize(
912
+ company_identifier=company_identifier,
913
+ booking_identifier=booking_identifier,
914
+ body=body,
915
+ wink_version=wink_version,
916
+ _request_auth=_request_auth,
917
+ _content_type=_content_type,
918
+ _headers=_headers,
919
+ _host_index=_host_index
920
+ )
921
+
922
+ _response_types_map: Dict[str, Optional[str]] = {
923
+ '500': "GenericErrorMessage",
924
+ '403': "GenericErrorMessage",
925
+ '401': "GenericErrorMessage",
926
+ '400': "CreateAgentBooking400Response",
927
+ '200': "BooleanResponseAgent",
928
+ }
929
+ response_data = self.api_client.call_api(
930
+ *_param,
931
+ _request_timeout=_request_timeout
932
+ )
933
+ return response_data.response
934
+
935
+
936
+ def _resend_booking_confirmation_email_as_travel_agent_serialize(
937
+ self,
938
+ company_identifier,
939
+ booking_identifier,
940
+ body,
941
+ wink_version,
942
+ _request_auth,
943
+ _content_type,
944
+ _headers,
945
+ _host_index,
946
+ ) -> RequestSerialized:
947
+
948
+ _host = None
949
+
950
+ _collection_formats: Dict[str, str] = {
951
+ }
952
+
953
+ _path_params: Dict[str, str] = {}
954
+ _query_params: List[Tuple[str, str]] = []
955
+ _header_params: Dict[str, Optional[str]] = _headers or {}
956
+ _form_params: List[Tuple[str, str]] = []
957
+ _files: Dict[
958
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
959
+ ] = {}
960
+ _body_params: Optional[bytes] = None
961
+
962
+ # process the path parameters
963
+ if company_identifier is not None:
964
+ _path_params['companyIdentifier'] = company_identifier
965
+ if booking_identifier is not None:
966
+ _path_params['bookingIdentifier'] = booking_identifier
967
+ # process the query parameters
968
+ # process the header parameters
969
+ if wink_version is not None:
970
+ _header_params['Wink-Version'] = wink_version
971
+ # process the form parameters
972
+ # process the body parameter
973
+ if body is not None:
974
+ _body_params = body
975
+
976
+
977
+ # set the HTTP header `Accept`
978
+ if 'Accept' not in _header_params:
979
+ _header_params['Accept'] = self.api_client.select_header_accept(
980
+ [
981
+ 'application/json',
982
+ 'application/xml',
983
+ 'text/xml',
984
+ 'text/plain',
985
+ '*/*'
986
+ ]
987
+ )
988
+
989
+ # set the HTTP header `Content-Type`
990
+ if _content_type:
991
+ _header_params['Content-Type'] = _content_type
992
+ else:
993
+ _default_content_type = (
994
+ self.api_client.select_header_content_type(
995
+ [
996
+ 'application/json'
997
+ ]
998
+ )
999
+ )
1000
+ if _default_content_type is not None:
1001
+ _header_params['Content-Type'] = _default_content_type
1002
+
1003
+ # authentication setting
1004
+ _auth_settings: List[str] = [
1005
+ 'oauth2ClientCredentials'
1006
+ ]
1007
+
1008
+ return self.api_client.param_serialize(
1009
+ method='PATCH',
1010
+ resource_path='/api/affiliate/{companyIdentifier}/booking/{bookingIdentifier}/resend',
1011
+ path_params=_path_params,
1012
+ query_params=_query_params,
1013
+ header_params=_header_params,
1014
+ body=_body_params,
1015
+ post_params=_form_params,
1016
+ files=_files,
1017
+ auth_settings=_auth_settings,
1018
+ collection_formats=_collection_formats,
1019
+ _host=_host,
1020
+ _request_auth=_request_auth
1021
+ )
1022
+
1023
+
1024
+
1025
+
1026
+ @validate_call
1027
+ def show_booking_as_travel_agent(
1028
+ self,
1029
+ company_identifier: Annotated[StrictStr, Field(description="Show booking for company identifier")],
1030
+ booking_identifier: Annotated[StrictStr, Field(description="Show booking with booking identifier")],
1031
+ wink_version: Optional[StrictStr] = None,
1032
+ accept: Optional[StrictStr] = None,
1033
+ _request_timeout: Union[
1034
+ None,
1035
+ Annotated[StrictFloat, Field(gt=0)],
1036
+ Tuple[
1037
+ Annotated[StrictFloat, Field(gt=0)],
1038
+ Annotated[StrictFloat, Field(gt=0)]
1039
+ ]
1040
+ ] = None,
1041
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1042
+ _content_type: Optional[StrictStr] = None,
1043
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1044
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1045
+ ) -> BookingViewAgent:
1046
+ """Show Booking
1047
+
1048
+ Show a booking record by its identifier.
1049
+
1050
+ :param company_identifier: Show booking for company identifier (required)
1051
+ :type company_identifier: str
1052
+ :param booking_identifier: Show booking with booking identifier (required)
1053
+ :type booking_identifier: str
1054
+ :param wink_version:
1055
+ :type wink_version: str
1056
+ :param accept:
1057
+ :type accept: str
1058
+ :param _request_timeout: timeout setting for this request. If one
1059
+ number provided, it will be total request
1060
+ timeout. It can also be a pair (tuple) of
1061
+ (connection, read) timeouts.
1062
+ :type _request_timeout: int, tuple(int, int), optional
1063
+ :param _request_auth: set to override the auth_settings for an a single
1064
+ request; this effectively ignores the
1065
+ authentication in the spec for a single request.
1066
+ :type _request_auth: dict, optional
1067
+ :param _content_type: force content-type for the request.
1068
+ :type _content_type: str, Optional
1069
+ :param _headers: set to override the headers for a single
1070
+ request; this effectively ignores the headers
1071
+ in the spec for a single request.
1072
+ :type _headers: dict, optional
1073
+ :param _host_index: set to override the host_index for a single
1074
+ request; this effectively ignores the host_index
1075
+ in the spec for a single request.
1076
+ :type _host_index: int, optional
1077
+ :return: Returns the result object.
1078
+ """ # noqa: E501
1079
+
1080
+ _param = self._show_booking_as_travel_agent_serialize(
1081
+ company_identifier=company_identifier,
1082
+ booking_identifier=booking_identifier,
1083
+ wink_version=wink_version,
1084
+ accept=accept,
1085
+ _request_auth=_request_auth,
1086
+ _content_type=_content_type,
1087
+ _headers=_headers,
1088
+ _host_index=_host_index
1089
+ )
1090
+
1091
+ _response_types_map: Dict[str, Optional[str]] = {
1092
+ '500': "GenericErrorMessage",
1093
+ '403': "GenericErrorMessage",
1094
+ '401': "GenericErrorMessage",
1095
+ '400': "CreateAgentBooking400Response",
1096
+ '200': "BookingViewAgent",
1097
+ }
1098
+ response_data = self.api_client.call_api(
1099
+ *_param,
1100
+ _request_timeout=_request_timeout
1101
+ )
1102
+ response_data.read()
1103
+ return self.api_client.response_deserialize(
1104
+ response_data=response_data,
1105
+ response_types_map=_response_types_map,
1106
+ ).data
1107
+
1108
+
1109
+ @validate_call
1110
+ def show_booking_as_travel_agent_with_http_info(
1111
+ self,
1112
+ company_identifier: Annotated[StrictStr, Field(description="Show booking for company identifier")],
1113
+ booking_identifier: Annotated[StrictStr, Field(description="Show booking with booking identifier")],
1114
+ wink_version: Optional[StrictStr] = None,
1115
+ accept: Optional[StrictStr] = None,
1116
+ _request_timeout: Union[
1117
+ None,
1118
+ Annotated[StrictFloat, Field(gt=0)],
1119
+ Tuple[
1120
+ Annotated[StrictFloat, Field(gt=0)],
1121
+ Annotated[StrictFloat, Field(gt=0)]
1122
+ ]
1123
+ ] = None,
1124
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1125
+ _content_type: Optional[StrictStr] = None,
1126
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1127
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1128
+ ) -> ApiResponse[BookingViewAgent]:
1129
+ """Show Booking
1130
+
1131
+ Show a booking record by its identifier.
1132
+
1133
+ :param company_identifier: Show booking for company identifier (required)
1134
+ :type company_identifier: str
1135
+ :param booking_identifier: Show booking with booking identifier (required)
1136
+ :type booking_identifier: str
1137
+ :param wink_version:
1138
+ :type wink_version: str
1139
+ :param accept:
1140
+ :type accept: str
1141
+ :param _request_timeout: timeout setting for this request. If one
1142
+ number provided, it will be total request
1143
+ timeout. It can also be a pair (tuple) of
1144
+ (connection, read) timeouts.
1145
+ :type _request_timeout: int, tuple(int, int), optional
1146
+ :param _request_auth: set to override the auth_settings for an a single
1147
+ request; this effectively ignores the
1148
+ authentication in the spec for a single request.
1149
+ :type _request_auth: dict, optional
1150
+ :param _content_type: force content-type for the request.
1151
+ :type _content_type: str, Optional
1152
+ :param _headers: set to override the headers for a single
1153
+ request; this effectively ignores the headers
1154
+ in the spec for a single request.
1155
+ :type _headers: dict, optional
1156
+ :param _host_index: set to override the host_index for a single
1157
+ request; this effectively ignores the host_index
1158
+ in the spec for a single request.
1159
+ :type _host_index: int, optional
1160
+ :return: Returns the result object.
1161
+ """ # noqa: E501
1162
+
1163
+ _param = self._show_booking_as_travel_agent_serialize(
1164
+ company_identifier=company_identifier,
1165
+ booking_identifier=booking_identifier,
1166
+ wink_version=wink_version,
1167
+ accept=accept,
1168
+ _request_auth=_request_auth,
1169
+ _content_type=_content_type,
1170
+ _headers=_headers,
1171
+ _host_index=_host_index
1172
+ )
1173
+
1174
+ _response_types_map: Dict[str, Optional[str]] = {
1175
+ '500': "GenericErrorMessage",
1176
+ '403': "GenericErrorMessage",
1177
+ '401': "GenericErrorMessage",
1178
+ '400': "CreateAgentBooking400Response",
1179
+ '200': "BookingViewAgent",
1180
+ }
1181
+ response_data = self.api_client.call_api(
1182
+ *_param,
1183
+ _request_timeout=_request_timeout
1184
+ )
1185
+ response_data.read()
1186
+ return self.api_client.response_deserialize(
1187
+ response_data=response_data,
1188
+ response_types_map=_response_types_map,
1189
+ )
1190
+
1191
+
1192
+ @validate_call
1193
+ def show_booking_as_travel_agent_without_preload_content(
1194
+ self,
1195
+ company_identifier: Annotated[StrictStr, Field(description="Show booking for company identifier")],
1196
+ booking_identifier: Annotated[StrictStr, Field(description="Show booking with booking identifier")],
1197
+ wink_version: Optional[StrictStr] = None,
1198
+ accept: Optional[StrictStr] = None,
1199
+ _request_timeout: Union[
1200
+ None,
1201
+ Annotated[StrictFloat, Field(gt=0)],
1202
+ Tuple[
1203
+ Annotated[StrictFloat, Field(gt=0)],
1204
+ Annotated[StrictFloat, Field(gt=0)]
1205
+ ]
1206
+ ] = None,
1207
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1208
+ _content_type: Optional[StrictStr] = None,
1209
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1210
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1211
+ ) -> RESTResponseType:
1212
+ """Show Booking
1213
+
1214
+ Show a booking record by its identifier.
1215
+
1216
+ :param company_identifier: Show booking for company identifier (required)
1217
+ :type company_identifier: str
1218
+ :param booking_identifier: Show booking with booking identifier (required)
1219
+ :type booking_identifier: str
1220
+ :param wink_version:
1221
+ :type wink_version: str
1222
+ :param accept:
1223
+ :type accept: str
1224
+ :param _request_timeout: timeout setting for this request. If one
1225
+ number provided, it will be total request
1226
+ timeout. It can also be a pair (tuple) of
1227
+ (connection, read) timeouts.
1228
+ :type _request_timeout: int, tuple(int, int), optional
1229
+ :param _request_auth: set to override the auth_settings for an a single
1230
+ request; this effectively ignores the
1231
+ authentication in the spec for a single request.
1232
+ :type _request_auth: dict, optional
1233
+ :param _content_type: force content-type for the request.
1234
+ :type _content_type: str, Optional
1235
+ :param _headers: set to override the headers for a single
1236
+ request; this effectively ignores the headers
1237
+ in the spec for a single request.
1238
+ :type _headers: dict, optional
1239
+ :param _host_index: set to override the host_index for a single
1240
+ request; this effectively ignores the host_index
1241
+ in the spec for a single request.
1242
+ :type _host_index: int, optional
1243
+ :return: Returns the result object.
1244
+ """ # noqa: E501
1245
+
1246
+ _param = self._show_booking_as_travel_agent_serialize(
1247
+ company_identifier=company_identifier,
1248
+ booking_identifier=booking_identifier,
1249
+ wink_version=wink_version,
1250
+ accept=accept,
1251
+ _request_auth=_request_auth,
1252
+ _content_type=_content_type,
1253
+ _headers=_headers,
1254
+ _host_index=_host_index
1255
+ )
1256
+
1257
+ _response_types_map: Dict[str, Optional[str]] = {
1258
+ '500': "GenericErrorMessage",
1259
+ '403': "GenericErrorMessage",
1260
+ '401': "GenericErrorMessage",
1261
+ '400': "CreateAgentBooking400Response",
1262
+ '200': "BookingViewAgent",
1263
+ }
1264
+ response_data = self.api_client.call_api(
1265
+ *_param,
1266
+ _request_timeout=_request_timeout
1267
+ )
1268
+ return response_data.response
1269
+
1270
+
1271
+ def _show_booking_as_travel_agent_serialize(
1272
+ self,
1273
+ company_identifier,
1274
+ booking_identifier,
1275
+ wink_version,
1276
+ accept,
1277
+ _request_auth,
1278
+ _content_type,
1279
+ _headers,
1280
+ _host_index,
1281
+ ) -> RequestSerialized:
1282
+
1283
+ _host = None
1284
+
1285
+ _collection_formats: Dict[str, str] = {
1286
+ }
1287
+
1288
+ _path_params: Dict[str, str] = {}
1289
+ _query_params: List[Tuple[str, str]] = []
1290
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1291
+ _form_params: List[Tuple[str, str]] = []
1292
+ _files: Dict[
1293
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1294
+ ] = {}
1295
+ _body_params: Optional[bytes] = None
1296
+
1297
+ # process the path parameters
1298
+ if company_identifier is not None:
1299
+ _path_params['companyIdentifier'] = company_identifier
1300
+ if booking_identifier is not None:
1301
+ _path_params['bookingIdentifier'] = booking_identifier
1302
+ # process the query parameters
1303
+ # process the header parameters
1304
+ if wink_version is not None:
1305
+ _header_params['Wink-Version'] = wink_version
1306
+ if accept is not None:
1307
+ _header_params['Accept'] = accept
1308
+ # process the form parameters
1309
+ # process the body parameter
1310
+
1311
+
1312
+ # set the HTTP header `Accept`
1313
+ if 'Accept' not in _header_params:
1314
+ _header_params['Accept'] = self.api_client.select_header_accept(
1315
+ [
1316
+ 'application/json',
1317
+ 'application/xml',
1318
+ 'text/xml',
1319
+ 'text/plain',
1320
+ '*/*'
1321
+ ]
1322
+ )
1323
+
1324
+
1325
+ # authentication setting
1326
+ _auth_settings: List[str] = [
1327
+ 'oauth2ClientCredentials'
1328
+ ]
1329
+
1330
+ return self.api_client.param_serialize(
1331
+ method='GET',
1332
+ resource_path='/api/affiliate/{companyIdentifier}/booking/{bookingIdentifier}',
1333
+ path_params=_path_params,
1334
+ query_params=_query_params,
1335
+ header_params=_header_params,
1336
+ body=_body_params,
1337
+ post_params=_form_params,
1338
+ files=_files,
1339
+ auth_settings=_auth_settings,
1340
+ collection_formats=_collection_formats,
1341
+ _host=_host,
1342
+ _request_auth=_request_auth
1343
+ )
1344
+
1345
+
1346
+
1347
+
1348
+ @validate_call
1349
+ def show_booking_grid_as_travel_agent(
1350
+ self,
1351
+ company_identifier: Annotated[StrictStr, Field(description="Show bookings for company identifier")],
1352
+ state_agent: StateAgent,
1353
+ wink_version: Optional[StrictStr] = None,
1354
+ _request_timeout: Union[
1355
+ None,
1356
+ Annotated[StrictFloat, Field(gt=0)],
1357
+ Tuple[
1358
+ Annotated[StrictFloat, Field(gt=0)],
1359
+ Annotated[StrictFloat, Field(gt=0)]
1360
+ ]
1361
+ ] = None,
1362
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1363
+ _content_type: Optional[StrictStr] = None,
1364
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1365
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1366
+ ) -> PageBookingViewAgent:
1367
+ """Show Bookings
1368
+
1369
+ Show bookings for the company that helped create those booking.
1370
+
1371
+ :param company_identifier: Show bookings for company identifier (required)
1372
+ :type company_identifier: str
1373
+ :param state_agent: (required)
1374
+ :type state_agent: StateAgent
1375
+ :param wink_version:
1376
+ :type wink_version: str
1377
+ :param _request_timeout: timeout setting for this request. If one
1378
+ number provided, it will be total request
1379
+ timeout. It can also be a pair (tuple) of
1380
+ (connection, read) timeouts.
1381
+ :type _request_timeout: int, tuple(int, int), optional
1382
+ :param _request_auth: set to override the auth_settings for an a single
1383
+ request; this effectively ignores the
1384
+ authentication in the spec for a single request.
1385
+ :type _request_auth: dict, optional
1386
+ :param _content_type: force content-type for the request.
1387
+ :type _content_type: str, Optional
1388
+ :param _headers: set to override the headers for a single
1389
+ request; this effectively ignores the headers
1390
+ in the spec for a single request.
1391
+ :type _headers: dict, optional
1392
+ :param _host_index: set to override the host_index for a single
1393
+ request; this effectively ignores the host_index
1394
+ in the spec for a single request.
1395
+ :type _host_index: int, optional
1396
+ :return: Returns the result object.
1397
+ """ # noqa: E501
1398
+
1399
+ _param = self._show_booking_grid_as_travel_agent_serialize(
1400
+ company_identifier=company_identifier,
1401
+ state_agent=state_agent,
1402
+ wink_version=wink_version,
1403
+ _request_auth=_request_auth,
1404
+ _content_type=_content_type,
1405
+ _headers=_headers,
1406
+ _host_index=_host_index
1407
+ )
1408
+
1409
+ _response_types_map: Dict[str, Optional[str]] = {
1410
+ '500': "GenericErrorMessage",
1411
+ '403': "GenericErrorMessage",
1412
+ '401': "GenericErrorMessage",
1413
+ '400': "CreateAgentBooking400Response",
1414
+ '200': "PageBookingViewAgent",
1415
+ }
1416
+ response_data = self.api_client.call_api(
1417
+ *_param,
1418
+ _request_timeout=_request_timeout
1419
+ )
1420
+ response_data.read()
1421
+ return self.api_client.response_deserialize(
1422
+ response_data=response_data,
1423
+ response_types_map=_response_types_map,
1424
+ ).data
1425
+
1426
+
1427
+ @validate_call
1428
+ def show_booking_grid_as_travel_agent_with_http_info(
1429
+ self,
1430
+ company_identifier: Annotated[StrictStr, Field(description="Show bookings for company identifier")],
1431
+ state_agent: StateAgent,
1432
+ wink_version: Optional[StrictStr] = None,
1433
+ _request_timeout: Union[
1434
+ None,
1435
+ Annotated[StrictFloat, Field(gt=0)],
1436
+ Tuple[
1437
+ Annotated[StrictFloat, Field(gt=0)],
1438
+ Annotated[StrictFloat, Field(gt=0)]
1439
+ ]
1440
+ ] = None,
1441
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1442
+ _content_type: Optional[StrictStr] = None,
1443
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1444
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1445
+ ) -> ApiResponse[PageBookingViewAgent]:
1446
+ """Show Bookings
1447
+
1448
+ Show bookings for the company that helped create those booking.
1449
+
1450
+ :param company_identifier: Show bookings for company identifier (required)
1451
+ :type company_identifier: str
1452
+ :param state_agent: (required)
1453
+ :type state_agent: StateAgent
1454
+ :param wink_version:
1455
+ :type wink_version: str
1456
+ :param _request_timeout: timeout setting for this request. If one
1457
+ number provided, it will be total request
1458
+ timeout. It can also be a pair (tuple) of
1459
+ (connection, read) timeouts.
1460
+ :type _request_timeout: int, tuple(int, int), optional
1461
+ :param _request_auth: set to override the auth_settings for an a single
1462
+ request; this effectively ignores the
1463
+ authentication in the spec for a single request.
1464
+ :type _request_auth: dict, optional
1465
+ :param _content_type: force content-type for the request.
1466
+ :type _content_type: str, Optional
1467
+ :param _headers: set to override the headers for a single
1468
+ request; this effectively ignores the headers
1469
+ in the spec for a single request.
1470
+ :type _headers: dict, optional
1471
+ :param _host_index: set to override the host_index for a single
1472
+ request; this effectively ignores the host_index
1473
+ in the spec for a single request.
1474
+ :type _host_index: int, optional
1475
+ :return: Returns the result object.
1476
+ """ # noqa: E501
1477
+
1478
+ _param = self._show_booking_grid_as_travel_agent_serialize(
1479
+ company_identifier=company_identifier,
1480
+ state_agent=state_agent,
1481
+ wink_version=wink_version,
1482
+ _request_auth=_request_auth,
1483
+ _content_type=_content_type,
1484
+ _headers=_headers,
1485
+ _host_index=_host_index
1486
+ )
1487
+
1488
+ _response_types_map: Dict[str, Optional[str]] = {
1489
+ '500': "GenericErrorMessage",
1490
+ '403': "GenericErrorMessage",
1491
+ '401': "GenericErrorMessage",
1492
+ '400': "CreateAgentBooking400Response",
1493
+ '200': "PageBookingViewAgent",
1494
+ }
1495
+ response_data = self.api_client.call_api(
1496
+ *_param,
1497
+ _request_timeout=_request_timeout
1498
+ )
1499
+ response_data.read()
1500
+ return self.api_client.response_deserialize(
1501
+ response_data=response_data,
1502
+ response_types_map=_response_types_map,
1503
+ )
1504
+
1505
+
1506
+ @validate_call
1507
+ def show_booking_grid_as_travel_agent_without_preload_content(
1508
+ self,
1509
+ company_identifier: Annotated[StrictStr, Field(description="Show bookings for company identifier")],
1510
+ state_agent: StateAgent,
1511
+ wink_version: Optional[StrictStr] = None,
1512
+ _request_timeout: Union[
1513
+ None,
1514
+ Annotated[StrictFloat, Field(gt=0)],
1515
+ Tuple[
1516
+ Annotated[StrictFloat, Field(gt=0)],
1517
+ Annotated[StrictFloat, Field(gt=0)]
1518
+ ]
1519
+ ] = None,
1520
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1521
+ _content_type: Optional[StrictStr] = None,
1522
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1523
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1524
+ ) -> RESTResponseType:
1525
+ """Show Bookings
1526
+
1527
+ Show bookings for the company that helped create those booking.
1528
+
1529
+ :param company_identifier: Show bookings for company identifier (required)
1530
+ :type company_identifier: str
1531
+ :param state_agent: (required)
1532
+ :type state_agent: StateAgent
1533
+ :param wink_version:
1534
+ :type wink_version: str
1535
+ :param _request_timeout: timeout setting for this request. If one
1536
+ number provided, it will be total request
1537
+ timeout. It can also be a pair (tuple) of
1538
+ (connection, read) timeouts.
1539
+ :type _request_timeout: int, tuple(int, int), optional
1540
+ :param _request_auth: set to override the auth_settings for an a single
1541
+ request; this effectively ignores the
1542
+ authentication in the spec for a single request.
1543
+ :type _request_auth: dict, optional
1544
+ :param _content_type: force content-type for the request.
1545
+ :type _content_type: str, Optional
1546
+ :param _headers: set to override the headers for a single
1547
+ request; this effectively ignores the headers
1548
+ in the spec for a single request.
1549
+ :type _headers: dict, optional
1550
+ :param _host_index: set to override the host_index for a single
1551
+ request; this effectively ignores the host_index
1552
+ in the spec for a single request.
1553
+ :type _host_index: int, optional
1554
+ :return: Returns the result object.
1555
+ """ # noqa: E501
1556
+
1557
+ _param = self._show_booking_grid_as_travel_agent_serialize(
1558
+ company_identifier=company_identifier,
1559
+ state_agent=state_agent,
1560
+ wink_version=wink_version,
1561
+ _request_auth=_request_auth,
1562
+ _content_type=_content_type,
1563
+ _headers=_headers,
1564
+ _host_index=_host_index
1565
+ )
1566
+
1567
+ _response_types_map: Dict[str, Optional[str]] = {
1568
+ '500': "GenericErrorMessage",
1569
+ '403': "GenericErrorMessage",
1570
+ '401': "GenericErrorMessage",
1571
+ '400': "CreateAgentBooking400Response",
1572
+ '200': "PageBookingViewAgent",
1573
+ }
1574
+ response_data = self.api_client.call_api(
1575
+ *_param,
1576
+ _request_timeout=_request_timeout
1577
+ )
1578
+ return response_data.response
1579
+
1580
+
1581
+ def _show_booking_grid_as_travel_agent_serialize(
1582
+ self,
1583
+ company_identifier,
1584
+ state_agent,
1585
+ wink_version,
1586
+ _request_auth,
1587
+ _content_type,
1588
+ _headers,
1589
+ _host_index,
1590
+ ) -> RequestSerialized:
1591
+
1592
+ _host = None
1593
+
1594
+ _collection_formats: Dict[str, str] = {
1595
+ }
1596
+
1597
+ _path_params: Dict[str, str] = {}
1598
+ _query_params: List[Tuple[str, str]] = []
1599
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1600
+ _form_params: List[Tuple[str, str]] = []
1601
+ _files: Dict[
1602
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1603
+ ] = {}
1604
+ _body_params: Optional[bytes] = None
1605
+
1606
+ # process the path parameters
1607
+ if company_identifier is not None:
1608
+ _path_params['companyIdentifier'] = company_identifier
1609
+ # process the query parameters
1610
+ # process the header parameters
1611
+ if wink_version is not None:
1612
+ _header_params['Wink-Version'] = wink_version
1613
+ # process the form parameters
1614
+ # process the body parameter
1615
+ if state_agent is not None:
1616
+ _body_params = state_agent
1617
+
1618
+
1619
+ # set the HTTP header `Accept`
1620
+ if 'Accept' not in _header_params:
1621
+ _header_params['Accept'] = self.api_client.select_header_accept(
1622
+ [
1623
+ 'application/json',
1624
+ 'application/xml',
1625
+ 'text/xml',
1626
+ 'text/plain',
1627
+ '*/*'
1628
+ ]
1629
+ )
1630
+
1631
+ # set the HTTP header `Content-Type`
1632
+ if _content_type:
1633
+ _header_params['Content-Type'] = _content_type
1634
+ else:
1635
+ _default_content_type = (
1636
+ self.api_client.select_header_content_type(
1637
+ [
1638
+ 'application/json'
1639
+ ]
1640
+ )
1641
+ )
1642
+ if _default_content_type is not None:
1643
+ _header_params['Content-Type'] = _default_content_type
1644
+
1645
+ # authentication setting
1646
+ _auth_settings: List[str] = [
1647
+ 'oauth2ClientCredentials'
1648
+ ]
1649
+
1650
+ return self.api_client.param_serialize(
1651
+ method='POST',
1652
+ resource_path='/api/affiliate/{companyIdentifier}/booking/grid',
1653
+ path_params=_path_params,
1654
+ query_params=_query_params,
1655
+ header_params=_header_params,
1656
+ body=_body_params,
1657
+ post_params=_form_params,
1658
+ files=_files,
1659
+ auth_settings=_auth_settings,
1660
+ collection_formats=_collection_formats,
1661
+ _host=_host,
1662
+ _request_auth=_request_auth
1663
+ )
1664
+
1665
+
1666
+
1667
+
1668
+ @validate_call
1669
+ def update_agent(
1670
+ self,
1671
+ company_identifier: Annotated[StrictStr, Field(description="Update agent by company id")],
1672
+ upsert_travel_agent_request_agent: UpsertTravelAgentRequestAgent,
1673
+ wink_version: Optional[StrictStr] = None,
1674
+ _request_timeout: Union[
1675
+ None,
1676
+ Annotated[StrictFloat, Field(gt=0)],
1677
+ Tuple[
1678
+ Annotated[StrictFloat, Field(gt=0)],
1679
+ Annotated[StrictFloat, Field(gt=0)]
1680
+ ]
1681
+ ] = None,
1682
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1683
+ _content_type: Optional[StrictStr] = None,
1684
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1685
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1686
+ ) -> CompanyViewAgent:
1687
+ """Update Agent
1688
+
1689
+ Update an existing agent
1690
+
1691
+ :param company_identifier: Update agent by company id (required)
1692
+ :type company_identifier: str
1693
+ :param upsert_travel_agent_request_agent: (required)
1694
+ :type upsert_travel_agent_request_agent: UpsertTravelAgentRequestAgent
1695
+ :param wink_version:
1696
+ :type wink_version: str
1697
+ :param _request_timeout: timeout setting for this request. If one
1698
+ number provided, it will be total request
1699
+ timeout. It can also be a pair (tuple) of
1700
+ (connection, read) timeouts.
1701
+ :type _request_timeout: int, tuple(int, int), optional
1702
+ :param _request_auth: set to override the auth_settings for an a single
1703
+ request; this effectively ignores the
1704
+ authentication in the spec for a single request.
1705
+ :type _request_auth: dict, optional
1706
+ :param _content_type: force content-type for the request.
1707
+ :type _content_type: str, Optional
1708
+ :param _headers: set to override the headers for a single
1709
+ request; this effectively ignores the headers
1710
+ in the spec for a single request.
1711
+ :type _headers: dict, optional
1712
+ :param _host_index: set to override the host_index for a single
1713
+ request; this effectively ignores the host_index
1714
+ in the spec for a single request.
1715
+ :type _host_index: int, optional
1716
+ :return: Returns the result object.
1717
+ """ # noqa: E501
1718
+
1719
+ _param = self._update_agent_serialize(
1720
+ company_identifier=company_identifier,
1721
+ upsert_travel_agent_request_agent=upsert_travel_agent_request_agent,
1722
+ wink_version=wink_version,
1723
+ _request_auth=_request_auth,
1724
+ _content_type=_content_type,
1725
+ _headers=_headers,
1726
+ _host_index=_host_index
1727
+ )
1728
+
1729
+ _response_types_map: Dict[str, Optional[str]] = {
1730
+ '500': "GenericErrorMessage",
1731
+ '403': "GenericErrorMessage",
1732
+ '401': "GenericErrorMessage",
1733
+ '400': "CreateAgentBooking400Response",
1734
+ '200': "CompanyViewAgent",
1735
+ }
1736
+ response_data = self.api_client.call_api(
1737
+ *_param,
1738
+ _request_timeout=_request_timeout
1739
+ )
1740
+ response_data.read()
1741
+ return self.api_client.response_deserialize(
1742
+ response_data=response_data,
1743
+ response_types_map=_response_types_map,
1744
+ ).data
1745
+
1746
+
1747
+ @validate_call
1748
+ def update_agent_with_http_info(
1749
+ self,
1750
+ company_identifier: Annotated[StrictStr, Field(description="Update agent by company id")],
1751
+ upsert_travel_agent_request_agent: UpsertTravelAgentRequestAgent,
1752
+ wink_version: Optional[StrictStr] = None,
1753
+ _request_timeout: Union[
1754
+ None,
1755
+ Annotated[StrictFloat, Field(gt=0)],
1756
+ Tuple[
1757
+ Annotated[StrictFloat, Field(gt=0)],
1758
+ Annotated[StrictFloat, Field(gt=0)]
1759
+ ]
1760
+ ] = None,
1761
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1762
+ _content_type: Optional[StrictStr] = None,
1763
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1764
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1765
+ ) -> ApiResponse[CompanyViewAgent]:
1766
+ """Update Agent
1767
+
1768
+ Update an existing agent
1769
+
1770
+ :param company_identifier: Update agent by company id (required)
1771
+ :type company_identifier: str
1772
+ :param upsert_travel_agent_request_agent: (required)
1773
+ :type upsert_travel_agent_request_agent: UpsertTravelAgentRequestAgent
1774
+ :param wink_version:
1775
+ :type wink_version: str
1776
+ :param _request_timeout: timeout setting for this request. If one
1777
+ number provided, it will be total request
1778
+ timeout. It can also be a pair (tuple) of
1779
+ (connection, read) timeouts.
1780
+ :type _request_timeout: int, tuple(int, int), optional
1781
+ :param _request_auth: set to override the auth_settings for an a single
1782
+ request; this effectively ignores the
1783
+ authentication in the spec for a single request.
1784
+ :type _request_auth: dict, optional
1785
+ :param _content_type: force content-type for the request.
1786
+ :type _content_type: str, Optional
1787
+ :param _headers: set to override the headers for a single
1788
+ request; this effectively ignores the headers
1789
+ in the spec for a single request.
1790
+ :type _headers: dict, optional
1791
+ :param _host_index: set to override the host_index for a single
1792
+ request; this effectively ignores the host_index
1793
+ in the spec for a single request.
1794
+ :type _host_index: int, optional
1795
+ :return: Returns the result object.
1796
+ """ # noqa: E501
1797
+
1798
+ _param = self._update_agent_serialize(
1799
+ company_identifier=company_identifier,
1800
+ upsert_travel_agent_request_agent=upsert_travel_agent_request_agent,
1801
+ wink_version=wink_version,
1802
+ _request_auth=_request_auth,
1803
+ _content_type=_content_type,
1804
+ _headers=_headers,
1805
+ _host_index=_host_index
1806
+ )
1807
+
1808
+ _response_types_map: Dict[str, Optional[str]] = {
1809
+ '500': "GenericErrorMessage",
1810
+ '403': "GenericErrorMessage",
1811
+ '401': "GenericErrorMessage",
1812
+ '400': "CreateAgentBooking400Response",
1813
+ '200': "CompanyViewAgent",
1814
+ }
1815
+ response_data = self.api_client.call_api(
1816
+ *_param,
1817
+ _request_timeout=_request_timeout
1818
+ )
1819
+ response_data.read()
1820
+ return self.api_client.response_deserialize(
1821
+ response_data=response_data,
1822
+ response_types_map=_response_types_map,
1823
+ )
1824
+
1825
+
1826
+ @validate_call
1827
+ def update_agent_without_preload_content(
1828
+ self,
1829
+ company_identifier: Annotated[StrictStr, Field(description="Update agent by company id")],
1830
+ upsert_travel_agent_request_agent: UpsertTravelAgentRequestAgent,
1831
+ wink_version: Optional[StrictStr] = None,
1832
+ _request_timeout: Union[
1833
+ None,
1834
+ Annotated[StrictFloat, Field(gt=0)],
1835
+ Tuple[
1836
+ Annotated[StrictFloat, Field(gt=0)],
1837
+ Annotated[StrictFloat, Field(gt=0)]
1838
+ ]
1839
+ ] = None,
1840
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1841
+ _content_type: Optional[StrictStr] = None,
1842
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1843
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1844
+ ) -> RESTResponseType:
1845
+ """Update Agent
1846
+
1847
+ Update an existing agent
1848
+
1849
+ :param company_identifier: Update agent by company id (required)
1850
+ :type company_identifier: str
1851
+ :param upsert_travel_agent_request_agent: (required)
1852
+ :type upsert_travel_agent_request_agent: UpsertTravelAgentRequestAgent
1853
+ :param wink_version:
1854
+ :type wink_version: str
1855
+ :param _request_timeout: timeout setting for this request. If one
1856
+ number provided, it will be total request
1857
+ timeout. It can also be a pair (tuple) of
1858
+ (connection, read) timeouts.
1859
+ :type _request_timeout: int, tuple(int, int), optional
1860
+ :param _request_auth: set to override the auth_settings for an a single
1861
+ request; this effectively ignores the
1862
+ authentication in the spec for a single request.
1863
+ :type _request_auth: dict, optional
1864
+ :param _content_type: force content-type for the request.
1865
+ :type _content_type: str, Optional
1866
+ :param _headers: set to override the headers for a single
1867
+ request; this effectively ignores the headers
1868
+ in the spec for a single request.
1869
+ :type _headers: dict, optional
1870
+ :param _host_index: set to override the host_index for a single
1871
+ request; this effectively ignores the host_index
1872
+ in the spec for a single request.
1873
+ :type _host_index: int, optional
1874
+ :return: Returns the result object.
1875
+ """ # noqa: E501
1876
+
1877
+ _param = self._update_agent_serialize(
1878
+ company_identifier=company_identifier,
1879
+ upsert_travel_agent_request_agent=upsert_travel_agent_request_agent,
1880
+ wink_version=wink_version,
1881
+ _request_auth=_request_auth,
1882
+ _content_type=_content_type,
1883
+ _headers=_headers,
1884
+ _host_index=_host_index
1885
+ )
1886
+
1887
+ _response_types_map: Dict[str, Optional[str]] = {
1888
+ '500': "GenericErrorMessage",
1889
+ '403': "GenericErrorMessage",
1890
+ '401': "GenericErrorMessage",
1891
+ '400': "CreateAgentBooking400Response",
1892
+ '200': "CompanyViewAgent",
1893
+ }
1894
+ response_data = self.api_client.call_api(
1895
+ *_param,
1896
+ _request_timeout=_request_timeout
1897
+ )
1898
+ return response_data.response
1899
+
1900
+
1901
+ def _update_agent_serialize(
1902
+ self,
1903
+ company_identifier,
1904
+ upsert_travel_agent_request_agent,
1905
+ wink_version,
1906
+ _request_auth,
1907
+ _content_type,
1908
+ _headers,
1909
+ _host_index,
1910
+ ) -> RequestSerialized:
1911
+
1912
+ _host = None
1913
+
1914
+ _collection_formats: Dict[str, str] = {
1915
+ }
1916
+
1917
+ _path_params: Dict[str, str] = {}
1918
+ _query_params: List[Tuple[str, str]] = []
1919
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1920
+ _form_params: List[Tuple[str, str]] = []
1921
+ _files: Dict[
1922
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1923
+ ] = {}
1924
+ _body_params: Optional[bytes] = None
1925
+
1926
+ # process the path parameters
1927
+ if company_identifier is not None:
1928
+ _path_params['companyIdentifier'] = company_identifier
1929
+ # process the query parameters
1930
+ # process the header parameters
1931
+ if wink_version is not None:
1932
+ _header_params['Wink-Version'] = wink_version
1933
+ # process the form parameters
1934
+ # process the body parameter
1935
+ if upsert_travel_agent_request_agent is not None:
1936
+ _body_params = upsert_travel_agent_request_agent
1937
+
1938
+
1939
+ # set the HTTP header `Accept`
1940
+ if 'Accept' not in _header_params:
1941
+ _header_params['Accept'] = self.api_client.select_header_accept(
1942
+ [
1943
+ 'application/json',
1944
+ 'application/xml',
1945
+ 'text/xml',
1946
+ 'text/plain',
1947
+ '*/*'
1948
+ ]
1949
+ )
1950
+
1951
+ # set the HTTP header `Content-Type`
1952
+ if _content_type:
1953
+ _header_params['Content-Type'] = _content_type
1954
+ else:
1955
+ _default_content_type = (
1956
+ self.api_client.select_header_content_type(
1957
+ [
1958
+ 'application/json'
1959
+ ]
1960
+ )
1961
+ )
1962
+ if _default_content_type is not None:
1963
+ _header_params['Content-Type'] = _default_content_type
1964
+
1965
+ # authentication setting
1966
+ _auth_settings: List[str] = [
1967
+ 'oauth2ClientCredentials'
1968
+ ]
1969
+
1970
+ return self.api_client.param_serialize(
1971
+ method='PATCH',
1972
+ resource_path='/api/affiliate/{companyIdentifier}/agent',
1973
+ path_params=_path_params,
1974
+ query_params=_query_params,
1975
+ header_params=_header_params,
1976
+ body=_body_params,
1977
+ post_params=_form_params,
1978
+ files=_files,
1979
+ auth_settings=_auth_settings,
1980
+ collection_formats=_collection_formats,
1981
+ _host=_host,
1982
+ _request_auth=_request_auth
1983
+ )
1984
+
1985
+