repull 0.2.8 → 0.2.10

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.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +1443 -182
  3. data/lib/repull/api/availability_api.rb +24 -92
  4. data/lib/repull/api/billing_api.rb +186 -15
  5. data/lib/repull/api/booking_com_api.rb +532 -41
  6. data/lib/repull/api/listings_api.rb +74 -0
  7. data/lib/repull/api/plumguide_api.rb +245 -0
  8. data/lib/repull/api/reservations_api.rb +0 -197
  9. data/lib/repull/api/sandbox_api.rb +136 -0
  10. data/lib/repull/api/vrbo_api.rb +0 -126
  11. data/lib/repull/models/acknowledge_booking_reservations_request.rb +176 -0
  12. data/lib/repull/models/{create_studio_project201_response_data.rb → airbnb_alteration.rb} +44 -52
  13. data/lib/repull/models/airbnb_amenity.rb +171 -0
  14. data/lib/repull/models/{get_studio_deployment200_response.rb → airbnb_availability_write_request.rb} +52 -10
  15. data/lib/repull/models/airbnb_calendar_operation.rb +250 -0
  16. data/lib/repull/models/airbnb_listing_action_request.rb +198 -0
  17. data/lib/repull/models/{update_availability_request.rb → airbnb_pricing_write_request.rb} +100 -11
  18. data/lib/repull/models/booking_availability_update.rb +276 -0
  19. data/lib/repull/models/booking_availability_update_request.rb +230 -0
  20. data/lib/repull/models/{generate_studio_completion_request_project_id.rb → booking_availability_update_request_property_id.rb} +2 -2
  21. data/lib/repull/models/booking_availability_update_request_updates_inner.rb +104 -0
  22. data/lib/repull/models/booking_pricing_rate_update.rb +1 -0
  23. data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +65 -6
  24. data/lib/repull/models/booking_setup_request.rb +220 -0
  25. data/lib/repull/models/create_airbnb_alteration_request.rb +195 -0
  26. data/lib/repull/models/{create_studio_deployment201_response_data.rb → create_airbnb_offer_request.rb} +42 -30
  27. data/lib/repull/models/{create_studio_project_request.rb → create_booking_webhook_request.rb} +36 -47
  28. data/lib/repull/models/{generate_studio_completion200_response.rb → delete_airbnb_listing_photo200_response.rb} +10 -10
  29. data/lib/repull/models/{delete_studio_project200_response.rb → get_airbnb_alteration200_response.rb} +50 -7
  30. data/lib/repull/models/{delete_studio_project_file200_response.rb → get_airbnb_listing_quality200_response.rb} +37 -7
  31. data/lib/repull/models/{create_studio_project_generation201_response.rb → get_airbnb_listing_settings200_response.rb} +37 -7
  32. data/lib/repull/models/{delete_studio_deployment200_response.rb → get_airbnb_thread200_response.rb} +50 -7
  33. data/lib/repull/models/{list_studio_deployments200_response.rb → get_usage_logs200_response.rb} +17 -8
  34. data/lib/repull/models/get_usage_logs200_response_data_inner.rb +264 -0
  35. data/lib/repull/models/{create_studio_deployment201_response.rb → get_usage_logs200_response_pagination.rb} +29 -10
  36. data/lib/repull/models/get_usage_summary200_response.rb +232 -0
  37. data/lib/repull/models/get_usage_summary200_response_breakdown_inner.rb +183 -0
  38. data/lib/repull/models/{delete_studio_deployment200_response_data.rb → get_usage_summary200_response_limits.rb} +18 -16
  39. data/lib/repull/models/{delete_studio_project200_response_data.rb → get_usage_summary200_response_remaining.rb} +18 -16
  40. data/lib/repull/models/{create_studio_project_generation201_response_data.rb → get_usage_summary200_response_status_distribution.rb} +31 -22
  41. data/lib/repull/models/{upsert_studio_project_file_request.rb → get_usage_summary200_response_timeline_inner.rb} +28 -28
  42. data/lib/repull/models/{create_studio_project_generation_request.rb → get_usage_summary200_response_totals.rb} +28 -28
  43. data/lib/repull/models/{create_studio_project201_response.rb → get_usage_summary200_response_used.rb} +19 -10
  44. data/lib/repull/models/get_usage_tier200_response.rb +183 -0
  45. data/lib/repull/models/{list_studio_projects200_response.rb → get_usage_tier200_response_limits.rb} +31 -12
  46. data/lib/repull/models/{update_reservation_request.rb → get_usage_tier200_response_remaining.rb} +25 -31
  47. data/lib/repull/models/{get_studio_project200_response.rb → get_usage_tier200_response_used.rb} +28 -10
  48. data/lib/repull/models/list_airbnb_alterations200_response.rb +192 -0
  49. data/lib/repull/models/list_airbnb_listing_amenities200_response.rb +190 -0
  50. data/lib/repull/models/{create_studio_deployment_request.rb → list_airbnb_listing_amenities200_response_data.rb} +23 -28
  51. data/lib/repull/models/{list_studio_project_files200_response.rb → list_airbnb_transactions200_response.rb} +50 -7
  52. data/lib/repull/models/listing_content_update_request.rb +243 -0
  53. data/lib/repull/models/{upsert_studio_project_file200_response.rb → listing_content_update_request_address.rb} +53 -10
  54. data/lib/repull/models/listing_content_update_request_amenities.rb +105 -0
  55. data/lib/repull/models/listing_content_update_request_amenities_one_of_inner.rb +196 -0
  56. data/lib/repull/models/listing_content_update_request_occupancy.rb +179 -0
  57. data/lib/repull/{api/ai_api.rb → models/listing_content_update_request_photos_inner.rb} +77 -59
  58. data/lib/repull/models/{generate_studio_completion200_response_data.rb → listing_content_update_request_photos_inner_one_of.rb} +81 -66
  59. data/lib/repull/models/listing_content_update_request_policies.rb +253 -0
  60. data/lib/repull/models/{create_ai_operation200_response.rb → listing_content_update_response.rb} +32 -16
  61. data/lib/repull/models/map_airbnb_listing_request.rb +215 -0
  62. data/lib/repull/models/{create_reservation_request.rb → map_airbnb_listing_response.rb} +137 -116
  63. data/lib/repull/models/property.rb +42 -69
  64. data/lib/repull/models/property_availability.rb +222 -0
  65. data/lib/repull/models/property_availability_day.rb +247 -0
  66. data/lib/repull/models/reservation.rb +28 -1
  67. data/lib/repull/models/sandbox_fixture_ref.rb +193 -0
  68. data/lib/repull/models/{delete_studio_project_file200_response_data.rb → sandbox_reset_result.rb} +72 -11
  69. data/lib/repull/models/sandbox_reset_result_deleted.rb +216 -0
  70. data/lib/repull/models/sandbox_seed_result.rb +278 -0
  71. data/lib/repull/models/{update_studio_project_request.rb → update_airbnb_message_request.rb} +43 -24
  72. data/lib/repull/models/update_booking_charges_request.rb +194 -0
  73. data/lib/repull/version.rb +1 -1
  74. data/lib/repull.rb +59 -34
  75. data/openapi/v1.json +3956 -2522
  76. metadata +61 -36
  77. data/lib/repull/api/studio_api.rb +0 -1094
  78. data/lib/repull/models/generate_studio_completion_request.rb +0 -305
  79. data/lib/repull/models/upsert_studio_project_file200_response_data.rb +0 -147
@@ -19,25 +19,31 @@ module Repull
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create Booking.com property
23
- # Onboard a new Booking.com hotel via the OAuth Connect flow. Returns the hotel id once Stage-1 designation completes in the Extranet.
22
+ # Acknowledge Booking.com reservations
23
+ # Acknowledge one or more reservations so Booking.com removes them from the `new` queue. The body carries `reservation_ids` (non-empty array). Acknowledge only after you have durably persisted each reservation.
24
+ # @param acknowledge_booking_reservations_request [AcknowledgeBookingReservationsRequest]
24
25
  # @param [Hash] opts the optional parameters
25
- # @return [BookingProperty]
26
- def create_booking_property(opts = {})
27
- data, _status_code, _headers = create_booking_property_with_http_info(opts)
28
- data
26
+ # @return [nil]
27
+ def acknowledge_booking_reservations(acknowledge_booking_reservations_request, opts = {})
28
+ acknowledge_booking_reservations_with_http_info(acknowledge_booking_reservations_request, opts)
29
+ nil
29
30
  end
30
31
 
31
- # Create Booking.com property
32
- # Onboard a new Booking.com hotel via the OAuth Connect flow. Returns the hotel id once Stage-1 designation completes in the Extranet.
32
+ # Acknowledge Booking.com reservations
33
+ # Acknowledge one or more reservations so Booking.com removes them from the `new` queue. The body carries `reservation_ids` (non-empty array). Acknowledge only after you have durably persisted each reservation.
34
+ # @param acknowledge_booking_reservations_request [AcknowledgeBookingReservationsRequest]
33
35
  # @param [Hash] opts the optional parameters
34
- # @return [Array<(BookingProperty, Integer, Hash)>] BookingProperty data, response status code and response headers
35
- def create_booking_property_with_http_info(opts = {})
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def acknowledge_booking_reservations_with_http_info(acknowledge_booking_reservations_request, opts = {})
36
38
  if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: BookingComApi.create_booking_property ...'
39
+ @api_client.config.logger.debug 'Calling API: BookingComApi.acknowledge_booking_reservations ...'
40
+ end
41
+ # verify the required parameter 'acknowledge_booking_reservations_request' is set
42
+ if @api_client.config.client_side_validation && acknowledge_booking_reservations_request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'acknowledge_booking_reservations_request' when calling BookingComApi.acknowledge_booking_reservations"
38
44
  end
39
45
  # resource path
40
- local_var_path = '/v1/channels/booking/properties'
46
+ local_var_path = '/v1/channels/booking/reservations'
41
47
 
42
48
  # query parameters
43
49
  query_params = opts[:query_params] || {}
@@ -46,21 +52,162 @@ module Repull
46
52
  header_params = opts[:header_params] || {}
47
53
  # HTTP header 'Accept' (if needed)
48
54
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
49
60
 
50
61
  # form parameters
51
62
  form_params = opts[:form_params] || {}
52
63
 
53
64
  # http body (model)
54
- post_body = opts[:debug_body]
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(acknowledge_booking_reservations_request)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type]
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"BookingComApi.acknowledge_booking_reservations",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: BookingComApi#acknowledge_booking_reservations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Booking.com property setup actions
91
+ # Action-router for onboarding a property onto Booking.com. Select the step with `action`: - `create-legal-entity` — register the legal entity (returns 201). - `check-legal-status` — poll legal-entity status by `leid`. - `check-readiness` — check whether a property is ready to open (`property_id`). - `open-property` — open the property for sale (`property_id`). - `set-contacts` — set property contacts (`property_id`, `contacts`). - `set-policies` — set property policies (`property_id`, plus policy fields). Missing required fields per action return a validation error; upstream failures surface as `booking_error`.
92
+ # @param booking_setup_request [BookingSetupRequest]
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [nil]
95
+ def booking_setup(booking_setup_request, opts = {})
96
+ booking_setup_with_http_info(booking_setup_request, opts)
97
+ nil
98
+ end
99
+
100
+ # Booking.com property setup actions
101
+ # Action-router for onboarding a property onto Booking.com. Select the step with &#x60;action&#x60;: - &#x60;create-legal-entity&#x60; — register the legal entity (returns 201). - &#x60;check-legal-status&#x60; — poll legal-entity status by &#x60;leid&#x60;. - &#x60;check-readiness&#x60; — check whether a property is ready to open (&#x60;property_id&#x60;). - &#x60;open-property&#x60; — open the property for sale (&#x60;property_id&#x60;). - &#x60;set-contacts&#x60; — set property contacts (&#x60;property_id&#x60;, &#x60;contacts&#x60;). - &#x60;set-policies&#x60; — set property policies (&#x60;property_id&#x60;, plus policy fields). Missing required fields per action return a validation error; upstream failures surface as &#x60;booking_error&#x60;.
102
+ # @param booking_setup_request [BookingSetupRequest]
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
105
+ def booking_setup_with_http_info(booking_setup_request, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: BookingComApi.booking_setup ...'
108
+ end
109
+ # verify the required parameter 'booking_setup_request' is set
110
+ if @api_client.config.client_side_validation && booking_setup_request.nil?
111
+ fail ArgumentError, "Missing the required parameter 'booking_setup_request' when calling BookingComApi.booking_setup"
112
+ end
113
+ # resource path
114
+ local_var_path = '/v1/channels/booking/setup'
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+ # HTTP header 'Content-Type'
124
+ content_type = @api_client.select_header_content_type(['application/json'])
125
+ if !content_type.nil?
126
+ header_params['Content-Type'] = content_type
127
+ end
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(booking_setup_request)
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type]
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"BookingComApi.booking_setup",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: BookingComApi#booking_setup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Subscribe to a Booking.com notification
159
+ # Subscribe to a Booking.com CNS notification type, delivered to `callback_url`. Returns 201 on success.
160
+ # @param create_booking_webhook_request [CreateBookingWebhookRequest]
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [nil]
163
+ def create_booking_webhook(create_booking_webhook_request, opts = {})
164
+ create_booking_webhook_with_http_info(create_booking_webhook_request, opts)
165
+ nil
166
+ end
167
+
168
+ # Subscribe to a Booking.com notification
169
+ # Subscribe to a Booking.com CNS notification type, delivered to &#x60;callback_url&#x60;. Returns 201 on success.
170
+ # @param create_booking_webhook_request [CreateBookingWebhookRequest]
171
+ # @param [Hash] opts the optional parameters
172
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
173
+ def create_booking_webhook_with_http_info(create_booking_webhook_request, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: BookingComApi.create_booking_webhook ...'
176
+ end
177
+ # verify the required parameter 'create_booking_webhook_request' is set
178
+ if @api_client.config.client_side_validation && create_booking_webhook_request.nil?
179
+ fail ArgumentError, "Missing the required parameter 'create_booking_webhook_request' when calling BookingComApi.create_booking_webhook"
180
+ end
181
+ # resource path
182
+ local_var_path = '/v1/channels/booking/webhooks'
183
+
184
+ # query parameters
185
+ query_params = opts[:query_params] || {}
186
+
187
+ # header parameters
188
+ header_params = opts[:header_params] || {}
189
+ # HTTP header 'Accept' (if needed)
190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
191
+ # HTTP header 'Content-Type'
192
+ content_type = @api_client.select_header_content_type(['application/json'])
193
+ if !content_type.nil?
194
+ header_params['Content-Type'] = content_type
195
+ end
196
+
197
+ # form parameters
198
+ form_params = opts[:form_params] || {}
199
+
200
+ # http body (model)
201
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_booking_webhook_request)
55
202
 
56
203
  # return_type
57
- return_type = opts[:debug_return_type] || 'BookingProperty'
204
+ return_type = opts[:debug_return_type]
58
205
 
59
206
  # auth_names
60
207
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
61
208
 
62
209
  new_options = opts.merge(
63
- :operation => :"BookingComApi.create_booking_property",
210
+ :operation => :"BookingComApi.create_booking_webhook",
64
211
  :header_params => header_params,
65
212
  :query_params => query_params,
66
213
  :form_params => form_params,
@@ -71,7 +218,135 @@ module Repull
71
218
 
72
219
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
73
220
  if @api_client.config.debugging
74
- @api_client.config.logger.debug "API called: BookingComApi#create_booking_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ @api_client.config.logger.debug "API called: BookingComApi#create_booking_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
222
+ end
223
+ return data, status_code, headers
224
+ end
225
+
226
+ # Unsubscribe from a Booking.com notification
227
+ # Remove a Booking.com CNS subscription. Pass the `notification_type` to unsubscribe as a query param — required.
228
+ # @param notification_type [String] Booking.com CNS notification type to unsubscribe.
229
+ # @param [Hash] opts the optional parameters
230
+ # @return [nil]
231
+ def delete_booking_webhook(notification_type, opts = {})
232
+ delete_booking_webhook_with_http_info(notification_type, opts)
233
+ nil
234
+ end
235
+
236
+ # Unsubscribe from a Booking.com notification
237
+ # Remove a Booking.com CNS subscription. Pass the &#x60;notification_type&#x60; to unsubscribe as a query param — required.
238
+ # @param notification_type [String] Booking.com CNS notification type to unsubscribe.
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
241
+ def delete_booking_webhook_with_http_info(notification_type, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: BookingComApi.delete_booking_webhook ...'
244
+ end
245
+ # verify the required parameter 'notification_type' is set
246
+ if @api_client.config.client_side_validation && notification_type.nil?
247
+ fail ArgumentError, "Missing the required parameter 'notification_type' when calling BookingComApi.delete_booking_webhook"
248
+ end
249
+ # resource path
250
+ local_var_path = '/v1/channels/booking/webhooks'
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+ query_params[:'notification_type'] = notification_type
255
+
256
+ # header parameters
257
+ header_params = opts[:header_params] || {}
258
+ # HTTP header 'Accept' (if needed)
259
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
260
+
261
+ # form parameters
262
+ form_params = opts[:form_params] || {}
263
+
264
+ # http body (model)
265
+ post_body = opts[:debug_body]
266
+
267
+ # return_type
268
+ return_type = opts[:debug_return_type]
269
+
270
+ # auth_names
271
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
272
+
273
+ new_options = opts.merge(
274
+ :operation => :"BookingComApi.delete_booking_webhook",
275
+ :header_params => header_params,
276
+ :query_params => query_params,
277
+ :form_params => form_params,
278
+ :body => post_body,
279
+ :auth_names => auth_names,
280
+ :return_type => return_type
281
+ )
282
+
283
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug "API called: BookingComApi#delete_booking_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
+ end
287
+ return data, status_code, headers
288
+ end
289
+
290
+ # Get Booking.com charges
291
+ # Fetch the extra-charge set (cleaning fee, resort fee, city tax, etc.) configured for a Booking.com property. Pass the Booking.com `property_id` as a query param — required.
292
+ # @param property_id [String] Booking.com hotel/property id.
293
+ # @param [Hash] opts the optional parameters
294
+ # @return [nil]
295
+ def get_booking_charges(property_id, opts = {})
296
+ get_booking_charges_with_http_info(property_id, opts)
297
+ nil
298
+ end
299
+
300
+ # Get Booking.com charges
301
+ # Fetch the extra-charge set (cleaning fee, resort fee, city tax, etc.) configured for a Booking.com property. Pass the Booking.com &#x60;property_id&#x60; as a query param — required.
302
+ # @param property_id [String] Booking.com hotel/property id.
303
+ # @param [Hash] opts the optional parameters
304
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
305
+ def get_booking_charges_with_http_info(property_id, opts = {})
306
+ if @api_client.config.debugging
307
+ @api_client.config.logger.debug 'Calling API: BookingComApi.get_booking_charges ...'
308
+ end
309
+ # verify the required parameter 'property_id' is set
310
+ if @api_client.config.client_side_validation && property_id.nil?
311
+ fail ArgumentError, "Missing the required parameter 'property_id' when calling BookingComApi.get_booking_charges"
312
+ end
313
+ # resource path
314
+ local_var_path = '/v1/channels/booking/charges'
315
+
316
+ # query parameters
317
+ query_params = opts[:query_params] || {}
318
+ query_params[:'property_id'] = property_id
319
+
320
+ # header parameters
321
+ header_params = opts[:header_params] || {}
322
+ # HTTP header 'Accept' (if needed)
323
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
324
+
325
+ # form parameters
326
+ form_params = opts[:form_params] || {}
327
+
328
+ # http body (model)
329
+ post_body = opts[:debug_body]
330
+
331
+ # return_type
332
+ return_type = opts[:debug_return_type]
333
+
334
+ # auth_names
335
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
336
+
337
+ new_options = opts.merge(
338
+ :operation => :"BookingComApi.get_booking_charges",
339
+ :header_params => header_params,
340
+ :query_params => query_params,
341
+ :form_params => form_params,
342
+ :body => post_body,
343
+ :auth_names => auth_names,
344
+ :return_type => return_type
345
+ )
346
+
347
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug "API called: BookingComApi#get_booking_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
350
  end
76
351
  return data, status_code, headers
77
352
  end
@@ -206,6 +481,69 @@ module Repull
206
481
  return data, status_code, headers
207
482
  end
208
483
 
484
+ # Get Booking.com connection for a listing
485
+ # Return the Booking.com connection record(s) for a Vanio listing — the linked Booking hotel id, sync flags, markup, sync category, and suspension state. Scoped to the authenticated workspace; a listing with no Booking.com connection returns 404.
486
+ # @param id [Integer] Vanio listing ID.
487
+ # @param [Hash] opts the optional parameters
488
+ # @return [nil]
489
+ def get_booking_property(id, opts = {})
490
+ get_booking_property_with_http_info(id, opts)
491
+ nil
492
+ end
493
+
494
+ # Get Booking.com connection for a listing
495
+ # Return the Booking.com connection record(s) for a Vanio listing — the linked Booking hotel id, sync flags, markup, sync category, and suspension state. Scoped to the authenticated workspace; a listing with no Booking.com connection returns 404.
496
+ # @param id [Integer] Vanio listing ID.
497
+ # @param [Hash] opts the optional parameters
498
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
499
+ def get_booking_property_with_http_info(id, opts = {})
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug 'Calling API: BookingComApi.get_booking_property ...'
502
+ end
503
+ # verify the required parameter 'id' is set
504
+ if @api_client.config.client_side_validation && id.nil?
505
+ fail ArgumentError, "Missing the required parameter 'id' when calling BookingComApi.get_booking_property"
506
+ end
507
+ # resource path
508
+ local_var_path = '/v1/channels/booking/properties/{id}'.sub('{id}', CGI.escape(id.to_s))
509
+
510
+ # query parameters
511
+ query_params = opts[:query_params] || {}
512
+
513
+ # header parameters
514
+ header_params = opts[:header_params] || {}
515
+ # HTTP header 'Accept' (if needed)
516
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
517
+
518
+ # form parameters
519
+ form_params = opts[:form_params] || {}
520
+
521
+ # http body (model)
522
+ post_body = opts[:debug_body]
523
+
524
+ # return_type
525
+ return_type = opts[:debug_return_type]
526
+
527
+ # auth_names
528
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
529
+
530
+ new_options = opts.merge(
531
+ :operation => :"BookingComApi.get_booking_property",
532
+ :header_params => header_params,
533
+ :query_params => query_params,
534
+ :form_params => form_params,
535
+ :body => post_body,
536
+ :auth_names => auth_names,
537
+ :return_type => return_type
538
+ )
539
+
540
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
541
+ if @api_client.config.debugging
542
+ @api_client.config.logger.debug "API called: BookingComApi#get_booking_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
543
+ end
544
+ return data, status_code, headers
545
+ end
546
+
209
547
  # List Booking.com conversations
210
548
  # List Booking.com guest conversations. Cursor-paginated. Use the messaging POST to send a reply.
211
549
  # @param [Hash] opts the optional parameters
@@ -320,6 +658,76 @@ module Repull
320
658
  return data, status_code, headers
321
659
  end
322
660
 
661
+ # List Booking.com reservations
662
+ # Pull reservations from Booking.com. `type=new` (default) returns un-acknowledged bookings; `type=modified` returns changed bookings. Pass both `reservation_id` and `hotel_id` to fetch a single reservation's full details. Acknowledge processed reservations with the POST so Booking stops re-serving them in the `new` queue.
663
+ # @param [Hash] opts the optional parameters
664
+ # @option opts [String] :type Which set to pull. &#x60;details&#x60; requires &#x60;reservation_id&#x60; + &#x60;hotel_id&#x60;. (default to 'new')
665
+ # @option opts [String] :hotel_id Booking.com hotel id — filters &#x60;new&#x60;/&#x60;modified&#x60;, and is required with &#x60;reservation_id&#x60; for details.
666
+ # @option opts [String] :reservation_id Booking.com reservation id — with &#x60;hotel_id&#x60;, returns that reservation&#39;s details.
667
+ # @return [nil]
668
+ def list_booking_reservations(opts = {})
669
+ list_booking_reservations_with_http_info(opts)
670
+ nil
671
+ end
672
+
673
+ # List Booking.com reservations
674
+ # Pull reservations from Booking.com. &#x60;type&#x3D;new&#x60; (default) returns un-acknowledged bookings; &#x60;type&#x3D;modified&#x60; returns changed bookings. Pass both &#x60;reservation_id&#x60; and &#x60;hotel_id&#x60; to fetch a single reservation&#39;s full details. Acknowledge processed reservations with the POST so Booking stops re-serving them in the &#x60;new&#x60; queue.
675
+ # @param [Hash] opts the optional parameters
676
+ # @option opts [String] :type Which set to pull. &#x60;details&#x60; requires &#x60;reservation_id&#x60; + &#x60;hotel_id&#x60;. (default to 'new')
677
+ # @option opts [String] :hotel_id Booking.com hotel id — filters &#x60;new&#x60;/&#x60;modified&#x60;, and is required with &#x60;reservation_id&#x60; for details.
678
+ # @option opts [String] :reservation_id Booking.com reservation id — with &#x60;hotel_id&#x60;, returns that reservation&#39;s details.
679
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
680
+ def list_booking_reservations_with_http_info(opts = {})
681
+ if @api_client.config.debugging
682
+ @api_client.config.logger.debug 'Calling API: BookingComApi.list_booking_reservations ...'
683
+ end
684
+ allowable_values = ["new", "modified", "details"]
685
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
686
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
687
+ end
688
+ # resource path
689
+ local_var_path = '/v1/channels/booking/reservations'
690
+
691
+ # query parameters
692
+ query_params = opts[:query_params] || {}
693
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
694
+ query_params[:'hotel_id'] = opts[:'hotel_id'] if !opts[:'hotel_id'].nil?
695
+ query_params[:'reservation_id'] = opts[:'reservation_id'] if !opts[:'reservation_id'].nil?
696
+
697
+ # header parameters
698
+ header_params = opts[:header_params] || {}
699
+ # HTTP header 'Accept' (if needed)
700
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
701
+
702
+ # form parameters
703
+ form_params = opts[:form_params] || {}
704
+
705
+ # http body (model)
706
+ post_body = opts[:debug_body]
707
+
708
+ # return_type
709
+ return_type = opts[:debug_return_type]
710
+
711
+ # auth_names
712
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
713
+
714
+ new_options = opts.merge(
715
+ :operation => :"BookingComApi.list_booking_reservations",
716
+ :header_params => header_params,
717
+ :query_params => query_params,
718
+ :form_params => form_params,
719
+ :body => post_body,
720
+ :auth_names => auth_names,
721
+ :return_type => return_type
722
+ )
723
+
724
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
725
+ if @api_client.config.debugging
726
+ @api_client.config.logger.debug "API called: BookingComApi#list_booking_reservations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
727
+ end
728
+ return data, status_code, headers
729
+ end
730
+
323
731
  # List Booking.com reviews
324
732
  # List guest reviews for a Booking.com property. Pass `property_id` (the Booking.com hotel id) as a query param — required.
325
733
  # @param property_id [String] Booking.com hotel/property id.
@@ -384,6 +792,63 @@ module Repull
384
792
  return data, status_code, headers
385
793
  end
386
794
 
795
+ # List Booking.com webhook subscriptions
796
+ # List the workspace's Booking.com Content Notification Service (CNS) subscriptions — the notification types Booking pushes to your callback URLs.
797
+ # @param [Hash] opts the optional parameters
798
+ # @return [nil]
799
+ def list_booking_webhooks(opts = {})
800
+ list_booking_webhooks_with_http_info(opts)
801
+ nil
802
+ end
803
+
804
+ # List Booking.com webhook subscriptions
805
+ # List the workspace&#39;s Booking.com Content Notification Service (CNS) subscriptions — the notification types Booking pushes to your callback URLs.
806
+ # @param [Hash] opts the optional parameters
807
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
808
+ def list_booking_webhooks_with_http_info(opts = {})
809
+ if @api_client.config.debugging
810
+ @api_client.config.logger.debug 'Calling API: BookingComApi.list_booking_webhooks ...'
811
+ end
812
+ # resource path
813
+ local_var_path = '/v1/channels/booking/webhooks'
814
+
815
+ # query parameters
816
+ query_params = opts[:query_params] || {}
817
+
818
+ # header parameters
819
+ header_params = opts[:header_params] || {}
820
+ # HTTP header 'Accept' (if needed)
821
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
822
+
823
+ # form parameters
824
+ form_params = opts[:form_params] || {}
825
+
826
+ # http body (model)
827
+ post_body = opts[:debug_body]
828
+
829
+ # return_type
830
+ return_type = opts[:debug_return_type]
831
+
832
+ # auth_names
833
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
834
+
835
+ new_options = opts.merge(
836
+ :operation => :"BookingComApi.list_booking_webhooks",
837
+ :header_params => header_params,
838
+ :query_params => query_params,
839
+ :form_params => form_params,
840
+ :body => post_body,
841
+ :auth_names => auth_names,
842
+ :return_type => return_type
843
+ )
844
+
845
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
846
+ if @api_client.config.debugging
847
+ @api_client.config.logger.debug "API called: BookingComApi#list_booking_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
848
+ end
849
+ return data, status_code, headers
850
+ end
851
+
387
852
  # Reply to Booking.com review
388
853
  # Post a public host reply to a guest review on Booking.com. Booking allows one host reply per review — repeated POSTs are rejected by upstream. Booking.com does NOT support host-authored reviews of guests via the API (platform-level limitation), so this endpoint is reply-only.
389
854
  # @param reply_booking_review_request [ReplyBookingReviewRequest]
@@ -507,37 +972,50 @@ module Repull
507
972
  return data, status_code, headers
508
973
  end
509
974
 
510
- # Bulk sync to Booking.com
511
- # Trigger a full bulk sync of properties + availability + rates to Booking.com. Runs asyncreturns 202 with a job id; poll `/v1/sync/jobs/{id}` for status.
975
+ # Update Booking.com rates/availability
976
+ # Push availability, rates, and the full restriction set to Booking.com. `type` selects the write path: - `rates` — nightly price + length-of-stay / arrival restrictions (min/max stay, closed-to-arrival, closed-to-departure, advance-reservation window). - `availability`inventory (`availableRooms`), the dedicated stop-sell flag (`closed`), and the same restriction set. - `derived-pricing` occupancy-derived pricing rules. Restrictions never leak across channels — this endpoint writes only to Booking.com. Errors from upstream surface as `booking_error`.
977
+ # @param booking_availability_update_request [BookingAvailabilityUpdateRequest]
512
978
  # @param [Hash] opts the optional parameters
513
979
  # @return [nil]
514
- def sync_booking(opts = {})
515
- sync_booking_with_http_info(opts)
980
+ def update_booking_availability(booking_availability_update_request, opts = {})
981
+ update_booking_availability_with_http_info(booking_availability_update_request, opts)
516
982
  nil
517
983
  end
518
984
 
519
- # Bulk sync to Booking.com
520
- # Trigger a full bulk sync of properties + availability + rates to Booking.com. Runs asyncreturns 202 with a job id; poll &#x60;/v1/sync/jobs/{id}&#x60; for status.
985
+ # Update Booking.com rates/availability
986
+ # Push availability, rates, and the full restriction set to Booking.com. &#x60;type&#x60; selects the write path: - &#x60;rates&#x60; — nightly price + length-of-stay / arrival restrictions (min/max stay, closed-to-arrival, closed-to-departure, advance-reservation window). - &#x60;availability&#x60;inventory (&#x60;availableRooms&#x60;), the dedicated stop-sell flag (&#x60;closed&#x60;), and the same restriction set. - &#x60;derived-pricing&#x60; occupancy-derived pricing rules. Restrictions never leak across channels — this endpoint writes only to Booking.com. Errors from upstream surface as &#x60;booking_error&#x60;.
987
+ # @param booking_availability_update_request [BookingAvailabilityUpdateRequest]
521
988
  # @param [Hash] opts the optional parameters
522
989
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
523
- def sync_booking_with_http_info(opts = {})
990
+ def update_booking_availability_with_http_info(booking_availability_update_request, opts = {})
524
991
  if @api_client.config.debugging
525
- @api_client.config.logger.debug 'Calling API: BookingComApi.sync_booking ...'
992
+ @api_client.config.logger.debug 'Calling API: BookingComApi.update_booking_availability ...'
993
+ end
994
+ # verify the required parameter 'booking_availability_update_request' is set
995
+ if @api_client.config.client_side_validation && booking_availability_update_request.nil?
996
+ fail ArgumentError, "Missing the required parameter 'booking_availability_update_request' when calling BookingComApi.update_booking_availability"
526
997
  end
527
998
  # resource path
528
- local_var_path = '/v1/channels/booking/sync'
999
+ local_var_path = '/v1/channels/booking/availability'
529
1000
 
530
1001
  # query parameters
531
1002
  query_params = opts[:query_params] || {}
532
1003
 
533
1004
  # header parameters
534
1005
  header_params = opts[:header_params] || {}
1006
+ # HTTP header 'Accept' (if needed)
1007
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1008
+ # HTTP header 'Content-Type'
1009
+ content_type = @api_client.select_header_content_type(['application/json'])
1010
+ if !content_type.nil?
1011
+ header_params['Content-Type'] = content_type
1012
+ end
535
1013
 
536
1014
  # form parameters
537
1015
  form_params = opts[:form_params] || {}
538
1016
 
539
1017
  # http body (model)
540
- post_body = opts[:debug_body]
1018
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(booking_availability_update_request)
541
1019
 
542
1020
  # return_type
543
1021
  return_type = opts[:debug_return_type]
@@ -546,7 +1024,7 @@ module Repull
546
1024
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
547
1025
 
548
1026
  new_options = opts.merge(
549
- :operation => :"BookingComApi.sync_booking",
1027
+ :operation => :"BookingComApi.update_booking_availability",
550
1028
  :header_params => header_params,
551
1029
  :query_params => query_params,
552
1030
  :form_params => form_params,
@@ -555,44 +1033,57 @@ module Repull
555
1033
  :return_type => return_type
556
1034
  )
557
1035
 
558
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1036
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
559
1037
  if @api_client.config.debugging
560
- @api_client.config.logger.debug "API called: BookingComApi#sync_booking\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1038
+ @api_client.config.logger.debug "API called: BookingComApi#update_booking_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
561
1039
  end
562
1040
  return data, status_code, headers
563
1041
  end
564
1042
 
565
- # Update Booking.com rates/availability
566
- # Push availability + rate changes to Booking.com's OTA system. Accepts the standard OTA rate message see Booking's OTA docs for the field shape. Errors from upstream surface as `booking_error`.
1043
+ # Set Booking.com charges
1044
+ # Replace the extra-charge set for a Booking.com property. The body carries the target `property_id` and the full `charges` array Booking treats the write as a full replacement, so include every charge you want to keep.
1045
+ # @param update_booking_charges_request [UpdateBookingChargesRequest]
567
1046
  # @param [Hash] opts the optional parameters
568
1047
  # @return [nil]
569
- def update_booking_availability(opts = {})
570
- update_booking_availability_with_http_info(opts)
1048
+ def update_booking_charges(update_booking_charges_request, opts = {})
1049
+ update_booking_charges_with_http_info(update_booking_charges_request, opts)
571
1050
  nil
572
1051
  end
573
1052
 
574
- # Update Booking.com rates/availability
575
- # Push availability + rate changes to Booking.com&#39;s OTA system. Accepts the standard OTA rate message see Booking&#39;s OTA docs for the field shape. Errors from upstream surface as &#x60;booking_error&#x60;.
1053
+ # Set Booking.com charges
1054
+ # Replace the extra-charge set for a Booking.com property. The body carries the target &#x60;property_id&#x60; and the full &#x60;charges&#x60; array Booking treats the write as a full replacement, so include every charge you want to keep.
1055
+ # @param update_booking_charges_request [UpdateBookingChargesRequest]
576
1056
  # @param [Hash] opts the optional parameters
577
1057
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
578
- def update_booking_availability_with_http_info(opts = {})
1058
+ def update_booking_charges_with_http_info(update_booking_charges_request, opts = {})
579
1059
  if @api_client.config.debugging
580
- @api_client.config.logger.debug 'Calling API: BookingComApi.update_booking_availability ...'
1060
+ @api_client.config.logger.debug 'Calling API: BookingComApi.update_booking_charges ...'
1061
+ end
1062
+ # verify the required parameter 'update_booking_charges_request' is set
1063
+ if @api_client.config.client_side_validation && update_booking_charges_request.nil?
1064
+ fail ArgumentError, "Missing the required parameter 'update_booking_charges_request' when calling BookingComApi.update_booking_charges"
581
1065
  end
582
1066
  # resource path
583
- local_var_path = '/v1/channels/booking/availability'
1067
+ local_var_path = '/v1/channels/booking/charges'
584
1068
 
585
1069
  # query parameters
586
1070
  query_params = opts[:query_params] || {}
587
1071
 
588
1072
  # header parameters
589
1073
  header_params = opts[:header_params] || {}
1074
+ # HTTP header 'Accept' (if needed)
1075
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1076
+ # HTTP header 'Content-Type'
1077
+ content_type = @api_client.select_header_content_type(['application/json'])
1078
+ if !content_type.nil?
1079
+ header_params['Content-Type'] = content_type
1080
+ end
590
1081
 
591
1082
  # form parameters
592
1083
  form_params = opts[:form_params] || {}
593
1084
 
594
1085
  # http body (model)
595
- post_body = opts[:debug_body]
1086
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_booking_charges_request)
596
1087
 
597
1088
  # return_type
598
1089
  return_type = opts[:debug_return_type]
@@ -601,7 +1092,7 @@ module Repull
601
1092
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
602
1093
 
603
1094
  new_options = opts.merge(
604
- :operation => :"BookingComApi.update_booking_availability",
1095
+ :operation => :"BookingComApi.update_booking_charges",
605
1096
  :header_params => header_params,
606
1097
  :query_params => query_params,
607
1098
  :form_params => form_params,
@@ -612,7 +1103,7 @@ module Repull
612
1103
 
613
1104
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
614
1105
  if @api_client.config.debugging
615
- @api_client.config.logger.debug "API called: BookingComApi#update_booking_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1106
+ @api_client.config.logger.debug "API called: BookingComApi#update_booking_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
616
1107
  end
617
1108
  return data, status_code, headers
618
1109
  end