repull 0.2.56 → 0.2.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +539 -2
  3. data/lib/repull/api/connect_api.rb +2 -2
  4. data/lib/repull/api/listings_api.rb +70 -0
  5. data/lib/repull/api/vrbo_api.rb +706 -0
  6. data/lib/repull/models/create_vrbo_offer201_response.rb +104 -0
  7. data/lib/repull/models/create_vrbo_offer201_response_one_of.rb +175 -0
  8. data/lib/repull/models/create_vrbo_offer_request.rb +320 -0
  9. data/lib/repull/models/create_vrbo_offer_request_fees_inner.rb +199 -0
  10. data/lib/repull/models/create_vrbo_offer_request_guest_details.rb +278 -0
  11. data/lib/repull/models/get_airbnb_house_rules200_response.rb +190 -0
  12. data/lib/repull/models/get_airbnb_house_rules200_response_data.rb +247 -0
  13. data/lib/repull/models/get_airbnb_house_rules200_response_data_children.rb +148 -0
  14. data/lib/repull/models/get_airbnb_house_rules200_response_data_house_rules_inner.rb +168 -0
  15. data/lib/repull/models/get_airbnb_listing_cancellation200_response.rb +190 -0
  16. data/lib/repull/models/get_airbnb_listing_cancellation200_response_data.rb +203 -0
  17. data/lib/repull/models/get_airbnb_listing_cancellation200_response_data_non_refundable.rb +192 -0
  18. data/lib/repull/models/get_airbnb_listing_fees200_response.rb +192 -0
  19. data/lib/repull/models/get_airbnb_listing_fees200_response_data_inner.rb +251 -0
  20. data/lib/repull/models/get_airbnb_listing_taxes200_response.rb +192 -0
  21. data/lib/repull/models/get_airbnb_listing_taxes200_response_data_inner.rb +181 -0
  22. data/lib/repull/models/get_airbnb_location200_response.rb +190 -0
  23. data/lib/repull/models/get_airbnb_location200_response_data.rb +197 -0
  24. data/lib/repull/models/get_airbnb_location200_response_data_address.rb +198 -0
  25. data/lib/repull/models/get_vrbo_listing200_response_data_inner.rb +1 -1
  26. data/lib/repull/models/get_vrbo_listing_settings200_response.rb +217 -0
  27. data/lib/repull/models/get_vrbo_listing_settings200_response_data.rb +106 -0
  28. data/lib/repull/models/get_vrbo_listing_settings200_response_data_one_of.rb +149 -0
  29. data/lib/repull/models/get_vrbo_offer200_response.rb +290 -0
  30. data/lib/repull/models/get_vrbo_offer200_response_fees_inner.rb +166 -0
  31. data/lib/repull/models/get_vrbo_thread200_response.rb +159 -0
  32. data/lib/repull/models/list_vrbo_thread_messages200_response.rb +170 -0
  33. data/lib/repull/models/list_vrbo_thread_messages200_response_data_inner.rb +240 -0
  34. data/lib/repull/models/list_vrbo_threads200_response.rb +172 -0
  35. data/lib/repull/models/list_vrbo_threads200_response_data_inner.rb +219 -0
  36. data/lib/repull/models/map_vrbo_listing_request.rb +1 -1
  37. data/lib/repull/models/pull_listing_from_vrbo200_response.rb +273 -0
  38. data/lib/repull/models/pull_listing_from_vrbo_request.rb +149 -0
  39. data/lib/repull/models/send_vrbo_message_request.rb +186 -0
  40. data/lib/repull/models/submit_vrbo_guest_review200_response.rb +176 -0
  41. data/lib/repull/models/submit_vrbo_guest_review_request.rb +195 -0
  42. data/lib/repull/models/submit_vrbo_guest_review_request_category_ratings_inner.rb +218 -0
  43. data/lib/repull/models/update_airbnb_house_rules200_response.rb +187 -0
  44. data/lib/repull/models/update_airbnb_house_rules_request.rb +191 -0
  45. data/lib/repull/models/update_airbnb_listing_cancellation200_response.rb +147 -0
  46. data/lib/repull/models/update_airbnb_listing_cancellation200_response_data.rb +158 -0
  47. data/lib/repull/models/update_airbnb_listing_cancellation_request.rb +201 -0
  48. data/lib/repull/models/update_airbnb_listing_cancellation_request_non_refundable.rb +182 -0
  49. data/lib/repull/models/update_airbnb_listing_fees200_response.rb +150 -0
  50. data/lib/repull/models/update_airbnb_listing_fees_request.rb +175 -0
  51. data/lib/repull/models/vrbo_login200_response.rb +2 -2
  52. data/lib/repull/models/vrbo_login_request.rb +13 -3
  53. data/lib/repull/models/withdraw_vrbo_offer200_response.rb +165 -0
  54. data/lib/repull/version.rb +1 -1
  55. data/lib/repull.rb +44 -0
  56. data/openapi/v1.json +2994 -195
  57. metadata +46 -2
@@ -318,6 +318,74 @@ module Repull
318
318
  return data, status_code, headers
319
319
  end
320
320
 
321
+ # Pre-approve or quote a Vrbo inquiry
322
+ # Answer a Vrbo inquiry — the counterpart of `POST /v1/channels/airbnb/offers`, the same body addressed by the Vrbo conversation. `type: \"preapproval\"` invites the guest to book their dates at the listed price; `type: \"offer\"` sends Vrbo's edited quote. **Priced by its parts, not a total.** Vrbo adds its taxes and service fee itself, so a quote takes `rental_amount`, `fees` (`[{ type, value }]`, Vrbo fee types such as `CLEANING`, `PET`) and `damage_deposit`; `total_price` is refused. The stay is `start_date` + `nights` and `guest_details`, as on Airbnb; leave them out to keep the guest's own. Both types may carry a `message` to the guest. Vrbo has no instant-book switch on a pre-approval (`block_instant_booking` is refused) and a quote is always for the conversation's property (`listing_id` is refused). The same as `POST /v1/conversations/{id}/pre-approval` and `/special-offers` on a Vrbo conversation, which take the Repull conversation id. Send `Idempotency-Key`: a retry without it can send the guest two quotes. Returns `403 listing_inactive` when the conversation's listing is inactive.
323
+ # @param create_vrbo_offer_request [CreateVrboOfferRequest]
324
+ # @param [Hash] opts the optional parameters
325
+ # @return [CreateVrboOffer201Response]
326
+ def create_vrbo_offer(create_vrbo_offer_request, opts = {})
327
+ data, _status_code, _headers = create_vrbo_offer_with_http_info(create_vrbo_offer_request, opts)
328
+ data
329
+ end
330
+
331
+ # Pre-approve or quote a Vrbo inquiry
332
+ # Answer a Vrbo inquiry — the counterpart of `POST /v1/channels/airbnb/offers`, the same body addressed by the Vrbo conversation. `type: \"preapproval\"` invites the guest to book their dates at the listed price; `type: \"offer\"` sends Vrbo's edited quote. **Priced by its parts, not a total.** Vrbo adds its taxes and service fee itself, so a quote takes `rental_amount`, `fees` (`[{ type, value }]`, Vrbo fee types such as `CLEANING`, `PET`) and `damage_deposit`; `total_price` is refused. The stay is `start_date` + `nights` and `guest_details`, as on Airbnb; leave them out to keep the guest's own. Both types may carry a `message` to the guest. Vrbo has no instant-book switch on a pre-approval (`block_instant_booking` is refused) and a quote is always for the conversation's property (`listing_id` is refused). The same as `POST /v1/conversations/{id}/pre-approval` and `/special-offers` on a Vrbo conversation, which take the Repull conversation id. Send `Idempotency-Key`: a retry without it can send the guest two quotes. Returns `403 listing_inactive` when the conversation's listing is inactive.
333
+ # @param create_vrbo_offer_request [CreateVrboOfferRequest]
334
+ # @param [Hash] opts the optional parameters
335
+ # @return [Array<(CreateVrboOffer201Response, Integer, Hash)>] CreateVrboOffer201Response data, response status code and response headers
336
+ def create_vrbo_offer_with_http_info(create_vrbo_offer_request, opts = {})
337
+ if @api_client.config.debugging
338
+ @api_client.config.logger.debug 'Calling API: VRBOApi.create_vrbo_offer ...'
339
+ end
340
+ # verify the required parameter 'create_vrbo_offer_request' is set
341
+ if @api_client.config.client_side_validation && create_vrbo_offer_request.nil?
342
+ fail ArgumentError, "Missing the required parameter 'create_vrbo_offer_request' when calling VRBOApi.create_vrbo_offer"
343
+ end
344
+ # resource path
345
+ local_var_path = '/v1/channels/vrbo/offers'
346
+
347
+ # query parameters
348
+ query_params = opts[:query_params] || {}
349
+
350
+ # header parameters
351
+ header_params = opts[:header_params] || {}
352
+ # HTTP header 'Accept' (if needed)
353
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
354
+ # HTTP header 'Content-Type'
355
+ content_type = @api_client.select_header_content_type(['application/json'])
356
+ if !content_type.nil?
357
+ header_params['Content-Type'] = content_type
358
+ end
359
+
360
+ # form parameters
361
+ form_params = opts[:form_params] || {}
362
+
363
+ # http body (model)
364
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_vrbo_offer_request)
365
+
366
+ # return_type
367
+ return_type = opts[:debug_return_type] || 'CreateVrboOffer201Response'
368
+
369
+ # auth_names
370
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
371
+
372
+ new_options = opts.merge(
373
+ :operation => :"VRBOApi.create_vrbo_offer",
374
+ :header_params => header_params,
375
+ :query_params => query_params,
376
+ :form_params => form_params,
377
+ :body => post_body,
378
+ :auth_names => auth_names,
379
+ :return_type => return_type
380
+ )
381
+
382
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
383
+ if @api_client.config.debugging
384
+ @api_client.config.logger.debug "API called: VRBOApi#create_vrbo_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
385
+ end
386
+ return data, status_code, headers
387
+ end
388
+
321
389
  # Remove a Vrbo translation
322
390
  # Remove the hand-written translation for `locale`; Vrbo goes back to translating that language automatically. The listing's own description cannot be removed, only changed. The answer is every language left. **When Vrbo refuses** a value the answer is `422 vrbo_rejected` with Vrbo's own message, the refused fields in `errors` and what Vrbo has now in `data`. A malformed body is `422 invalid_params` naming the field, and nothing is sent to Vrbo. Needs a Vrbo account connected with full access: one connected with messaging access answers `403 vrbo_messaging_access`. Returns `403 listing_inactive` when the listing is inactive.
323
391
  # @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
@@ -2284,6 +2352,86 @@ module Repull
2284
2352
  return data, status_code, headers
2285
2353
  end
2286
2354
 
2355
+ # Get Vrbo listing settings
2356
+ # The counterpart of `GET /v1/channels/airbnb/listings/{id}/settings`: the languages the listing has a hand-written description in (`locales`), and with `?type=permits` its registration / licence (the `data` of `GET …/permits`). `type=all` (default) returns `{ locales }`, `type=locales` the array. Vrbo has no co-host roles, so `type=hosts` answers `422 not_available_on_vrbo`: a Vrbo listing belongs to the one Vrbo account it is in (`accountId` on `GET /v1/channels/vrbo/listings`). Answers from Repull's stored copy of the listing's Vrbo content, like the Airbnb endpoints (`dataFreshness.lastSyncedAt` says when it was read from Vrbo). The first read of a section reads Vrbo and stores it; a copy over 24 h old answers and is refreshed in the background (`reason: refreshing`); every write through Repull stores what Vrbo has after it. `?source=live` reads Vrbo now. Works with messaging or full access. Returns `404` when the listing is not linked to Vrbo, and `403 listing_inactive` when the listing is inactive.
2357
+ # @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
2358
+ # @param [Hash] opts the optional parameters
2359
+ # @option opts [String] :type Which settings to return. &#x60;all&#x60; returns &#x60;{ locales }&#x60;. (default to 'all')
2360
+ # @option opts [String] :source &#x60;stored&#x60; (default): Repull&#39;s copy, in milliseconds. &#x60;live&#x60;: read Vrbo now (seconds) and refresh the copy. (default to 'stored')
2361
+ # @option opts [String] :vrbo_listing_number The Vrbo listing number to work on, when the listing is linked to more than one Vrbo unit.
2362
+ # @return [GetVrboListingSettings200Response]
2363
+ def get_vrbo_listing_settings(id, opts = {})
2364
+ data, _status_code, _headers = get_vrbo_listing_settings_with_http_info(id, opts)
2365
+ data
2366
+ end
2367
+
2368
+ # Get Vrbo listing settings
2369
+ # The counterpart of &#x60;GET /v1/channels/airbnb/listings/{id}/settings&#x60;: the languages the listing has a hand-written description in (&#x60;locales&#x60;), and with &#x60;?type&#x3D;permits&#x60; its registration / licence (the &#x60;data&#x60; of &#x60;GET …/permits&#x60;). &#x60;type&#x3D;all&#x60; (default) returns &#x60;{ locales }&#x60;, &#x60;type&#x3D;locales&#x60; the array. Vrbo has no co-host roles, so &#x60;type&#x3D;hosts&#x60; answers &#x60;422 not_available_on_vrbo&#x60;: a Vrbo listing belongs to the one Vrbo account it is in (&#x60;accountId&#x60; on &#x60;GET /v1/channels/vrbo/listings&#x60;). Answers from Repull&#39;s stored copy of the listing&#39;s Vrbo content, like the Airbnb endpoints (&#x60;dataFreshness.lastSyncedAt&#x60; says when it was read from Vrbo). The first read of a section reads Vrbo and stores it; a copy over 24 h old answers and is refreshed in the background (&#x60;reason: refreshing&#x60;); every write through Repull stores what Vrbo has after it. &#x60;?source&#x3D;live&#x60; reads Vrbo now. Works with messaging or full access. Returns &#x60;404&#x60; when the listing is not linked to Vrbo, and &#x60;403 listing_inactive&#x60; when the listing is inactive.
2370
+ # @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
2371
+ # @param [Hash] opts the optional parameters
2372
+ # @option opts [String] :type Which settings to return. &#x60;all&#x60; returns &#x60;{ locales }&#x60;. (default to 'all')
2373
+ # @option opts [String] :source &#x60;stored&#x60; (default): Repull&#39;s copy, in milliseconds. &#x60;live&#x60;: read Vrbo now (seconds) and refresh the copy. (default to 'stored')
2374
+ # @option opts [String] :vrbo_listing_number The Vrbo listing number to work on, when the listing is linked to more than one Vrbo unit.
2375
+ # @return [Array<(GetVrboListingSettings200Response, Integer, Hash)>] GetVrboListingSettings200Response data, response status code and response headers
2376
+ def get_vrbo_listing_settings_with_http_info(id, opts = {})
2377
+ if @api_client.config.debugging
2378
+ @api_client.config.logger.debug 'Calling API: VRBOApi.get_vrbo_listing_settings ...'
2379
+ end
2380
+ # verify the required parameter 'id' is set
2381
+ if @api_client.config.client_side_validation && id.nil?
2382
+ fail ArgumentError, "Missing the required parameter 'id' when calling VRBOApi.get_vrbo_listing_settings"
2383
+ end
2384
+ allowable_values = ["all", "locales", "permits"]
2385
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
2386
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
2387
+ end
2388
+ allowable_values = ["stored", "live"]
2389
+ if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
2390
+ fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
2391
+ end
2392
+ # resource path
2393
+ local_var_path = '/v1/channels/vrbo/listings/{id}/settings'.sub('{id}', CGI.escape(id.to_s))
2394
+
2395
+ # query parameters
2396
+ query_params = opts[:query_params] || {}
2397
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
2398
+ query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?
2399
+ query_params[:'vrboListingNumber'] = opts[:'vrbo_listing_number'] if !opts[:'vrbo_listing_number'].nil?
2400
+
2401
+ # header parameters
2402
+ header_params = opts[:header_params] || {}
2403
+ # HTTP header 'Accept' (if needed)
2404
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2405
+
2406
+ # form parameters
2407
+ form_params = opts[:form_params] || {}
2408
+
2409
+ # http body (model)
2410
+ post_body = opts[:debug_body]
2411
+
2412
+ # return_type
2413
+ return_type = opts[:debug_return_type] || 'GetVrboListingSettings200Response'
2414
+
2415
+ # auth_names
2416
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2417
+
2418
+ new_options = opts.merge(
2419
+ :operation => :"VRBOApi.get_vrbo_listing_settings",
2420
+ :header_params => header_params,
2421
+ :query_params => query_params,
2422
+ :form_params => form_params,
2423
+ :body => post_body,
2424
+ :auth_names => auth_names,
2425
+ :return_type => return_type
2426
+ )
2427
+
2428
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2429
+ if @api_client.config.debugging
2430
+ @api_client.config.logger.debug "API called: VRBOApi#get_vrbo_listing_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2431
+ end
2432
+ return data, status_code, headers
2433
+ end
2434
+
2287
2435
  # Get the Vrbo host story
2288
2436
  # \"Your story\" on the listing: about you, why this property, what makes it unique. Answers from Repull's stored copy of the listing's Vrbo content, like the Airbnb endpoints (`dataFreshness.lastSyncedAt` says when it was read from Vrbo). The first read of a section reads Vrbo and stores it; a copy over 24 h old answers and is refreshed in the background (`reason: refreshing`); every write through Repull stores what Vrbo has after it. `?source=live` reads Vrbo now. **Cost:** from the copy, milliseconds. A live read is 1 Vrbo call on Vrbo, spaced ~3 s apart per account — a few seconds. Works with messaging or full access. Returns `404` when the listing is not linked to Vrbo, and `403 listing_inactive` when the listing is inactive.
2289
2437
  # @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
@@ -2503,6 +2651,70 @@ module Repull
2503
2651
  return data, status_code, headers
2504
2652
  end
2505
2653
 
2654
+ # Get the Vrbo quote
2655
+ # The conversation's live quote as Vrbo shows it — its parts and Vrbo's guest total. The counterpart of `GET /v1/channels/airbnb/offers`; Vrbo keeps one quote per conversation, so it is read by `thread_id` rather than an offer id.
2656
+ # @param thread_id [String] The Vrbo conversation (&#x60;externalThreadId&#x60; on &#x60;GET /v1/channels/vrbo/messaging&#x60;).
2657
+ # @param [Hash] opts the optional parameters
2658
+ # @return [GetVrboOffer200Response]
2659
+ def get_vrbo_offer(thread_id, opts = {})
2660
+ data, _status_code, _headers = get_vrbo_offer_with_http_info(thread_id, opts)
2661
+ data
2662
+ end
2663
+
2664
+ # Get the Vrbo quote
2665
+ # The conversation&#39;s live quote as Vrbo shows it — its parts and Vrbo&#39;s guest total. The counterpart of &#x60;GET /v1/channels/airbnb/offers&#x60;; Vrbo keeps one quote per conversation, so it is read by &#x60;thread_id&#x60; rather than an offer id.
2666
+ # @param thread_id [String] The Vrbo conversation (&#x60;externalThreadId&#x60; on &#x60;GET /v1/channels/vrbo/messaging&#x60;).
2667
+ # @param [Hash] opts the optional parameters
2668
+ # @return [Array<(GetVrboOffer200Response, Integer, Hash)>] GetVrboOffer200Response data, response status code and response headers
2669
+ def get_vrbo_offer_with_http_info(thread_id, opts = {})
2670
+ if @api_client.config.debugging
2671
+ @api_client.config.logger.debug 'Calling API: VRBOApi.get_vrbo_offer ...'
2672
+ end
2673
+ # verify the required parameter 'thread_id' is set
2674
+ if @api_client.config.client_side_validation && thread_id.nil?
2675
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling VRBOApi.get_vrbo_offer"
2676
+ end
2677
+ # resource path
2678
+ local_var_path = '/v1/channels/vrbo/offers'
2679
+
2680
+ # query parameters
2681
+ query_params = opts[:query_params] || {}
2682
+ query_params[:'thread_id'] = thread_id
2683
+
2684
+ # header parameters
2685
+ header_params = opts[:header_params] || {}
2686
+ # HTTP header 'Accept' (if needed)
2687
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2688
+
2689
+ # form parameters
2690
+ form_params = opts[:form_params] || {}
2691
+
2692
+ # http body (model)
2693
+ post_body = opts[:debug_body]
2694
+
2695
+ # return_type
2696
+ return_type = opts[:debug_return_type] || 'GetVrboOffer200Response'
2697
+
2698
+ # auth_names
2699
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2700
+
2701
+ new_options = opts.merge(
2702
+ :operation => :"VRBOApi.get_vrbo_offer",
2703
+ :header_params => header_params,
2704
+ :query_params => query_params,
2705
+ :form_params => form_params,
2706
+ :body => post_body,
2707
+ :auth_names => auth_names,
2708
+ :return_type => return_type
2709
+ )
2710
+
2711
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2712
+ if @api_client.config.debugging
2713
+ @api_client.config.logger.debug "API called: VRBOApi#get_vrbo_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2714
+ end
2715
+ return data, status_code, headers
2716
+ end
2717
+
2506
2718
  # Get a Vrbo reservation
2507
2719
  # A Vrbo booking by its confirmation code, as Vrbo shows it now — the counterpart of `GET /v1/channels/airbnb/reservations/{code}`: its state (`Booked`, a request, …), dates, party, the guest's charges (`guestLines`), your deductions and payout (`hostLines`, `payout`), the cancellation policy and the damage deposit, plus `availableActions` — what Vrbo's \"Change or cancel the booking\" menu offers right now. `?options=cancel|change|decline` returns Vrbo's choices for that action instead: the cancel reasons and message limits; the booking's current dates, times and party with Vrbo's limits (e.g. a pay-later booking's check-in is locked); or the decline reasons of a booking request. Read live from Vrbo (a few seconds).
2508
2720
  # @param code [String] The Vrbo confirmation code (&#x60;HA-…&#x60;), as in &#x60;GET /v1/channels/vrbo/reservations&#x60;.
@@ -2573,6 +2785,69 @@ module Repull
2573
2785
  return data, status_code, headers
2574
2786
  end
2575
2787
 
2788
+ # Get a Vrbo message thread
2789
+ # One Vrbo conversation by its Vrbo id — the counterpart of `GET /v1/channels/airbnb/messaging/{threadId}`. Returns `403 listing_inactive` when the conversation's listing is inactive.
2790
+ # @param thread_id [String] The Vrbo conversation id — &#x60;externalThreadId&#x60; on &#x60;GET /v1/channels/vrbo/messaging&#x60; (&#x60;vrbo:&lt;uuid&gt;&#x60;; the bare uuid works too).
2791
+ # @param [Hash] opts the optional parameters
2792
+ # @return [GetVrboThread200Response]
2793
+ def get_vrbo_thread(thread_id, opts = {})
2794
+ data, _status_code, _headers = get_vrbo_thread_with_http_info(thread_id, opts)
2795
+ data
2796
+ end
2797
+
2798
+ # Get a Vrbo message thread
2799
+ # One Vrbo conversation by its Vrbo id — the counterpart of &#x60;GET /v1/channels/airbnb/messaging/{threadId}&#x60;. Returns &#x60;403 listing_inactive&#x60; when the conversation&#39;s listing is inactive.
2800
+ # @param thread_id [String] The Vrbo conversation id — &#x60;externalThreadId&#x60; on &#x60;GET /v1/channels/vrbo/messaging&#x60; (&#x60;vrbo:&lt;uuid&gt;&#x60;; the bare uuid works too).
2801
+ # @param [Hash] opts the optional parameters
2802
+ # @return [Array<(GetVrboThread200Response, Integer, Hash)>] GetVrboThread200Response data, response status code and response headers
2803
+ def get_vrbo_thread_with_http_info(thread_id, opts = {})
2804
+ if @api_client.config.debugging
2805
+ @api_client.config.logger.debug 'Calling API: VRBOApi.get_vrbo_thread ...'
2806
+ end
2807
+ # verify the required parameter 'thread_id' is set
2808
+ if @api_client.config.client_side_validation && thread_id.nil?
2809
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling VRBOApi.get_vrbo_thread"
2810
+ end
2811
+ # resource path
2812
+ local_var_path = '/v1/channels/vrbo/messaging/{threadId}'.sub('{threadId}', CGI.escape(thread_id.to_s))
2813
+
2814
+ # query parameters
2815
+ query_params = opts[:query_params] || {}
2816
+
2817
+ # header parameters
2818
+ header_params = opts[:header_params] || {}
2819
+ # HTTP header 'Accept' (if needed)
2820
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2821
+
2822
+ # form parameters
2823
+ form_params = opts[:form_params] || {}
2824
+
2825
+ # http body (model)
2826
+ post_body = opts[:debug_body]
2827
+
2828
+ # return_type
2829
+ return_type = opts[:debug_return_type] || 'GetVrboThread200Response'
2830
+
2831
+ # auth_names
2832
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2833
+
2834
+ new_options = opts.merge(
2835
+ :operation => :"VRBOApi.get_vrbo_thread",
2836
+ :header_params => header_params,
2837
+ :query_params => query_params,
2838
+ :form_params => form_params,
2839
+ :body => post_body,
2840
+ :auth_names => auth_names,
2841
+ :return_type => return_type
2842
+ )
2843
+
2844
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2845
+ if @api_client.config.debugging
2846
+ @api_client.config.logger.debug "API called: VRBOApi#get_vrbo_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2847
+ end
2848
+ return data, status_code, headers
2849
+ end
2850
+
2576
2851
  # List VRBO listings
2577
2852
  # List the Vrbo units linked to this workspace's listings, from the host's connected Vrbo account (host sign-in, beta). Inactive listings are left out unless `?status=inactive|all` asks for them; they then come back with identity fields only (ids, `listingName`, `listingCity`, `status`, `inactiveReason`). They keep syncing and are complete again once activated.
2578
2853
  # @param [Hash] opts the optional parameters
@@ -2722,6 +2997,225 @@ module Repull
2722
2997
  return data, status_code, headers
2723
2998
  end
2724
2999
 
3000
+ # List Vrbo reviews
3001
+ # The workspace's Vrbo reviews — the counterpart of `GET /v1/channels/airbnb/reviews`. The same list, filters, paging and review shape as `GET /v1/reviews?platform=vrbo`, with the channel fixed: `reviewerRole=guest` (default) is what guests wrote, `reviewerRole=host` your ratings of guests. Reply to a review with `POST /v1/reviews/{id}/reply`; rate a guest with `PUT /v1/channels/vrbo/reviews/{id}`. Reviews of inactive listings are left out; `listingId` naming an inactive listing returns `403 listing_inactive`. `platform` other than `vrbo` is refused.
3002
+ # @param [Hash] opts the optional parameters
3003
+ # @option opts [String] :cursor &#x60;pagination.nextCursor&#x60; from the previous page.
3004
+ # @option opts [Integer] :limit (default to 20)
3005
+ # @option opts [String] :listing_id Repull listing id.
3006
+ # @option opts [String] :status
3007
+ # @option opts [String] :reviewer_role (default to 'guest')
3008
+ # @return [ReviewListResponse]
3009
+ def list_vrbo_reviews(opts = {})
3010
+ data, _status_code, _headers = list_vrbo_reviews_with_http_info(opts)
3011
+ data
3012
+ end
3013
+
3014
+ # List Vrbo reviews
3015
+ # The workspace&#39;s Vrbo reviews — the counterpart of &#x60;GET /v1/channels/airbnb/reviews&#x60;. The same list, filters, paging and review shape as &#x60;GET /v1/reviews?platform&#x3D;vrbo&#x60;, with the channel fixed: &#x60;reviewerRole&#x3D;guest&#x60; (default) is what guests wrote, &#x60;reviewerRole&#x3D;host&#x60; your ratings of guests. Reply to a review with &#x60;POST /v1/reviews/{id}/reply&#x60;; rate a guest with &#x60;PUT /v1/channels/vrbo/reviews/{id}&#x60;. Reviews of inactive listings are left out; &#x60;listingId&#x60; naming an inactive listing returns &#x60;403 listing_inactive&#x60;. &#x60;platform&#x60; other than &#x60;vrbo&#x60; is refused.
3016
+ # @param [Hash] opts the optional parameters
3017
+ # @option opts [String] :cursor &#x60;pagination.nextCursor&#x60; from the previous page.
3018
+ # @option opts [Integer] :limit (default to 20)
3019
+ # @option opts [String] :listing_id Repull listing id.
3020
+ # @option opts [String] :status
3021
+ # @option opts [String] :reviewer_role (default to 'guest')
3022
+ # @return [Array<(ReviewListResponse, Integer, Hash)>] ReviewListResponse data, response status code and response headers
3023
+ def list_vrbo_reviews_with_http_info(opts = {})
3024
+ if @api_client.config.debugging
3025
+ @api_client.config.logger.debug 'Calling API: VRBOApi.list_vrbo_reviews ...'
3026
+ end
3027
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
3028
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VRBOApi.list_vrbo_reviews, must be smaller than or equal to 100.'
3029
+ end
3030
+
3031
+ allowable_values = ["responded", "unanswered", "all"]
3032
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
3033
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
3034
+ end
3035
+ allowable_values = ["guest", "host", "all"]
3036
+ if @api_client.config.client_side_validation && opts[:'reviewer_role'] && !allowable_values.include?(opts[:'reviewer_role'])
3037
+ fail ArgumentError, "invalid value for \"reviewer_role\", must be one of #{allowable_values}"
3038
+ end
3039
+ # resource path
3040
+ local_var_path = '/v1/channels/vrbo/reviews'
3041
+
3042
+ # query parameters
3043
+ query_params = opts[:query_params] || {}
3044
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
3045
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
3046
+ query_params[:'listingId'] = opts[:'listing_id'] if !opts[:'listing_id'].nil?
3047
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
3048
+ query_params[:'reviewerRole'] = opts[:'reviewer_role'] if !opts[:'reviewer_role'].nil?
3049
+
3050
+ # header parameters
3051
+ header_params = opts[:header_params] || {}
3052
+ # HTTP header 'Accept' (if needed)
3053
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3054
+
3055
+ # form parameters
3056
+ form_params = opts[:form_params] || {}
3057
+
3058
+ # http body (model)
3059
+ post_body = opts[:debug_body]
3060
+
3061
+ # return_type
3062
+ return_type = opts[:debug_return_type] || 'ReviewListResponse'
3063
+
3064
+ # auth_names
3065
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3066
+
3067
+ new_options = opts.merge(
3068
+ :operation => :"VRBOApi.list_vrbo_reviews",
3069
+ :header_params => header_params,
3070
+ :query_params => query_params,
3071
+ :form_params => form_params,
3072
+ :body => post_body,
3073
+ :auth_names => auth_names,
3074
+ :return_type => return_type
3075
+ )
3076
+
3077
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3078
+ if @api_client.config.debugging
3079
+ @api_client.config.logger.debug "API called: VRBOApi#list_vrbo_reviews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3080
+ end
3081
+ return data, status_code, headers
3082
+ end
3083
+
3084
+ # Get Vrbo messages
3085
+ # The messages of a Vrbo conversation, as recorded rows — the counterpart of `GET /v1/channels/airbnb/messaging/{threadId}/messages`, same shape. 50 per page, newest first; walk older pages with `?cursor=` until `pagination.hasMore` is `false`. `?all=true` returns up to 1000 oldest first, without `pagination`. Returns `403 listing_inactive` when the conversation's listing is inactive.
3086
+ # @param thread_id [String] The Vrbo conversation id — &#x60;externalThreadId&#x60; on &#x60;GET /v1/channels/vrbo/messaging&#x60; (&#x60;vrbo:&lt;uuid&gt;&#x60;; the bare uuid works too).
3087
+ # @param [Hash] opts the optional parameters
3088
+ # @option opts [String] :cursor &#x60;pagination.nextCursor&#x60; from the previous page.
3089
+ # @option opts [Boolean] :all &#x60;true&#x60; returns up to 1000 messages oldest first in one response.
3090
+ # @return [ListVrboThreadMessages200Response]
3091
+ def list_vrbo_thread_messages(thread_id, opts = {})
3092
+ data, _status_code, _headers = list_vrbo_thread_messages_with_http_info(thread_id, opts)
3093
+ data
3094
+ end
3095
+
3096
+ # Get Vrbo messages
3097
+ # The messages of a Vrbo conversation, as recorded rows — the counterpart of &#x60;GET /v1/channels/airbnb/messaging/{threadId}/messages&#x60;, same shape. 50 per page, newest first; walk older pages with &#x60;?cursor&#x3D;&#x60; until &#x60;pagination.hasMore&#x60; is &#x60;false&#x60;. &#x60;?all&#x3D;true&#x60; returns up to 1000 oldest first, without &#x60;pagination&#x60;. Returns &#x60;403 listing_inactive&#x60; when the conversation&#39;s listing is inactive.
3098
+ # @param thread_id [String] The Vrbo conversation id — &#x60;externalThreadId&#x60; on &#x60;GET /v1/channels/vrbo/messaging&#x60; (&#x60;vrbo:&lt;uuid&gt;&#x60;; the bare uuid works too).
3099
+ # @param [Hash] opts the optional parameters
3100
+ # @option opts [String] :cursor &#x60;pagination.nextCursor&#x60; from the previous page.
3101
+ # @option opts [Boolean] :all &#x60;true&#x60; returns up to 1000 messages oldest first in one response.
3102
+ # @return [Array<(ListVrboThreadMessages200Response, Integer, Hash)>] ListVrboThreadMessages200Response data, response status code and response headers
3103
+ def list_vrbo_thread_messages_with_http_info(thread_id, opts = {})
3104
+ if @api_client.config.debugging
3105
+ @api_client.config.logger.debug 'Calling API: VRBOApi.list_vrbo_thread_messages ...'
3106
+ end
3107
+ # verify the required parameter 'thread_id' is set
3108
+ if @api_client.config.client_side_validation && thread_id.nil?
3109
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling VRBOApi.list_vrbo_thread_messages"
3110
+ end
3111
+ # resource path
3112
+ local_var_path = '/v1/channels/vrbo/messaging/{threadId}/messages'.sub('{threadId}', CGI.escape(thread_id.to_s))
3113
+
3114
+ # query parameters
3115
+ query_params = opts[:query_params] || {}
3116
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
3117
+ query_params[:'all'] = opts[:'all'] if !opts[:'all'].nil?
3118
+
3119
+ # header parameters
3120
+ header_params = opts[:header_params] || {}
3121
+ # HTTP header 'Accept' (if needed)
3122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3123
+
3124
+ # form parameters
3125
+ form_params = opts[:form_params] || {}
3126
+
3127
+ # http body (model)
3128
+ post_body = opts[:debug_body]
3129
+
3130
+ # return_type
3131
+ return_type = opts[:debug_return_type] || 'ListVrboThreadMessages200Response'
3132
+
3133
+ # auth_names
3134
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3135
+
3136
+ new_options = opts.merge(
3137
+ :operation => :"VRBOApi.list_vrbo_thread_messages",
3138
+ :header_params => header_params,
3139
+ :query_params => query_params,
3140
+ :form_params => form_params,
3141
+ :body => post_body,
3142
+ :auth_names => auth_names,
3143
+ :return_type => return_type
3144
+ )
3145
+
3146
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3147
+ if @api_client.config.debugging
3148
+ @api_client.config.logger.debug "API called: VRBOApi#list_vrbo_thread_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3149
+ end
3150
+ return data, status_code, headers
3151
+ end
3152
+
3153
+ # List Vrbo message threads
3154
+ # The workspace's Vrbo conversations, newest activity first (up to 200) — the counterpart of `GET /v1/channels/airbnb/messaging`, read from Repull's copy of the Vrbo inbox. Each thread carries the Vrbo account it belongs to (`accountId`, `accountName`). `externalThreadId` (`vrbo:<uuid>`) addresses the thread on these routes; `id` is the Repull conversation id of `/v1/conversations/{id}`. Only conversations Vrbo itself holds are listed: a Vrbo booking that reached Repull another way (a PMS, iCal) has no Vrbo conversation to message. Threads on inactive listings are left out. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`.
3155
+ # @param [Hash] opts the optional parameters
3156
+ # @option opts [String] :account_id One connected Vrbo account (&#x60;vrbo:…&#x60;). Omitted: every account. Unknown: &#x60;404&#x60; with your accounts in &#x60;valid_values&#x60;.
3157
+ # @option opts [String] :listing_id Repull listing id.
3158
+ # @option opts [String] :reservation_id Repull reservation id.
3159
+ # @return [ListVrboThreads200Response]
3160
+ def list_vrbo_threads(opts = {})
3161
+ data, _status_code, _headers = list_vrbo_threads_with_http_info(opts)
3162
+ data
3163
+ end
3164
+
3165
+ # List Vrbo message threads
3166
+ # The workspace&#39;s Vrbo conversations, newest activity first (up to 200) — the counterpart of &#x60;GET /v1/channels/airbnb/messaging&#x60;, read from Repull&#39;s copy of the Vrbo inbox. Each thread carries the Vrbo account it belongs to (&#x60;accountId&#x60;, &#x60;accountName&#x60;). &#x60;externalThreadId&#x60; (&#x60;vrbo:&lt;uuid&gt;&#x60;) addresses the thread on these routes; &#x60;id&#x60; is the Repull conversation id of &#x60;/v1/conversations/{id}&#x60;. Only conversations Vrbo itself holds are listed: a Vrbo booking that reached Repull another way (a PMS, iCal) has no Vrbo conversation to message. Threads on inactive listings are left out. Filtering by an inactive listing (&#x60;listing_id&#x60;) returns &#x60;403 listing_inactive&#x60;.
3167
+ # @param [Hash] opts the optional parameters
3168
+ # @option opts [String] :account_id One connected Vrbo account (&#x60;vrbo:…&#x60;). Omitted: every account. Unknown: &#x60;404&#x60; with your accounts in &#x60;valid_values&#x60;.
3169
+ # @option opts [String] :listing_id Repull listing id.
3170
+ # @option opts [String] :reservation_id Repull reservation id.
3171
+ # @return [Array<(ListVrboThreads200Response, Integer, Hash)>] ListVrboThreads200Response data, response status code and response headers
3172
+ def list_vrbo_threads_with_http_info(opts = {})
3173
+ if @api_client.config.debugging
3174
+ @api_client.config.logger.debug 'Calling API: VRBOApi.list_vrbo_threads ...'
3175
+ end
3176
+ # resource path
3177
+ local_var_path = '/v1/channels/vrbo/messaging'
3178
+
3179
+ # query parameters
3180
+ query_params = opts[:query_params] || {}
3181
+ query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
3182
+ query_params[:'listing_id'] = opts[:'listing_id'] if !opts[:'listing_id'].nil?
3183
+ query_params[:'reservation_id'] = opts[:'reservation_id'] if !opts[:'reservation_id'].nil?
3184
+
3185
+ # header parameters
3186
+ header_params = opts[:header_params] || {}
3187
+ # HTTP header 'Accept' (if needed)
3188
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3189
+
3190
+ # form parameters
3191
+ form_params = opts[:form_params] || {}
3192
+
3193
+ # http body (model)
3194
+ post_body = opts[:debug_body]
3195
+
3196
+ # return_type
3197
+ return_type = opts[:debug_return_type] || 'ListVrboThreads200Response'
3198
+
3199
+ # auth_names
3200
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3201
+
3202
+ new_options = opts.merge(
3203
+ :operation => :"VRBOApi.list_vrbo_threads",
3204
+ :header_params => header_params,
3205
+ :query_params => query_params,
3206
+ :form_params => form_params,
3207
+ :body => post_body,
3208
+ :auth_names => auth_names,
3209
+ :return_type => return_type
3210
+ )
3211
+
3212
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3213
+ if @api_client.config.debugging
3214
+ @api_client.config.logger.debug "API called: VRBOApi#list_vrbo_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3215
+ end
3216
+ return data, status_code, headers
3217
+ end
3218
+
2725
3219
  # List Vrbo transactions (payout ledger)
2726
3220
  # The Vrbo payout ledger for this workspace — the counterpart of `GET /v1/channels/airbnb/transactions`: every bank deposit Vrbo made to the host, each followed by the bookings it paid. A deposit's lines' signed `amount`s sum to its `payout.paidOutAmount` exactly; a negative line (`type: Adjustment`) is money taken back from that deposit. `status: UPCOMING` lines are payouts Vrbo has scheduled and not made yet, with Vrbo's `upcomingStatus` (`Scheduled`, `Blocked`). **Ids are stable**, so you can upsert on `transactionId`: a Payout row's id is Vrbo's deposit reference number; a line's is `<reference>:<confirmationCode>:<n>`. **Order:** newest deposit first, each followed by its lines in Vrbo's order (`payout.lineIndex`). `start_date` / `end_date` match the deposit's date (a scheduled line's estimated payout date). **From Repull's copy.** The ledger is read from the Vrbo account (the last 12 months of deposits, and the payouts scheduled for the next 6) and kept: a read answers from it at once. A copy over a day old — or never filled — answers and is refreshed in the background (`dataFreshness.reason`: `refreshing` / `never_synced`); `POST` refreshes it now. Lines on listings that are inactive in Repull are included and flagged `onInactiveListing: true`, so every deposit reconciles. **Not in Vrbo's payout reports** (`unavailableFields`): the fee split per booking, taxes, and the stay's nights and dates — see the reservation for those.
2727
3221
  # @param [Hash] opts the optional parameters
@@ -2959,6 +3453,80 @@ module Repull
2959
3453
  return data, status_code, headers
2960
3454
  end
2961
3455
 
3456
+ # Send a Vrbo message
3457
+ # Send a message in a Vrbo conversation through the host's connected Vrbo account — the counterpart of `POST /v1/channels/airbnb/messaging/{threadId}/messages`, with the same body. It is sent the way the dashboard sends it and recorded in the conversation, so it also appears on `GET /v1/conversations/{id}/messages`. `201` with `status: \"sent\"` when Vrbo took it; `202` with `status: \"queued\"` when Vrbo was slow and the send finishes in the background — do not send it again, watch `conversation.message.status_changed`. Vrbo messages are text: a `mediaUrl` is refused with `422 attachments_not_supported`. Send `Idempotency-Key` to make a retry safe. Vrbo has no edit, unsend or reaction on a sent message (Airbnb's `PATCH …/messages/{messageId}`). Returns `403 listing_inactive` when the conversation's listing is inactive.
3458
+ # @param thread_id [String] The Vrbo conversation id — &#x60;externalThreadId&#x60; on &#x60;GET /v1/channels/vrbo/messaging&#x60; (&#x60;vrbo:&lt;uuid&gt;&#x60;; the bare uuid works too).
3459
+ # @param send_vrbo_message_request [SendVrboMessageRequest]
3460
+ # @param [Hash] opts the optional parameters
3461
+ # @return [SendMessageResponse]
3462
+ def send_vrbo_message(thread_id, send_vrbo_message_request, opts = {})
3463
+ data, _status_code, _headers = send_vrbo_message_with_http_info(thread_id, send_vrbo_message_request, opts)
3464
+ data
3465
+ end
3466
+
3467
+ # Send a Vrbo message
3468
+ # Send a message in a Vrbo conversation through the host&#39;s connected Vrbo account — the counterpart of &#x60;POST /v1/channels/airbnb/messaging/{threadId}/messages&#x60;, with the same body. It is sent the way the dashboard sends it and recorded in the conversation, so it also appears on &#x60;GET /v1/conversations/{id}/messages&#x60;. &#x60;201&#x60; with &#x60;status: \&quot;sent\&quot;&#x60; when Vrbo took it; &#x60;202&#x60; with &#x60;status: \&quot;queued\&quot;&#x60; when Vrbo was slow and the send finishes in the background — do not send it again, watch &#x60;conversation.message.status_changed&#x60;. Vrbo messages are text: a &#x60;mediaUrl&#x60; is refused with &#x60;422 attachments_not_supported&#x60;. Send &#x60;Idempotency-Key&#x60; to make a retry safe. Vrbo has no edit, unsend or reaction on a sent message (Airbnb&#39;s &#x60;PATCH …/messages/{messageId}&#x60;). Returns &#x60;403 listing_inactive&#x60; when the conversation&#39;s listing is inactive.
3469
+ # @param thread_id [String] The Vrbo conversation id — &#x60;externalThreadId&#x60; on &#x60;GET /v1/channels/vrbo/messaging&#x60; (&#x60;vrbo:&lt;uuid&gt;&#x60;; the bare uuid works too).
3470
+ # @param send_vrbo_message_request [SendVrboMessageRequest]
3471
+ # @param [Hash] opts the optional parameters
3472
+ # @return [Array<(SendMessageResponse, Integer, Hash)>] SendMessageResponse data, response status code and response headers
3473
+ def send_vrbo_message_with_http_info(thread_id, send_vrbo_message_request, opts = {})
3474
+ if @api_client.config.debugging
3475
+ @api_client.config.logger.debug 'Calling API: VRBOApi.send_vrbo_message ...'
3476
+ end
3477
+ # verify the required parameter 'thread_id' is set
3478
+ if @api_client.config.client_side_validation && thread_id.nil?
3479
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling VRBOApi.send_vrbo_message"
3480
+ end
3481
+ # verify the required parameter 'send_vrbo_message_request' is set
3482
+ if @api_client.config.client_side_validation && send_vrbo_message_request.nil?
3483
+ fail ArgumentError, "Missing the required parameter 'send_vrbo_message_request' when calling VRBOApi.send_vrbo_message"
3484
+ end
3485
+ # resource path
3486
+ local_var_path = '/v1/channels/vrbo/messaging/{threadId}/messages'.sub('{threadId}', CGI.escape(thread_id.to_s))
3487
+
3488
+ # query parameters
3489
+ query_params = opts[:query_params] || {}
3490
+
3491
+ # header parameters
3492
+ header_params = opts[:header_params] || {}
3493
+ # HTTP header 'Accept' (if needed)
3494
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3495
+ # HTTP header 'Content-Type'
3496
+ content_type = @api_client.select_header_content_type(['application/json'])
3497
+ if !content_type.nil?
3498
+ header_params['Content-Type'] = content_type
3499
+ end
3500
+
3501
+ # form parameters
3502
+ form_params = opts[:form_params] || {}
3503
+
3504
+ # http body (model)
3505
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(send_vrbo_message_request)
3506
+
3507
+ # return_type
3508
+ return_type = opts[:debug_return_type] || 'SendMessageResponse'
3509
+
3510
+ # auth_names
3511
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3512
+
3513
+ new_options = opts.merge(
3514
+ :operation => :"VRBOApi.send_vrbo_message",
3515
+ :header_params => header_params,
3516
+ :query_params => query_params,
3517
+ :form_params => form_params,
3518
+ :body => post_body,
3519
+ :auth_names => auth_names,
3520
+ :return_type => return_type
3521
+ )
3522
+
3523
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3524
+ if @api_client.config.debugging
3525
+ @api_client.config.logger.debug "API called: VRBOApi#send_vrbo_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3526
+ end
3527
+ return data, status_code, headers
3528
+ end
3529
+
2962
3530
  # Set the Vrbo cover photo
2963
3531
  # Make one photo the first, the one guests see in search. Photo ids are the `id`s of GET …/photos. **When Vrbo refuses** a value the answer is `422 vrbo_rejected` with Vrbo's own message, the refused fields in `errors` and what Vrbo has now in `data`. A malformed body is `422 invalid_params` naming the field, and nothing is sent to Vrbo. Needs a Vrbo account connected with full access: one connected with messaging access answers `403 vrbo_messaging_access`. Returns `403 listing_inactive` when the listing is inactive.
2964
3532
  # @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
@@ -3036,6 +3604,80 @@ module Repull
3036
3604
  return data, status_code, headers
3037
3605
  end
3038
3606
 
3607
+ # Rate a Vrbo guest
3608
+ # Rate the guest of a Vrbo stay — Vrbo's \"Rate guest\", the counterpart of `PUT /v1/channels/airbnb/reviews/{id}`, and the same as `POST /v1/reviews/{id}/guest-review` on a Vrbo review. `rating` (overall, 1–5), `categoryRatings` (`cleanliness`, `communication`, `respect_house_rules`) and `isRevieweeRecommended` (would host again). Vrbo's rating has no text: `publicReview` / `privateFeedback` are refused when not empty. Publishing is final. `{id}` is the review `id` from `GET /v1/channels/vrbo/reviews?reviewerRole=host`; a review from another channel is `404`.
3609
+ # @param id [String] The review &#x60;id&#x60;.
3610
+ # @param submit_vrbo_guest_review_request [SubmitVrboGuestReviewRequest]
3611
+ # @param [Hash] opts the optional parameters
3612
+ # @return [SubmitVrboGuestReview200Response]
3613
+ def submit_vrbo_guest_review(id, submit_vrbo_guest_review_request, opts = {})
3614
+ data, _status_code, _headers = submit_vrbo_guest_review_with_http_info(id, submit_vrbo_guest_review_request, opts)
3615
+ data
3616
+ end
3617
+
3618
+ # Rate a Vrbo guest
3619
+ # Rate the guest of a Vrbo stay — Vrbo&#39;s \&quot;Rate guest\&quot;, the counterpart of &#x60;PUT /v1/channels/airbnb/reviews/{id}&#x60;, and the same as &#x60;POST /v1/reviews/{id}/guest-review&#x60; on a Vrbo review. &#x60;rating&#x60; (overall, 1–5), &#x60;categoryRatings&#x60; (&#x60;cleanliness&#x60;, &#x60;communication&#x60;, &#x60;respect_house_rules&#x60;) and &#x60;isRevieweeRecommended&#x60; (would host again). Vrbo&#39;s rating has no text: &#x60;publicReview&#x60; / &#x60;privateFeedback&#x60; are refused when not empty. Publishing is final. &#x60;{id}&#x60; is the review &#x60;id&#x60; from &#x60;GET /v1/channels/vrbo/reviews?reviewerRole&#x3D;host&#x60;; a review from another channel is &#x60;404&#x60;.
3620
+ # @param id [String] The review &#x60;id&#x60;.
3621
+ # @param submit_vrbo_guest_review_request [SubmitVrboGuestReviewRequest]
3622
+ # @param [Hash] opts the optional parameters
3623
+ # @return [Array<(SubmitVrboGuestReview200Response, Integer, Hash)>] SubmitVrboGuestReview200Response data, response status code and response headers
3624
+ def submit_vrbo_guest_review_with_http_info(id, submit_vrbo_guest_review_request, opts = {})
3625
+ if @api_client.config.debugging
3626
+ @api_client.config.logger.debug 'Calling API: VRBOApi.submit_vrbo_guest_review ...'
3627
+ end
3628
+ # verify the required parameter 'id' is set
3629
+ if @api_client.config.client_side_validation && id.nil?
3630
+ fail ArgumentError, "Missing the required parameter 'id' when calling VRBOApi.submit_vrbo_guest_review"
3631
+ end
3632
+ # verify the required parameter 'submit_vrbo_guest_review_request' is set
3633
+ if @api_client.config.client_side_validation && submit_vrbo_guest_review_request.nil?
3634
+ fail ArgumentError, "Missing the required parameter 'submit_vrbo_guest_review_request' when calling VRBOApi.submit_vrbo_guest_review"
3635
+ end
3636
+ # resource path
3637
+ local_var_path = '/v1/channels/vrbo/reviews/{id}'.sub('{id}', CGI.escape(id.to_s))
3638
+
3639
+ # query parameters
3640
+ query_params = opts[:query_params] || {}
3641
+
3642
+ # header parameters
3643
+ header_params = opts[:header_params] || {}
3644
+ # HTTP header 'Accept' (if needed)
3645
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3646
+ # HTTP header 'Content-Type'
3647
+ content_type = @api_client.select_header_content_type(['application/json'])
3648
+ if !content_type.nil?
3649
+ header_params['Content-Type'] = content_type
3650
+ end
3651
+
3652
+ # form parameters
3653
+ form_params = opts[:form_params] || {}
3654
+
3655
+ # http body (model)
3656
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(submit_vrbo_guest_review_request)
3657
+
3658
+ # return_type
3659
+ return_type = opts[:debug_return_type] || 'SubmitVrboGuestReview200Response'
3660
+
3661
+ # auth_names
3662
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3663
+
3664
+ new_options = opts.merge(
3665
+ :operation => :"VRBOApi.submit_vrbo_guest_review",
3666
+ :header_params => header_params,
3667
+ :query_params => query_params,
3668
+ :form_params => form_params,
3669
+ :body => post_body,
3670
+ :auth_names => auth_names,
3671
+ :return_type => return_type
3672
+ )
3673
+
3674
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3675
+ if @api_client.config.debugging
3676
+ @api_client.config.logger.debug "API called: VRBOApi#submit_vrbo_guest_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3677
+ end
3678
+ return data, status_code, headers
3679
+ end
3680
+
3039
3681
  # Refresh the Vrbo payout ledger
3040
3682
  # Read the ledger from Vrbo now — every connected Vrbo account, or the one in `?account_id=` — and keep it; then read it with GET. Body (optional): `start_date` / `end_date` (YYYY-MM-DD) for the deposits to read; without them, the last 12 months. The payouts Vrbo has scheduled are always read again. One account failing never stops the others: it carries `error` in `accounts[]`. About 15 seconds per account.
3041
3683
  # @param [Hash] opts the optional parameters
@@ -4874,5 +5516,69 @@ module Repull
4874
5516
  end
4875
5517
  return data, status_code, headers
4876
5518
  end
5519
+
5520
+ # Withdraw the Vrbo pre-approval or quote
5521
+ # Withdraw the conversation's pre-approval or quote: the guest can no longer book on it. The counterpart of `DELETE /v1/channels/airbnb/offers`, by `thread_id`.
5522
+ # @param thread_id [String] The Vrbo conversation (&#x60;externalThreadId&#x60; on &#x60;GET /v1/channels/vrbo/messaging&#x60;).
5523
+ # @param [Hash] opts the optional parameters
5524
+ # @return [WithdrawVrboOffer200Response]
5525
+ def withdraw_vrbo_offer(thread_id, opts = {})
5526
+ data, _status_code, _headers = withdraw_vrbo_offer_with_http_info(thread_id, opts)
5527
+ data
5528
+ end
5529
+
5530
+ # Withdraw the Vrbo pre-approval or quote
5531
+ # Withdraw the conversation&#39;s pre-approval or quote: the guest can no longer book on it. The counterpart of &#x60;DELETE /v1/channels/airbnb/offers&#x60;, by &#x60;thread_id&#x60;.
5532
+ # @param thread_id [String] The Vrbo conversation (&#x60;externalThreadId&#x60; on &#x60;GET /v1/channels/vrbo/messaging&#x60;).
5533
+ # @param [Hash] opts the optional parameters
5534
+ # @return [Array<(WithdrawVrboOffer200Response, Integer, Hash)>] WithdrawVrboOffer200Response data, response status code and response headers
5535
+ def withdraw_vrbo_offer_with_http_info(thread_id, opts = {})
5536
+ if @api_client.config.debugging
5537
+ @api_client.config.logger.debug 'Calling API: VRBOApi.withdraw_vrbo_offer ...'
5538
+ end
5539
+ # verify the required parameter 'thread_id' is set
5540
+ if @api_client.config.client_side_validation && thread_id.nil?
5541
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling VRBOApi.withdraw_vrbo_offer"
5542
+ end
5543
+ # resource path
5544
+ local_var_path = '/v1/channels/vrbo/offers'
5545
+
5546
+ # query parameters
5547
+ query_params = opts[:query_params] || {}
5548
+ query_params[:'thread_id'] = thread_id
5549
+
5550
+ # header parameters
5551
+ header_params = opts[:header_params] || {}
5552
+ # HTTP header 'Accept' (if needed)
5553
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
5554
+
5555
+ # form parameters
5556
+ form_params = opts[:form_params] || {}
5557
+
5558
+ # http body (model)
5559
+ post_body = opts[:debug_body]
5560
+
5561
+ # return_type
5562
+ return_type = opts[:debug_return_type] || 'WithdrawVrboOffer200Response'
5563
+
5564
+ # auth_names
5565
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
5566
+
5567
+ new_options = opts.merge(
5568
+ :operation => :"VRBOApi.withdraw_vrbo_offer",
5569
+ :header_params => header_params,
5570
+ :query_params => query_params,
5571
+ :form_params => form_params,
5572
+ :body => post_body,
5573
+ :auth_names => auth_names,
5574
+ :return_type => return_type
5575
+ )
5576
+
5577
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
5578
+ if @api_client.config.debugging
5579
+ @api_client.config.logger.debug "API called: VRBOApi#withdraw_vrbo_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5580
+ end
5581
+ return data, status_code, headers
5582
+ end
4877
5583
  end
4878
5584
  end