repull 0.2.25 → 0.2.27
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 +38 -23
- data/lib/repull/api/booking_com_api.rb +9 -2
- data/lib/repull/api/connect_api.rb +6 -6
- data/lib/repull/api/conversations_api.rb +3 -0
- data/lib/repull/api/listings_api.rb +2 -2
- data/lib/repull/api/properties_api.rb +5 -2
- data/lib/repull/api/reservations_api.rb +96 -6
- data/lib/repull/api/reviews_api.rb +3 -0
- data/lib/repull/api/vrbo_api.rb +11 -4
- data/lib/repull/models/airbnb_listing.rb +13 -2
- data/lib/repull/models/airbnb_listing_details_write_request.rb +109 -5
- data/lib/repull/models/airbnb_listing_details_write_request_check_in_option.rb +1 -1
- data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +2 -2
- data/lib/repull/models/airbnb_pricing_write_request.rb +30 -2
- data/lib/repull/models/airbnb_pricing_write_request_fees_inner.rb +291 -0
- data/lib/repull/models/booking_property_listings_inner.rb +57 -1
- data/lib/repull/models/cancel_reservation200_response.rb +1 -1
- data/lib/repull/models/connect_session_completed_event.rb +281 -0
- data/lib/repull/models/connect_session_completed_payload.rb +210 -0
- data/lib/repull/models/connect_status.rb +35 -4
- data/lib/repull/models/connect_status_capabilities.rb +148 -0
- data/lib/repull/models/connection.rb +28 -5
- data/lib/repull/models/connection_action.rb +188 -0
- data/lib/repull/models/conversation.rb +12 -1
- data/lib/repull/models/conversation_detail.rb +12 -1
- data/lib/repull/models/create_connect_session_request.rb +40 -2
- data/lib/repull/models/create_connection_request.rb +46 -8
- data/lib/repull/models/error_error.rb +13 -1
- data/lib/repull/models/{cancel_reservation200_response_pms.rb → error_error_listings_inner.rb} +36 -30
- data/lib/repull/models/get_booking_extranet_login_status200_response.rb +2 -1
- data/lib/repull/models/list_listing_units200_response.rb +2 -1
- data/lib/repull/models/listing.rb +23 -2
- data/lib/repull/models/listing_capabilities.rb +148 -0
- data/lib/repull/models/property.rb +26 -3
- data/lib/repull/models/record_account.rb +170 -0
- data/lib/repull/models/reservation.rb +12 -1
- data/lib/repull/models/reservation_capabilities.rb +230 -0
- data/lib/repull/models/reservation_create_request.rb +172 -33
- data/lib/repull/models/reservation_create_response.rb +6 -6
- data/lib/repull/models/reservation_create_response_unit.rb +1 -1
- data/lib/repull/models/{reservation_create_response_pms.rb → reservation_pms_outcome.rb} +38 -8
- data/lib/repull/models/reservation_pms_outcome_quote.rb +168 -0
- data/lib/repull/models/{cancel_reservation200_response_pms_errors_inner.rb → reservation_pms_section_error.rb} +16 -16
- data/lib/repull/models/reservation_quote_request.rb +312 -0
- data/lib/repull/models/reservation_quote_response.rb +228 -0
- data/lib/repull/models/reservation_quote_response_breakdown.rb +175 -0
- data/lib/repull/models/reservation_update_response.rb +16 -6
- data/lib/repull/models/review.rb +12 -1
- data/lib/repull/models/submit_smoobu_credentials_request.rb +2 -5
- data/lib/repull/models/submit_smoobu_credentials_request_credentials.rb +193 -0
- data/lib/repull/models/update_airbnb_checkin_guide200_response.rb +147 -0
- data/lib/repull/models/update_airbnb_checkin_guide200_response_data.rb +177 -0
- data/lib/repull/models/{airbnb_permits_write_request_permits_inner_answers_value.rb → update_airbnb_checkin_guide200_response_data_steps_inner.rb} +24 -43
- data/lib/repull/models/update_airbnb_checkin_guide_request.rb +186 -0
- data/lib/repull/models/update_airbnb_checkin_guide_request_steps_inner.rb +182 -0
- data/lib/repull/models/webhook_event.rb +2 -0
- data/lib/repull/models/webhook_event_type.rb +2 -1
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +21 -4
- data/openapi/v1.json +2221 -340
- data/scripts/regen.sh +1 -1
- metadata +23 -6
|
@@ -90,9 +90,11 @@ module Repull
|
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
# Cancel a reservation
|
|
93
|
-
# Cancels a reservation where it lives. - **
|
|
93
|
+
# Cancels a reservation where it lives. - **A booking managed in a connected PMS** (Mews, Cloudbeds, Hostaway, Guesty, Beds24, BookingSync, Lodgify, Smoobu, Hospitable, iGMS): cancelled in the PMS, then read back, so Repull and the PMS agree. No cancellation fee is charged. Lodgify *declines* the booking rather than deleting it. **OwnerRez's API cannot cancel** — `422 pms_write_unsupported`; cancel it in OwnerRez. `GET /v1/listings/{id}` → `capabilities.reservations.cancel` says which applies. - **Direct, website or owner bookings**: cancelled in Repull — the nights are released and `reservation.cancelled` fires. - **A channel booking** (Airbnb, Booking.com, VRBO), including one that came in through a PMS: `409 reservation_owned_by_channel`. Cancel it on the channel; the cancellation reaches Repull with the next sync. Cancelling an already-cancelled reservation is not an error: the response carries `alreadyCancelled: true`. PMS integrations other than Mews and Cloudbeds are verified against the vendor's API documentation only. `X-Account-Id` restricts the reservation to one connected account. Returns `403 listing_inactive` when the listing is inactive.
|
|
94
94
|
# @param id [Integer] Reservation id.
|
|
95
95
|
# @param [Hash] opts the optional parameters
|
|
96
|
+
# @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.
|
|
97
|
+
# @option opts [String] :x_account_id Restrict the request to one connected account (a Repull connection id, `GET /v1/connect` → `id`). A listing or reservation outside that account answers `404 not_found`. Omit it to act workspace-wide.
|
|
96
98
|
# @option opts [CancelReservationRequest] :cancel_reservation_request
|
|
97
99
|
# @return [CancelReservation200Response]
|
|
98
100
|
def cancel_reservation(id, opts = {})
|
|
@@ -101,9 +103,11 @@ module Repull
|
|
|
101
103
|
end
|
|
102
104
|
|
|
103
105
|
# Cancel a reservation
|
|
104
|
-
# Cancels a reservation where it lives. - **
|
|
106
|
+
# Cancels a reservation where it lives. - **A booking managed in a connected PMS** (Mews, Cloudbeds, Hostaway, Guesty, Beds24, BookingSync, Lodgify, Smoobu, Hospitable, iGMS): cancelled in the PMS, then read back, so Repull and the PMS agree. No cancellation fee is charged. Lodgify *declines* the booking rather than deleting it. **OwnerRez's API cannot cancel** — `422 pms_write_unsupported`; cancel it in OwnerRez. `GET /v1/listings/{id}` → `capabilities.reservations.cancel` says which applies. - **Direct, website or owner bookings**: cancelled in Repull — the nights are released and `reservation.cancelled` fires. - **A channel booking** (Airbnb, Booking.com, VRBO), including one that came in through a PMS: `409 reservation_owned_by_channel`. Cancel it on the channel; the cancellation reaches Repull with the next sync. Cancelling an already-cancelled reservation is not an error: the response carries `alreadyCancelled: true`. PMS integrations other than Mews and Cloudbeds are verified against the vendor's API documentation only. `X-Account-Id` restricts the reservation to one connected account. Returns `403 listing_inactive` when the listing is inactive.
|
|
105
107
|
# @param id [Integer] Reservation id.
|
|
106
108
|
# @param [Hash] opts the optional parameters
|
|
109
|
+
# @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.
|
|
110
|
+
# @option opts [String] :x_account_id Restrict the request to one connected account (a Repull connection id, `GET /v1/connect` → `id`). A listing or reservation outside that account answers `404 not_found`. Omit it to act workspace-wide.
|
|
107
111
|
# @option opts [CancelReservationRequest] :cancel_reservation_request
|
|
108
112
|
# @return [Array<(CancelReservation200Response, Integer, Hash)>] CancelReservation200Response data, response status code and response headers
|
|
109
113
|
def cancel_reservation_with_http_info(id, opts = {})
|
|
@@ -114,6 +118,10 @@ module Repull
|
|
|
114
118
|
if @api_client.config.client_side_validation && id.nil?
|
|
115
119
|
fail ArgumentError, "Missing the required parameter 'id' when calling ReservationsApi.cancel_reservation"
|
|
116
120
|
end
|
|
121
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
122
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling ReservationsApi.cancel_reservation, the character length must be smaller than or equal to 255.'
|
|
123
|
+
end
|
|
124
|
+
|
|
117
125
|
# resource path
|
|
118
126
|
local_var_path = '/v1/reservations/{id}/cancel'.sub('{id}', CGI.escape(id.to_s))
|
|
119
127
|
|
|
@@ -129,6 +137,8 @@ module Repull
|
|
|
129
137
|
if !content_type.nil?
|
|
130
138
|
header_params['Content-Type'] = content_type
|
|
131
139
|
end
|
|
140
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
141
|
+
header_params[:'X-Account-Id'] = opts[:'x_account_id'] if !opts[:'x_account_id'].nil?
|
|
132
142
|
|
|
133
143
|
# form parameters
|
|
134
144
|
form_params = opts[:form_params] || {}
|
|
@@ -160,10 +170,11 @@ module Repull
|
|
|
160
170
|
end
|
|
161
171
|
|
|
162
172
|
# Create a reservation
|
|
163
|
-
# Creates a reservation and everything that hangs off one
|
|
173
|
+
# Creates a reservation — in the listing's PMS when it has one, otherwise as a direct booking in Repull. ### Where the booking is made - **A listing managed in a connected PMS** (Mews, Cloudbeds, Hostaway, Guesty, Beds24, BookingSync, Lodgify, Smoobu, Hospitable, iGMS, OwnerRez): the booking is created **in the PMS first**, then recorded in Repull from the PMS's own record, so the next sync lands on the same confirmation code and nothing is duplicated. A booking is **never** created only in Repull for such a listing — the PMS would keep selling the dates. What the PMS cannot do is refused (`422 pms_write_unsupported`), never faked. The PMS checks availability: taken dates answer `409 pms_unavailable`. - **Any other listing**: a direct booking made in Repull, with everything that hangs off one — the guest, the conversation, the calendar block and the `reservation.created` fan-out that issues the door code and starts the messaging automations. Priced by the listing's own rates; **availability is NOT checked** (call `GET /v1/availability/{propertyId}` first if that matters). `GET /v1/listings/{id}` → `capabilities.reservations` says which applies to a listing and exactly what it supports (`create`, `modify`, `cancel`, `quote`, `customPrice`, plus `notes`). ### Fields by listing kind | Field | PMS listing | Direct-booking listing | |---|---|---| | `listingId`, `checkIn`, `checkOut`, `guest`, `guestCount`, `adults`, `children` | ✓ | ✓ | | `status` | `confirmed` (default) or `tentative` | ✓ | | `totalPrice` | ✓ where `capabilities.reservations.customPrice`; otherwise the PMS prices the stay | `422 unsupported_field` (priced from the listing's rates) | | `notes`, `unitId`, `sendConfirmationEmail` | ✓ | `422 unsupported_field` | | `checkInTime`, `checkOutTime`, `currency`, `guestId` | `422 unsupported_field` (the PMS's own settings apply) | ✓ | | `platform` | `direct` or `website` (`owner` → `422 pms_write_unsupported`; block owner stays in the PMS) | `direct`, `website` or `owner` | A field a listing cannot take is refused by name, never silently dropped. `platform` never accepts `airbnb` / `booking` / `vrbo`: those reservations are owned by the channel and arrive through sync. ### Per-PMS limits | PMS | create | change | cancel | quote | `totalPrice` | Limits | |---|---|---|---|---|---|---| | Mews | ✓ | ✓ | ✓ | – | ✓ | — | | Cloudbeds | ✓ | ✓ | ✓ | – | – | Books at the rate plan's price; group bookings supported. | | Hostaway | ✓ | ✓ | ✓ | ✓ | ✓ | Direct-channel bookings only; a specific unit is refused; a date change keeps the booked total. | | Guesty | ✓ | ✓ | ✓ | ✓ | ✓ | Cancels direct and Vrbo bookings; other channel bookings are cancelled on the channel. | | Beds24 | ✓ | ✓ | ✓ | ✓ | ✓ | Needs the `write:bookings` scope; a multi-room property needs `unitId`. | | BookingSync | ✓ | ✓ | ✓ | ✓ | ✓ | Needs `bookings_write`; fees and taxes are not itemized; no guest email. | | Lodgify | ✓ | ✓ | ✓ (declines) | ✓ | ✓ | Cancel declines the booking; single-room bookings. | | Smoobu | ✓ | ✓ (no dates) | ✓ | ✓ | ✓ | Dates cannot be changed through Smoobu's API — cancel and rebook, or change them in Smoobu. | | Hospitable | ✓ | ✓ | ✓ | ✓ (Direct plan) | ✓ | Manual reservations only; needs `reservation:write`; adds no fees or taxes. | | iGMS | ✓ | ✓ | ✓ | – | ✓ (required) | iGMS direct bookings only; a price is required; no tentative holds. | | OwnerRez | ✓ | ✓ | – | ✓ | – | No cancel through OwnerRez's API; priced by the property's own rates; needs the `full` scope. | Every PMS except Cloudbeds refuses group bookings, and every vacation-rental PMS refuses to change or cancel a booking that came from a channel (Airbnb, Booking.com, Vrbo…) — that is done on the channel. **Verification.** Mews and Cloudbeds were run end to end on their vendors' sandboxes. Every other PMS is **verified against the vendor's API documentation only** — no live account has been written to yet. `capabilities.reservations.verifiedAgainst` says which. ### Idempotency **Send `Idempotency-Key`.** A network timeout here is exactly the case it exists for. The key is also sent to the PMS as the booking's reference, so even a retry that reaches the PMS again finds the booking instead of making a second one (`409 pms_duplicate` with `existing`, or the existing booking returned). A completed answer is replayed with `Idempotency-Status: cached` and the PMS is not called again. `502 pms_error` (the PMS could not be reached) is NOT stored — retry with the same key. `502 reservation_created_in_pms_only` IS stored, unlike every other 5xx: the booking exists in the PMS and arrives with the next sync, so a retry replays that answer rather than booking twice. ### Partial success When the PMS created the booking but a follow-up step did not apply (for example the notes, or a tentative state), the response is still `201`, with `pms.partial: true` and the steps in `pms.failedSections`. The booking exists — do not create it again. `X-Account-Id` restricts the listing to one connected account. Returns `403 listing_inactive` when the listing is inactive.
|
|
164
174
|
# @param reservation_create_request [ReservationCreateRequest]
|
|
165
175
|
# @param [Hash] opts the optional parameters
|
|
166
176
|
# @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.
|
|
177
|
+
# @option opts [String] :x_account_id Restrict the request to one connected account (a Repull connection id, `GET /v1/connect` → `id`). A listing or reservation outside that account answers `404 not_found`. Omit it to act workspace-wide.
|
|
167
178
|
# @return [ReservationCreateResponse]
|
|
168
179
|
def create_reservation(reservation_create_request, opts = {})
|
|
169
180
|
data, _status_code, _headers = create_reservation_with_http_info(reservation_create_request, opts)
|
|
@@ -171,10 +182,11 @@ module Repull
|
|
|
171
182
|
end
|
|
172
183
|
|
|
173
184
|
# Create a reservation
|
|
174
|
-
# Creates a reservation and everything that hangs off one
|
|
185
|
+
# Creates a reservation — in the listing's PMS when it has one, otherwise as a direct booking in Repull. ### Where the booking is made - **A listing managed in a connected PMS** (Mews, Cloudbeds, Hostaway, Guesty, Beds24, BookingSync, Lodgify, Smoobu, Hospitable, iGMS, OwnerRez): the booking is created **in the PMS first**, then recorded in Repull from the PMS's own record, so the next sync lands on the same confirmation code and nothing is duplicated. A booking is **never** created only in Repull for such a listing — the PMS would keep selling the dates. What the PMS cannot do is refused (`422 pms_write_unsupported`), never faked. The PMS checks availability: taken dates answer `409 pms_unavailable`. - **Any other listing**: a direct booking made in Repull, with everything that hangs off one — the guest, the conversation, the calendar block and the `reservation.created` fan-out that issues the door code and starts the messaging automations. Priced by the listing's own rates; **availability is NOT checked** (call `GET /v1/availability/{propertyId}` first if that matters). `GET /v1/listings/{id}` → `capabilities.reservations` says which applies to a listing and exactly what it supports (`create`, `modify`, `cancel`, `quote`, `customPrice`, plus `notes`). ### Fields by listing kind | Field | PMS listing | Direct-booking listing | |---|---|---| | `listingId`, `checkIn`, `checkOut`, `guest`, `guestCount`, `adults`, `children` | ✓ | ✓ | | `status` | `confirmed` (default) or `tentative` | ✓ | | `totalPrice` | ✓ where `capabilities.reservations.customPrice`; otherwise the PMS prices the stay | `422 unsupported_field` (priced from the listing's rates) | | `notes`, `unitId`, `sendConfirmationEmail` | ✓ | `422 unsupported_field` | | `checkInTime`, `checkOutTime`, `currency`, `guestId` | `422 unsupported_field` (the PMS's own settings apply) | ✓ | | `platform` | `direct` or `website` (`owner` → `422 pms_write_unsupported`; block owner stays in the PMS) | `direct`, `website` or `owner` | A field a listing cannot take is refused by name, never silently dropped. `platform` never accepts `airbnb` / `booking` / `vrbo`: those reservations are owned by the channel and arrive through sync. ### Per-PMS limits | PMS | create | change | cancel | quote | `totalPrice` | Limits | |---|---|---|---|---|---|---| | Mews | ✓ | ✓ | ✓ | – | ✓ | — | | Cloudbeds | ✓ | ✓ | ✓ | – | – | Books at the rate plan's price; group bookings supported. | | Hostaway | ✓ | ✓ | ✓ | ✓ | ✓ | Direct-channel bookings only; a specific unit is refused; a date change keeps the booked total. | | Guesty | ✓ | ✓ | ✓ | ✓ | ✓ | Cancels direct and Vrbo bookings; other channel bookings are cancelled on the channel. | | Beds24 | ✓ | ✓ | ✓ | ✓ | ✓ | Needs the `write:bookings` scope; a multi-room property needs `unitId`. | | BookingSync | ✓ | ✓ | ✓ | ✓ | ✓ | Needs `bookings_write`; fees and taxes are not itemized; no guest email. | | Lodgify | ✓ | ✓ | ✓ (declines) | ✓ | ✓ | Cancel declines the booking; single-room bookings. | | Smoobu | ✓ | ✓ (no dates) | ✓ | ✓ | ✓ | Dates cannot be changed through Smoobu's API — cancel and rebook, or change them in Smoobu. | | Hospitable | ✓ | ✓ | ✓ | ✓ (Direct plan) | ✓ | Manual reservations only; needs `reservation:write`; adds no fees or taxes. | | iGMS | ✓ | ✓ | ✓ | – | ✓ (required) | iGMS direct bookings only; a price is required; no tentative holds. | | OwnerRez | ✓ | ✓ | – | ✓ | – | No cancel through OwnerRez's API; priced by the property's own rates; needs the `full` scope. | Every PMS except Cloudbeds refuses group bookings, and every vacation-rental PMS refuses to change or cancel a booking that came from a channel (Airbnb, Booking.com, Vrbo…) — that is done on the channel. **Verification.** Mews and Cloudbeds were run end to end on their vendors' sandboxes. Every other PMS is **verified against the vendor's API documentation only** — no live account has been written to yet. `capabilities.reservations.verifiedAgainst` says which. ### Idempotency **Send `Idempotency-Key`.** A network timeout here is exactly the case it exists for. The key is also sent to the PMS as the booking's reference, so even a retry that reaches the PMS again finds the booking instead of making a second one (`409 pms_duplicate` with `existing`, or the existing booking returned). A completed answer is replayed with `Idempotency-Status: cached` and the PMS is not called again. `502 pms_error` (the PMS could not be reached) is NOT stored — retry with the same key. `502 reservation_created_in_pms_only` IS stored, unlike every other 5xx: the booking exists in the PMS and arrives with the next sync, so a retry replays that answer rather than booking twice. ### Partial success When the PMS created the booking but a follow-up step did not apply (for example the notes, or a tentative state), the response is still `201`, with `pms.partial: true` and the steps in `pms.failedSections`. The booking exists — do not create it again. `X-Account-Id` restricts the listing to one connected account. Returns `403 listing_inactive` when the listing is inactive.
|
|
175
186
|
# @param reservation_create_request [ReservationCreateRequest]
|
|
176
187
|
# @param [Hash] opts the optional parameters
|
|
177
188
|
# @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.
|
|
189
|
+
# @option opts [String] :x_account_id Restrict the request to one connected account (a Repull connection id, `GET /v1/connect` → `id`). A listing or reservation outside that account answers `404 not_found`. Omit it to act workspace-wide.
|
|
178
190
|
# @return [Array<(ReservationCreateResponse, Integer, Hash)>] ReservationCreateResponse data, response status code and response headers
|
|
179
191
|
def create_reservation_with_http_info(reservation_create_request, opts = {})
|
|
180
192
|
if @api_client.config.debugging
|
|
@@ -204,6 +216,7 @@ module Repull
|
|
|
204
216
|
header_params['Content-Type'] = content_type
|
|
205
217
|
end
|
|
206
218
|
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
219
|
+
header_params[:'X-Account-Id'] = opts[:'x_account_id'] if !opts[:'x_account_id'].nil?
|
|
207
220
|
|
|
208
221
|
# form parameters
|
|
209
222
|
form_params = opts[:form_params] || {}
|
|
@@ -384,6 +397,7 @@ module Repull
|
|
|
384
397
|
# List reservations
|
|
385
398
|
# Cursor-paginated list of reservations across all connected PMS platforms. Filter by platform, status, listing, or check-in date range. **Pagination:** Walk pages with `?cursor=` — pass `pagination.nextCursor` from one response back as `?cursor=` on the next request. Stop when `pagination.hasMore` is `false`. `limit` defaults to 50, max 100; requesting more returns 422 (no silent truncation). `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. For deep pagination cursor remains O(1) per page; offset > 10000 returns 422 with a docs link. **Incremental sync (only changes since last poll):** pass `?updated_since=<ISO8601>` to receive only reservations amended, cancelled, or created at or after that instant — no full re-walk. Each row carries `updatedAt`; the last row of the final page is your next watermark. Note that `updated_since` changes the page ordering to `updatedAt ASC, id ASC` (and the cursor with it) so mid-walk amendments cannot be skipped — see the parameter description for the full contract. Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`.
|
|
386
399
|
# @param [Hash] opts the optional parameters
|
|
400
|
+
# @option opts [String] :account Only the records of one connected account, as `provider:externalAccountId` — the pair from a webhook `account` block, `connect.session.completed`, or `GET /v1/connect/{provider}` → `accounts`. A record belongs to an account when it is on that account's listings and on its channel (a PMS account: came in through that PMS). An account with no listings returns an empty page.
|
|
387
401
|
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
388
402
|
# @option opts [Integer] :limit Page size (max 100). Requests over the cap return 422. (default to 50)
|
|
389
403
|
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`. Omit to fetch the first page.
|
|
@@ -412,6 +426,7 @@ module Repull
|
|
|
412
426
|
# List reservations
|
|
413
427
|
# Cursor-paginated list of reservations across all connected PMS platforms. Filter by platform, status, listing, or check-in date range. **Pagination:** Walk pages with `?cursor=` — pass `pagination.nextCursor` from one response back as `?cursor=` on the next request. Stop when `pagination.hasMore` is `false`. `limit` defaults to 50, max 100; requesting more returns 422 (no silent truncation). `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. For deep pagination cursor remains O(1) per page; offset > 10000 returns 422 with a docs link. **Incremental sync (only changes since last poll):** pass `?updated_since=<ISO8601>` to receive only reservations amended, cancelled, or created at or after that instant — no full re-walk. Each row carries `updatedAt`; the last row of the final page is your next watermark. Note that `updated_since` changes the page ordering to `updatedAt ASC, id ASC` (and the cursor with it) so mid-walk amendments cannot be skipped — see the parameter description for the full contract. Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`.
|
|
414
428
|
# @param [Hash] opts the optional parameters
|
|
429
|
+
# @option opts [String] :account Only the records of one connected account, as `provider:externalAccountId` — the pair from a webhook `account` block, `connect.session.completed`, or `GET /v1/connect/{provider}` → `accounts`. A record belongs to an account when it is on that account's listings and on its channel (a PMS account: came in through that PMS). An account with no listings returns an empty page.
|
|
415
430
|
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
416
431
|
# @option opts [Integer] :limit Page size (max 100). Requests over the cap return 422. (default to 50)
|
|
417
432
|
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`. Omit to fetch the first page.
|
|
@@ -461,6 +476,7 @@ module Repull
|
|
|
461
476
|
|
|
462
477
|
# query parameters
|
|
463
478
|
query_params = opts[:query_params] || {}
|
|
479
|
+
query_params[:'account'] = opts[:'account'] if !opts[:'account'].nil?
|
|
464
480
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
465
481
|
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
466
482
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
@@ -515,12 +531,84 @@ module Repull
|
|
|
515
531
|
return data, status_code, headers
|
|
516
532
|
end
|
|
517
533
|
|
|
534
|
+
# Quote a reservation in the PMS
|
|
535
|
+
# Prices a stay and checks its availability **in the PMS that manages the listing**, without booking anything. It is the same check `POST /v1/reservations` makes before booking when no `totalPrice` is sent, so `available: true` with a `total` is what that create would be priced at (dates can still be taken in between). `available: false` is an answer, not an error: the PMS's reasons are in `restrictions` (minimum stay, closed to arrival, taken dates…). - A listing **not managed in a PMS** answers `422 pms_not_linked`. Book it directly with `POST /v1/reservations`, or price it with `GET /v1/quotes`. - A PMS **without a quote API** (Mews, Cloudbeds, iGMS) answers `422 pms_write_unsupported`. You can still create the booking; on iGMS a `totalPrice` is required. `GET /v1/listings/{id}` → `capabilities.reservations.quote` says whether a listing can be quoted. ### Per-PMS limits | PMS | create | change | cancel | quote | `totalPrice` | Limits | |---|---|---|---|---|---|---| | Mews | ✓ | ✓ | ✓ | – | ✓ | — | | Cloudbeds | ✓ | ✓ | ✓ | – | – | Books at the rate plan's price; group bookings supported. | | Hostaway | ✓ | ✓ | ✓ | ✓ | ✓ | Direct-channel bookings only; a specific unit is refused; a date change keeps the booked total. | | Guesty | ✓ | ✓ | ✓ | ✓ | ✓ | Cancels direct and Vrbo bookings; other channel bookings are cancelled on the channel. | | Beds24 | ✓ | ✓ | ✓ | ✓ | ✓ | Needs the `write:bookings` scope; a multi-room property needs `unitId`. | | BookingSync | ✓ | ✓ | ✓ | ✓ | ✓ | Needs `bookings_write`; fees and taxes are not itemized; no guest email. | | Lodgify | ✓ | ✓ | ✓ (declines) | ✓ | ✓ | Cancel declines the booking; single-room bookings. | | Smoobu | ✓ | ✓ (no dates) | ✓ | ✓ | ✓ | Dates cannot be changed through Smoobu's API — cancel and rebook, or change them in Smoobu. | | Hospitable | ✓ | ✓ | ✓ | ✓ (Direct plan) | ✓ | Manual reservations only; needs `reservation:write`; adds no fees or taxes. | | iGMS | ✓ | ✓ | ✓ | – | ✓ (required) | iGMS direct bookings only; a price is required; no tentative holds. | | OwnerRez | ✓ | ✓ | – | ✓ | – | No cancel through OwnerRez's API; priced by the property's own rates; needs the `full` scope. | Every PMS except Cloudbeds refuses group bookings, and every vacation-rental PMS refuses to change or cancel a booking that came from a channel (Airbnb, Booking.com, Vrbo…) — that is done on the channel. **Verification.** Mews and Cloudbeds were run end to end on their vendors' sandboxes. Every other PMS is **verified against the vendor's API documentation only** — no live account has been written to yet. `capabilities.reservations.verifiedAgainst` says which. `X-Account-Id` restricts the listing to one connected account. Returns `403 listing_inactive` when the listing is inactive.
|
|
536
|
+
# @param reservation_quote_request [ReservationQuoteRequest]
|
|
537
|
+
# @param [Hash] opts the optional parameters
|
|
538
|
+
# @option opts [String] :x_account_id Restrict the request to one connected account (a Repull connection id, `GET /v1/connect` → `id`). A listing or reservation outside that account answers `404 not_found`. Omit it to act workspace-wide.
|
|
539
|
+
# @return [ReservationQuoteResponse]
|
|
540
|
+
def quote_reservation(reservation_quote_request, opts = {})
|
|
541
|
+
data, _status_code, _headers = quote_reservation_with_http_info(reservation_quote_request, opts)
|
|
542
|
+
data
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
# Quote a reservation in the PMS
|
|
546
|
+
# Prices a stay and checks its availability **in the PMS that manages the listing**, without booking anything. It is the same check `POST /v1/reservations` makes before booking when no `totalPrice` is sent, so `available: true` with a `total` is what that create would be priced at (dates can still be taken in between). `available: false` is an answer, not an error: the PMS's reasons are in `restrictions` (minimum stay, closed to arrival, taken dates…). - A listing **not managed in a PMS** answers `422 pms_not_linked`. Book it directly with `POST /v1/reservations`, or price it with `GET /v1/quotes`. - A PMS **without a quote API** (Mews, Cloudbeds, iGMS) answers `422 pms_write_unsupported`. You can still create the booking; on iGMS a `totalPrice` is required. `GET /v1/listings/{id}` → `capabilities.reservations.quote` says whether a listing can be quoted. ### Per-PMS limits | PMS | create | change | cancel | quote | `totalPrice` | Limits | |---|---|---|---|---|---|---| | Mews | ✓ | ✓ | ✓ | – | ✓ | — | | Cloudbeds | ✓ | ✓ | ✓ | – | – | Books at the rate plan's price; group bookings supported. | | Hostaway | ✓ | ✓ | ✓ | ✓ | ✓ | Direct-channel bookings only; a specific unit is refused; a date change keeps the booked total. | | Guesty | ✓ | ✓ | ✓ | ✓ | ✓ | Cancels direct and Vrbo bookings; other channel bookings are cancelled on the channel. | | Beds24 | ✓ | ✓ | ✓ | ✓ | ✓ | Needs the `write:bookings` scope; a multi-room property needs `unitId`. | | BookingSync | ✓ | ✓ | ✓ | ✓ | ✓ | Needs `bookings_write`; fees and taxes are not itemized; no guest email. | | Lodgify | ✓ | ✓ | ✓ (declines) | ✓ | ✓ | Cancel declines the booking; single-room bookings. | | Smoobu | ✓ | ✓ (no dates) | ✓ | ✓ | ✓ | Dates cannot be changed through Smoobu's API — cancel and rebook, or change them in Smoobu. | | Hospitable | ✓ | ✓ | ✓ | ✓ (Direct plan) | ✓ | Manual reservations only; needs `reservation:write`; adds no fees or taxes. | | iGMS | ✓ | ✓ | ✓ | – | ✓ (required) | iGMS direct bookings only; a price is required; no tentative holds. | | OwnerRez | ✓ | ✓ | – | ✓ | – | No cancel through OwnerRez's API; priced by the property's own rates; needs the `full` scope. | Every PMS except Cloudbeds refuses group bookings, and every vacation-rental PMS refuses to change or cancel a booking that came from a channel (Airbnb, Booking.com, Vrbo…) — that is done on the channel. **Verification.** Mews and Cloudbeds were run end to end on their vendors' sandboxes. Every other PMS is **verified against the vendor's API documentation only** — no live account has been written to yet. `capabilities.reservations.verifiedAgainst` says which. `X-Account-Id` restricts the listing to one connected account. Returns `403 listing_inactive` when the listing is inactive.
|
|
547
|
+
# @param reservation_quote_request [ReservationQuoteRequest]
|
|
548
|
+
# @param [Hash] opts the optional parameters
|
|
549
|
+
# @option opts [String] :x_account_id Restrict the request to one connected account (a Repull connection id, `GET /v1/connect` → `id`). A listing or reservation outside that account answers `404 not_found`. Omit it to act workspace-wide.
|
|
550
|
+
# @return [Array<(ReservationQuoteResponse, Integer, Hash)>] ReservationQuoteResponse data, response status code and response headers
|
|
551
|
+
def quote_reservation_with_http_info(reservation_quote_request, opts = {})
|
|
552
|
+
if @api_client.config.debugging
|
|
553
|
+
@api_client.config.logger.debug 'Calling API: ReservationsApi.quote_reservation ...'
|
|
554
|
+
end
|
|
555
|
+
# verify the required parameter 'reservation_quote_request' is set
|
|
556
|
+
if @api_client.config.client_side_validation && reservation_quote_request.nil?
|
|
557
|
+
fail ArgumentError, "Missing the required parameter 'reservation_quote_request' when calling ReservationsApi.quote_reservation"
|
|
558
|
+
end
|
|
559
|
+
# resource path
|
|
560
|
+
local_var_path = '/v1/reservations/quote'
|
|
561
|
+
|
|
562
|
+
# query parameters
|
|
563
|
+
query_params = opts[:query_params] || {}
|
|
564
|
+
|
|
565
|
+
# header parameters
|
|
566
|
+
header_params = opts[:header_params] || {}
|
|
567
|
+
# HTTP header 'Accept' (if needed)
|
|
568
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
569
|
+
# HTTP header 'Content-Type'
|
|
570
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
571
|
+
if !content_type.nil?
|
|
572
|
+
header_params['Content-Type'] = content_type
|
|
573
|
+
end
|
|
574
|
+
header_params[:'X-Account-Id'] = opts[:'x_account_id'] if !opts[:'x_account_id'].nil?
|
|
575
|
+
|
|
576
|
+
# form parameters
|
|
577
|
+
form_params = opts[:form_params] || {}
|
|
578
|
+
|
|
579
|
+
# http body (model)
|
|
580
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(reservation_quote_request)
|
|
581
|
+
|
|
582
|
+
# return_type
|
|
583
|
+
return_type = opts[:debug_return_type] || 'ReservationQuoteResponse'
|
|
584
|
+
|
|
585
|
+
# auth_names
|
|
586
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
587
|
+
|
|
588
|
+
new_options = opts.merge(
|
|
589
|
+
:operation => :"ReservationsApi.quote_reservation",
|
|
590
|
+
:header_params => header_params,
|
|
591
|
+
:query_params => query_params,
|
|
592
|
+
:form_params => form_params,
|
|
593
|
+
:body => post_body,
|
|
594
|
+
:auth_names => auth_names,
|
|
595
|
+
:return_type => return_type
|
|
596
|
+
)
|
|
597
|
+
|
|
598
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
599
|
+
if @api_client.config.debugging
|
|
600
|
+
@api_client.config.logger.debug "API called: ReservationsApi#quote_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
601
|
+
end
|
|
602
|
+
return data, status_code, headers
|
|
603
|
+
end
|
|
604
|
+
|
|
518
605
|
# Update a reservation
|
|
519
|
-
# Changes the dates, the occupancy, or the unit.
|
|
606
|
+
# Changes the dates, the occupancy, or the unit. **A stay managed in a connected PMS is changed in the PMS first**, then Repull's copy is refreshed from the PMS's record — changing only Repull's copy would be reverted by the next sync. On such a stay, `checkIn`, `checkOut` and `guestCount` are changed; moving it to another listing and changing its check-in/check-out times are done in the PMS (`422 pms_write_unsupported`), as is anything the PMS's API cannot change (for example dates on Smoobu). A channel booking that came in through the PMS (Airbnb, Booking.com, …) is changed on the channel (`409 reservation_owned_by_channel`). The PMS checks availability: taken dates answer `409 pms_unavailable`. The PMS's outcome comes back as `pms`. `GET /v1/listings/{id}` → `capabilities.reservations.modify` says whether a listing's PMS supports changes. **Any other stay** drives the same command path the dashboard does, so the side effects come with it: the change audit is appended, bound task due dates re-sync, the old calendar dates unblock and the new ones block, the conversation's cached listing is invalidated, and `reservation.updated` fires — which is what revokes and re-issues the door code. Supply at least one field; an empty body returns 422 rather than a 200 that changed nothing. **Moving and re-dating in one call is one operation.** Send `listingId` together with `checkIn`/`checkOut` and it is applied as a single move, so the access code is re-issued once rather than twice. ### Fields this endpoint deliberately does NOT accept Each is rejected by name with the reason, never accepted and ignored: | Field | Why | |---|---| | `guest` / `guestDetails` | Guest name, email and phone live on the guest record. The underlying command has no branch for them, so accepting them would return a success that changed nothing. | | `pricing` / `totalPrice` / `currency` | Repricing writes the price breakdown, the pricing row and a pricing-history entry. It belongs to its own endpoint. | | `status` | Not a field. Cancelling, confirming and checking out are separate operations with materially different side effects — cancellation issues a credit refund and revokes access codes. | | `platform` | Immutable: it records where the booking actually originated. | | `notes` | `internal_notes` is an append-only audit trail the system writes on every change. | **Availability is NOT checked for stays outside a PMS.** A date change that overlaps another booking will be written. Call `GET /v1/availability/{propertyId}` first if that matters. `X-Account-Id` restricts the reservation (and a listing it is moved to) to one connected account. Returns `403 listing_inactive` when the reservation is on an inactive listing, or when a `listingId` move targets one; nothing is changed.
|
|
520
607
|
# @param id [Integer] Internal Repull reservation ID.
|
|
521
608
|
# @param reservation_update_request [ReservationUpdateRequest]
|
|
522
609
|
# @param [Hash] opts the optional parameters
|
|
523
610
|
# @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.
|
|
611
|
+
# @option opts [String] :x_account_id Restrict the request to one connected account (a Repull connection id, `GET /v1/connect` → `id`). A listing or reservation outside that account answers `404 not_found`. Omit it to act workspace-wide.
|
|
524
612
|
# @return [ReservationUpdateResponse]
|
|
525
613
|
def update_reservation(id, reservation_update_request, opts = {})
|
|
526
614
|
data, _status_code, _headers = update_reservation_with_http_info(id, reservation_update_request, opts)
|
|
@@ -528,11 +616,12 @@ module Repull
|
|
|
528
616
|
end
|
|
529
617
|
|
|
530
618
|
# Update a reservation
|
|
531
|
-
# Changes the dates, the occupancy, or the unit.
|
|
619
|
+
# Changes the dates, the occupancy, or the unit. **A stay managed in a connected PMS is changed in the PMS first**, then Repull's copy is refreshed from the PMS's record — changing only Repull's copy would be reverted by the next sync. On such a stay, `checkIn`, `checkOut` and `guestCount` are changed; moving it to another listing and changing its check-in/check-out times are done in the PMS (`422 pms_write_unsupported`), as is anything the PMS's API cannot change (for example dates on Smoobu). A channel booking that came in through the PMS (Airbnb, Booking.com, …) is changed on the channel (`409 reservation_owned_by_channel`). The PMS checks availability: taken dates answer `409 pms_unavailable`. The PMS's outcome comes back as `pms`. `GET /v1/listings/{id}` → `capabilities.reservations.modify` says whether a listing's PMS supports changes. **Any other stay** drives the same command path the dashboard does, so the side effects come with it: the change audit is appended, bound task due dates re-sync, the old calendar dates unblock and the new ones block, the conversation's cached listing is invalidated, and `reservation.updated` fires — which is what revokes and re-issues the door code. Supply at least one field; an empty body returns 422 rather than a 200 that changed nothing. **Moving and re-dating in one call is one operation.** Send `listingId` together with `checkIn`/`checkOut` and it is applied as a single move, so the access code is re-issued once rather than twice. ### Fields this endpoint deliberately does NOT accept Each is rejected by name with the reason, never accepted and ignored: | Field | Why | |---|---| | `guest` / `guestDetails` | Guest name, email and phone live on the guest record. The underlying command has no branch for them, so accepting them would return a success that changed nothing. | | `pricing` / `totalPrice` / `currency` | Repricing writes the price breakdown, the pricing row and a pricing-history entry. It belongs to its own endpoint. | | `status` | Not a field. Cancelling, confirming and checking out are separate operations with materially different side effects — cancellation issues a credit refund and revokes access codes. | | `platform` | Immutable: it records where the booking actually originated. | | `notes` | `internal_notes` is an append-only audit trail the system writes on every change. | **Availability is NOT checked for stays outside a PMS.** A date change that overlaps another booking will be written. Call `GET /v1/availability/{propertyId}` first if that matters. `X-Account-Id` restricts the reservation (and a listing it is moved to) to one connected account. Returns `403 listing_inactive` when the reservation is on an inactive listing, or when a `listingId` move targets one; nothing is changed.
|
|
532
620
|
# @param id [Integer] Internal Repull reservation ID.
|
|
533
621
|
# @param reservation_update_request [ReservationUpdateRequest]
|
|
534
622
|
# @param [Hash] opts the optional parameters
|
|
535
623
|
# @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.
|
|
624
|
+
# @option opts [String] :x_account_id Restrict the request to one connected account (a Repull connection id, `GET /v1/connect` → `id`). A listing or reservation outside that account answers `404 not_found`. Omit it to act workspace-wide.
|
|
536
625
|
# @return [Array<(ReservationUpdateResponse, Integer, Hash)>] ReservationUpdateResponse data, response status code and response headers
|
|
537
626
|
def update_reservation_with_http_info(id, reservation_update_request, opts = {})
|
|
538
627
|
if @api_client.config.debugging
|
|
@@ -566,6 +655,7 @@ module Repull
|
|
|
566
655
|
header_params['Content-Type'] = content_type
|
|
567
656
|
end
|
|
568
657
|
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
658
|
+
header_params[:'X-Account-Id'] = opts[:'x_account_id'] if !opts[:'x_account_id'].nil?
|
|
569
659
|
|
|
570
660
|
# form parameters
|
|
571
661
|
form_params = opts[:form_params] || {}
|
|
@@ -88,6 +88,7 @@ module Repull
|
|
|
88
88
|
# List reviews
|
|
89
89
|
# Cursor-paginated guest + host review stream for the workspace. This surface returns the complete cross-channel history — separate from `/v1/channels/airbnb/reviews` which hits Airbnb live. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Filters: `platform` (`airbnb`|`booking`|`vrbo`), `listing_id` (internal Repull listing id), `rating_min` / `rating_max` (inclusive bounds, 0..5), `status` (`responded`|`unanswered`|`all`), `reviewer_role` (`guest` (default) | `host` | `all`). **Inactive listings:** reviews of inactive listings are left out of the page and of `pagination.total`. Filtering by an inactive `listing_id` returns `403 listing_inactive`. Inactive listings keep syncing; activate the listing to use it here.
|
|
90
90
|
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @option opts [String] :account Only the records of one connected account, as `provider:externalAccountId` — the pair from a webhook `account` block, `connect.session.completed`, or `GET /v1/connect/{provider}` → `accounts`. A record belongs to an account when it is on that account's listings and on its channel (a PMS account: came in through that PMS). An account with no listings returns an empty page.
|
|
91
92
|
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
92
93
|
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`.
|
|
93
94
|
# @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.nextCursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
|
|
@@ -107,6 +108,7 @@ module Repull
|
|
|
107
108
|
# List reviews
|
|
108
109
|
# Cursor-paginated guest + host review stream for the workspace. This surface returns the complete cross-channel history — separate from `/v1/channels/airbnb/reviews` which hits Airbnb live. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Filters: `platform` (`airbnb`|`booking`|`vrbo`), `listing_id` (internal Repull listing id), `rating_min` / `rating_max` (inclusive bounds, 0..5), `status` (`responded`|`unanswered`|`all`), `reviewer_role` (`guest` (default) | `host` | `all`). **Inactive listings:** reviews of inactive listings are left out of the page and of `pagination.total`. Filtering by an inactive `listing_id` returns `403 listing_inactive`. Inactive listings keep syncing; activate the listing to use it here.
|
|
109
110
|
# @param [Hash] opts the optional parameters
|
|
111
|
+
# @option opts [String] :account Only the records of one connected account, as `provider:externalAccountId` — the pair from a webhook `account` block, `connect.session.completed`, or `GET /v1/connect/{provider}` → `accounts`. A record belongs to an account when it is on that account's listings and on its channel (a PMS account: came in through that PMS). An account with no listings returns an empty page.
|
|
110
112
|
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
111
113
|
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`.
|
|
112
114
|
# @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.nextCursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
|
|
@@ -171,6 +173,7 @@ module Repull
|
|
|
171
173
|
|
|
172
174
|
# query parameters
|
|
173
175
|
query_params = opts[:query_params] || {}
|
|
176
|
+
query_params[:'account'] = opts[:'account'] if !opts[:'account'].nil?
|
|
174
177
|
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
175
178
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
176
179
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
data/lib/repull/api/vrbo_api.rb
CHANGED
|
@@ -20,8 +20,9 @@ module Repull
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# List VRBO listings
|
|
23
|
-
# List
|
|
23
|
+
# 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.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :status `active` (default) leaves inactive listings out. `inactive` returns only them and `all` returns both. An inactive listing comes back with identity fields only (ids, `name`, `city`, `status`, `inactiveReason`, its account), which is enough to show what can be activated. Every row carries `status`. (default to 'active')
|
|
25
26
|
# @return [Array<VrboListing>]
|
|
26
27
|
def list_vrbo_listings(opts = {})
|
|
27
28
|
data, _status_code, _headers = list_vrbo_listings_with_http_info(opts)
|
|
@@ -29,18 +30,24 @@ module Repull
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
# List VRBO listings
|
|
32
|
-
# List
|
|
33
|
+
# 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.
|
|
33
34
|
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [String] :status `active` (default) leaves inactive listings out. `inactive` returns only them and `all` returns both. An inactive listing comes back with identity fields only (ids, `name`, `city`, `status`, `inactiveReason`, its account), which is enough to show what can be activated. Every row carries `status`. (default to 'active')
|
|
34
36
|
# @return [Array<(Array<VrboListing>, Integer, Hash)>] Array<VrboListing> data, response status code and response headers
|
|
35
37
|
def list_vrbo_listings_with_http_info(opts = {})
|
|
36
38
|
if @api_client.config.debugging
|
|
37
39
|
@api_client.config.logger.debug 'Calling API: VRBOApi.list_vrbo_listings ...'
|
|
38
40
|
end
|
|
41
|
+
allowable_values = ["active", "inactive", "all"]
|
|
42
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
43
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
44
|
+
end
|
|
39
45
|
# resource path
|
|
40
46
|
local_var_path = '/v1/channels/vrbo/listings'
|
|
41
47
|
|
|
42
48
|
# query parameters
|
|
43
49
|
query_params = opts[:query_params] || {}
|
|
50
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
44
51
|
|
|
45
52
|
# header parameters
|
|
46
53
|
header_params = opts[:header_params] || {}
|
|
@@ -77,7 +84,7 @@ module Repull
|
|
|
77
84
|
end
|
|
78
85
|
|
|
79
86
|
# List VRBO reservations
|
|
80
|
-
# Cursor-paginated list of
|
|
87
|
+
# Cursor-paginated list of Vrbo reservations imported from the host's connected Vrbo account (host sign-in, beta). The full normalised record — guest, price breakdown, policy — is on `GET /v1/reservations?platform=vrbo`. `?offset=` is accepted as a first-class alias for `?cursor=` (mutually exclusive; offset capped at 10000). Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated.
|
|
81
88
|
# @param [Hash] opts the optional parameters
|
|
82
89
|
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`.
|
|
83
90
|
# @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.nextCursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
|
|
@@ -90,7 +97,7 @@ module Repull
|
|
|
90
97
|
end
|
|
91
98
|
|
|
92
99
|
# List VRBO reservations
|
|
93
|
-
# Cursor-paginated list of
|
|
100
|
+
# Cursor-paginated list of Vrbo reservations imported from the host's connected Vrbo account (host sign-in, beta). The full normalised record — guest, price breakdown, policy — is on `GET /v1/reservations?platform=vrbo`. `?offset=` is accepted as a first-class alias for `?cursor=` (mutually exclusive; offset capped at 10000). Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated.
|
|
94
101
|
# @param [Hash] opts the optional parameters
|
|
95
102
|
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`.
|
|
96
103
|
# @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.nextCursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
|
|
@@ -19,9 +19,12 @@ module Repull
|
|
|
19
19
|
# Repull listing id
|
|
20
20
|
attr_accessor :listing_id
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# The host's internal nickname for the listing.
|
|
23
23
|
attr_accessor :name
|
|
24
24
|
|
|
25
|
+
# The title guests see on the channel (e.g. the Airbnb listing title). `name` is the host's internal nickname for the listing; show `publicName` in anything a guest or end user reads. Present on inactive rows too.
|
|
26
|
+
attr_accessor :public_name
|
|
27
|
+
|
|
25
28
|
attr_accessor :city
|
|
26
29
|
|
|
27
30
|
# Cover photo URL for the listing. **Only present when the caller passes `?include=thumbnail`.** `null` when the listing has no cover photo stored — the listing is still returned.
|
|
@@ -34,6 +37,7 @@ module Repull
|
|
|
34
37
|
{
|
|
35
38
|
:'listing_id' => :'listingId',
|
|
36
39
|
:'name' => :'name',
|
|
40
|
+
:'public_name' => :'publicName',
|
|
37
41
|
:'city' => :'city',
|
|
38
42
|
:'thumbnail_url' => :'thumbnailUrl',
|
|
39
43
|
:'connections' => :'connections'
|
|
@@ -55,6 +59,7 @@ module Repull
|
|
|
55
59
|
{
|
|
56
60
|
:'listing_id' => :'String',
|
|
57
61
|
:'name' => :'String',
|
|
62
|
+
:'public_name' => :'String',
|
|
58
63
|
:'city' => :'String',
|
|
59
64
|
:'thumbnail_url' => :'String',
|
|
60
65
|
:'connections' => :'Array<AirbnbConnection>'
|
|
@@ -64,6 +69,7 @@ module Repull
|
|
|
64
69
|
# List of attributes with nullable: true
|
|
65
70
|
def self.openapi_nullable
|
|
66
71
|
Set.new([
|
|
72
|
+
:'public_name',
|
|
67
73
|
:'city',
|
|
68
74
|
:'thumbnail_url',
|
|
69
75
|
])
|
|
@@ -93,6 +99,10 @@ module Repull
|
|
|
93
99
|
self.name = attributes[:'name']
|
|
94
100
|
end
|
|
95
101
|
|
|
102
|
+
if attributes.key?(:'public_name')
|
|
103
|
+
self.public_name = attributes[:'public_name']
|
|
104
|
+
end
|
|
105
|
+
|
|
96
106
|
if attributes.key?(:'city')
|
|
97
107
|
self.city = attributes[:'city']
|
|
98
108
|
end
|
|
@@ -130,6 +140,7 @@ module Repull
|
|
|
130
140
|
self.class == o.class &&
|
|
131
141
|
listing_id == o.listing_id &&
|
|
132
142
|
name == o.name &&
|
|
143
|
+
public_name == o.public_name &&
|
|
133
144
|
city == o.city &&
|
|
134
145
|
thumbnail_url == o.thumbnail_url &&
|
|
135
146
|
connections == o.connections
|
|
@@ -144,7 +155,7 @@ module Repull
|
|
|
144
155
|
# Calculates hash code according to all attributes.
|
|
145
156
|
# @return [Integer] Hash code
|
|
146
157
|
def hash
|
|
147
|
-
[listing_id, name, city, thumbnail_url, connections].hash
|
|
158
|
+
[listing_id, name, public_name, city, thumbnail_url, connections].hash
|
|
148
159
|
end
|
|
149
160
|
|
|
150
161
|
# Builds the object from hash
|