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
|
@@ -2447,7 +2447,7 @@ module Repull
|
|
|
2447
2447
|
end
|
|
2448
2448
|
|
|
2449
2449
|
# Sign in with a Vrbo host account
|
|
2450
|
-
# `action: login` checks the email and password and answers in seconds: `connected`, `otp_required` (Vrbo sent a code to `destination`) or `failed` with a `reason` (`bad_credentials`, `blocked`, …). `action: otp` submits the code; a refused code comes back as `otp_required` with `reason: bad_code`. `action: resend` (with `accountId`) signs in again with the details already given, so Vrbo sends a new code. Signing in imports nothing. `accessType` (`full_access` or `messaging`, when the session did not lock it) is the host's choice of whether mapped listings push the calendar. The import starts when the mapping is confirmed. Called by the hosted Connect page. No API key — the session ID is the capability token.
|
|
2450
|
+
# `action: login` checks the email and password and answers in seconds: `connected`, `otp_required` (Vrbo sent a code to `destination`) or `failed` with a `reason` (`bad_credentials`, `blocked`, …). `action: otp` submits the code; a refused code comes back as `otp_required` with `reason: bad_code`. `action: resend` (with `accountId`) signs in again with the details already given, so Vrbo sends a new code. `phone_required` means Vrbo accepted the login and its \"complete your profile\" step wants a contact phone: `action: phone` (with `accountId` and `phone`, international format with the country code, any country) fills it in, then answers like the others (`otp_required` when Vrbo texts a code to that number; `phone_required` with `reason: bad_phone` when Vrbo refuses it). Signing in imports nothing. `accessType` (`full_access` or `messaging`, when the session did not lock it) is the host's choice of whether mapped listings push the calendar. The import starts when the mapping is confirmed. Called by the hosted Connect page. No API key — the session ID is the capability token.
|
|
2451
2451
|
# @param vrbo_login_request [VrboLoginRequest]
|
|
2452
2452
|
# @param [Hash] opts the optional parameters
|
|
2453
2453
|
# @return [VrboLogin200Response]
|
|
@@ -2457,7 +2457,7 @@ module Repull
|
|
|
2457
2457
|
end
|
|
2458
2458
|
|
|
2459
2459
|
# Sign in with a Vrbo host account
|
|
2460
|
-
# `action: login` checks the email and password and answers in seconds: `connected`, `otp_required` (Vrbo sent a code to `destination`) or `failed` with a `reason` (`bad_credentials`, `blocked`, …). `action: otp` submits the code; a refused code comes back as `otp_required` with `reason: bad_code`. `action: resend` (with `accountId`) signs in again with the details already given, so Vrbo sends a new code. Signing in imports nothing. `accessType` (`full_access` or `messaging`, when the session did not lock it) is the host's choice of whether mapped listings push the calendar. The import starts when the mapping is confirmed. Called by the hosted Connect page. No API key — the session ID is the capability token.
|
|
2460
|
+
# `action: login` checks the email and password and answers in seconds: `connected`, `otp_required` (Vrbo sent a code to `destination`) or `failed` with a `reason` (`bad_credentials`, `blocked`, …). `action: otp` submits the code; a refused code comes back as `otp_required` with `reason: bad_code`. `action: resend` (with `accountId`) signs in again with the details already given, so Vrbo sends a new code. `phone_required` means Vrbo accepted the login and its \"complete your profile\" step wants a contact phone: `action: phone` (with `accountId` and `phone`, international format with the country code, any country) fills it in, then answers like the others (`otp_required` when Vrbo texts a code to that number; `phone_required` with `reason: bad_phone` when Vrbo refuses it). Signing in imports nothing. `accessType` (`full_access` or `messaging`, when the session did not lock it) is the host's choice of whether mapped listings push the calendar. The import starts when the mapping is confirmed. Called by the hosted Connect page. No API key — the session ID is the capability token.
|
|
2461
2461
|
# @param vrbo_login_request [VrboLoginRequest]
|
|
2462
2462
|
# @param [Hash] opts the optional parameters
|
|
2463
2463
|
# @return [Array<(VrboLogin200Response, Integer, Hash)>] VrboLogin200Response data, response status code and response headers
|
|
@@ -1276,6 +1276,76 @@ module Repull
|
|
|
1276
1276
|
return data, status_code, headers
|
|
1277
1277
|
end
|
|
1278
1278
|
|
|
1279
|
+
# Refresh a listing from Vrbo
|
|
1280
|
+
# Re-read every content section of the listing's Vrbo listing from Vrbo and keep it as Repull's copy, then report what was refreshed and when — the counterpart of `POST /v1/listings/{id}/pull/airbnb`. Use it after the host changed something on Vrbo, so the `/v1/channels/vrbo/listings/{id}/…` reads answer with what Vrbo holds now. **What it refreshes:** descriptions, details, story, additional-info, photos, amenities, rooms, location, house-rules, booking-settings, cancellation, fees, pricing, payment-terms, protection, taxes, permits, checkin-guide, videos. **Not** the calendar, rates per night, bookings, messages, reviews or payouts — those arrive through the channel's own sync. **Runs synchronously:** about 45 Vrbo calls spaced ~3 s apart per account, **around 2.5 minutes**. A section Vrbo fails to return is listed in `failedSections`; the others are refreshed. **One pull per listing per 15 minutes**, as on Airbnb: a second call inside the window returns `429 rate_limit_exceeded` with `Retry-After` and `nextPullAvailableAt`, and makes no Vrbo calls. 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.
|
|
1281
|
+
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
1282
|
+
# @param [Hash] opts the optional parameters
|
|
1283
|
+
# @option opts [PullListingFromVrboRequest] :pull_listing_from_vrbo_request
|
|
1284
|
+
# @return [PullListingFromVrbo200Response]
|
|
1285
|
+
def pull_listing_from_vrbo(id, opts = {})
|
|
1286
|
+
data, _status_code, _headers = pull_listing_from_vrbo_with_http_info(id, opts)
|
|
1287
|
+
data
|
|
1288
|
+
end
|
|
1289
|
+
|
|
1290
|
+
# Refresh a listing from Vrbo
|
|
1291
|
+
# Re-read every content section of the listing's Vrbo listing from Vrbo and keep it as Repull's copy, then report what was refreshed and when — the counterpart of `POST /v1/listings/{id}/pull/airbnb`. Use it after the host changed something on Vrbo, so the `/v1/channels/vrbo/listings/{id}/…` reads answer with what Vrbo holds now. **What it refreshes:** descriptions, details, story, additional-info, photos, amenities, rooms, location, house-rules, booking-settings, cancellation, fees, pricing, payment-terms, protection, taxes, permits, checkin-guide, videos. **Not** the calendar, rates per night, bookings, messages, reviews or payouts — those arrive through the channel's own sync. **Runs synchronously:** about 45 Vrbo calls spaced ~3 s apart per account, **around 2.5 minutes**. A section Vrbo fails to return is listed in `failedSections`; the others are refreshed. **One pull per listing per 15 minutes**, as on Airbnb: a second call inside the window returns `429 rate_limit_exceeded` with `Retry-After` and `nextPullAvailableAt`, and makes no Vrbo calls. 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.
|
|
1292
|
+
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
1293
|
+
# @param [Hash] opts the optional parameters
|
|
1294
|
+
# @option opts [PullListingFromVrboRequest] :pull_listing_from_vrbo_request
|
|
1295
|
+
# @return [Array<(PullListingFromVrbo200Response, Integer, Hash)>] PullListingFromVrbo200Response data, response status code and response headers
|
|
1296
|
+
def pull_listing_from_vrbo_with_http_info(id, opts = {})
|
|
1297
|
+
if @api_client.config.debugging
|
|
1298
|
+
@api_client.config.logger.debug 'Calling API: ListingsApi.pull_listing_from_vrbo ...'
|
|
1299
|
+
end
|
|
1300
|
+
# verify the required parameter 'id' is set
|
|
1301
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1302
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListingsApi.pull_listing_from_vrbo"
|
|
1303
|
+
end
|
|
1304
|
+
# resource path
|
|
1305
|
+
local_var_path = '/v1/listings/{id}/pull/vrbo'.sub('{id}', CGI.escape(id.to_s))
|
|
1306
|
+
|
|
1307
|
+
# query parameters
|
|
1308
|
+
query_params = opts[:query_params] || {}
|
|
1309
|
+
|
|
1310
|
+
# header parameters
|
|
1311
|
+
header_params = opts[:header_params] || {}
|
|
1312
|
+
# HTTP header 'Accept' (if needed)
|
|
1313
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1314
|
+
# HTTP header 'Content-Type'
|
|
1315
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1316
|
+
if !content_type.nil?
|
|
1317
|
+
header_params['Content-Type'] = content_type
|
|
1318
|
+
end
|
|
1319
|
+
|
|
1320
|
+
# form parameters
|
|
1321
|
+
form_params = opts[:form_params] || {}
|
|
1322
|
+
|
|
1323
|
+
# http body (model)
|
|
1324
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'pull_listing_from_vrbo_request'])
|
|
1325
|
+
|
|
1326
|
+
# return_type
|
|
1327
|
+
return_type = opts[:debug_return_type] || 'PullListingFromVrbo200Response'
|
|
1328
|
+
|
|
1329
|
+
# auth_names
|
|
1330
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1331
|
+
|
|
1332
|
+
new_options = opts.merge(
|
|
1333
|
+
:operation => :"ListingsApi.pull_listing_from_vrbo",
|
|
1334
|
+
:header_params => header_params,
|
|
1335
|
+
:query_params => query_params,
|
|
1336
|
+
:form_params => form_params,
|
|
1337
|
+
:body => post_body,
|
|
1338
|
+
:auth_names => auth_names,
|
|
1339
|
+
:return_type => return_type
|
|
1340
|
+
)
|
|
1341
|
+
|
|
1342
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1343
|
+
if @api_client.config.debugging
|
|
1344
|
+
@api_client.config.logger.debug "API called: ListingsApi#pull_listing_from_vrbo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1345
|
+
end
|
|
1346
|
+
return data, status_code, headers
|
|
1347
|
+
end
|
|
1348
|
+
|
|
1279
1349
|
# Set a listing's markup on a channel
|
|
1280
1350
|
# Set the markup one channel adds to this listing's price. When the value changes, the affected listings' prices are re-sent to that channel straight away (`pricesResent`); nothing else is sent. A listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel. - **Airbnb** — one markup per listing. - **Booking.com** — one markup per **property**, shared by every listing priced through it (`listingIds` names them). - **Vrbo** — one markup per connected **Vrbo account**, shared by every listing linked on it (`listingIds` names them). Prices reach Vrbo through its calendar queue. Returns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one. On Booking.com the markup belongs to the property, so setting it reprices every listing on that property (`affectedListingIds`). A listing on more than one property must name one with `hotelId`; without it the request is refused with `409 ambiguous_booking_mapping` listing the candidates, rather than repricing a property it guessed. On Vrbo the markup belongs to the connected Vrbo account, so setting it reprices every listing linked on that account (`affectedListingIds`). A listing linked on more than one account names one with `accountId`, else `409 ambiguous_vrbo_account`; a listing not linked to Vrbo is `409 listing_not_on_vrbo`. `markupPercent` is a percentage — `15` for 15%. A value between 0 and 1 is refused as a probable fraction, with the number to send instead.
|
|
1281
1351
|
# @param id [String] Repull listing id.
|
|
@@ -20,7 +20,7 @@ module Repull
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Accept a booking request
|
|
23
|
-
# Accept a pending Airbnb booking request — a reservation with status `pending`, made on a listing without Instant Book. Find them with `GET /v1/reservations?status=pending`. Airbnb
|
|
23
|
+
# Accept a pending Airbnb or Vrbo booking request — a reservation with status `pending`, made on a listing without Instant Book. Find them with `GET /v1/reservations?status=pending`. Airbnb and Vrbo expire a request the host has not answered within 24 hours. Airbnb confirms asynchronously: the reservation’s status moves to confirmed, and a `reservation.updated` webhook fires, when Airbnb’s notification lands (usually within seconds). The response reports what Airbnb was asked to do. **Airbnb**, for listings connected to Airbnb directly, and **Vrbo**, where the request is answered on Vrbo itself (the same as `POST /v1/channels/vrbo/reservations/{code}`); other channels have no request step (`422 channel_not_supported`). **A request relayed by a PMS** (Guesty, Hostaway, …) is answered in that PMS, whatever channel it came from; a PMS whose API cannot answer requests returns `422 pms_write_unsupported` naming it (Hostaway today), and `GET /v1/connect/{provider}` → `capabilities.pms.reservations.respond` says so beforehand. The response then carries `pms`. A reservation that is not pending is refused before Airbnb is contacted (`409 reservation_not_pending`); one Airbnb says already moved on is `409 request_no_longer_pending`. Neither is worth retrying. Takes no body. Send `Idempotency-Key`: a repeat with the same key replays the first response instead of acting twice (a `409 idempotency_key_in_use` while the first is still running). A 5xx, a `429 airbnb_rate_limited` or a `403 connection_reauth_required` is not stored — nothing was done — so retrying with the same key reaches Airbnb again.
|
|
24
24
|
# @param id [Integer] Repull reservation id (from `GET /v1/reservations?status=pending`) — not the Airbnb confirmation code.
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Retryable outcomes are deliberately not stored, so a retry with the same key runs for real: any status >= 500, `408`, `425` and `429`, and the refusals that happen before anything is done and tell you to fix something outside the request first — `connection_reauth_required`, `listing_inactive`, and the rate/daily limits. Every other answer, including a final refusal such as `422 airbnb_rejected`, is stored and replayed.
|
|
@@ -31,7 +31,7 @@ module Repull
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Accept a booking request
|
|
34
|
-
# Accept a pending Airbnb booking request — a reservation with status `pending`, made on a listing without Instant Book. Find them with `GET /v1/reservations?status=pending`. Airbnb
|
|
34
|
+
# Accept a pending Airbnb or Vrbo booking request — a reservation with status `pending`, made on a listing without Instant Book. Find them with `GET /v1/reservations?status=pending`. Airbnb and Vrbo expire a request the host has not answered within 24 hours. Airbnb confirms asynchronously: the reservation’s status moves to confirmed, and a `reservation.updated` webhook fires, when Airbnb’s notification lands (usually within seconds). The response reports what Airbnb was asked to do. **Airbnb**, for listings connected to Airbnb directly, and **Vrbo**, where the request is answered on Vrbo itself (the same as `POST /v1/channels/vrbo/reservations/{code}`); other channels have no request step (`422 channel_not_supported`). **A request relayed by a PMS** (Guesty, Hostaway, …) is answered in that PMS, whatever channel it came from; a PMS whose API cannot answer requests returns `422 pms_write_unsupported` naming it (Hostaway today), and `GET /v1/connect/{provider}` → `capabilities.pms.reservations.respond` says so beforehand. The response then carries `pms`. A reservation that is not pending is refused before Airbnb is contacted (`409 reservation_not_pending`); one Airbnb says already moved on is `409 request_no_longer_pending`. Neither is worth retrying. Takes no body. Send `Idempotency-Key`: a repeat with the same key replays the first response instead of acting twice (a `409 idempotency_key_in_use` while the first is still running). A 5xx, a `429 airbnb_rate_limited` or a `403 connection_reauth_required` is not stored — nothing was done — so retrying with the same key reaches Airbnb again.
|
|
35
35
|
# @param id [Integer] Repull reservation id (from `GET /v1/reservations?status=pending`) — not the Airbnb confirmation code.
|
|
36
36
|
# @param [Hash] opts the optional parameters
|
|
37
37
|
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Retryable outcomes are deliberately not stored, so a retry with the same key runs for real: any status >= 500, `408`, `425` and `429`, and the refusals that happen before anything is done and tell you to fix something outside the request first — `connection_reauth_required`, `listing_inactive`, and the rate/daily limits. Every other answer, including a final refusal such as `422 airbnb_rejected`, is stored and replayed.
|
|
@@ -248,7 +248,7 @@ module Repull
|
|
|
248
248
|
end
|
|
249
249
|
|
|
250
250
|
# Decline a booking request
|
|
251
|
-
# Decline a pending Airbnb booking request (a reservation with status `pending`; find them with `GET /v1/reservations?status=pending`). `reason` must be one of Airbnb’s own decline reasons. `message` is required:
|
|
251
|
+
# Decline a pending Airbnb or Vrbo booking request (a reservation with status `pending`; find them with `GET /v1/reservations?status=pending`). `reason` must be one of Airbnb’s own decline reasons. `message` is required: the channel sends it to the guest with the decline (Airbnb: at most 500 characters; Vrbo: 250). It is not defaulted — a canned message would put words in your mouth. **Vrbo** has its own decline reasons: `dates_not_available` is sent as Vrbo’s “dates unavailable” (and blocks the dates, as Vrbo does); any other reason is refused with `422 invalid_params` pointing at `POST /v1/channels/vrbo/reservations/{code}`, which takes Vrbo’s reasons directly. Airbnb confirms asynchronously; the reservation’s status moves, and `reservation.updated` fires, when its notification lands. Same channel and status rules as `POST /v1/reservations/{id}/accept`. Send `Idempotency-Key`: a repeat with the same key replays the first response instead of acting twice (a `409 idempotency_key_in_use` while the first is still running). A 5xx, a `429 airbnb_rate_limited` or a `403 connection_reauth_required` is not stored — nothing was done — so retrying with the same key reaches Airbnb again.
|
|
252
252
|
# @param id [Integer] Repull reservation id (from `GET /v1/reservations?status=pending`) — not the Airbnb confirmation code.
|
|
253
253
|
# @param decline_reservation_request_request [DeclineReservationRequestRequest]
|
|
254
254
|
# @param [Hash] opts the optional parameters
|
|
@@ -260,7 +260,7 @@ module Repull
|
|
|
260
260
|
end
|
|
261
261
|
|
|
262
262
|
# Decline a booking request
|
|
263
|
-
# Decline a pending Airbnb booking request (a reservation with status `pending`; find them with `GET /v1/reservations?status=pending`). `reason` must be one of Airbnb’s own decline reasons. `message` is required:
|
|
263
|
+
# Decline a pending Airbnb or Vrbo booking request (a reservation with status `pending`; find them with `GET /v1/reservations?status=pending`). `reason` must be one of Airbnb’s own decline reasons. `message` is required: the channel sends it to the guest with the decline (Airbnb: at most 500 characters; Vrbo: 250). It is not defaulted — a canned message would put words in your mouth. **Vrbo** has its own decline reasons: `dates_not_available` is sent as Vrbo’s “dates unavailable” (and blocks the dates, as Vrbo does); any other reason is refused with `422 invalid_params` pointing at `POST /v1/channels/vrbo/reservations/{code}`, which takes Vrbo’s reasons directly. Airbnb confirms asynchronously; the reservation’s status moves, and `reservation.updated` fires, when its notification lands. Same channel and status rules as `POST /v1/reservations/{id}/accept`. Send `Idempotency-Key`: a repeat with the same key replays the first response instead of acting twice (a `409 idempotency_key_in_use` while the first is still running). A 5xx, a `429 airbnb_rate_limited` or a `403 connection_reauth_required` is not stored — nothing was done — so retrying with the same key reaches Airbnb again.
|
|
264
264
|
# @param id [Integer] Repull reservation id (from `GET /v1/reservations?status=pending`) — not the Airbnb confirmation code.
|
|
265
265
|
# @param decline_reservation_request_request [DeclineReservationRequestRequest]
|
|
266
266
|
# @param [Hash] opts the optional parameters
|
|
@@ -220,7 +220,7 @@ module Repull
|
|
|
220
220
|
end
|
|
221
221
|
|
|
222
222
|
# Reply to a review on any channel
|
|
223
|
-
# Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies work on Airbnb, Booking.com and VRBO. Each channel accepts one reply per review (VRBO: a second is `409 already_replied`; a review VRBO no longer takes a response to is `409 reply_not_allowed`). On VRBO the response is signed with a name — the connected account's host name, or `name` if you send it. A review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work. **Reviews read from a PMS** (`pms` set on the review — Guesty, Hostaway, …) are answered through that PMS. A PMS whose API has no reply returns `422 pms_write_unsupported` naming it (Hostaway today); `GET /v1/connect/{provider}` → `capabilities.pms.reviews.reply` says so beforehand. A revoked PMS connection is `403 connection_reauth_required`. To review a guest (Airbnb
|
|
223
|
+
# Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies work on Airbnb, Booking.com and VRBO. Each channel accepts one reply per review (VRBO: a second is `409 already_replied`; a review VRBO no longer takes a response to is `409 reply_not_allowed`). On VRBO the response is signed with a name — the connected account's host name, or `name` if you send it. A review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work. **Reviews read from a PMS** (`pms` set on the review — Guesty, Hostaway, …) are answered through that PMS. A PMS whose API has no reply returns `422 pms_write_unsupported` naming it (Hostaway today); `GET /v1/connect/{provider}` → `capabilities.pms.reviews.reply` says so beforehand. A revoked PMS connection is `403 connection_reauth_required`. To review a guest (Airbnb and Vrbo), use `POST /v1/reviews/{id}/guest-review`. **Inactive listings:** a review of an inactive listing returns `403 listing_inactive` and no reply reaches the channel. Activate the listing first.
|
|
224
224
|
# @param id [Integer] Internal Repull review id.
|
|
225
225
|
# @param reply_to_review_request [ReplyToReviewRequest]
|
|
226
226
|
# @param [Hash] opts the optional parameters
|
|
@@ -231,7 +231,7 @@ module Repull
|
|
|
231
231
|
end
|
|
232
232
|
|
|
233
233
|
# Reply to a review on any channel
|
|
234
|
-
# Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies work on Airbnb, Booking.com and VRBO. Each channel accepts one reply per review (VRBO: a second is `409 already_replied`; a review VRBO no longer takes a response to is `409 reply_not_allowed`). On VRBO the response is signed with a name — the connected account's host name, or `name` if you send it. A review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work. **Reviews read from a PMS** (`pms` set on the review — Guesty, Hostaway, …) are answered through that PMS. A PMS whose API has no reply returns `422 pms_write_unsupported` naming it (Hostaway today); `GET /v1/connect/{provider}` → `capabilities.pms.reviews.reply` says so beforehand. A revoked PMS connection is `403 connection_reauth_required`. To review a guest (Airbnb
|
|
234
|
+
# Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies work on Airbnb, Booking.com and VRBO. Each channel accepts one reply per review (VRBO: a second is `409 already_replied`; a review VRBO no longer takes a response to is `409 reply_not_allowed`). On VRBO the response is signed with a name — the connected account's host name, or `name` if you send it. A review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work. **Reviews read from a PMS** (`pms` set on the review — Guesty, Hostaway, …) are answered through that PMS. A PMS whose API has no reply returns `422 pms_write_unsupported` naming it (Hostaway today); `GET /v1/connect/{provider}` → `capabilities.pms.reviews.reply` says so beforehand. A revoked PMS connection is `403 connection_reauth_required`. To review a guest (Airbnb and Vrbo), use `POST /v1/reviews/{id}/guest-review`. **Inactive listings:** a review of an inactive listing returns `403 listing_inactive` and no reply reaches the channel. Activate the listing first.
|
|
235
235
|
# @param id [Integer] Internal Repull review id.
|
|
236
236
|
# @param reply_to_review_request [ReplyToReviewRequest]
|
|
237
237
|
# @param [Hash] opts the optional parameters
|
|
@@ -293,8 +293,8 @@ module Repull
|
|
|
293
293
|
return data, status_code, headers
|
|
294
294
|
end
|
|
295
295
|
|
|
296
|
-
# Review a guest
|
|
297
|
-
# Submit your review of a guest — a review with `reviewerRole: \"host\"` from `GET /v1/reviews?reviewerRole=host`.
|
|
296
|
+
# Review a guest
|
|
297
|
+
# Submit your review of a guest — a review with `reviewerRole: \"host\"` from `GET /v1/reviews?reviewerRole=host`. Airbnb and Vrbo let hosts review guests; a review from another channel returns `422 unsupported_channel`. **Airbnb — publishes it, final:** Airbnb has no draft and does not allow edits; a second submission is `409 review_already_submitted`. Airbnb accepts it up to 14 days after checkout (`expiresAt`); after that, `409 review_window_closed`. Required: `publicReview`, `isRevieweeRecommended` (whether you would host the guest again), and a 1–5 rating for **each** of `cleanliness`, `communication` and `respect_house_rules` — send `rating` to use one score for all three, `categoryRatings` to score them individually, or both (`rating` fills any category you did not rate). Optional: `privateFeedback`, a note to the guest that is not published. ```json { \"publicReview\": \"Joanne was a great guest.\", \"rating\": 5, \"privateFeedback\": \"Thanks for leaving the place so tidy!\", \"isRevieweeRecommended\": true } ``` **Vrbo — Vrbo's \"Rate guest\":** stars and \"would you rent to this guest again\", with no text, and never shown to the guest. `rating` (the overall experience, 1–5) is required; `categoryRatings` (cleanliness, communication, respect_house_rules) and `isRevieweeRecommended` are optional. `publicReview` and `privateFeedback` must be left out or empty (typed SDKs send them empty) — text is refused by name. A stay already rated is `409 review_already_submitted`; one Vrbo no longer takes a rating for, `409 review_window_closed`. ```json { \"rating\": 5, \"categoryRatings\": [{ \"category\": \"cleanliness\", \"rating\": 4 }], \"isRevieweeRecommended\": true } ``` A request missing a required piece is refused with `422 invalid_params` naming it, before anything is sent to the channel. A guest's review of you (`reviewerRole: \"guest\"`) cannot be written here — `409 not_host_review` (Vrbo: `422`); answer it with `POST /v1/reviews/{id}/reply`. Guide: https://repull.dev/docs/reviews#review-a-guest
|
|
298
298
|
# @param id [Integer] The review `id` from `GET /v1/reviews`.
|
|
299
299
|
# @param airbnb_host_review_submit [AirbnbHostReviewSubmit]
|
|
300
300
|
# @param [Hash] opts the optional parameters
|
|
@@ -304,8 +304,8 @@ module Repull
|
|
|
304
304
|
data
|
|
305
305
|
end
|
|
306
306
|
|
|
307
|
-
# Review a guest
|
|
308
|
-
# Submit your review of a guest — a review with `reviewerRole: \"host\"` from `GET /v1/reviews?reviewerRole=host`.
|
|
307
|
+
# Review a guest
|
|
308
|
+
# Submit your review of a guest — a review with `reviewerRole: \"host\"` from `GET /v1/reviews?reviewerRole=host`. Airbnb and Vrbo let hosts review guests; a review from another channel returns `422 unsupported_channel`. **Airbnb — publishes it, final:** Airbnb has no draft and does not allow edits; a second submission is `409 review_already_submitted`. Airbnb accepts it up to 14 days after checkout (`expiresAt`); after that, `409 review_window_closed`. Required: `publicReview`, `isRevieweeRecommended` (whether you would host the guest again), and a 1–5 rating for **each** of `cleanliness`, `communication` and `respect_house_rules` — send `rating` to use one score for all three, `categoryRatings` to score them individually, or both (`rating` fills any category you did not rate). Optional: `privateFeedback`, a note to the guest that is not published. ```json { \"publicReview\": \"Joanne was a great guest.\", \"rating\": 5, \"privateFeedback\": \"Thanks for leaving the place so tidy!\", \"isRevieweeRecommended\": true } ``` **Vrbo — Vrbo's \"Rate guest\":** stars and \"would you rent to this guest again\", with no text, and never shown to the guest. `rating` (the overall experience, 1–5) is required; `categoryRatings` (cleanliness, communication, respect_house_rules) and `isRevieweeRecommended` are optional. `publicReview` and `privateFeedback` must be left out or empty (typed SDKs send them empty) — text is refused by name. A stay already rated is `409 review_already_submitted`; one Vrbo no longer takes a rating for, `409 review_window_closed`. ```json { \"rating\": 5, \"categoryRatings\": [{ \"category\": \"cleanliness\", \"rating\": 4 }], \"isRevieweeRecommended\": true } ``` A request missing a required piece is refused with `422 invalid_params` naming it, before anything is sent to the channel. A guest's review of you (`reviewerRole: \"guest\"`) cannot be written here — `409 not_host_review` (Vrbo: `422`); answer it with `POST /v1/reviews/{id}/reply`. Guide: https://repull.dev/docs/reviews#review-a-guest
|
|
309
309
|
# @param id [Integer] The review `id` from `GET /v1/reviews`.
|
|
310
310
|
# @param airbnb_host_review_submit [AirbnbHostReviewSubmit]
|
|
311
311
|
# @param [Hash] opts the optional parameters
|