Class: Repull::BookingComApi

Inherits:
Object
  • Object
show all
Defined in:
lib/repull/api/booking_com_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ BookingComApi

Returns a new instance of BookingComApi.



19
20
21
# File 'lib/repull/api/booking_com_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/repull/api/booking_com_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#acknowledge_booking_reservations(acknowledge_booking_reservations_request, opts = {}) ⇒ nil

Acknowledge Booking.com reservations 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.

Parameters:

Returns:

  • (nil)


27
28
29
30
# File 'lib/repull/api/booking_com_api.rb', line 27

def acknowledge_booking_reservations(acknowledge_booking_reservations_request, opts = {})
  acknowledge_booking_reservations_with_http_info(acknowledge_booking_reservations_request, opts)
  nil
end

#acknowledge_booking_reservations_with_http_info(acknowledge_booking_reservations_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Acknowledge Booking.com reservations 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.

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/repull/api/booking_com_api.rb', line 37

def acknowledge_booking_reservations_with_http_info(acknowledge_booking_reservations_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.acknowledge_booking_reservations ...'
  end
  # verify the required parameter 'acknowledge_booking_reservations_request' is set
  if @api_client.config.client_side_validation && acknowledge_booking_reservations_request.nil?
    fail ArgumentError, "Missing the required parameter 'acknowledge_booking_reservations_request' when calling BookingComApi.acknowledge_booking_reservations"
  end
  # resource path
  local_var_path = '/v1/channels/booking/reservations'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(acknowledge_booking_reservations_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.acknowledge_booking_reservations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#acknowledge_booking_reservations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#booking_setup(booking_setup_request, opts = {}) ⇒ nil

Booking.com property setup actions 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.

Parameters:

  • booking_setup_request (BookingSetupRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


95
96
97
98
# File 'lib/repull/api/booking_com_api.rb', line 95

def booking_setup(booking_setup_request, opts = {})
  booking_setup_with_http_info(booking_setup_request, opts)
  nil
end

#booking_setup_with_http_info(booking_setup_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Booking.com property setup actions 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`.

Parameters:

  • booking_setup_request (BookingSetupRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/repull/api/booking_com_api.rb', line 105

def booking_setup_with_http_info(booking_setup_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.booking_setup ...'
  end
  # verify the required parameter 'booking_setup_request' is set
  if @api_client.config.client_side_validation && booking_setup_request.nil?
    fail ArgumentError, "Missing the required parameter 'booking_setup_request' when calling BookingComApi.booking_setup"
  end
  # resource path
  local_var_path = '/v1/channels/booking/setup'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(booking_setup_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.booking_setup",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#booking_setup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_booking_webhook(create_booking_webhook_request, opts = {}) ⇒ nil

Subscribe to a Booking.com notification Subscribe to a Booking.com CNS notification type, delivered to callback_url. Returns 201 on success.

Parameters:

Returns:

  • (nil)


163
164
165
166
# File 'lib/repull/api/booking_com_api.rb', line 163

def create_booking_webhook(create_booking_webhook_request, opts = {})
  create_booking_webhook_with_http_info(create_booking_webhook_request, opts)
  nil
end

#create_booking_webhook_with_http_info(create_booking_webhook_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Subscribe to a Booking.com notification Subscribe to a Booking.com CNS notification type, delivered to `callback_url`. Returns 201 on success.

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/repull/api/booking_com_api.rb', line 173

def create_booking_webhook_with_http_info(create_booking_webhook_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.create_booking_webhook ...'
  end
  # verify the required parameter 'create_booking_webhook_request' is set
  if @api_client.config.client_side_validation && create_booking_webhook_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_booking_webhook_request' when calling BookingComApi.create_booking_webhook"
  end
  # resource path
  local_var_path = '/v1/channels/booking/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_booking_webhook_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.create_booking_webhook",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#create_booking_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_booking_webhook(notification_type, opts = {}) ⇒ nil

Unsubscribe from a Booking.com notification Remove a Booking.com CNS subscription. Pass the notification_type to unsubscribe as a query param — required.

Parameters:

  • notification_type (String)

    Booking.com CNS notification type to unsubscribe.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


231
232
233
234
# File 'lib/repull/api/booking_com_api.rb', line 231

def delete_booking_webhook(notification_type, opts = {})
  delete_booking_webhook_with_http_info(notification_type, opts)
  nil
end

#delete_booking_webhook_with_http_info(notification_type, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Unsubscribe from a Booking.com notification Remove a Booking.com CNS subscription. Pass the `notification_type` to unsubscribe as a query param — required.

Parameters:

  • notification_type (String)

    Booking.com CNS notification type to unsubscribe.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/repull/api/booking_com_api.rb', line 241

def delete_booking_webhook_with_http_info(notification_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.delete_booking_webhook ...'
  end
  # verify the required parameter 'notification_type' is set
  if @api_client.config.client_side_validation && notification_type.nil?
    fail ArgumentError, "Missing the required parameter 'notification_type' when calling BookingComApi.delete_booking_webhook"
  end
  # resource path
  local_var_path = '/v1/channels/booking/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'notification_type'] = notification_type

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.delete_booking_webhook",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#delete_booking_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_booking_charges(property_id, opts = {}) ⇒ nil

Get Booking.com charges 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.

Parameters:

  • property_id (String)

    Booking.com hotel/property id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


295
296
297
298
# File 'lib/repull/api/booking_com_api.rb', line 295

def get_booking_charges(property_id, opts = {})
  get_booking_charges_with_http_info(property_id, opts)
  nil
end

#get_booking_charges_with_http_info(property_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Get Booking.com charges 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.

Parameters:

  • property_id (String)

    Booking.com hotel/property id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/repull/api/booking_com_api.rb', line 305

def get_booking_charges_with_http_info(property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.get_booking_charges ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling BookingComApi.get_booking_charges"
  end
  # resource path
  local_var_path = '/v1/channels/booking/charges'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'property_id'] = property_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.get_booking_charges",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#get_booking_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_booking_content(opts = {}) ⇒ nil

Get Booking.com content Fetch the current content (descriptions, amenities, photos) for a Booking.com property. Used to round-trip edits through Repull.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


358
359
360
361
# File 'lib/repull/api/booking_com_api.rb', line 358

def get_booking_content(opts = {})
  get_booking_content_with_http_info(opts)
  nil
end

#get_booking_content_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Get Booking.com content Fetch the current content (descriptions, amenities, photos) for a Booking.com property. Used to round-trip edits through Repull.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
# File 'lib/repull/api/booking_com_api.rb', line 367

def get_booking_content_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.get_booking_content ...'
  end
  # resource path
  local_var_path = '/v1/channels/booking/content'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.get_booking_content",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#get_booking_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_booking_listing_pricing(id, opts = {}) ⇒ BookingPricingResponse

Get Booking.com pricing for a listing Resolves the Vanio listing ID to its Booking.com hotel_id (via the listings_booking mapping owned by the authenticated workspace), then proxies Booking's getRoomRateAvailability for the requested window. Pricing on Booking is per-room/per-rate-plan, so room_id and room_level flow through query params unchanged. Mirrors the per-channel /listings/{id}/pricing shape used by Airbnb so SDK consumers can carry a Vanio listing ID across channels.

Parameters:

  • id (Integer)

    Vanio listing ID — resolved to a Booking.com hotel ID via the workspace mapping.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :start_date (Date)
  • :number_of_days (Integer)
  • :room_id (String)
  • :room_level (Boolean)

    When true, returns room-level (vs rate-plan-level) availability.

Returns:



418
419
420
421
# File 'lib/repull/api/booking_com_api.rb', line 418

def get_booking_listing_pricing(id, opts = {})
  data, _status_code, _headers = get_booking_listing_pricing_with_http_info(id, opts)
  data
end

#get_booking_listing_pricing_with_http_info(id, opts = {}) ⇒ Array<(BookingPricingResponse, Integer, Hash)>

Get Booking.com pricing for a listing Resolves the Vanio listing ID to its Booking.com `hotel_id` (via the `listings_booking` mapping owned by the authenticated workspace), then proxies Booking's `getRoomRateAvailability` for the requested window. Pricing on Booking is per-room/per-rate-plan, so `room_id` and `room_level` flow through query params unchanged. Mirrors the per-channel `/listings/id/pricing` shape used by Airbnb so SDK consumers can carry a Vanio listing ID across channels.

Parameters:

  • id (Integer)

    Vanio listing ID — resolved to a Booking.com hotel ID via the workspace mapping.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :start_date (Date)
  • :number_of_days (Integer)
  • :room_id (String)
  • :room_level (Boolean)

    When true, returns room-level (vs rate-plan-level) availability.

Returns:

  • (Array<(BookingPricingResponse, Integer, Hash)>)

    BookingPricingResponse data, response status code and response headers



432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/repull/api/booking_com_api.rb', line 432

def get_booking_listing_pricing_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.get_booking_listing_pricing ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling BookingComApi.get_booking_listing_pricing"
  end
  # resource path
  local_var_path = '/v1/channels/booking/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'number_of_days'] = opts[:'number_of_days'] if !opts[:'number_of_days'].nil?
  query_params[:'room_id'] = opts[:'room_id'] if !opts[:'room_id'].nil?
  query_params[:'room_level'] = opts[:'room_level'] if !opts[:'room_level'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BookingPricingResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.get_booking_listing_pricing",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#get_booking_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_booking_property(id, opts = {}) ⇒ nil

Get Booking.com connection for a listing 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.

Parameters:

  • id (Integer)

    Vanio listing ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


489
490
491
492
# File 'lib/repull/api/booking_com_api.rb', line 489

def get_booking_property(id, opts = {})
  get_booking_property_with_http_info(id, opts)
  nil
end

#get_booking_property_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Get Booking.com connection for a listing 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.

Parameters:

  • id (Integer)

    Vanio listing ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
# File 'lib/repull/api/booking_com_api.rb', line 499

def get_booking_property_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.get_booking_property ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling BookingComApi.get_booking_property"
  end
  # resource path
  local_var_path = '/v1/channels/booking/properties/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.get_booking_property",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#get_booking_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_booking_conversations(opts = {}) ⇒ BookingConversationListResponse

List Booking.com conversations List Booking.com guest conversations. Cursor-paginated. Use the messaging POST to send a reply.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



551
552
553
554
# File 'lib/repull/api/booking_com_api.rb', line 551

def list_booking_conversations(opts = {})
  data, _status_code, _headers = list_booking_conversations_with_http_info(opts)
  data
end

#list_booking_conversations_with_http_info(opts = {}) ⇒ Array<(BookingConversationListResponse, Integer, Hash)>

List Booking.com conversations List Booking.com guest conversations. Cursor-paginated. Use the messaging POST to send a reply.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
# File 'lib/repull/api/booking_com_api.rb', line 560

def list_booking_conversations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.list_booking_conversations ...'
  end
  # resource path
  local_var_path = '/v1/channels/booking/messaging'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BookingConversationListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.list_booking_conversations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#list_booking_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_booking_properties(opts = {}) ⇒ BookingPropertyListResponse

List Booking.com properties List Booking.com hotels claimed by this workspace. Each row includes the Booking-side hotel id and the connected room types.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



608
609
610
611
# File 'lib/repull/api/booking_com_api.rb', line 608

def list_booking_properties(opts = {})
  data, _status_code, _headers = list_booking_properties_with_http_info(opts)
  data
end

#list_booking_properties_with_http_info(opts = {}) ⇒ Array<(BookingPropertyListResponse, Integer, Hash)>

List Booking.com properties List Booking.com hotels claimed by this workspace. Each row includes the Booking-side hotel id and the connected room types.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(BookingPropertyListResponse, Integer, Hash)>)

    BookingPropertyListResponse data, response status code and response headers



617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
# File 'lib/repull/api/booking_com_api.rb', line 617

def list_booking_properties_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.list_booking_properties ...'
  end
  # resource path
  local_var_path = '/v1/channels/booking/properties'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BookingPropertyListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.list_booking_properties",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#list_booking_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_booking_reservations(opts = {}) ⇒ nil

List Booking.com reservations 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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :type (String)

    Which set to pull. `details` requires `reservation_id` + `hotel_id`. (default to 'new')

  • :hotel_id (String)

    Booking.com hotel id — filters `new`/`modified`, and is required with `reservation_id` for details.

  • :reservation_id (String)

    Booking.com reservation id — with `hotel_id`, returns that reservation's details.

Returns:

  • (nil)


668
669
670
671
# File 'lib/repull/api/booking_com_api.rb', line 668

def list_booking_reservations(opts = {})
  list_booking_reservations_with_http_info(opts)
  nil
end

#list_booking_reservations_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

List Booking.com reservations 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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :type (String)

    Which set to pull. `details` requires `reservation_id` + `hotel_id`. (default to 'new')

  • :hotel_id (String)

    Booking.com hotel id — filters `new`/`modified`, and is required with `reservation_id` for details.

  • :reservation_id (String)

    Booking.com reservation id — with `hotel_id`, returns that reservation's details.

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
# File 'lib/repull/api/booking_com_api.rb', line 680

def list_booking_reservations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.list_booking_reservations ...'
  end
  allowable_values = ["new", "modified", "details"]
  if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
    fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/channels/booking/reservations'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'hotel_id'] = opts[:'hotel_id'] if !opts[:'hotel_id'].nil?
  query_params[:'reservation_id'] = opts[:'reservation_id'] if !opts[:'reservation_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.list_booking_reservations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#list_booking_reservations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_booking_reviews(property_id, opts = {}) ⇒ nil

List Booking.com reviews List guest reviews for a Booking.com property. Pass property_id (the Booking.com hotel id) as a query param — required.

Parameters:

  • property_id (String)

    Booking.com hotel/property id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


736
737
738
739
# File 'lib/repull/api/booking_com_api.rb', line 736

def list_booking_reviews(property_id, opts = {})
  list_booking_reviews_with_http_info(property_id, opts)
  nil
end

#list_booking_reviews_with_http_info(property_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

List Booking.com reviews List guest reviews for a Booking.com property. Pass `property_id` (the Booking.com hotel id) as a query param — required.

Parameters:

  • property_id (String)

    Booking.com hotel/property id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
# File 'lib/repull/api/booking_com_api.rb', line 746

def list_booking_reviews_with_http_info(property_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.list_booking_reviews ...'
  end
  # verify the required parameter 'property_id' is set
  if @api_client.config.client_side_validation && property_id.nil?
    fail ArgumentError, "Missing the required parameter 'property_id' when calling BookingComApi.list_booking_reviews"
  end
  # resource path
  local_var_path = '/v1/channels/booking/reviews'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'property_id'] = property_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.list_booking_reviews",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#list_booking_reviews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_booking_webhooks(opts = {}) ⇒ nil

List Booking.com webhook subscriptions List the workspace's Booking.com Content Notification Service (CNS) subscriptions — the notification types Booking pushes to your callback URLs.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


799
800
801
802
# File 'lib/repull/api/booking_com_api.rb', line 799

def list_booking_webhooks(opts = {})
  list_booking_webhooks_with_http_info(opts)
  nil
end

#list_booking_webhooks_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

List Booking.com webhook subscriptions List the workspace's Booking.com Content Notification Service (CNS) subscriptions — the notification types Booking pushes to your callback URLs.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
# File 'lib/repull/api/booking_com_api.rb', line 808

def list_booking_webhooks_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.list_booking_webhooks ...'
  end
  # resource path
  local_var_path = '/v1/channels/booking/webhooks'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.list_booking_webhooks",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#list_booking_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#reply_booking_review(reply_booking_review_request, opts = {}) ⇒ ReplyBookingReview200Response

Reply to Booking.com review 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.

Parameters:

Returns:



857
858
859
860
# File 'lib/repull/api/booking_com_api.rb', line 857

def reply_booking_review(reply_booking_review_request, opts = {})
  data, _status_code, _headers = reply_booking_review_with_http_info(reply_booking_review_request, opts)
  data
end

#reply_booking_review_with_http_info(reply_booking_review_request, opts = {}) ⇒ Array<(ReplyBookingReview200Response, Integer, Hash)>

Reply to Booking.com review 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.

Parameters:

Returns:



867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
# File 'lib/repull/api/booking_com_api.rb', line 867

def reply_booking_review_with_http_info(reply_booking_review_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.reply_booking_review ...'
  end
  # verify the required parameter 'reply_booking_review_request' is set
  if @api_client.config.client_side_validation && reply_booking_review_request.nil?
    fail ArgumentError, "Missing the required parameter 'reply_booking_review_request' when calling BookingComApi.reply_booking_review"
  end
  # resource path
  local_var_path = '/v1/channels/booking/reviews'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(reply_booking_review_request)

  # return_type
  return_type = opts[:debug_return_type] || 'ReplyBookingReview200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.reply_booking_review",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#reply_booking_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_booking_message(opts = {}) ⇒ nil

Send Booking.com message Send a message in a Booking.com conversation as the host. Booking enforces content rules similar to Airbnb.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


924
925
926
927
# File 'lib/repull/api/booking_com_api.rb', line 924

def send_booking_message(opts = {})
  send_booking_message_with_http_info(opts)
  nil
end

#send_booking_message_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Send Booking.com message Send a message in a Booking.com conversation as the host. Booking enforces content rules similar to Airbnb.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
# File 'lib/repull/api/booking_com_api.rb', line 933

def send_booking_message_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.send_booking_message ...'
  end
  # resource path
  local_var_path = '/v1/channels/booking/messaging'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.send_booking_message",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#send_booking_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_booking_availability(booking_availability_update_request, opts = {}) ⇒ nil

Update Booking.com rates/availability 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.

Parameters:

Returns:

  • (nil)


980
981
982
983
# File 'lib/repull/api/booking_com_api.rb', line 980

def update_booking_availability(booking_availability_update_request, opts = {})
  update_booking_availability_with_http_info(booking_availability_update_request, opts)
  nil
end

#update_booking_availability_with_http_info(booking_availability_update_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update Booking.com rates/availability 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`.

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
# File 'lib/repull/api/booking_com_api.rb', line 990

def update_booking_availability_with_http_info(booking_availability_update_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.update_booking_availability ...'
  end
  # verify the required parameter 'booking_availability_update_request' is set
  if @api_client.config.client_side_validation && booking_availability_update_request.nil?
    fail ArgumentError, "Missing the required parameter 'booking_availability_update_request' when calling BookingComApi.update_booking_availability"
  end
  # resource path
  local_var_path = '/v1/channels/booking/availability'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(booking_availability_update_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.update_booking_availability",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#update_booking_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_booking_charges(update_booking_charges_request, opts = {}) ⇒ nil

Set Booking.com charges 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.

Parameters:

Returns:

  • (nil)


1048
1049
1050
1051
# File 'lib/repull/api/booking_com_api.rb', line 1048

def update_booking_charges(update_booking_charges_request, opts = {})
  update_booking_charges_with_http_info(update_booking_charges_request, opts)
  nil
end

#update_booking_charges_with_http_info(update_booking_charges_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Set Booking.com charges 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.

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
# File 'lib/repull/api/booking_com_api.rb', line 1058

def update_booking_charges_with_http_info(update_booking_charges_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.update_booking_charges ...'
  end
  # verify the required parameter 'update_booking_charges_request' is set
  if @api_client.config.client_side_validation && update_booking_charges_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_booking_charges_request' when calling BookingComApi.update_booking_charges"
  end
  # resource path
  local_var_path = '/v1/channels/booking/charges'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_booking_charges_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.update_booking_charges",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#update_booking_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_booking_content(opts = {}) ⇒ nil

Update Booking.com content Push content changes (descriptions, amenities, photos) to Booking.com. Booking enforces editorial review on text fields — changes appear after their content moderation queue clears.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1115
1116
1117
1118
# File 'lib/repull/api/booking_com_api.rb', line 1115

def update_booking_content(opts = {})
  update_booking_content_with_http_info(opts)
  nil
end

#update_booking_content_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update Booking.com content Push content changes (descriptions, amenities, photos) to Booking.com. Booking enforces editorial review on text fields — changes appear after their content moderation queue clears.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
# File 'lib/repull/api/booking_com_api.rb', line 1124

def update_booking_content_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.update_booking_content ...'
  end
  # resource path
  local_var_path = '/v1/channels/booking/content'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.update_booking_content",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#update_booking_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_booking_listing_pricing(id, booking_pricing_update_request, opts = {}) ⇒ BookingPricingUpdateResponse

Update Booking.com pricing for a listing Pushes one or more rate updates to Booking.com via updateRates. Each update needs roomId + rateId + dateRange + price + currency. Field-level validation runs up front so callers don't have to parse Booking's XML error envelope to discover a missing roomId.

Parameters:

Returns:



1172
1173
1174
1175
# File 'lib/repull/api/booking_com_api.rb', line 1172

def update_booking_listing_pricing(id, booking_pricing_update_request, opts = {})
  data, _status_code, _headers = update_booking_listing_pricing_with_http_info(id, booking_pricing_update_request, opts)
  data
end

#update_booking_listing_pricing_with_http_info(id, booking_pricing_update_request, opts = {}) ⇒ Array<(BookingPricingUpdateResponse, Integer, Hash)>

Update Booking.com pricing for a listing Pushes one or more rate updates to Booking.com via `updateRates`. Each update needs `roomId` + `rateId` + `dateRange` + `price` + `currency`. Field-level validation runs up front so callers don't have to parse Booking's XML error envelope to discover a missing `roomId`.

Parameters:

Returns:



1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
# File 'lib/repull/api/booking_com_api.rb', line 1183

def update_booking_listing_pricing_with_http_info(id, booking_pricing_update_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.update_booking_listing_pricing ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling BookingComApi.update_booking_listing_pricing"
  end
  # verify the required parameter 'booking_pricing_update_request' is set
  if @api_client.config.client_side_validation && booking_pricing_update_request.nil?
    fail ArgumentError, "Missing the required parameter 'booking_pricing_update_request' when calling BookingComApi.update_booking_listing_pricing"
  end
  # resource path
  local_var_path = '/v1/channels/booking/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(booking_pricing_update_request)

  # return_type
  return_type = opts[:debug_return_type] || 'BookingPricingUpdateResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"BookingComApi.update_booking_listing_pricing",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#update_booking_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end