repull 0.2.26 → 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 +4 -4
- data/lib/repull/api/listings_api.rb +2 -2
- data/lib/repull/api/properties_api.rb +2 -2
- data/lib/repull/api/reservations_api.rb +93 -6
- data/lib/repull/api/vrbo_api.rb +9 -2
- 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_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/create_connect_session_request.rb +39 -1
- data/lib/repull/models/create_connection_request.rb +39 -1
- 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 +14 -3
- 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/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/version.rb +1 -1
- data/lib/repull.rb +18 -4
- data/openapi/v1.json +2059 -335
- data/scripts/regen.sh +1 -1
- metadata +20 -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] || {}
|
|
@@ -518,12 +531,84 @@ module Repull
|
|
|
518
531
|
return data, status_code, headers
|
|
519
532
|
end
|
|
520
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
|
+
|
|
521
605
|
# Update a reservation
|
|
522
|
-
# 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.
|
|
523
607
|
# @param id [Integer] Internal Repull reservation ID.
|
|
524
608
|
# @param reservation_update_request [ReservationUpdateRequest]
|
|
525
609
|
# @param [Hash] opts the optional parameters
|
|
526
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.
|
|
527
612
|
# @return [ReservationUpdateResponse]
|
|
528
613
|
def update_reservation(id, reservation_update_request, opts = {})
|
|
529
614
|
data, _status_code, _headers = update_reservation_with_http_info(id, reservation_update_request, opts)
|
|
@@ -531,11 +616,12 @@ module Repull
|
|
|
531
616
|
end
|
|
532
617
|
|
|
533
618
|
# Update a reservation
|
|
534
|
-
# 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.
|
|
535
620
|
# @param id [Integer] Internal Repull reservation ID.
|
|
536
621
|
# @param reservation_update_request [ReservationUpdateRequest]
|
|
537
622
|
# @param [Hash] opts the optional parameters
|
|
538
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.
|
|
539
625
|
# @return [Array<(ReservationUpdateResponse, Integer, Hash)>] ReservationUpdateResponse data, response status code and response headers
|
|
540
626
|
def update_reservation_with_http_info(id, reservation_update_request, opts = {})
|
|
541
627
|
if @api_client.config.debugging
|
|
@@ -569,6 +655,7 @@ module Repull
|
|
|
569
655
|
header_params['Content-Type'] = content_type
|
|
570
656
|
end
|
|
571
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?
|
|
572
659
|
|
|
573
660
|
# form parameters
|
|
574
661
|
form_params = opts[:form_params] || {}
|
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 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; they
|
|
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 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; they
|
|
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] || {}
|
|
@@ -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
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# Update what kind of property this is, when the quiet hours are,
|
|
17
|
+
# Update what kind of property this is, when the quiet hours are, how the guest gets in, the house manual, directions or Wi-Fi details. At least one field required. These are among the attributes Airbnb locks on established listings — see `blockedFields` on the response.
|
|
18
18
|
class AirbnbListingDetailsWriteRequest < ApiModelBase
|
|
19
19
|
# The coarse building family.
|
|
20
20
|
attr_accessor :property_type_group
|
|
@@ -30,6 +30,18 @@ module Repull
|
|
|
30
30
|
|
|
31
31
|
attr_accessor :check_in_option
|
|
32
32
|
|
|
33
|
+
# The house manual guests see after booking.
|
|
34
|
+
attr_accessor :house_manual
|
|
35
|
+
|
|
36
|
+
# Directions to the property, shown to booked guests.
|
|
37
|
+
attr_accessor :directions
|
|
38
|
+
|
|
39
|
+
# Wi-Fi network name.
|
|
40
|
+
attr_accessor :wifi_network
|
|
41
|
+
|
|
42
|
+
# Wi-Fi password.
|
|
43
|
+
attr_accessor :wifi_password
|
|
44
|
+
|
|
33
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
46
|
def self.attribute_map
|
|
35
47
|
{
|
|
@@ -37,7 +49,11 @@ module Repull
|
|
|
37
49
|
:'property_type_category' => :'property_type_category',
|
|
38
50
|
:'room_type_category' => :'room_type_category',
|
|
39
51
|
:'quiet_hours' => :'quiet_hours',
|
|
40
|
-
:'check_in_option' => :'check_in_option'
|
|
52
|
+
:'check_in_option' => :'check_in_option',
|
|
53
|
+
:'house_manual' => :'house_manual',
|
|
54
|
+
:'directions' => :'directions',
|
|
55
|
+
:'wifi_network' => :'wifi_network',
|
|
56
|
+
:'wifi_password' => :'wifi_password'
|
|
41
57
|
}
|
|
42
58
|
end
|
|
43
59
|
|
|
@@ -58,13 +74,21 @@ module Repull
|
|
|
58
74
|
:'property_type_category' => :'String',
|
|
59
75
|
:'room_type_category' => :'String',
|
|
60
76
|
:'quiet_hours' => :'Array<AirbnbListingDetailsWriteRequestQuietHoursInner>',
|
|
61
|
-
:'check_in_option' => :'AirbnbListingDetailsWriteRequestCheckInOption'
|
|
77
|
+
:'check_in_option' => :'AirbnbListingDetailsWriteRequestCheckInOption',
|
|
78
|
+
:'house_manual' => :'String',
|
|
79
|
+
:'directions' => :'String',
|
|
80
|
+
:'wifi_network' => :'String',
|
|
81
|
+
:'wifi_password' => :'String'
|
|
62
82
|
}
|
|
63
83
|
end
|
|
64
84
|
|
|
65
85
|
# List of attributes with nullable: true
|
|
66
86
|
def self.openapi_nullable
|
|
67
87
|
Set.new([
|
|
88
|
+
:'house_manual',
|
|
89
|
+
:'directions',
|
|
90
|
+
:'wifi_network',
|
|
91
|
+
:'wifi_password'
|
|
68
92
|
])
|
|
69
93
|
end
|
|
70
94
|
|
|
@@ -105,6 +129,22 @@ module Repull
|
|
|
105
129
|
if attributes.key?(:'check_in_option')
|
|
106
130
|
self.check_in_option = attributes[:'check_in_option']
|
|
107
131
|
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'house_manual')
|
|
134
|
+
self.house_manual = attributes[:'house_manual']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'directions')
|
|
138
|
+
self.directions = attributes[:'directions']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'wifi_network')
|
|
142
|
+
self.wifi_network = attributes[:'wifi_network']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'wifi_password')
|
|
146
|
+
self.wifi_password = attributes[:'wifi_password']
|
|
147
|
+
end
|
|
108
148
|
end
|
|
109
149
|
|
|
110
150
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -116,6 +156,22 @@ module Repull
|
|
|
116
156
|
invalid_properties.push('invalid value for "quiet_hours", number of items must be greater than or equal to 1.')
|
|
117
157
|
end
|
|
118
158
|
|
|
159
|
+
if !@house_manual.nil? && @house_manual.to_s.length > 10000
|
|
160
|
+
invalid_properties.push('invalid value for "house_manual", the character length must be smaller than or equal to 10000.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if !@directions.nil? && @directions.to_s.length > 5000
|
|
164
|
+
invalid_properties.push('invalid value for "directions", the character length must be smaller than or equal to 5000.')
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if !@wifi_network.nil? && @wifi_network.to_s.length > 255
|
|
168
|
+
invalid_properties.push('invalid value for "wifi_network", the character length must be smaller than or equal to 255.')
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if !@wifi_password.nil? && @wifi_password.to_s.length > 255
|
|
172
|
+
invalid_properties.push('invalid value for "wifi_password", the character length must be smaller than or equal to 255.')
|
|
173
|
+
end
|
|
174
|
+
|
|
119
175
|
invalid_properties
|
|
120
176
|
end
|
|
121
177
|
|
|
@@ -124,6 +180,10 @@ module Repull
|
|
|
124
180
|
def valid?
|
|
125
181
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
126
182
|
return false if !@quiet_hours.nil? && @quiet_hours.length < 1
|
|
183
|
+
return false if !@house_manual.nil? && @house_manual.to_s.length > 10000
|
|
184
|
+
return false if !@directions.nil? && @directions.to_s.length > 5000
|
|
185
|
+
return false if !@wifi_network.nil? && @wifi_network.to_s.length > 255
|
|
186
|
+
return false if !@wifi_password.nil? && @wifi_password.to_s.length > 255
|
|
127
187
|
true
|
|
128
188
|
end
|
|
129
189
|
|
|
@@ -141,6 +201,46 @@ module Repull
|
|
|
141
201
|
@quiet_hours = quiet_hours
|
|
142
202
|
end
|
|
143
203
|
|
|
204
|
+
# Custom attribute writer method with validation
|
|
205
|
+
# @param [Object] house_manual Value to be assigned
|
|
206
|
+
def house_manual=(house_manual)
|
|
207
|
+
if !house_manual.nil? && house_manual.to_s.length > 10000
|
|
208
|
+
fail ArgumentError, 'invalid value for "house_manual", the character length must be smaller than or equal to 10000.'
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
@house_manual = house_manual
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Custom attribute writer method with validation
|
|
215
|
+
# @param [Object] directions Value to be assigned
|
|
216
|
+
def directions=(directions)
|
|
217
|
+
if !directions.nil? && directions.to_s.length > 5000
|
|
218
|
+
fail ArgumentError, 'invalid value for "directions", the character length must be smaller than or equal to 5000.'
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
@directions = directions
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Custom attribute writer method with validation
|
|
225
|
+
# @param [Object] wifi_network Value to be assigned
|
|
226
|
+
def wifi_network=(wifi_network)
|
|
227
|
+
if !wifi_network.nil? && wifi_network.to_s.length > 255
|
|
228
|
+
fail ArgumentError, 'invalid value for "wifi_network", the character length must be smaller than or equal to 255.'
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
@wifi_network = wifi_network
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Custom attribute writer method with validation
|
|
235
|
+
# @param [Object] wifi_password Value to be assigned
|
|
236
|
+
def wifi_password=(wifi_password)
|
|
237
|
+
if !wifi_password.nil? && wifi_password.to_s.length > 255
|
|
238
|
+
fail ArgumentError, 'invalid value for "wifi_password", the character length must be smaller than or equal to 255.'
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
@wifi_password = wifi_password
|
|
242
|
+
end
|
|
243
|
+
|
|
144
244
|
# Checks equality by comparing each attribute.
|
|
145
245
|
# @param [Object] Object to be compared
|
|
146
246
|
def ==(o)
|
|
@@ -150,7 +250,11 @@ module Repull
|
|
|
150
250
|
property_type_category == o.property_type_category &&
|
|
151
251
|
room_type_category == o.room_type_category &&
|
|
152
252
|
quiet_hours == o.quiet_hours &&
|
|
153
|
-
check_in_option == o.check_in_option
|
|
253
|
+
check_in_option == o.check_in_option &&
|
|
254
|
+
house_manual == o.house_manual &&
|
|
255
|
+
directions == o.directions &&
|
|
256
|
+
wifi_network == o.wifi_network &&
|
|
257
|
+
wifi_password == o.wifi_password
|
|
154
258
|
end
|
|
155
259
|
|
|
156
260
|
# @see the `==` method
|
|
@@ -162,7 +266,7 @@ module Repull
|
|
|
162
266
|
# Calculates hash code according to all attributes.
|
|
163
267
|
# @return [Integer] Hash code
|
|
164
268
|
def hash
|
|
165
|
-
[property_type_group, property_type_category, room_type_category, quiet_hours, check_in_option].hash
|
|
269
|
+
[property_type_group, property_type_category, room_type_category, quiet_hours, check_in_option, house_manual, directions, wifi_network, wifi_password].hash
|
|
166
270
|
end
|
|
167
271
|
|
|
168
272
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# How the guest lets themselves in — Airbnb's `check_in_option`.
|
|
17
|
+
# How the guest lets themselves in — Airbnb's `check_in_option`. `instruction` is the arrival instructions the guest sees.
|
|
18
18
|
class AirbnbListingDetailsWriteRequestCheckInOption < ApiModelBase
|
|
19
19
|
attr_accessor :category
|
|
20
20
|
|
|
@@ -27,7 +27,7 @@ module Repull
|
|
|
27
27
|
# The `slug` of the flow you are answering, e.g. `existing_registration` or `exemption_claim`.
|
|
28
28
|
attr_accessor :flow_slug
|
|
29
29
|
|
|
30
|
-
# Keyed by each question's `answer_key`. Each value carries exactly one field
|
|
30
|
+
# Keyed by each question's `answer_key`. Each value carries exactly one `<type>_value` field named after the question's `type` (lower-case): `text_value`, `attestation_value` (boolean), `radio_value`, `dropdown_value`, `email_value`, `future_date_value` (YYYY-MM-DD) and `file_upload_value` (object with the base64 file) are the ones Airbnb returns in production; other question types follow the same pattern. Airbnb validates the value against its question. Example: `{\"email\": {\"email_value\": \"host@example.com\"}, \"expiration_date\": {\"future_date_value\": \"2029-02-04\"}, \"attestation\": {\"attestation_value\": true}}`.
|
|
31
31
|
attr_accessor :answers
|
|
32
32
|
|
|
33
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -58,7 +58,7 @@ module Repull
|
|
|
58
58
|
:'regulation_type' => :'String',
|
|
59
59
|
:'regulation_context' => :'String',
|
|
60
60
|
:'flow_slug' => :'String',
|
|
61
|
-
:'answers' => :'Hash<String,
|
|
61
|
+
:'answers' => :'Hash<String, Hash<String, Object>>'
|
|
62
62
|
}
|
|
63
63
|
end
|
|
64
64
|
|