repull 0.2.9 → 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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +1391 -117
  3. data/lib/repull/api/availability_api.rb +99 -0
  4. data/lib/repull/api/billing_api.rb +226 -0
  5. data/lib/repull/api/booking_com_api.rb +590 -0
  6. data/lib/repull/api/plumguide_api.rb +245 -0
  7. data/lib/repull/models/acknowledge_booking_reservations_request.rb +176 -0
  8. data/lib/repull/models/airbnb_alteration.rb +191 -0
  9. data/lib/repull/models/airbnb_amenity.rb +171 -0
  10. data/lib/repull/models/booking_setup_request.rb +220 -0
  11. data/lib/repull/models/create_airbnb_alteration_request.rb +195 -0
  12. data/lib/repull/models/create_airbnb_offer_request.rb +211 -0
  13. data/lib/repull/models/create_booking_webhook_request.rb +192 -0
  14. data/lib/repull/models/delete_airbnb_listing_photo200_response.rb +147 -0
  15. data/lib/repull/models/get_airbnb_alteration200_response.rb +190 -0
  16. data/lib/repull/models/get_airbnb_listing_quality200_response.rb +177 -0
  17. data/lib/repull/models/get_airbnb_listing_settings200_response.rb +177 -0
  18. data/lib/repull/models/get_airbnb_thread200_response.rb +190 -0
  19. data/lib/repull/models/get_usage_logs200_response.rb +167 -0
  20. data/lib/repull/models/get_usage_logs200_response_data_inner.rb +264 -0
  21. data/lib/repull/models/get_usage_logs200_response_pagination.rb +166 -0
  22. data/lib/repull/models/get_usage_summary200_response.rb +232 -0
  23. data/lib/repull/models/get_usage_summary200_response_breakdown_inner.rb +183 -0
  24. data/lib/repull/models/get_usage_summary200_response_limits.rb +158 -0
  25. data/lib/repull/models/get_usage_summary200_response_remaining.rb +158 -0
  26. data/lib/repull/models/get_usage_summary200_response_status_distribution.rb +174 -0
  27. data/lib/repull/models/get_usage_summary200_response_timeline_inner.rb +165 -0
  28. data/lib/repull/models/get_usage_summary200_response_totals.rb +165 -0
  29. data/lib/repull/models/get_usage_summary200_response_used.rb +156 -0
  30. data/lib/repull/models/get_usage_tier200_response.rb +183 -0
  31. data/lib/repull/models/get_usage_tier200_response_limits.rb +168 -0
  32. data/lib/repull/models/get_usage_tier200_response_remaining.rb +168 -0
  33. data/lib/repull/models/get_usage_tier200_response_used.rb +165 -0
  34. data/lib/repull/models/list_airbnb_alterations200_response.rb +192 -0
  35. data/lib/repull/models/list_airbnb_listing_amenities200_response.rb +190 -0
  36. data/lib/repull/models/list_airbnb_listing_amenities200_response_data.rb +160 -0
  37. data/lib/repull/models/list_airbnb_transactions200_response.rb +192 -0
  38. data/lib/repull/models/property_availability.rb +222 -0
  39. data/lib/repull/models/property_availability_day.rb +247 -0
  40. data/lib/repull/models/update_airbnb_message_request.rb +209 -0
  41. data/lib/repull/models/update_booking_charges_request.rb +194 -0
  42. data/lib/repull/version.rb +1 -1
  43. data/lib/repull.rb +36 -0
  44. data/openapi/v1.json +3297 -1000
  45. metadata +37 -1
@@ -19,6 +19,338 @@ module Repull
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
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]
25
+ # @param [Hash] opts the optional parameters
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
30
+ end
31
+
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]
35
+ # @param [Hash] opts the optional parameters
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 = {})
38
+ if @api_client.config.debugging
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"
44
+ end
45
+ # resource path
46
+ local_var_path = '/v1/channels/booking/reservations'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
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
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
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)
202
+
203
+ # return_type
204
+ return_type = opts[:debug_return_type]
205
+
206
+ # auth_names
207
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
208
+
209
+ new_options = opts.merge(
210
+ :operation => :"BookingComApi.create_booking_webhook",
211
+ :header_params => header_params,
212
+ :query_params => query_params,
213
+ :form_params => form_params,
214
+ :body => post_body,
215
+ :auth_names => auth_names,
216
+ :return_type => return_type
217
+ )
218
+
219
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
220
+ if @api_client.config.debugging
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}"
350
+ end
351
+ return data, status_code, headers
352
+ end
353
+
22
354
  # Get Booking.com content
23
355
  # Fetch the current content (descriptions, amenities, photos) for a Booking.com property. Used to round-trip edits through Repull.
24
356
  # @param [Hash] opts the optional parameters
@@ -149,6 +481,69 @@ module Repull
149
481
  return data, status_code, headers
150
482
  end
151
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
+
152
547
  # List Booking.com conversations
153
548
  # List Booking.com guest conversations. Cursor-paginated. Use the messaging POST to send a reply.
154
549
  # @param [Hash] opts the optional parameters
@@ -263,6 +658,76 @@ module Repull
263
658
  return data, status_code, headers
264
659
  end
265
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
+
266
731
  # List Booking.com reviews
267
732
  # List guest reviews for a Booking.com property. Pass `property_id` (the Booking.com hotel id) as a query param — required.
268
733
  # @param property_id [String] Booking.com hotel/property id.
@@ -327,6 +792,63 @@ module Repull
327
792
  return data, status_code, headers
328
793
  end
329
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
+
330
852
  # Reply to Booking.com review
331
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.
332
854
  # @param reply_booking_review_request [ReplyBookingReviewRequest]
@@ -518,6 +1040,74 @@ module Repull
518
1040
  return data, status_code, headers
519
1041
  end
520
1042
 
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]
1046
+ # @param [Hash] opts the optional parameters
1047
+ # @return [nil]
1048
+ def update_booking_charges(update_booking_charges_request, opts = {})
1049
+ update_booking_charges_with_http_info(update_booking_charges_request, opts)
1050
+ nil
1051
+ end
1052
+
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]
1056
+ # @param [Hash] opts the optional parameters
1057
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1058
+ def update_booking_charges_with_http_info(update_booking_charges_request, opts = {})
1059
+ if @api_client.config.debugging
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"
1065
+ end
1066
+ # resource path
1067
+ local_var_path = '/v1/channels/booking/charges'
1068
+
1069
+ # query parameters
1070
+ query_params = opts[:query_params] || {}
1071
+
1072
+ # header parameters
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
1081
+
1082
+ # form parameters
1083
+ form_params = opts[:form_params] || {}
1084
+
1085
+ # http body (model)
1086
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_booking_charges_request)
1087
+
1088
+ # return_type
1089
+ return_type = opts[:debug_return_type]
1090
+
1091
+ # auth_names
1092
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1093
+
1094
+ new_options = opts.merge(
1095
+ :operation => :"BookingComApi.update_booking_charges",
1096
+ :header_params => header_params,
1097
+ :query_params => query_params,
1098
+ :form_params => form_params,
1099
+ :body => post_body,
1100
+ :auth_names => auth_names,
1101
+ :return_type => return_type
1102
+ )
1103
+
1104
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1105
+ if @api_client.config.debugging
1106
+ @api_client.config.logger.debug "API called: BookingComApi#update_booking_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1107
+ end
1108
+ return data, status_code, headers
1109
+ end
1110
+
521
1111
  # Update Booking.com content
522
1112
  # Push content changes (descriptions, amenities, photos) to Booking.com. Booking enforces editorial review on text fields — changes appear after their content moderation queue clears.
523
1113
  # @param [Hash] opts the optional parameters