repull 0.2.55 → 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.
- checksums.yaml +4 -4
- data/lib/repull/api/airbnb_api.rb +539 -2
- data/lib/repull/api/connect_api.rb +2 -2
- data/lib/repull/api/listings_api.rb +70 -0
- data/lib/repull/api/reservations_api.rb +4 -4
- data/lib/repull/api/reviews_api.rb +6 -6
- data/lib/repull/api/vrbo_api.rb +1174 -97
- data/lib/repull/models/create_vrbo_alteration200_response.rb +157 -0
- data/lib/repull/models/create_vrbo_alteration200_response_data.rb +202 -0
- data/lib/repull/models/create_vrbo_alteration200_response_data_before.rb +201 -0
- data/lib/repull/models/create_vrbo_alteration200_response_data_due_date.rb +168 -0
- data/lib/repull/models/create_vrbo_alteration200_response_data_payment.rb +168 -0
- data/lib/repull/models/create_vrbo_alteration200_response_data_payment_lines_inner.rb +157 -0
- data/lib/repull/models/create_vrbo_alteration200_response_data_payment_total.rb +159 -0
- data/lib/repull/models/create_vrbo_alteration201_response.rb +157 -0
- data/lib/repull/models/create_vrbo_alteration201_response_data.rb +193 -0
- data/lib/repull/models/create_vrbo_alteration_request.rb +305 -0
- data/lib/repull/models/create_vrbo_offer201_response.rb +104 -0
- data/lib/repull/models/create_vrbo_offer201_response_one_of.rb +175 -0
- data/lib/repull/models/create_vrbo_offer_request.rb +320 -0
- data/lib/repull/models/create_vrbo_offer_request_fees_inner.rb +199 -0
- data/lib/repull/models/create_vrbo_offer_request_guest_details.rb +278 -0
- data/lib/repull/models/get_airbnb_house_rules200_response.rb +190 -0
- data/lib/repull/models/get_airbnb_house_rules200_response_data.rb +247 -0
- data/lib/repull/models/get_airbnb_house_rules200_response_data_children.rb +148 -0
- data/lib/repull/models/get_airbnb_house_rules200_response_data_house_rules_inner.rb +168 -0
- data/lib/repull/models/get_airbnb_listing_cancellation200_response.rb +190 -0
- data/lib/repull/models/get_airbnb_listing_cancellation200_response_data.rb +203 -0
- data/lib/repull/models/get_airbnb_listing_cancellation200_response_data_non_refundable.rb +192 -0
- data/lib/repull/models/get_airbnb_listing_fees200_response.rb +192 -0
- data/lib/repull/models/get_airbnb_listing_fees200_response_data_inner.rb +251 -0
- data/lib/repull/models/get_airbnb_listing_taxes200_response.rb +192 -0
- data/lib/repull/models/get_airbnb_listing_taxes200_response_data_inner.rb +181 -0
- data/lib/repull/models/get_airbnb_location200_response.rb +190 -0
- data/lib/repull/models/get_airbnb_location200_response_data.rb +197 -0
- data/lib/repull/models/get_airbnb_location200_response_data_address.rb +198 -0
- data/lib/repull/models/get_vrbo_listing200_response_data_inner.rb +1 -1
- data/lib/repull/models/get_vrbo_listing_settings200_response.rb +217 -0
- data/lib/repull/models/get_vrbo_listing_settings200_response_data.rb +106 -0
- data/lib/repull/models/get_vrbo_listing_settings200_response_data_one_of.rb +149 -0
- data/lib/repull/models/get_vrbo_offer200_response.rb +290 -0
- data/lib/repull/models/get_vrbo_offer200_response_fees_inner.rb +166 -0
- data/lib/repull/models/get_vrbo_reservation200_response.rb +175 -0
- data/lib/repull/models/get_vrbo_reservation200_response_data.rb +310 -0
- data/lib/repull/models/get_vrbo_reservation200_response_data_available_actions_inner.rb +156 -0
- data/lib/repull/models/get_vrbo_reservation200_response_data_freshness.rb +219 -0
- data/lib/repull/models/get_vrbo_reservation200_response_data_freshness_accounts_inner.rb +174 -0
- data/lib/repull/models/get_vrbo_thread200_response.rb +159 -0
- data/lib/repull/models/list_vrbo_thread_messages200_response.rb +170 -0
- data/lib/repull/models/list_vrbo_thread_messages200_response_data_inner.rb +240 -0
- data/lib/repull/models/list_vrbo_threads200_response.rb +172 -0
- data/lib/repull/models/list_vrbo_threads200_response_data_inner.rb +219 -0
- data/lib/repull/models/list_vrbo_transactions200_response.rb +167 -0
- data/lib/repull/models/list_vrbo_transactions200_response_data_freshness.rb +220 -0
- data/lib/repull/models/list_vrbo_transactions200_response_data_inner.rb +362 -0
- data/lib/repull/models/list_vrbo_transactions200_response_data_inner_payout.rb +189 -0
- data/lib/repull/models/map_vrbo_listing_request.rb +1 -1
- data/lib/repull/models/pull_listing_from_vrbo200_response.rb +273 -0
- data/lib/repull/models/pull_listing_from_vrbo_request.rb +149 -0
- data/lib/repull/models/send_vrbo_message_request.rb +186 -0
- data/lib/repull/models/submit_guest_review200_response.rb +26 -4
- data/lib/repull/models/submit_vrbo_guest_review200_response.rb +176 -0
- data/lib/repull/models/submit_vrbo_guest_review_request.rb +195 -0
- data/lib/repull/models/submit_vrbo_guest_review_request_category_ratings_inner.rb +218 -0
- data/lib/repull/models/sync_vrbo_transactions200_response.rb +167 -0
- data/lib/repull/models/sync_vrbo_transactions200_response_accounts_inner.rb +183 -0
- data/lib/repull/models/sync_vrbo_transactions200_response_accounts_inner_error.rb +156 -0
- data/lib/repull/models/sync_vrbo_transactions_request.rb +156 -0
- data/lib/repull/models/update_airbnb_house_rules200_response.rb +187 -0
- data/lib/repull/models/update_airbnb_house_rules_request.rb +191 -0
- data/lib/repull/models/update_airbnb_listing_cancellation200_response.rb +147 -0
- data/lib/repull/models/update_airbnb_listing_cancellation200_response_data.rb +158 -0
- data/lib/repull/models/update_airbnb_listing_cancellation_request.rb +201 -0
- data/lib/repull/models/update_airbnb_listing_cancellation_request_non_refundable.rb +182 -0
- data/lib/repull/models/update_airbnb_listing_fees200_response.rb +150 -0
- data/lib/repull/models/update_airbnb_listing_fees_request.rb +175 -0
- data/lib/repull/models/vrbo_login200_response.rb +2 -2
- data/lib/repull/models/vrbo_login_request.rb +13 -3
- data/lib/repull/models/vrbo_reservation_action200_response.rb +166 -0
- data/lib/repull/models/vrbo_reservation_action200_response_data.rb +215 -0
- data/lib/repull/models/vrbo_reservation_action200_response_data_payment.rb +169 -0
- data/lib/repull/models/vrbo_reservation_action200_response_data_penalties.rb +168 -0
- data/lib/repull/models/vrbo_reservation_action200_response_data_terms_inner.rb +158 -0
- data/lib/repull/models/vrbo_reservation_action_request.rb +268 -0
- data/lib/repull/models/withdraw_vrbo_offer200_response.rb +165 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +73 -0
- data/openapi/v1.json +4689 -202
- metadata +75 -2
data/lib/repull/api/vrbo_api.rb
CHANGED
|
@@ -250,6 +250,142 @@ module Repull
|
|
|
250
250
|
return data, status_code, headers
|
|
251
251
|
end
|
|
252
252
|
|
|
253
|
+
# Change a Vrbo reservation
|
|
254
|
+
# Change an existing Vrbo booking — the counterpart of `POST /v1/channels/airbnb/alterations`. Send `confirmation_code` and what changes: `check_in`, `check_out`, `check_in_time` / `check_out_time` (`HH:MM` on the hour or half hour), `number_of_adults`, `number_of_children`, `pets`; for the price, `rent_amount` (the new rent — Vrbo adds its fees and taxes) or `keep_original_price: true`. Fields you leave out keep the booking's values. Unlike Airbnb, the change is made at once (the guest does not accept it); when the guest owes more, Vrbo requests it by `payment_due_date`. **`preview: true`** returns Vrbo's dry run — `before`, `after`, the price difference (`payment`, or `priceUnchanged`) and the due-date range — and changes nothing. Vrbo's rules are checked first and refused by field: e.g. a pay-later booking's check-in cannot move, guests are capped by the listing. `GET /v1/channels/vrbo/reservations/{code}?options=change` shows the booking's values and limits. Airbnb fields with no Vrbo equivalent are refused by name: `number_of_guests` (send adults and children), `total_price` (send `rent_amount`), `listing_id` (Vrbo cannot move a booking to another unit).
|
|
255
|
+
# @param create_vrbo_alteration_request [CreateVrboAlterationRequest]
|
|
256
|
+
# @param [Hash] opts the optional parameters
|
|
257
|
+
# @return [CreateVrboAlteration200Response]
|
|
258
|
+
def create_vrbo_alteration(create_vrbo_alteration_request, opts = {})
|
|
259
|
+
data, _status_code, _headers = create_vrbo_alteration_with_http_info(create_vrbo_alteration_request, opts)
|
|
260
|
+
data
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Change a Vrbo reservation
|
|
264
|
+
# Change an existing Vrbo booking — the counterpart of `POST /v1/channels/airbnb/alterations`. Send `confirmation_code` and what changes: `check_in`, `check_out`, `check_in_time` / `check_out_time` (`HH:MM` on the hour or half hour), `number_of_adults`, `number_of_children`, `pets`; for the price, `rent_amount` (the new rent — Vrbo adds its fees and taxes) or `keep_original_price: true`. Fields you leave out keep the booking's values. Unlike Airbnb, the change is made at once (the guest does not accept it); when the guest owes more, Vrbo requests it by `payment_due_date`. **`preview: true`** returns Vrbo's dry run — `before`, `after`, the price difference (`payment`, or `priceUnchanged`) and the due-date range — and changes nothing. Vrbo's rules are checked first and refused by field: e.g. a pay-later booking's check-in cannot move, guests are capped by the listing. `GET /v1/channels/vrbo/reservations/{code}?options=change` shows the booking's values and limits. Airbnb fields with no Vrbo equivalent are refused by name: `number_of_guests` (send adults and children), `total_price` (send `rent_amount`), `listing_id` (Vrbo cannot move a booking to another unit).
|
|
265
|
+
# @param create_vrbo_alteration_request [CreateVrboAlterationRequest]
|
|
266
|
+
# @param [Hash] opts the optional parameters
|
|
267
|
+
# @return [Array<(CreateVrboAlteration200Response, Integer, Hash)>] CreateVrboAlteration200Response data, response status code and response headers
|
|
268
|
+
def create_vrbo_alteration_with_http_info(create_vrbo_alteration_request, opts = {})
|
|
269
|
+
if @api_client.config.debugging
|
|
270
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.create_vrbo_alteration ...'
|
|
271
|
+
end
|
|
272
|
+
# verify the required parameter 'create_vrbo_alteration_request' is set
|
|
273
|
+
if @api_client.config.client_side_validation && create_vrbo_alteration_request.nil?
|
|
274
|
+
fail ArgumentError, "Missing the required parameter 'create_vrbo_alteration_request' when calling VRBOApi.create_vrbo_alteration"
|
|
275
|
+
end
|
|
276
|
+
# resource path
|
|
277
|
+
local_var_path = '/v1/channels/vrbo/alterations'
|
|
278
|
+
|
|
279
|
+
# query parameters
|
|
280
|
+
query_params = opts[:query_params] || {}
|
|
281
|
+
|
|
282
|
+
# header parameters
|
|
283
|
+
header_params = opts[:header_params] || {}
|
|
284
|
+
# HTTP header 'Accept' (if needed)
|
|
285
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
286
|
+
# HTTP header 'Content-Type'
|
|
287
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
288
|
+
if !content_type.nil?
|
|
289
|
+
header_params['Content-Type'] = content_type
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# form parameters
|
|
293
|
+
form_params = opts[:form_params] || {}
|
|
294
|
+
|
|
295
|
+
# http body (model)
|
|
296
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_vrbo_alteration_request)
|
|
297
|
+
|
|
298
|
+
# return_type
|
|
299
|
+
return_type = opts[:debug_return_type] || 'CreateVrboAlteration200Response'
|
|
300
|
+
|
|
301
|
+
# auth_names
|
|
302
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
303
|
+
|
|
304
|
+
new_options = opts.merge(
|
|
305
|
+
:operation => :"VRBOApi.create_vrbo_alteration",
|
|
306
|
+
:header_params => header_params,
|
|
307
|
+
:query_params => query_params,
|
|
308
|
+
:form_params => form_params,
|
|
309
|
+
:body => post_body,
|
|
310
|
+
:auth_names => auth_names,
|
|
311
|
+
:return_type => return_type
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
315
|
+
if @api_client.config.debugging
|
|
316
|
+
@api_client.config.logger.debug "API called: VRBOApi#create_vrbo_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
317
|
+
end
|
|
318
|
+
return data, status_code, headers
|
|
319
|
+
end
|
|
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
|
+
|
|
253
389
|
# Remove a Vrbo translation
|
|
254
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.
|
|
255
391
|
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
@@ -2216,6 +2352,86 @@ module Repull
|
|
|
2216
2352
|
return data, status_code, headers
|
|
2217
2353
|
end
|
|
2218
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. `all` returns `{ locales }`. (default to 'all')
|
|
2360
|
+
# @option opts [String] :source `stored` (default): Repull's copy, in milliseconds. `live`: 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 `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.
|
|
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. `all` returns `{ locales }`. (default to 'all')
|
|
2373
|
+
# @option opts [String] :source `stored` (default): Repull's copy, in milliseconds. `live`: 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
|
+
|
|
2219
2435
|
# Get the Vrbo host story
|
|
2220
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.
|
|
2221
2437
|
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
@@ -2435,35 +2651,35 @@ module Repull
|
|
|
2435
2651
|
return data, status_code, headers
|
|
2436
2652
|
end
|
|
2437
2653
|
|
|
2438
|
-
#
|
|
2439
|
-
#
|
|
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 (`externalThreadId` on `GET /v1/channels/vrbo/messaging`).
|
|
2440
2657
|
# @param [Hash] opts the optional parameters
|
|
2441
|
-
# @
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
data, _status_code, _headers = list_vrbo_listings_with_http_info(opts)
|
|
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)
|
|
2445
2661
|
data
|
|
2446
2662
|
end
|
|
2447
2663
|
|
|
2448
|
-
#
|
|
2449
|
-
#
|
|
2664
|
+
# Get the Vrbo quote
|
|
2665
|
+
# 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.
|
|
2666
|
+
# @param thread_id [String] The Vrbo conversation (`externalThreadId` on `GET /v1/channels/vrbo/messaging`).
|
|
2450
2667
|
# @param [Hash] opts the optional parameters
|
|
2451
|
-
# @
|
|
2452
|
-
|
|
2453
|
-
def list_vrbo_listings_with_http_info(opts = {})
|
|
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 = {})
|
|
2454
2670
|
if @api_client.config.debugging
|
|
2455
|
-
@api_client.config.logger.debug 'Calling API: VRBOApi.
|
|
2671
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.get_vrbo_offer ...'
|
|
2456
2672
|
end
|
|
2457
|
-
|
|
2458
|
-
if @api_client.config.client_side_validation &&
|
|
2459
|
-
fail ArgumentError, "
|
|
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"
|
|
2460
2676
|
end
|
|
2461
2677
|
# resource path
|
|
2462
|
-
local_var_path = '/v1/channels/vrbo/
|
|
2678
|
+
local_var_path = '/v1/channels/vrbo/offers'
|
|
2463
2679
|
|
|
2464
2680
|
# query parameters
|
|
2465
2681
|
query_params = opts[:query_params] || {}
|
|
2466
|
-
query_params[:'
|
|
2682
|
+
query_params[:'thread_id'] = thread_id
|
|
2467
2683
|
|
|
2468
2684
|
# header parameters
|
|
2469
2685
|
header_params = opts[:header_params] || {}
|
|
@@ -2477,13 +2693,13 @@ module Repull
|
|
|
2477
2693
|
post_body = opts[:debug_body]
|
|
2478
2694
|
|
|
2479
2695
|
# return_type
|
|
2480
|
-
return_type = opts[:debug_return_type] || '
|
|
2696
|
+
return_type = opts[:debug_return_type] || 'GetVrboOffer200Response'
|
|
2481
2697
|
|
|
2482
2698
|
# auth_names
|
|
2483
2699
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2484
2700
|
|
|
2485
2701
|
new_options = opts.merge(
|
|
2486
|
-
:operation => :"VRBOApi.
|
|
2702
|
+
:operation => :"VRBOApi.get_vrbo_offer",
|
|
2487
2703
|
:header_params => header_params,
|
|
2488
2704
|
:query_params => query_params,
|
|
2489
2705
|
:form_params => form_params,
|
|
@@ -2494,61 +2710,46 @@ module Repull
|
|
|
2494
2710
|
|
|
2495
2711
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2496
2712
|
if @api_client.config.debugging
|
|
2497
|
-
@api_client.config.logger.debug "API called: VRBOApi#
|
|
2713
|
+
@api_client.config.logger.debug "API called: VRBOApi#get_vrbo_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2498
2714
|
end
|
|
2499
2715
|
return data, status_code, headers
|
|
2500
2716
|
end
|
|
2501
2717
|
|
|
2502
|
-
#
|
|
2503
|
-
#
|
|
2718
|
+
# Get a Vrbo reservation
|
|
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).
|
|
2720
|
+
# @param code [String] The Vrbo confirmation code (`HA-…`), as in `GET /v1/channels/vrbo/reservations`.
|
|
2504
2721
|
# @param [Hash] opts the optional parameters
|
|
2505
|
-
# @option opts [String] :
|
|
2506
|
-
# @
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
# @return [VrboReservationListResponse]
|
|
2510
|
-
def list_vrbo_reservations(opts = {})
|
|
2511
|
-
data, _status_code, _headers = list_vrbo_reservations_with_http_info(opts)
|
|
2722
|
+
# @option opts [String] :options Return Vrbo's choices for this action instead of the booking.
|
|
2723
|
+
# @return [GetVrboReservation200Response]
|
|
2724
|
+
def get_vrbo_reservation(code, opts = {})
|
|
2725
|
+
data, _status_code, _headers = get_vrbo_reservation_with_http_info(code, opts)
|
|
2512
2726
|
data
|
|
2513
2727
|
end
|
|
2514
2728
|
|
|
2515
|
-
#
|
|
2516
|
-
#
|
|
2729
|
+
# Get a Vrbo reservation
|
|
2730
|
+
# 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).
|
|
2731
|
+
# @param code [String] The Vrbo confirmation code (`HA-…`), as in `GET /v1/channels/vrbo/reservations`.
|
|
2517
2732
|
# @param [Hash] opts the optional parameters
|
|
2518
|
-
# @option opts [String] :
|
|
2519
|
-
# @
|
|
2520
|
-
|
|
2521
|
-
# @option opts [Boolean] :include_total When `true` (default), the response's `pagination.total` carries the count of rows matching the current filter, across all pages. Pass `false` to skip the count for very large workspaces where the per-page COUNT(*) cost matters. (default to true)
|
|
2522
|
-
# @return [Array<(VrboReservationListResponse, Integer, Hash)>] VrboReservationListResponse data, response status code and response headers
|
|
2523
|
-
def list_vrbo_reservations_with_http_info(opts = {})
|
|
2733
|
+
# @option opts [String] :options Return Vrbo's choices for this action instead of the booking.
|
|
2734
|
+
# @return [Array<(GetVrboReservation200Response, Integer, Hash)>] GetVrboReservation200Response data, response status code and response headers
|
|
2735
|
+
def get_vrbo_reservation_with_http_info(code, opts = {})
|
|
2524
2736
|
if @api_client.config.debugging
|
|
2525
|
-
@api_client.config.logger.debug 'Calling API: VRBOApi.
|
|
2526
|
-
end
|
|
2527
|
-
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 10000
|
|
2528
|
-
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling VRBOApi.list_vrbo_reservations, must be smaller than or equal to 10000.'
|
|
2529
|
-
end
|
|
2530
|
-
|
|
2531
|
-
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
2532
|
-
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling VRBOApi.list_vrbo_reservations, must be greater than or equal to 0.'
|
|
2737
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.get_vrbo_reservation ...'
|
|
2533
2738
|
end
|
|
2534
|
-
|
|
2535
|
-
if @api_client.config.client_side_validation &&
|
|
2536
|
-
fail ArgumentError,
|
|
2739
|
+
# verify the required parameter 'code' is set
|
|
2740
|
+
if @api_client.config.client_side_validation && code.nil?
|
|
2741
|
+
fail ArgumentError, "Missing the required parameter 'code' when calling VRBOApi.get_vrbo_reservation"
|
|
2537
2742
|
end
|
|
2538
|
-
|
|
2539
|
-
if @api_client.config.client_side_validation &&
|
|
2540
|
-
fail ArgumentError,
|
|
2743
|
+
allowable_values = ["cancel", "change", "decline"]
|
|
2744
|
+
if @api_client.config.client_side_validation && opts[:'options'] && !allowable_values.include?(opts[:'options'])
|
|
2745
|
+
fail ArgumentError, "invalid value for \"options\", must be one of #{allowable_values}"
|
|
2541
2746
|
end
|
|
2542
|
-
|
|
2543
2747
|
# resource path
|
|
2544
|
-
local_var_path = '/v1/channels/vrbo/reservations'
|
|
2748
|
+
local_var_path = '/v1/channels/vrbo/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
|
|
2545
2749
|
|
|
2546
2750
|
# query parameters
|
|
2547
2751
|
query_params = opts[:query_params] || {}
|
|
2548
|
-
query_params[:'
|
|
2549
|
-
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
2550
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2551
|
-
query_params[:'include_total'] = opts[:'include_total'] if !opts[:'include_total'].nil?
|
|
2752
|
+
query_params[:'options'] = opts[:'options'] if !opts[:'options'].nil?
|
|
2552
2753
|
|
|
2553
2754
|
# header parameters
|
|
2554
2755
|
header_params = opts[:header_params] || {}
|
|
@@ -2562,13 +2763,13 @@ module Repull
|
|
|
2562
2763
|
post_body = opts[:debug_body]
|
|
2563
2764
|
|
|
2564
2765
|
# return_type
|
|
2565
|
-
return_type = opts[:debug_return_type] || '
|
|
2766
|
+
return_type = opts[:debug_return_type] || 'GetVrboReservation200Response'
|
|
2566
2767
|
|
|
2567
2768
|
# auth_names
|
|
2568
2769
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2569
2770
|
|
|
2570
2771
|
new_options = opts.merge(
|
|
2571
|
-
:operation => :"VRBOApi.
|
|
2772
|
+
:operation => :"VRBOApi.get_vrbo_reservation",
|
|
2572
2773
|
:header_params => header_params,
|
|
2573
2774
|
:query_params => query_params,
|
|
2574
2775
|
:form_params => form_params,
|
|
@@ -2579,36 +2780,36 @@ module Repull
|
|
|
2579
2780
|
|
|
2580
2781
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2581
2782
|
if @api_client.config.debugging
|
|
2582
|
-
@api_client.config.logger.debug "API called: VRBOApi#
|
|
2783
|
+
@api_client.config.logger.debug "API called: VRBOApi#get_vrbo_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2583
2784
|
end
|
|
2584
2785
|
return data, status_code, headers
|
|
2585
2786
|
end
|
|
2586
2787
|
|
|
2587
|
-
#
|
|
2588
|
-
#
|
|
2589
|
-
# @param
|
|
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 — `externalThreadId` on `GET /v1/channels/vrbo/messaging` (`vrbo:<uuid>`; the bare uuid works too).
|
|
2590
2791
|
# @param [Hash] opts the optional parameters
|
|
2591
|
-
# @return [
|
|
2592
|
-
def
|
|
2593
|
-
data, _status_code, _headers =
|
|
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)
|
|
2594
2795
|
data
|
|
2595
2796
|
end
|
|
2596
2797
|
|
|
2597
|
-
#
|
|
2598
|
-
#
|
|
2599
|
-
# @param
|
|
2798
|
+
# Get a Vrbo message thread
|
|
2799
|
+
# 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.
|
|
2800
|
+
# @param thread_id [String] The Vrbo conversation id — `externalThreadId` on `GET /v1/channels/vrbo/messaging` (`vrbo:<uuid>`; the bare uuid works too).
|
|
2600
2801
|
# @param [Hash] opts the optional parameters
|
|
2601
|
-
# @return [Array<(
|
|
2602
|
-
def
|
|
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 = {})
|
|
2603
2804
|
if @api_client.config.debugging
|
|
2604
|
-
@api_client.config.logger.debug 'Calling API: VRBOApi.
|
|
2805
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.get_vrbo_thread ...'
|
|
2605
2806
|
end
|
|
2606
|
-
# verify the required parameter '
|
|
2607
|
-
if @api_client.config.client_side_validation &&
|
|
2608
|
-
fail ArgumentError, "Missing the required parameter '
|
|
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"
|
|
2609
2810
|
end
|
|
2610
2811
|
# resource path
|
|
2611
|
-
local_var_path = '/v1/channels/vrbo/
|
|
2812
|
+
local_var_path = '/v1/channels/vrbo/messaging/{threadId}'.sub('{threadId}', CGI.escape(thread_id.to_s))
|
|
2612
2813
|
|
|
2613
2814
|
# query parameters
|
|
2614
2815
|
query_params = opts[:query_params] || {}
|
|
@@ -2617,26 +2818,21 @@ module Repull
|
|
|
2617
2818
|
header_params = opts[:header_params] || {}
|
|
2618
2819
|
# HTTP header 'Accept' (if needed)
|
|
2619
2820
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2620
|
-
# HTTP header 'Content-Type'
|
|
2621
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2622
|
-
if !content_type.nil?
|
|
2623
|
-
header_params['Content-Type'] = content_type
|
|
2624
|
-
end
|
|
2625
2821
|
|
|
2626
2822
|
# form parameters
|
|
2627
2823
|
form_params = opts[:form_params] || {}
|
|
2628
2824
|
|
|
2629
2825
|
# http body (model)
|
|
2630
|
-
post_body = opts[:debug_body]
|
|
2826
|
+
post_body = opts[:debug_body]
|
|
2631
2827
|
|
|
2632
2828
|
# return_type
|
|
2633
|
-
return_type = opts[:debug_return_type] || '
|
|
2829
|
+
return_type = opts[:debug_return_type] || 'GetVrboThread200Response'
|
|
2634
2830
|
|
|
2635
2831
|
# auth_names
|
|
2636
2832
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2637
2833
|
|
|
2638
2834
|
new_options = opts.merge(
|
|
2639
|
-
:operation => :"VRBOApi.
|
|
2835
|
+
:operation => :"VRBOApi.get_vrbo_thread",
|
|
2640
2836
|
:header_params => header_params,
|
|
2641
2837
|
:query_params => query_params,
|
|
2642
2838
|
:form_params => form_params,
|
|
@@ -2645,25 +2841,553 @@ module Repull
|
|
|
2645
2841
|
:return_type => return_type
|
|
2646
2842
|
)
|
|
2647
2843
|
|
|
2648
|
-
data, status_code, headers = @api_client.call_api(:
|
|
2844
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2649
2845
|
if @api_client.config.debugging
|
|
2650
|
-
@api_client.config.logger.debug "API called: VRBOApi#
|
|
2846
|
+
@api_client.config.logger.debug "API called: VRBOApi#get_vrbo_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2651
2847
|
end
|
|
2652
2848
|
return data, status_code, headers
|
|
2653
2849
|
end
|
|
2654
2850
|
|
|
2655
|
-
#
|
|
2656
|
-
#
|
|
2657
|
-
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
2658
|
-
# @param reorder_vrbo_listing_photos_request [ReorderVrboListingPhotosRequest]
|
|
2851
|
+
# List VRBO listings
|
|
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.
|
|
2659
2853
|
# @param [Hash] opts the optional parameters
|
|
2660
|
-
# @option opts [String] :
|
|
2661
|
-
# @return [
|
|
2662
|
-
def
|
|
2663
|
-
data, _status_code, _headers =
|
|
2664
|
-
data
|
|
2665
|
-
end
|
|
2666
|
-
|
|
2854
|
+
# @option opts [String] :status `active` (default) leaves inactive listings out. `inactive` returns only them and `all` returns both. An inactive listing comes back with identity fields only (ids, `name`, `city`, `status`, `inactiveReason`, its account), which is enough to show what can be activated. Every row carries `status`. (default to 'active')
|
|
2855
|
+
# @return [Array<VrboListing>]
|
|
2856
|
+
def list_vrbo_listings(opts = {})
|
|
2857
|
+
data, _status_code, _headers = list_vrbo_listings_with_http_info(opts)
|
|
2858
|
+
data
|
|
2859
|
+
end
|
|
2860
|
+
|
|
2861
|
+
# List VRBO listings
|
|
2862
|
+
# 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.
|
|
2863
|
+
# @param [Hash] opts the optional parameters
|
|
2864
|
+
# @option opts [String] :status `active` (default) leaves inactive listings out. `inactive` returns only them and `all` returns both. An inactive listing comes back with identity fields only (ids, `name`, `city`, `status`, `inactiveReason`, its account), which is enough to show what can be activated. Every row carries `status`. (default to 'active')
|
|
2865
|
+
# @return [Array<(Array<VrboListing>, Integer, Hash)>] Array<VrboListing> data, response status code and response headers
|
|
2866
|
+
def list_vrbo_listings_with_http_info(opts = {})
|
|
2867
|
+
if @api_client.config.debugging
|
|
2868
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.list_vrbo_listings ...'
|
|
2869
|
+
end
|
|
2870
|
+
allowable_values = ["active", "inactive", "all"]
|
|
2871
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
2872
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
2873
|
+
end
|
|
2874
|
+
# resource path
|
|
2875
|
+
local_var_path = '/v1/channels/vrbo/listings'
|
|
2876
|
+
|
|
2877
|
+
# query parameters
|
|
2878
|
+
query_params = opts[:query_params] || {}
|
|
2879
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
2880
|
+
|
|
2881
|
+
# header parameters
|
|
2882
|
+
header_params = opts[:header_params] || {}
|
|
2883
|
+
# HTTP header 'Accept' (if needed)
|
|
2884
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2885
|
+
|
|
2886
|
+
# form parameters
|
|
2887
|
+
form_params = opts[:form_params] || {}
|
|
2888
|
+
|
|
2889
|
+
# http body (model)
|
|
2890
|
+
post_body = opts[:debug_body]
|
|
2891
|
+
|
|
2892
|
+
# return_type
|
|
2893
|
+
return_type = opts[:debug_return_type] || 'Array<VrboListing>'
|
|
2894
|
+
|
|
2895
|
+
# auth_names
|
|
2896
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2897
|
+
|
|
2898
|
+
new_options = opts.merge(
|
|
2899
|
+
:operation => :"VRBOApi.list_vrbo_listings",
|
|
2900
|
+
:header_params => header_params,
|
|
2901
|
+
:query_params => query_params,
|
|
2902
|
+
:form_params => form_params,
|
|
2903
|
+
:body => post_body,
|
|
2904
|
+
:auth_names => auth_names,
|
|
2905
|
+
:return_type => return_type
|
|
2906
|
+
)
|
|
2907
|
+
|
|
2908
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2909
|
+
if @api_client.config.debugging
|
|
2910
|
+
@api_client.config.logger.debug "API called: VRBOApi#list_vrbo_listings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2911
|
+
end
|
|
2912
|
+
return data, status_code, headers
|
|
2913
|
+
end
|
|
2914
|
+
|
|
2915
|
+
# List VRBO reservations
|
|
2916
|
+
# Cursor-paginated list of Vrbo reservations imported from the host's connected Vrbo account (host sign-in, beta). The full normalised record — guest, price breakdown, policy — is on `GET /v1/reservations?platform=vrbo`. `?offset=` is accepted as a first-class alias for `?cursor=` (mutually exclusive; offset capped at 10000). Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated.
|
|
2917
|
+
# @param [Hash] opts the optional parameters
|
|
2918
|
+
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`.
|
|
2919
|
+
# @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.nextCursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
|
|
2920
|
+
# @option opts [Integer] :limit (default to 50)
|
|
2921
|
+
# @option opts [Boolean] :include_total When `true` (default), the response's `pagination.total` carries the count of rows matching the current filter, across all pages. Pass `false` to skip the count for very large workspaces where the per-page COUNT(*) cost matters. (default to true)
|
|
2922
|
+
# @return [VrboReservationListResponse]
|
|
2923
|
+
def list_vrbo_reservations(opts = {})
|
|
2924
|
+
data, _status_code, _headers = list_vrbo_reservations_with_http_info(opts)
|
|
2925
|
+
data
|
|
2926
|
+
end
|
|
2927
|
+
|
|
2928
|
+
# List VRBO reservations
|
|
2929
|
+
# Cursor-paginated list of Vrbo reservations imported from the host's connected Vrbo account (host sign-in, beta). The full normalised record — guest, price breakdown, policy — is on `GET /v1/reservations?platform=vrbo`. `?offset=` is accepted as a first-class alias for `?cursor=` (mutually exclusive; offset capped at 10000). Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated.
|
|
2930
|
+
# @param [Hash] opts the optional parameters
|
|
2931
|
+
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`.
|
|
2932
|
+
# @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.nextCursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
|
|
2933
|
+
# @option opts [Integer] :limit (default to 50)
|
|
2934
|
+
# @option opts [Boolean] :include_total When `true` (default), the response's `pagination.total` carries the count of rows matching the current filter, across all pages. Pass `false` to skip the count for very large workspaces where the per-page COUNT(*) cost matters. (default to true)
|
|
2935
|
+
# @return [Array<(VrboReservationListResponse, Integer, Hash)>] VrboReservationListResponse data, response status code and response headers
|
|
2936
|
+
def list_vrbo_reservations_with_http_info(opts = {})
|
|
2937
|
+
if @api_client.config.debugging
|
|
2938
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.list_vrbo_reservations ...'
|
|
2939
|
+
end
|
|
2940
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 10000
|
|
2941
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling VRBOApi.list_vrbo_reservations, must be smaller than or equal to 10000.'
|
|
2942
|
+
end
|
|
2943
|
+
|
|
2944
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
2945
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling VRBOApi.list_vrbo_reservations, must be greater than or equal to 0.'
|
|
2946
|
+
end
|
|
2947
|
+
|
|
2948
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
2949
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VRBOApi.list_vrbo_reservations, must be smaller than or equal to 100.'
|
|
2950
|
+
end
|
|
2951
|
+
|
|
2952
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2953
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VRBOApi.list_vrbo_reservations, must be greater than or equal to 1.'
|
|
2954
|
+
end
|
|
2955
|
+
|
|
2956
|
+
# resource path
|
|
2957
|
+
local_var_path = '/v1/channels/vrbo/reservations'
|
|
2958
|
+
|
|
2959
|
+
# query parameters
|
|
2960
|
+
query_params = opts[:query_params] || {}
|
|
2961
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2962
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
2963
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2964
|
+
query_params[:'include_total'] = opts[:'include_total'] if !opts[:'include_total'].nil?
|
|
2965
|
+
|
|
2966
|
+
# header parameters
|
|
2967
|
+
header_params = opts[:header_params] || {}
|
|
2968
|
+
# HTTP header 'Accept' (if needed)
|
|
2969
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2970
|
+
|
|
2971
|
+
# form parameters
|
|
2972
|
+
form_params = opts[:form_params] || {}
|
|
2973
|
+
|
|
2974
|
+
# http body (model)
|
|
2975
|
+
post_body = opts[:debug_body]
|
|
2976
|
+
|
|
2977
|
+
# return_type
|
|
2978
|
+
return_type = opts[:debug_return_type] || 'VrboReservationListResponse'
|
|
2979
|
+
|
|
2980
|
+
# auth_names
|
|
2981
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2982
|
+
|
|
2983
|
+
new_options = opts.merge(
|
|
2984
|
+
:operation => :"VRBOApi.list_vrbo_reservations",
|
|
2985
|
+
:header_params => header_params,
|
|
2986
|
+
:query_params => query_params,
|
|
2987
|
+
:form_params => form_params,
|
|
2988
|
+
:body => post_body,
|
|
2989
|
+
:auth_names => auth_names,
|
|
2990
|
+
:return_type => return_type
|
|
2991
|
+
)
|
|
2992
|
+
|
|
2993
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2994
|
+
if @api_client.config.debugging
|
|
2995
|
+
@api_client.config.logger.debug "API called: VRBOApi#list_vrbo_reservations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2996
|
+
end
|
|
2997
|
+
return data, status_code, headers
|
|
2998
|
+
end
|
|
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 `pagination.nextCursor` 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'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.
|
|
3016
|
+
# @param [Hash] opts the optional parameters
|
|
3017
|
+
# @option opts [String] :cursor `pagination.nextCursor` 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 — `externalThreadId` on `GET /v1/channels/vrbo/messaging` (`vrbo:<uuid>`; the bare uuid works too).
|
|
3087
|
+
# @param [Hash] opts the optional parameters
|
|
3088
|
+
# @option opts [String] :cursor `pagination.nextCursor` from the previous page.
|
|
3089
|
+
# @option opts [Boolean] :all `true` 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 `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.
|
|
3098
|
+
# @param thread_id [String] The Vrbo conversation id — `externalThreadId` on `GET /v1/channels/vrbo/messaging` (`vrbo:<uuid>`; the bare uuid works too).
|
|
3099
|
+
# @param [Hash] opts the optional parameters
|
|
3100
|
+
# @option opts [String] :cursor `pagination.nextCursor` from the previous page.
|
|
3101
|
+
# @option opts [Boolean] :all `true` 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 (`vrbo:…`). Omitted: every account. Unknown: `404` with your accounts in `valid_values`.
|
|
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'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`.
|
|
3167
|
+
# @param [Hash] opts the optional parameters
|
|
3168
|
+
# @option opts [String] :account_id One connected Vrbo account (`vrbo:…`). Omitted: every account. Unknown: `404` with your accounts in `valid_values`.
|
|
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
|
+
|
|
3219
|
+
# List Vrbo transactions (payout ledger)
|
|
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.
|
|
3221
|
+
# @param [Hash] opts the optional parameters
|
|
3222
|
+
# @option opts [String] :account_id Only this Vrbo account (`accountId` from `GET /v1/channels/vrbo/connection`).
|
|
3223
|
+
# @option opts [Date] :start_date Inclusive lower bound on the deposit's date. YYYY-MM-DD.
|
|
3224
|
+
# @option opts [Date] :end_date Inclusive upper bound on the deposit's date. YYYY-MM-DD.
|
|
3225
|
+
# @option opts [String] :status
|
|
3226
|
+
# @option opts [String] :type `Payout`, `Reservation` or `Adjustment`.
|
|
3227
|
+
# @option opts [String] :payout_id One deposit (its reference number) and its lines.
|
|
3228
|
+
# @option opts [String] :confirmation_code
|
|
3229
|
+
# @option opts [String] :cursor From the previous page's `pagination.nextCursor`.
|
|
3230
|
+
# @option opts [Integer] :limit Rows per page (default 100, at most 500). (default to 100)
|
|
3231
|
+
# @return [ListVrboTransactions200Response]
|
|
3232
|
+
def list_vrbo_transactions(opts = {})
|
|
3233
|
+
data, _status_code, _headers = list_vrbo_transactions_with_http_info(opts)
|
|
3234
|
+
data
|
|
3235
|
+
end
|
|
3236
|
+
|
|
3237
|
+
# List Vrbo transactions (payout ledger)
|
|
3238
|
+
# 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.
|
|
3239
|
+
# @param [Hash] opts the optional parameters
|
|
3240
|
+
# @option opts [String] :account_id Only this Vrbo account (`accountId` from `GET /v1/channels/vrbo/connection`).
|
|
3241
|
+
# @option opts [Date] :start_date Inclusive lower bound on the deposit's date. YYYY-MM-DD.
|
|
3242
|
+
# @option opts [Date] :end_date Inclusive upper bound on the deposit's date. YYYY-MM-DD.
|
|
3243
|
+
# @option opts [String] :status
|
|
3244
|
+
# @option opts [String] :type `Payout`, `Reservation` or `Adjustment`.
|
|
3245
|
+
# @option opts [String] :payout_id One deposit (its reference number) and its lines.
|
|
3246
|
+
# @option opts [String] :confirmation_code
|
|
3247
|
+
# @option opts [String] :cursor From the previous page's `pagination.nextCursor`.
|
|
3248
|
+
# @option opts [Integer] :limit Rows per page (default 100, at most 500). (default to 100)
|
|
3249
|
+
# @return [Array<(ListVrboTransactions200Response, Integer, Hash)>] ListVrboTransactions200Response data, response status code and response headers
|
|
3250
|
+
def list_vrbo_transactions_with_http_info(opts = {})
|
|
3251
|
+
if @api_client.config.debugging
|
|
3252
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.list_vrbo_transactions ...'
|
|
3253
|
+
end
|
|
3254
|
+
allowable_values = ["COMPLETED", "UPCOMING"]
|
|
3255
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
3256
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
3257
|
+
end
|
|
3258
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
3259
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VRBOApi.list_vrbo_transactions, must be smaller than or equal to 500.'
|
|
3260
|
+
end
|
|
3261
|
+
|
|
3262
|
+
# resource path
|
|
3263
|
+
local_var_path = '/v1/channels/vrbo/transactions'
|
|
3264
|
+
|
|
3265
|
+
# query parameters
|
|
3266
|
+
query_params = opts[:query_params] || {}
|
|
3267
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
3268
|
+
query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
|
3269
|
+
query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
|
3270
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
3271
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
3272
|
+
query_params[:'payout_id'] = opts[:'payout_id'] if !opts[:'payout_id'].nil?
|
|
3273
|
+
query_params[:'confirmation_code'] = opts[:'confirmation_code'] if !opts[:'confirmation_code'].nil?
|
|
3274
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
3275
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3276
|
+
|
|
3277
|
+
# header parameters
|
|
3278
|
+
header_params = opts[:header_params] || {}
|
|
3279
|
+
# HTTP header 'Accept' (if needed)
|
|
3280
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3281
|
+
|
|
3282
|
+
# form parameters
|
|
3283
|
+
form_params = opts[:form_params] || {}
|
|
3284
|
+
|
|
3285
|
+
# http body (model)
|
|
3286
|
+
post_body = opts[:debug_body]
|
|
3287
|
+
|
|
3288
|
+
# return_type
|
|
3289
|
+
return_type = opts[:debug_return_type] || 'ListVrboTransactions200Response'
|
|
3290
|
+
|
|
3291
|
+
# auth_names
|
|
3292
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3293
|
+
|
|
3294
|
+
new_options = opts.merge(
|
|
3295
|
+
:operation => :"VRBOApi.list_vrbo_transactions",
|
|
3296
|
+
:header_params => header_params,
|
|
3297
|
+
:query_params => query_params,
|
|
3298
|
+
:form_params => form_params,
|
|
3299
|
+
:body => post_body,
|
|
3300
|
+
:auth_names => auth_names,
|
|
3301
|
+
:return_type => return_type
|
|
3302
|
+
)
|
|
3303
|
+
|
|
3304
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3305
|
+
if @api_client.config.debugging
|
|
3306
|
+
@api_client.config.logger.debug "API called: VRBOApi#list_vrbo_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3307
|
+
end
|
|
3308
|
+
return data, status_code, headers
|
|
3309
|
+
end
|
|
3310
|
+
|
|
3311
|
+
# Link a Vrbo listing to a Repull listing
|
|
3312
|
+
# Link a Vrbo unit that is already on the host's connected Vrbo account to a Repull listing — the Vrbo counterpart of `POST /v1/channels/airbnb/listings/map`. Send `listingId` to link it to that listing, or `create: true` to create a Repull listing from what Vrbo shows. Once linked, the unit's bookings and messages are imported (upcoming ones and the last 30 days first). `accountId` names the Vrbo account when the workspace has several (`GET /v1/connect/vrbo-login`). `syncEnabled: true` also sends the listing's calendar to Vrbo (full access; refused with `409 calendar_managed_elsewhere` while another tool manages the account's calendar). The same write as `POST /v1/connections/{id}/mappings`, for one unit.
|
|
3313
|
+
# @param map_vrbo_listing_request [MapVrboListingRequest]
|
|
3314
|
+
# @param [Hash] opts the optional parameters
|
|
3315
|
+
# @return [MapVrboListing200Response]
|
|
3316
|
+
def map_vrbo_listing(map_vrbo_listing_request, opts = {})
|
|
3317
|
+
data, _status_code, _headers = map_vrbo_listing_with_http_info(map_vrbo_listing_request, opts)
|
|
3318
|
+
data
|
|
3319
|
+
end
|
|
3320
|
+
|
|
3321
|
+
# Link a Vrbo listing to a Repull listing
|
|
3322
|
+
# Link a Vrbo unit that is already on the host's connected Vrbo account to a Repull listing — the Vrbo counterpart of `POST /v1/channels/airbnb/listings/map`. Send `listingId` to link it to that listing, or `create: true` to create a Repull listing from what Vrbo shows. Once linked, the unit's bookings and messages are imported (upcoming ones and the last 30 days first). `accountId` names the Vrbo account when the workspace has several (`GET /v1/connect/vrbo-login`). `syncEnabled: true` also sends the listing's calendar to Vrbo (full access; refused with `409 calendar_managed_elsewhere` while another tool manages the account's calendar). The same write as `POST /v1/connections/{id}/mappings`, for one unit.
|
|
3323
|
+
# @param map_vrbo_listing_request [MapVrboListingRequest]
|
|
3324
|
+
# @param [Hash] opts the optional parameters
|
|
3325
|
+
# @return [Array<(MapVrboListing200Response, Integer, Hash)>] MapVrboListing200Response data, response status code and response headers
|
|
3326
|
+
def map_vrbo_listing_with_http_info(map_vrbo_listing_request, opts = {})
|
|
3327
|
+
if @api_client.config.debugging
|
|
3328
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.map_vrbo_listing ...'
|
|
3329
|
+
end
|
|
3330
|
+
# verify the required parameter 'map_vrbo_listing_request' is set
|
|
3331
|
+
if @api_client.config.client_side_validation && map_vrbo_listing_request.nil?
|
|
3332
|
+
fail ArgumentError, "Missing the required parameter 'map_vrbo_listing_request' when calling VRBOApi.map_vrbo_listing"
|
|
3333
|
+
end
|
|
3334
|
+
# resource path
|
|
3335
|
+
local_var_path = '/v1/channels/vrbo/listings/map'
|
|
3336
|
+
|
|
3337
|
+
# query parameters
|
|
3338
|
+
query_params = opts[:query_params] || {}
|
|
3339
|
+
|
|
3340
|
+
# header parameters
|
|
3341
|
+
header_params = opts[:header_params] || {}
|
|
3342
|
+
# HTTP header 'Accept' (if needed)
|
|
3343
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3344
|
+
# HTTP header 'Content-Type'
|
|
3345
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3346
|
+
if !content_type.nil?
|
|
3347
|
+
header_params['Content-Type'] = content_type
|
|
3348
|
+
end
|
|
3349
|
+
|
|
3350
|
+
# form parameters
|
|
3351
|
+
form_params = opts[:form_params] || {}
|
|
3352
|
+
|
|
3353
|
+
# http body (model)
|
|
3354
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(map_vrbo_listing_request)
|
|
3355
|
+
|
|
3356
|
+
# return_type
|
|
3357
|
+
return_type = opts[:debug_return_type] || 'MapVrboListing200Response'
|
|
3358
|
+
|
|
3359
|
+
# auth_names
|
|
3360
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3361
|
+
|
|
3362
|
+
new_options = opts.merge(
|
|
3363
|
+
:operation => :"VRBOApi.map_vrbo_listing",
|
|
3364
|
+
:header_params => header_params,
|
|
3365
|
+
:query_params => query_params,
|
|
3366
|
+
:form_params => form_params,
|
|
3367
|
+
:body => post_body,
|
|
3368
|
+
:auth_names => auth_names,
|
|
3369
|
+
:return_type => return_type
|
|
3370
|
+
)
|
|
3371
|
+
|
|
3372
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3373
|
+
if @api_client.config.debugging
|
|
3374
|
+
@api_client.config.logger.debug "API called: VRBOApi#map_vrbo_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3375
|
+
end
|
|
3376
|
+
return data, status_code, headers
|
|
3377
|
+
end
|
|
3378
|
+
|
|
3379
|
+
# Reorder the Vrbo photos
|
|
3380
|
+
# Put the photos in this order, first photo first. Photos left out keep their order after the ones sent. 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.
|
|
3381
|
+
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
3382
|
+
# @param reorder_vrbo_listing_photos_request [ReorderVrboListingPhotosRequest]
|
|
3383
|
+
# @param [Hash] opts the optional parameters
|
|
3384
|
+
# @option opts [String] :vrbo_listing_number The Vrbo listing number to work on, when the listing is linked to more than one Vrbo unit.
|
|
3385
|
+
# @return [AddVrboListingPhotos200Response]
|
|
3386
|
+
def reorder_vrbo_listing_photos(id, reorder_vrbo_listing_photos_request, opts = {})
|
|
3387
|
+
data, _status_code, _headers = reorder_vrbo_listing_photos_with_http_info(id, reorder_vrbo_listing_photos_request, opts)
|
|
3388
|
+
data
|
|
3389
|
+
end
|
|
3390
|
+
|
|
2667
3391
|
# Reorder the Vrbo photos
|
|
2668
3392
|
# Put the photos in this order, first photo first. Photos left out keep their order after the ones sent. 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.
|
|
2669
3393
|
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
@@ -2729,6 +3453,80 @@ module Repull
|
|
|
2729
3453
|
return data, status_code, headers
|
|
2730
3454
|
end
|
|
2731
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 — `externalThreadId` on `GET /v1/channels/vrbo/messaging` (`vrbo:<uuid>`; 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'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.
|
|
3469
|
+
# @param thread_id [String] The Vrbo conversation id — `externalThreadId` on `GET /v1/channels/vrbo/messaging` (`vrbo:<uuid>`; 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
|
+
|
|
2732
3530
|
# Set the Vrbo cover photo
|
|
2733
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.
|
|
2734
3532
|
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
@@ -2806,6 +3604,147 @@ module Repull
|
|
|
2806
3604
|
return data, status_code, headers
|
|
2807
3605
|
end
|
|
2808
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 `id`.
|
|
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'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`.
|
|
3620
|
+
# @param id [String] The review `id`.
|
|
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
|
+
|
|
3681
|
+
# Refresh the Vrbo payout ledger
|
|
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.
|
|
3683
|
+
# @param [Hash] opts the optional parameters
|
|
3684
|
+
# @option opts [String] :account_id Only this Vrbo account (`accountId` from `GET /v1/channels/vrbo/connection`).
|
|
3685
|
+
# @option opts [SyncVrboTransactionsRequest] :sync_vrbo_transactions_request
|
|
3686
|
+
# @return [SyncVrboTransactions200Response]
|
|
3687
|
+
def sync_vrbo_transactions(opts = {})
|
|
3688
|
+
data, _status_code, _headers = sync_vrbo_transactions_with_http_info(opts)
|
|
3689
|
+
data
|
|
3690
|
+
end
|
|
3691
|
+
|
|
3692
|
+
# Refresh the Vrbo payout ledger
|
|
3693
|
+
# 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.
|
|
3694
|
+
# @param [Hash] opts the optional parameters
|
|
3695
|
+
# @option opts [String] :account_id Only this Vrbo account (`accountId` from `GET /v1/channels/vrbo/connection`).
|
|
3696
|
+
# @option opts [SyncVrboTransactionsRequest] :sync_vrbo_transactions_request
|
|
3697
|
+
# @return [Array<(SyncVrboTransactions200Response, Integer, Hash)>] SyncVrboTransactions200Response data, response status code and response headers
|
|
3698
|
+
def sync_vrbo_transactions_with_http_info(opts = {})
|
|
3699
|
+
if @api_client.config.debugging
|
|
3700
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.sync_vrbo_transactions ...'
|
|
3701
|
+
end
|
|
3702
|
+
# resource path
|
|
3703
|
+
local_var_path = '/v1/channels/vrbo/transactions'
|
|
3704
|
+
|
|
3705
|
+
# query parameters
|
|
3706
|
+
query_params = opts[:query_params] || {}
|
|
3707
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
3708
|
+
|
|
3709
|
+
# header parameters
|
|
3710
|
+
header_params = opts[:header_params] || {}
|
|
3711
|
+
# HTTP header 'Accept' (if needed)
|
|
3712
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3713
|
+
# HTTP header 'Content-Type'
|
|
3714
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3715
|
+
if !content_type.nil?
|
|
3716
|
+
header_params['Content-Type'] = content_type
|
|
3717
|
+
end
|
|
3718
|
+
|
|
3719
|
+
# form parameters
|
|
3720
|
+
form_params = opts[:form_params] || {}
|
|
3721
|
+
|
|
3722
|
+
# http body (model)
|
|
3723
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'sync_vrbo_transactions_request'])
|
|
3724
|
+
|
|
3725
|
+
# return_type
|
|
3726
|
+
return_type = opts[:debug_return_type] || 'SyncVrboTransactions200Response'
|
|
3727
|
+
|
|
3728
|
+
# auth_names
|
|
3729
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3730
|
+
|
|
3731
|
+
new_options = opts.merge(
|
|
3732
|
+
:operation => :"VRBOApi.sync_vrbo_transactions",
|
|
3733
|
+
:header_params => header_params,
|
|
3734
|
+
:query_params => query_params,
|
|
3735
|
+
:form_params => form_params,
|
|
3736
|
+
:body => post_body,
|
|
3737
|
+
:auth_names => auth_names,
|
|
3738
|
+
:return_type => return_type
|
|
3739
|
+
)
|
|
3740
|
+
|
|
3741
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3742
|
+
if @api_client.config.debugging
|
|
3743
|
+
@api_client.config.logger.debug "API called: VRBOApi#sync_vrbo_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3744
|
+
end
|
|
3745
|
+
return data, status_code, headers
|
|
3746
|
+
end
|
|
3747
|
+
|
|
2809
3748
|
# Update the Vrbo additional details
|
|
2810
3749
|
# Change the additional details of the listing's existing Vrbo listing. **Partial:** send only the fields to change; a field you leave out is never changed on Vrbo, and a field sent as `null` means \"none\" (where the field can be cleared). Fields Vrbo can change but never empty once set are refused with `422 invalid_params` when sent empty or `null`, rather than answering OK while Vrbo keeps the old value. Any of `property`, `bedrooms`, `bathrooms`. **Cost:** 1 call + 2 to read back on Vrbo, spaced ~3 s apart per account. The answer comes once Vrbo has saved and the section has been read back. **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.
|
|
2811
3750
|
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
@@ -4503,5 +5442,143 @@ module Repull
|
|
|
4503
5442
|
end
|
|
4504
5443
|
return data, status_code, headers
|
|
4505
5444
|
end
|
|
5445
|
+
|
|
5446
|
+
# Accept, decline, cancel, charge or refund a Vrbo reservation
|
|
5447
|
+
# Act on a Vrbo booking by its confirmation code — the counterpart of `POST /v1/channels/airbnb/reservations/{code}`, plus Vrbo's extra charge and refund. **Write-side**: Vrbo's own host-app actions, as the account that owns the booking. - `accept` — accept a pending booking request. Optional `message` to the guest (≤ 250 characters). - `decline` — decline a pending booking request. `reason` is one of Vrbo's decline reasons (`?options=decline`); `block_dates: true` also blocks the dates (default: they stay open). - `cancel` — cancel a booking as the host. `reason`: `property-sold-or-ownership-change`, `conflict-with-house-rules`, `dates-booked-on-another-platform`, `extenuating-circumstance` or `payment-not-received` (Vrbo's list, read live: `?options=cancel`); `message` to the guest, 25–250 characters; `refund_level` (default `FULL`). **Host cancellations carry Vrbo penalties** — the listing hidden for 7 days and a fee from your payout, unless the cancellation was unavoidable. - `charge` — request an extra payment from the guest: `fee_type` (Vrbo's list, e.g. `PARKING`, `HOT_TUB`, `DEPARTURE_LATE`), `amount` (1–10,000, the booking's currency), `message` (≤ 50 characters) and `due_date`. - `refund` — refund the guest part of what they paid: `reason`, `amount`, `message`. Vrbo offers it once the guest has paid. **`preview: true`** (cancel, charge, refund) returns Vrbo's own dry run — for a cancel, the terms and penalties (`penalties.cancellationFee`, `penalties.listingHidden`, `refundToGuest`); for a charge, the guest's total with taxes — and changes nothing. Without it, the dry run runs first and the action after, once: a lost answer is `502 vrbo_unconfirmed` (read the booking before retrying), never a second cancel. Changing dates, times, guests or price is `POST /v1/channels/vrbo/alterations`. The body is validated before anything reaches Vrbo; unknown fields are refused by name. Returns `403 listing_inactive` when the listing is inactive.
|
|
5448
|
+
# @param code [String] The Vrbo confirmation code (`HA-…`), as in `GET /v1/channels/vrbo/reservations`.
|
|
5449
|
+
# @param vrbo_reservation_action_request [VrboReservationActionRequest]
|
|
5450
|
+
# @param [Hash] opts the optional parameters
|
|
5451
|
+
# @return [VrboReservationAction200Response]
|
|
5452
|
+
def vrbo_reservation_action(code, vrbo_reservation_action_request, opts = {})
|
|
5453
|
+
data, _status_code, _headers = vrbo_reservation_action_with_http_info(code, vrbo_reservation_action_request, opts)
|
|
5454
|
+
data
|
|
5455
|
+
end
|
|
5456
|
+
|
|
5457
|
+
# Accept, decline, cancel, charge or refund a Vrbo reservation
|
|
5458
|
+
# Act on a Vrbo booking by its confirmation code — the counterpart of `POST /v1/channels/airbnb/reservations/{code}`, plus Vrbo's extra charge and refund. **Write-side**: Vrbo's own host-app actions, as the account that owns the booking. - `accept` — accept a pending booking request. Optional `message` to the guest (≤ 250 characters). - `decline` — decline a pending booking request. `reason` is one of Vrbo's decline reasons (`?options=decline`); `block_dates: true` also blocks the dates (default: they stay open). - `cancel` — cancel a booking as the host. `reason`: `property-sold-or-ownership-change`, `conflict-with-house-rules`, `dates-booked-on-another-platform`, `extenuating-circumstance` or `payment-not-received` (Vrbo's list, read live: `?options=cancel`); `message` to the guest, 25–250 characters; `refund_level` (default `FULL`). **Host cancellations carry Vrbo penalties** — the listing hidden for 7 days and a fee from your payout, unless the cancellation was unavoidable. - `charge` — request an extra payment from the guest: `fee_type` (Vrbo's list, e.g. `PARKING`, `HOT_TUB`, `DEPARTURE_LATE`), `amount` (1–10,000, the booking's currency), `message` (≤ 50 characters) and `due_date`. - `refund` — refund the guest part of what they paid: `reason`, `amount`, `message`. Vrbo offers it once the guest has paid. **`preview: true`** (cancel, charge, refund) returns Vrbo's own dry run — for a cancel, the terms and penalties (`penalties.cancellationFee`, `penalties.listingHidden`, `refundToGuest`); for a charge, the guest's total with taxes — and changes nothing. Without it, the dry run runs first and the action after, once: a lost answer is `502 vrbo_unconfirmed` (read the booking before retrying), never a second cancel. Changing dates, times, guests or price is `POST /v1/channels/vrbo/alterations`. The body is validated before anything reaches Vrbo; unknown fields are refused by name. Returns `403 listing_inactive` when the listing is inactive.
|
|
5459
|
+
# @param code [String] The Vrbo confirmation code (`HA-…`), as in `GET /v1/channels/vrbo/reservations`.
|
|
5460
|
+
# @param vrbo_reservation_action_request [VrboReservationActionRequest]
|
|
5461
|
+
# @param [Hash] opts the optional parameters
|
|
5462
|
+
# @return [Array<(VrboReservationAction200Response, Integer, Hash)>] VrboReservationAction200Response data, response status code and response headers
|
|
5463
|
+
def vrbo_reservation_action_with_http_info(code, vrbo_reservation_action_request, opts = {})
|
|
5464
|
+
if @api_client.config.debugging
|
|
5465
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.vrbo_reservation_action ...'
|
|
5466
|
+
end
|
|
5467
|
+
# verify the required parameter 'code' is set
|
|
5468
|
+
if @api_client.config.client_side_validation && code.nil?
|
|
5469
|
+
fail ArgumentError, "Missing the required parameter 'code' when calling VRBOApi.vrbo_reservation_action"
|
|
5470
|
+
end
|
|
5471
|
+
# verify the required parameter 'vrbo_reservation_action_request' is set
|
|
5472
|
+
if @api_client.config.client_side_validation && vrbo_reservation_action_request.nil?
|
|
5473
|
+
fail ArgumentError, "Missing the required parameter 'vrbo_reservation_action_request' when calling VRBOApi.vrbo_reservation_action"
|
|
5474
|
+
end
|
|
5475
|
+
# resource path
|
|
5476
|
+
local_var_path = '/v1/channels/vrbo/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
|
|
5477
|
+
|
|
5478
|
+
# query parameters
|
|
5479
|
+
query_params = opts[:query_params] || {}
|
|
5480
|
+
|
|
5481
|
+
# header parameters
|
|
5482
|
+
header_params = opts[:header_params] || {}
|
|
5483
|
+
# HTTP header 'Accept' (if needed)
|
|
5484
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
5485
|
+
# HTTP header 'Content-Type'
|
|
5486
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
5487
|
+
if !content_type.nil?
|
|
5488
|
+
header_params['Content-Type'] = content_type
|
|
5489
|
+
end
|
|
5490
|
+
|
|
5491
|
+
# form parameters
|
|
5492
|
+
form_params = opts[:form_params] || {}
|
|
5493
|
+
|
|
5494
|
+
# http body (model)
|
|
5495
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(vrbo_reservation_action_request)
|
|
5496
|
+
|
|
5497
|
+
# return_type
|
|
5498
|
+
return_type = opts[:debug_return_type] || 'VrboReservationAction200Response'
|
|
5499
|
+
|
|
5500
|
+
# auth_names
|
|
5501
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
5502
|
+
|
|
5503
|
+
new_options = opts.merge(
|
|
5504
|
+
:operation => :"VRBOApi.vrbo_reservation_action",
|
|
5505
|
+
:header_params => header_params,
|
|
5506
|
+
:query_params => query_params,
|
|
5507
|
+
:form_params => form_params,
|
|
5508
|
+
:body => post_body,
|
|
5509
|
+
:auth_names => auth_names,
|
|
5510
|
+
:return_type => return_type
|
|
5511
|
+
)
|
|
5512
|
+
|
|
5513
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
5514
|
+
if @api_client.config.debugging
|
|
5515
|
+
@api_client.config.logger.debug "API called: VRBOApi#vrbo_reservation_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
5516
|
+
end
|
|
5517
|
+
return data, status_code, headers
|
|
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 (`externalThreadId` on `GET /v1/channels/vrbo/messaging`).
|
|
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's pre-approval or quote: the guest can no longer book on it. The counterpart of `DELETE /v1/channels/airbnb/offers`, by `thread_id`.
|
|
5532
|
+
# @param thread_id [String] The Vrbo conversation (`externalThreadId` on `GET /v1/channels/vrbo/messaging`).
|
|
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
|
|
4506
5583
|
end
|
|
4507
5584
|
end
|