Class: Repull::BookingComApi
- Inherits:
-
Object
- Object
- Repull::BookingComApi
- Defined in:
- lib/repull/api/booking_com_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_booking_property(opts = {}) ⇒ BookingProperty
Create Booking.com property Onboard a new Booking.com hotel via the OAuth Connect flow.
-
#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.
-
#get_booking_content(opts = {}) ⇒ nil
Get Booking.com content Fetch the current content (descriptions, amenities, photos) for a Booking.com property.
-
#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.
-
#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.
-
#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.
-
#initialize(api_client = ApiClient.default) ⇒ BookingComApi
constructor
A new instance of BookingComApi.
-
#list_booking_conversations(opts = {}) ⇒ BookingConversationListResponse
List Booking.com conversations List Booking.com guest conversations.
-
#list_booking_conversations_with_http_info(opts = {}) ⇒ Array<(BookingConversationListResponse, Integer, Hash)>
List Booking.com conversations List Booking.com guest conversations.
-
#list_booking_properties(opts = {}) ⇒ BookingPropertyListResponse
List Booking.com properties List Booking.com hotels claimed by this workspace.
-
#list_booking_properties_with_http_info(opts = {}) ⇒ Array<(BookingPropertyListResponse, Integer, Hash)>
List Booking.com properties List Booking.com hotels claimed by this workspace.
-
#list_booking_reviews(property_id, opts = {}) ⇒ nil
List Booking.com reviews List guest reviews for a Booking.com property.
-
#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.
-
#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.
-
#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.
-
#send_booking_message(opts = {}) ⇒ nil
Send Booking.com message Send a message in a Booking.com conversation as the host.
-
#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.
-
#sync_booking(opts = {}) ⇒ nil
Bulk sync to Booking.com Trigger a full bulk sync of properties + availability + rates to Booking.com.
-
#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.
-
#update_booking_availability(opts = {}) ⇒ nil
Update Booking.com rates/availability Push availability + rate changes to Booking.com’s OTA system.
-
#update_booking_availability_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Booking.com rates/availability Push availability + rate changes to Booking.com's OTA system.
-
#update_booking_content(opts = {}) ⇒ nil
Update Booking.com content Push content changes (descriptions, amenities, photos) to Booking.com.
-
#update_booking_content_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Booking.com content Push content changes (descriptions, amenities, photos) to Booking.com.
-
#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`.
-
#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`.
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_client ⇒ Object
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.
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.
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'] = 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, ) 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.
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.
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'] = 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, ) 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.
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 `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.
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'] = 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, ) 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.
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.
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'] = 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, ) 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.
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.
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'] = 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, ) 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_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.
328 329 330 331 |
# File 'lib/repull/api/booking_com_api.rb', line 328 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.
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 377 378 379 380 381 382 383 384 385 |
# File 'lib/repull/api/booking_com_api.rb', line 338 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'] = 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, ) 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 |
#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.
392 393 394 395 |
# File 'lib/repull/api/booking_com_api.rb', line 392 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.
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 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/repull/api/booking_com_api.rb', line 402 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'] = 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, ) 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.
459 460 461 462 |
# File 'lib/repull/api/booking_com_api.rb', line 459 def (opts = {}) (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.
468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'lib/repull/api/booking_com_api.rb', line 468 def (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'] = 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, ) 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.
514 515 516 517 |
# File 'lib/repull/api/booking_com_api.rb', line 514 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 `/v1/sync/jobs/id` for status.
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/repull/api/booking_com_api.rb', line 523 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'] = 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, ) 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`.
569 570 571 572 |
# File 'lib/repull/api/booking_com_api.rb', line 569 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'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`.
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 616 617 618 |
# File 'lib/repull/api/booking_com_api.rb', line 578 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'] = 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, ) 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.
624 625 626 627 |
# File 'lib/repull/api/booking_com_api.rb', line 624 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.
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 660 661 662 663 664 665 666 667 668 669 670 671 672 673 |
# File 'lib/repull/api/booking_com_api.rb', line 633 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'] = 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, ) 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`.
681 682 683 684 |
# File 'lib/repull/api/booking_com_api.rb', line 681 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`.
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 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 |
# File 'lib/repull/api/booking_com_api.rb', line 692 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'] = 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, ) 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 |