repull 0.2.55 → 0.2.56
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/reservations_api.rb +4 -4
- data/lib/repull/api/reviews_api.rb +6 -6
- data/lib/repull/api/vrbo_api.rb +371 -0
- 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/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/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/submit_guest_review200_response.rb +26 -4
- 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/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/version.rb +1 -1
- data/lib/repull.rb +29 -0
- data/openapi/v1.json +1695 -7
- metadata +30 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf03ecc7cb195158373bf4de2cd41f9dc84180561164418ade71aa76abfc926d
|
|
4
|
+
data.tar.gz: c41eef0abb2a251a6a8e0fd3e2c05b6f5604bd08ca5496869142056956213214
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b721a00c0c3a86990a9ad23674587e87707be21393a45aaf9bfeea467fc484639570bc7481cd6db65f72ed50120aeef7a082ba78d9d500368a75d84917c3804
|
|
7
|
+
data.tar.gz: 98c39c4dbfb1fe89e4a55addc3c7febbbf99f63790702f1d3053d9185a06a10b1a9ae4cabb52a9946608bb2aba333c85c3db6445dfcef0b088b929dd1513503a
|
|
@@ -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
|
data/lib/repull/api/vrbo_api.rb
CHANGED
|
@@ -250,6 +250,74 @@ 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
|
+
|
|
253
321
|
# Remove a Vrbo translation
|
|
254
322
|
# 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
323
|
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
@@ -2435,6 +2503,76 @@ module Repull
|
|
|
2435
2503
|
return data, status_code, headers
|
|
2436
2504
|
end
|
|
2437
2505
|
|
|
2506
|
+
# Get a Vrbo reservation
|
|
2507
|
+
# A Vrbo booking by its confirmation code, as Vrbo shows it now — the counterpart of `GET /v1/channels/airbnb/reservations/{code}`: its state (`Booked`, a request, …), dates, party, the guest's charges (`guestLines`), your deductions and payout (`hostLines`, `payout`), the cancellation policy and the damage deposit, plus `availableActions` — what Vrbo's \"Change or cancel the booking\" menu offers right now. `?options=cancel|change|decline` returns Vrbo's choices for that action instead: the cancel reasons and message limits; the booking's current dates, times and party with Vrbo's limits (e.g. a pay-later booking's check-in is locked); or the decline reasons of a booking request. Read live from Vrbo (a few seconds).
|
|
2508
|
+
# @param code [String] The Vrbo confirmation code (`HA-…`), as in `GET /v1/channels/vrbo/reservations`.
|
|
2509
|
+
# @param [Hash] opts the optional parameters
|
|
2510
|
+
# @option opts [String] :options Return Vrbo's choices for this action instead of the booking.
|
|
2511
|
+
# @return [GetVrboReservation200Response]
|
|
2512
|
+
def get_vrbo_reservation(code, opts = {})
|
|
2513
|
+
data, _status_code, _headers = get_vrbo_reservation_with_http_info(code, opts)
|
|
2514
|
+
data
|
|
2515
|
+
end
|
|
2516
|
+
|
|
2517
|
+
# Get a Vrbo reservation
|
|
2518
|
+
# 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).
|
|
2519
|
+
# @param code [String] The Vrbo confirmation code (`HA-…`), as in `GET /v1/channels/vrbo/reservations`.
|
|
2520
|
+
# @param [Hash] opts the optional parameters
|
|
2521
|
+
# @option opts [String] :options Return Vrbo's choices for this action instead of the booking.
|
|
2522
|
+
# @return [Array<(GetVrboReservation200Response, Integer, Hash)>] GetVrboReservation200Response data, response status code and response headers
|
|
2523
|
+
def get_vrbo_reservation_with_http_info(code, opts = {})
|
|
2524
|
+
if @api_client.config.debugging
|
|
2525
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.get_vrbo_reservation ...'
|
|
2526
|
+
end
|
|
2527
|
+
# verify the required parameter 'code' is set
|
|
2528
|
+
if @api_client.config.client_side_validation && code.nil?
|
|
2529
|
+
fail ArgumentError, "Missing the required parameter 'code' when calling VRBOApi.get_vrbo_reservation"
|
|
2530
|
+
end
|
|
2531
|
+
allowable_values = ["cancel", "change", "decline"]
|
|
2532
|
+
if @api_client.config.client_side_validation && opts[:'options'] && !allowable_values.include?(opts[:'options'])
|
|
2533
|
+
fail ArgumentError, "invalid value for \"options\", must be one of #{allowable_values}"
|
|
2534
|
+
end
|
|
2535
|
+
# resource path
|
|
2536
|
+
local_var_path = '/v1/channels/vrbo/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
|
|
2537
|
+
|
|
2538
|
+
# query parameters
|
|
2539
|
+
query_params = opts[:query_params] || {}
|
|
2540
|
+
query_params[:'options'] = opts[:'options'] if !opts[:'options'].nil?
|
|
2541
|
+
|
|
2542
|
+
# header parameters
|
|
2543
|
+
header_params = opts[:header_params] || {}
|
|
2544
|
+
# HTTP header 'Accept' (if needed)
|
|
2545
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2546
|
+
|
|
2547
|
+
# form parameters
|
|
2548
|
+
form_params = opts[:form_params] || {}
|
|
2549
|
+
|
|
2550
|
+
# http body (model)
|
|
2551
|
+
post_body = opts[:debug_body]
|
|
2552
|
+
|
|
2553
|
+
# return_type
|
|
2554
|
+
return_type = opts[:debug_return_type] || 'GetVrboReservation200Response'
|
|
2555
|
+
|
|
2556
|
+
# auth_names
|
|
2557
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2558
|
+
|
|
2559
|
+
new_options = opts.merge(
|
|
2560
|
+
:operation => :"VRBOApi.get_vrbo_reservation",
|
|
2561
|
+
:header_params => header_params,
|
|
2562
|
+
:query_params => query_params,
|
|
2563
|
+
:form_params => form_params,
|
|
2564
|
+
:body => post_body,
|
|
2565
|
+
:auth_names => auth_names,
|
|
2566
|
+
:return_type => return_type
|
|
2567
|
+
)
|
|
2568
|
+
|
|
2569
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2570
|
+
if @api_client.config.debugging
|
|
2571
|
+
@api_client.config.logger.debug "API called: VRBOApi#get_vrbo_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2572
|
+
end
|
|
2573
|
+
return data, status_code, headers
|
|
2574
|
+
end
|
|
2575
|
+
|
|
2438
2576
|
# List VRBO listings
|
|
2439
2577
|
# 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.
|
|
2440
2578
|
# @param [Hash] opts the optional parameters
|
|
@@ -2584,6 +2722,98 @@ module Repull
|
|
|
2584
2722
|
return data, status_code, headers
|
|
2585
2723
|
end
|
|
2586
2724
|
|
|
2725
|
+
# List Vrbo transactions (payout ledger)
|
|
2726
|
+
# The Vrbo payout ledger for this workspace — the counterpart of `GET /v1/channels/airbnb/transactions`: every bank deposit Vrbo made to the host, each followed by the bookings it paid. A deposit's lines' signed `amount`s sum to its `payout.paidOutAmount` exactly; a negative line (`type: Adjustment`) is money taken back from that deposit. `status: UPCOMING` lines are payouts Vrbo has scheduled and not made yet, with Vrbo's `upcomingStatus` (`Scheduled`, `Blocked`). **Ids are stable**, so you can upsert on `transactionId`: a Payout row's id is Vrbo's deposit reference number; a line's is `<reference>:<confirmationCode>:<n>`. **Order:** newest deposit first, each followed by its lines in Vrbo's order (`payout.lineIndex`). `start_date` / `end_date` match the deposit's date (a scheduled line's estimated payout date). **From Repull's copy.** The ledger is read from the Vrbo account (the last 12 months of deposits, and the payouts scheduled for the next 6) and kept: a read answers from it at once. A copy over a day old — or never filled — answers and is refreshed in the background (`dataFreshness.reason`: `refreshing` / `never_synced`); `POST` refreshes it now. Lines on listings that are inactive in Repull are included and flagged `onInactiveListing: true`, so every deposit reconciles. **Not in Vrbo's payout reports** (`unavailableFields`): the fee split per booking, taxes, and the stay's nights and dates — see the reservation for those.
|
|
2727
|
+
# @param [Hash] opts the optional parameters
|
|
2728
|
+
# @option opts [String] :account_id Only this Vrbo account (`accountId` from `GET /v1/channels/vrbo/connection`).
|
|
2729
|
+
# @option opts [Date] :start_date Inclusive lower bound on the deposit's date. YYYY-MM-DD.
|
|
2730
|
+
# @option opts [Date] :end_date Inclusive upper bound on the deposit's date. YYYY-MM-DD.
|
|
2731
|
+
# @option opts [String] :status
|
|
2732
|
+
# @option opts [String] :type `Payout`, `Reservation` or `Adjustment`.
|
|
2733
|
+
# @option opts [String] :payout_id One deposit (its reference number) and its lines.
|
|
2734
|
+
# @option opts [String] :confirmation_code
|
|
2735
|
+
# @option opts [String] :cursor From the previous page's `pagination.nextCursor`.
|
|
2736
|
+
# @option opts [Integer] :limit Rows per page (default 100, at most 500). (default to 100)
|
|
2737
|
+
# @return [ListVrboTransactions200Response]
|
|
2738
|
+
def list_vrbo_transactions(opts = {})
|
|
2739
|
+
data, _status_code, _headers = list_vrbo_transactions_with_http_info(opts)
|
|
2740
|
+
data
|
|
2741
|
+
end
|
|
2742
|
+
|
|
2743
|
+
# List Vrbo transactions (payout ledger)
|
|
2744
|
+
# 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.
|
|
2745
|
+
# @param [Hash] opts the optional parameters
|
|
2746
|
+
# @option opts [String] :account_id Only this Vrbo account (`accountId` from `GET /v1/channels/vrbo/connection`).
|
|
2747
|
+
# @option opts [Date] :start_date Inclusive lower bound on the deposit's date. YYYY-MM-DD.
|
|
2748
|
+
# @option opts [Date] :end_date Inclusive upper bound on the deposit's date. YYYY-MM-DD.
|
|
2749
|
+
# @option opts [String] :status
|
|
2750
|
+
# @option opts [String] :type `Payout`, `Reservation` or `Adjustment`.
|
|
2751
|
+
# @option opts [String] :payout_id One deposit (its reference number) and its lines.
|
|
2752
|
+
# @option opts [String] :confirmation_code
|
|
2753
|
+
# @option opts [String] :cursor From the previous page's `pagination.nextCursor`.
|
|
2754
|
+
# @option opts [Integer] :limit Rows per page (default 100, at most 500). (default to 100)
|
|
2755
|
+
# @return [Array<(ListVrboTransactions200Response, Integer, Hash)>] ListVrboTransactions200Response data, response status code and response headers
|
|
2756
|
+
def list_vrbo_transactions_with_http_info(opts = {})
|
|
2757
|
+
if @api_client.config.debugging
|
|
2758
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.list_vrbo_transactions ...'
|
|
2759
|
+
end
|
|
2760
|
+
allowable_values = ["COMPLETED", "UPCOMING"]
|
|
2761
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
2762
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
2763
|
+
end
|
|
2764
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
2765
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VRBOApi.list_vrbo_transactions, must be smaller than or equal to 500.'
|
|
2766
|
+
end
|
|
2767
|
+
|
|
2768
|
+
# resource path
|
|
2769
|
+
local_var_path = '/v1/channels/vrbo/transactions'
|
|
2770
|
+
|
|
2771
|
+
# query parameters
|
|
2772
|
+
query_params = opts[:query_params] || {}
|
|
2773
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
2774
|
+
query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
|
2775
|
+
query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
|
2776
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
2777
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
2778
|
+
query_params[:'payout_id'] = opts[:'payout_id'] if !opts[:'payout_id'].nil?
|
|
2779
|
+
query_params[:'confirmation_code'] = opts[:'confirmation_code'] if !opts[:'confirmation_code'].nil?
|
|
2780
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2781
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2782
|
+
|
|
2783
|
+
# header parameters
|
|
2784
|
+
header_params = opts[:header_params] || {}
|
|
2785
|
+
# HTTP header 'Accept' (if needed)
|
|
2786
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2787
|
+
|
|
2788
|
+
# form parameters
|
|
2789
|
+
form_params = opts[:form_params] || {}
|
|
2790
|
+
|
|
2791
|
+
# http body (model)
|
|
2792
|
+
post_body = opts[:debug_body]
|
|
2793
|
+
|
|
2794
|
+
# return_type
|
|
2795
|
+
return_type = opts[:debug_return_type] || 'ListVrboTransactions200Response'
|
|
2796
|
+
|
|
2797
|
+
# auth_names
|
|
2798
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2799
|
+
|
|
2800
|
+
new_options = opts.merge(
|
|
2801
|
+
:operation => :"VRBOApi.list_vrbo_transactions",
|
|
2802
|
+
:header_params => header_params,
|
|
2803
|
+
:query_params => query_params,
|
|
2804
|
+
:form_params => form_params,
|
|
2805
|
+
:body => post_body,
|
|
2806
|
+
:auth_names => auth_names,
|
|
2807
|
+
:return_type => return_type
|
|
2808
|
+
)
|
|
2809
|
+
|
|
2810
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2811
|
+
if @api_client.config.debugging
|
|
2812
|
+
@api_client.config.logger.debug "API called: VRBOApi#list_vrbo_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2813
|
+
end
|
|
2814
|
+
return data, status_code, headers
|
|
2815
|
+
end
|
|
2816
|
+
|
|
2587
2817
|
# Link a Vrbo listing to a Repull listing
|
|
2588
2818
|
# 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.
|
|
2589
2819
|
# @param map_vrbo_listing_request [MapVrboListingRequest]
|
|
@@ -2806,6 +3036,73 @@ module Repull
|
|
|
2806
3036
|
return data, status_code, headers
|
|
2807
3037
|
end
|
|
2808
3038
|
|
|
3039
|
+
# Refresh the Vrbo payout ledger
|
|
3040
|
+
# Read the ledger from Vrbo now — every connected Vrbo account, or the one in `?account_id=` — and keep it; then read it with GET. Body (optional): `start_date` / `end_date` (YYYY-MM-DD) for the deposits to read; without them, the last 12 months. The payouts Vrbo has scheduled are always read again. One account failing never stops the others: it carries `error` in `accounts[]`. About 15 seconds per account.
|
|
3041
|
+
# @param [Hash] opts the optional parameters
|
|
3042
|
+
# @option opts [String] :account_id Only this Vrbo account (`accountId` from `GET /v1/channels/vrbo/connection`).
|
|
3043
|
+
# @option opts [SyncVrboTransactionsRequest] :sync_vrbo_transactions_request
|
|
3044
|
+
# @return [SyncVrboTransactions200Response]
|
|
3045
|
+
def sync_vrbo_transactions(opts = {})
|
|
3046
|
+
data, _status_code, _headers = sync_vrbo_transactions_with_http_info(opts)
|
|
3047
|
+
data
|
|
3048
|
+
end
|
|
3049
|
+
|
|
3050
|
+
# Refresh the Vrbo payout ledger
|
|
3051
|
+
# 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.
|
|
3052
|
+
# @param [Hash] opts the optional parameters
|
|
3053
|
+
# @option opts [String] :account_id Only this Vrbo account (`accountId` from `GET /v1/channels/vrbo/connection`).
|
|
3054
|
+
# @option opts [SyncVrboTransactionsRequest] :sync_vrbo_transactions_request
|
|
3055
|
+
# @return [Array<(SyncVrboTransactions200Response, Integer, Hash)>] SyncVrboTransactions200Response data, response status code and response headers
|
|
3056
|
+
def sync_vrbo_transactions_with_http_info(opts = {})
|
|
3057
|
+
if @api_client.config.debugging
|
|
3058
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.sync_vrbo_transactions ...'
|
|
3059
|
+
end
|
|
3060
|
+
# resource path
|
|
3061
|
+
local_var_path = '/v1/channels/vrbo/transactions'
|
|
3062
|
+
|
|
3063
|
+
# query parameters
|
|
3064
|
+
query_params = opts[:query_params] || {}
|
|
3065
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
3066
|
+
|
|
3067
|
+
# header parameters
|
|
3068
|
+
header_params = opts[:header_params] || {}
|
|
3069
|
+
# HTTP header 'Accept' (if needed)
|
|
3070
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3071
|
+
# HTTP header 'Content-Type'
|
|
3072
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3073
|
+
if !content_type.nil?
|
|
3074
|
+
header_params['Content-Type'] = content_type
|
|
3075
|
+
end
|
|
3076
|
+
|
|
3077
|
+
# form parameters
|
|
3078
|
+
form_params = opts[:form_params] || {}
|
|
3079
|
+
|
|
3080
|
+
# http body (model)
|
|
3081
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'sync_vrbo_transactions_request'])
|
|
3082
|
+
|
|
3083
|
+
# return_type
|
|
3084
|
+
return_type = opts[:debug_return_type] || 'SyncVrboTransactions200Response'
|
|
3085
|
+
|
|
3086
|
+
# auth_names
|
|
3087
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3088
|
+
|
|
3089
|
+
new_options = opts.merge(
|
|
3090
|
+
:operation => :"VRBOApi.sync_vrbo_transactions",
|
|
3091
|
+
:header_params => header_params,
|
|
3092
|
+
:query_params => query_params,
|
|
3093
|
+
:form_params => form_params,
|
|
3094
|
+
:body => post_body,
|
|
3095
|
+
:auth_names => auth_names,
|
|
3096
|
+
:return_type => return_type
|
|
3097
|
+
)
|
|
3098
|
+
|
|
3099
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3100
|
+
if @api_client.config.debugging
|
|
3101
|
+
@api_client.config.logger.debug "API called: VRBOApi#sync_vrbo_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3102
|
+
end
|
|
3103
|
+
return data, status_code, headers
|
|
3104
|
+
end
|
|
3105
|
+
|
|
2809
3106
|
# Update the Vrbo additional details
|
|
2810
3107
|
# 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
3108
|
# @param id [String] Repull listing id (numeric string) of a listing linked to Vrbo.
|
|
@@ -4503,5 +4800,79 @@ module Repull
|
|
|
4503
4800
|
end
|
|
4504
4801
|
return data, status_code, headers
|
|
4505
4802
|
end
|
|
4803
|
+
|
|
4804
|
+
# Accept, decline, cancel, charge or refund a Vrbo reservation
|
|
4805
|
+
# 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.
|
|
4806
|
+
# @param code [String] The Vrbo confirmation code (`HA-…`), as in `GET /v1/channels/vrbo/reservations`.
|
|
4807
|
+
# @param vrbo_reservation_action_request [VrboReservationActionRequest]
|
|
4808
|
+
# @param [Hash] opts the optional parameters
|
|
4809
|
+
# @return [VrboReservationAction200Response]
|
|
4810
|
+
def vrbo_reservation_action(code, vrbo_reservation_action_request, opts = {})
|
|
4811
|
+
data, _status_code, _headers = vrbo_reservation_action_with_http_info(code, vrbo_reservation_action_request, opts)
|
|
4812
|
+
data
|
|
4813
|
+
end
|
|
4814
|
+
|
|
4815
|
+
# Accept, decline, cancel, charge or refund a Vrbo reservation
|
|
4816
|
+
# 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.
|
|
4817
|
+
# @param code [String] The Vrbo confirmation code (`HA-…`), as in `GET /v1/channels/vrbo/reservations`.
|
|
4818
|
+
# @param vrbo_reservation_action_request [VrboReservationActionRequest]
|
|
4819
|
+
# @param [Hash] opts the optional parameters
|
|
4820
|
+
# @return [Array<(VrboReservationAction200Response, Integer, Hash)>] VrboReservationAction200Response data, response status code and response headers
|
|
4821
|
+
def vrbo_reservation_action_with_http_info(code, vrbo_reservation_action_request, opts = {})
|
|
4822
|
+
if @api_client.config.debugging
|
|
4823
|
+
@api_client.config.logger.debug 'Calling API: VRBOApi.vrbo_reservation_action ...'
|
|
4824
|
+
end
|
|
4825
|
+
# verify the required parameter 'code' is set
|
|
4826
|
+
if @api_client.config.client_side_validation && code.nil?
|
|
4827
|
+
fail ArgumentError, "Missing the required parameter 'code' when calling VRBOApi.vrbo_reservation_action"
|
|
4828
|
+
end
|
|
4829
|
+
# verify the required parameter 'vrbo_reservation_action_request' is set
|
|
4830
|
+
if @api_client.config.client_side_validation && vrbo_reservation_action_request.nil?
|
|
4831
|
+
fail ArgumentError, "Missing the required parameter 'vrbo_reservation_action_request' when calling VRBOApi.vrbo_reservation_action"
|
|
4832
|
+
end
|
|
4833
|
+
# resource path
|
|
4834
|
+
local_var_path = '/v1/channels/vrbo/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
|
|
4835
|
+
|
|
4836
|
+
# query parameters
|
|
4837
|
+
query_params = opts[:query_params] || {}
|
|
4838
|
+
|
|
4839
|
+
# header parameters
|
|
4840
|
+
header_params = opts[:header_params] || {}
|
|
4841
|
+
# HTTP header 'Accept' (if needed)
|
|
4842
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4843
|
+
# HTTP header 'Content-Type'
|
|
4844
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4845
|
+
if !content_type.nil?
|
|
4846
|
+
header_params['Content-Type'] = content_type
|
|
4847
|
+
end
|
|
4848
|
+
|
|
4849
|
+
# form parameters
|
|
4850
|
+
form_params = opts[:form_params] || {}
|
|
4851
|
+
|
|
4852
|
+
# http body (model)
|
|
4853
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(vrbo_reservation_action_request)
|
|
4854
|
+
|
|
4855
|
+
# return_type
|
|
4856
|
+
return_type = opts[:debug_return_type] || 'VrboReservationAction200Response'
|
|
4857
|
+
|
|
4858
|
+
# auth_names
|
|
4859
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
4860
|
+
|
|
4861
|
+
new_options = opts.merge(
|
|
4862
|
+
:operation => :"VRBOApi.vrbo_reservation_action",
|
|
4863
|
+
:header_params => header_params,
|
|
4864
|
+
:query_params => query_params,
|
|
4865
|
+
:form_params => form_params,
|
|
4866
|
+
:body => post_body,
|
|
4867
|
+
:auth_names => auth_names,
|
|
4868
|
+
:return_type => return_type
|
|
4869
|
+
)
|
|
4870
|
+
|
|
4871
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
4872
|
+
if @api_client.config.debugging
|
|
4873
|
+
@api_client.config.logger.debug "API called: VRBOApi#vrbo_reservation_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4874
|
+
end
|
|
4875
|
+
return data, status_code, headers
|
|
4876
|
+
end
|
|
4506
4877
|
end
|
|
4507
4878
|
end
|