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

#create_booking_property(opts = {}) ⇒ BookingProperty

Create Booking.com property Onboard a new Booking.com hotel via the OAuth Connect flow. Returns the hotel id once Stage-1 designation completes in the Extranet.

Parameters:

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

    the optional parameters

Returns:



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

def create_booking_property(opts = {})
  data, _status_code, _headers = create_booking_property_with_http_info(opts)
  data
end

#create_booking_property_with_http_info(opts = {}) ⇒ Array<(BookingProperty, Integer, Hash)>

Create Booking.com property Onboard a new Booking.com hotel via the OAuth Connect flow. Returns the hotel id once Stage-1 designation completes in the Extranet.

Parameters:

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

    the optional parameters

Returns:

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

    BookingProperty data, response status code and response headers



35
36
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
# File 'lib/repull/api/booking_com_api.rb', line 35

def create_booking_property_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BookingComApi.create_booking_property ...'
  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] || 'BookingProperty'

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

  new_options = opts.merge(
    :operation => :"BookingComApi.create_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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: BookingComApi#create_booking_property\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)


83
84
85
86
# File 'lib/repull/api/booking_com_api.rb', line 83

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



92
93
94
95
96
97
98
99
100
101
102
103
104
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
# File 'lib/repull/api/booking_com_api.rb', line 92

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:



143
144
145
146
# File 'lib/repull/api/booking_com_api.rb', line 143

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 &#x60;hotel_id&#x60; (via the &#x60;listings_booking&#x60; mapping owned by the authenticated workspace), then proxies Booking&#39;s &#x60;getRoomRateAvailability&#x60; for the requested window. Pricing on Booking is per-room/per-rate-plan, so &#x60;room_id&#x60; and &#x60;room_level&#x60; flow through query params unchanged. Mirrors the per-channel &#x60;/listings/id/pricing&#x60; 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



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
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
# File 'lib/repull/api/booking_com_api.rb', line 157

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

#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:



213
214
215
216
# File 'lib/repull/api/booking_com_api.rb', line 213

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:



222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/repull/api/booking_com_api.rb', line 222

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:



270
271
272
273
# File 'lib/repull/api/booking_com_api.rb', line 270

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



279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/repull/api/booking_com_api.rb', line 279

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

#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)


327
328
329
330
# File 'lib/repull/api/booking_com_api.rb', line 327

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



336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'lib/repull/api/booking_com_api.rb', line 336

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

#sync_booking(opts = {}) ⇒ nil

Bulk sync to Booking.com Trigger a full bulk sync of properties + availability + rates to Booking.com. Runs async — returns 202 with a job id; poll ‘/v1/sync/jobs/id` for status.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


382
383
384
385
# File 'lib/repull/api/booking_com_api.rb', line 382

def sync_booking(opts = {})
  sync_booking_with_http_info(opts)
  nil
end

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

Bulk sync to Booking.com Trigger a full bulk sync of properties + availability + rates to Booking.com. Runs async — returns 202 with a job id; poll &#x60;/v1/sync/jobs/id&#x60; for status.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/repull/api/booking_com_api.rb', line 391

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

  # 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.sync_booking",
    :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#sync_booking\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_booking_availability(opts = {}) ⇒ nil

Update Booking.com rates/availability Push availability + rate changes to Booking.com’s OTA system. Accepts the standard OTA rate message — see Booking’s OTA docs for the field shape. Errors from upstream surface as ‘booking_error`.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


437
438
439
440
# File 'lib/repull/api/booking_com_api.rb', line 437

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

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

Update Booking.com rates/availability Push availability + rate changes to Booking.com&#39;s OTA system. Accepts the standard OTA rate message — see Booking&#39;s OTA docs for the field shape. Errors from upstream surface as &#x60;booking_error&#x60;.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
483
484
485
486
# File 'lib/repull/api/booking_com_api.rb', line 446

def update_booking_availability_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: 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] || {}

  # 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_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_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)


492
493
494
495
# File 'lib/repull/api/booking_com_api.rb', line 492

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



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
# File 'lib/repull/api/booking_com_api.rb', line 501

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:



549
550
551
552
# File 'lib/repull/api/booking_com_api.rb', line 549

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 &#x60;updateRates&#x60;. Each update needs &#x60;roomId&#x60; + &#x60;rateId&#x60; + &#x60;dateRange&#x60; + &#x60;price&#x60; + &#x60;currency&#x60;. Field-level validation runs up front so callers don&#39;t have to parse Booking&#39;s XML error envelope to discover a missing &#x60;roomId&#x60;.

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
603
604
605
606
607
608
609
610
611
612
613
614
615
# File 'lib/repull/api/booking_com_api.rb', line 560

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