repull 0.2.36 → 0.2.37
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/connect_api.rb +70 -2
- data/lib/repull/api/conversations_api.rb +2 -2
- data/lib/repull/api/reservations_api.rb +4 -4
- data/lib/repull/models/account_disconnected_payload.rb +16 -4
- data/lib/repull/models/account_disconnected_payload_listings_inner.rb +157 -0
- data/lib/repull/models/airbnb_calendar_operation.rb +12 -12
- data/lib/repull/models/inquiry_webhook_object.rb +10 -1
- data/lib/repull/models/inquiry_webhook_object_guest.rb +159 -0
- data/lib/repull/models/list_inquiries200_response_data_inner.rb +27 -1
- data/lib/repull/models/list_inquiries200_response_data_inner_guest.rb +160 -0
- data/lib/repull/models/listing_channel.rb +15 -4
- data/lib/repull/models/listing_webhook_object_channels_inner.rb +16 -5
- data/lib/repull/models/reservation.rb +25 -1
- data/lib/repull/models/reservation_access_code.rb +301 -0
- data/lib/repull/models/reservation_access_code_locks_inner.rb +190 -0
- data/lib/repull/models/submit_ciirus_credentials200_response.rb +213 -0
- data/lib/repull/models/submit_ciirus_credentials200_response_account_info.rb +159 -0
- data/lib/repull/models/submit_ciirus_credentials_request.rb +184 -0
- data/lib/repull/models/submit_ciirus_credentials_request_credentials.rb +203 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +9 -0
- data/openapi/v1.json +330 -8
- data/scripts/regen.sh +1 -1
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd95b6f41fc43994008cdf19153e5d46dc2344917765a9f347515aa6621c89d3
|
|
4
|
+
data.tar.gz: c3b6e119eabe3edeabe2e47193ab20451b6e8d6c2fe260c27ae1289d3a1c660d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c16c5c6feb701118133399a5c88ab107ad464f0493c2d913f8c7159874af9cebd2a40bbaa3355e07ce138aab1f7c5fdc666b1c6d2d61b1e1634c4298243a87f5
|
|
7
|
+
data.tar.gz: bd9b01e452b8264001d5ab150d686cf04bca97ef111f95821f9863fe355d6f1667dd1355abcc28a48cc7545dca01a439867a4dd871137b48fa4bd3ccf13fdffb
|
|
@@ -226,7 +226,7 @@ module Repull
|
|
|
226
226
|
end
|
|
227
227
|
|
|
228
228
|
# Disconnect provider
|
|
229
|
-
# Disconnect ONE connected account of a provider from this workspace. Supported for `airbnb`, `booking` and `
|
|
229
|
+
# Disconnect ONE connected account of a provider from this workspace. Supported for `airbnb`, `booking`, `vrbo-login` and every PMS (`guesty`, `hostaway`, `hospitable`, …). **Which account.** Pass `accountId` — for Airbnb the host id (`accounts[].externalAccountId` from `GET /v1/connect/airbnb`), for Booking.com the hotel id, for `vrbo-login` the sign-in's `accounts[].externalAccountId` from `GET /v1/connect/vrbo-login`. It is optional only when the workspace has exactly one account for the provider. With several and no `accountId`, the call returns `422` with the account ids in `valid_values` instead of guessing. An `accountId` that is not connected to this workspace returns `404`. Disconnecting one account leaves the others connected. **What happens.** The account's stored authorization is removed and it stops syncing. Its listings are **deactivated**, not deleted: they stop counting toward your plan's listing limit, their data is kept, and they are returned in `listingsDeactivated`. A listing that is still connected through another account or channel stays active. Reconnect the account, then activate the listings with `POST /v1/listings/status`. The change is all or nothing. For Airbnb, the host can also revoke access on Airbnb's side (Account → Privacy & sharing → Connected apps); that alone does not update this workspace, so call this endpoint as well. **PMS.** A workspace has one connection per PMS, so no `accountId` is needed. Disconnecting stops syncing, clears the stored credentials and deactivates the connection's listings; nothing is deleted, and reservations and messages stay. The response also carries `connectionId`. The PMS's own webhook subscription is left in place, because the same PMS account can be connected to another workspace (such as a Repull Migrate workspace). Reconnect with a new Connect session. Other providers return `501 not_implemented` with instructions for disconnecting on the provider's side. That answer depends only on the provider, not on your workspace: an unsupported provider returns `501` whether or not you have a connection to it. `404 not_found` on a supported provider means this workspace has no connection to it (or, with `accountId`, that the account is not connected here).
|
|
230
230
|
# @param provider [String] PMS provider slug (e.g., hostaway, guesty, ownerrez)
|
|
231
231
|
# @param [Hash] opts the optional parameters
|
|
232
232
|
# @option opts [String] :account_id The account to disconnect: the Airbnb host id (`accounts[].externalAccountId` on `GET /v1/connect/airbnb`) or the Booking.com hotel id. Required when the workspace has more than one connected account for the provider. Not the same as the `X-Account-Id` header.
|
|
@@ -237,7 +237,7 @@ module Repull
|
|
|
237
237
|
end
|
|
238
238
|
|
|
239
239
|
# Disconnect provider
|
|
240
|
-
# Disconnect ONE connected account of a provider from this workspace. Supported for `airbnb`, `booking`
|
|
240
|
+
# Disconnect ONE connected account of a provider from this workspace. Supported for `airbnb`, `booking`, `vrbo-login` and every PMS (`guesty`, `hostaway`, `hospitable`, …). **Which account.** Pass `accountId` — for Airbnb the host id (`accounts[].externalAccountId` from `GET /v1/connect/airbnb`), for Booking.com the hotel id, for `vrbo-login` the sign-in's `accounts[].externalAccountId` from `GET /v1/connect/vrbo-login`. It is optional only when the workspace has exactly one account for the provider. With several and no `accountId`, the call returns `422` with the account ids in `valid_values` instead of guessing. An `accountId` that is not connected to this workspace returns `404`. Disconnecting one account leaves the others connected. **What happens.** The account's stored authorization is removed and it stops syncing. Its listings are **deactivated**, not deleted: they stop counting toward your plan's listing limit, their data is kept, and they are returned in `listingsDeactivated`. A listing that is still connected through another account or channel stays active. Reconnect the account, then activate the listings with `POST /v1/listings/status`. The change is all or nothing. For Airbnb, the host can also revoke access on Airbnb's side (Account → Privacy & sharing → Connected apps); that alone does not update this workspace, so call this endpoint as well. **PMS.** A workspace has one connection per PMS, so no `accountId` is needed. Disconnecting stops syncing, clears the stored credentials and deactivates the connection's listings; nothing is deleted, and reservations and messages stay. The response also carries `connectionId`. The PMS's own webhook subscription is left in place, because the same PMS account can be connected to another workspace (such as a Repull Migrate workspace). Reconnect with a new Connect session. Other providers return `501 not_implemented` with instructions for disconnecting on the provider's side. That answer depends only on the provider, not on your workspace: an unsupported provider returns `501` whether or not you have a connection to it. `404 not_found` on a supported provider means this workspace has no connection to it (or, with `accountId`, that the account is not connected here).
|
|
241
241
|
# @param provider [String] PMS provider slug (e.g., hostaway, guesty, ownerrez)
|
|
242
242
|
# @param [Hash] opts the optional parameters
|
|
243
243
|
# @option opts [String] :account_id The account to disconnect: the Airbnb host id (`accounts[].externalAccountId` on `GET /v1/connect/airbnb`) or the Booking.com hotel id. Required when the workspace has more than one connected account for the provider. Not the same as the `X-Account-Id` header.
|
|
@@ -1488,6 +1488,74 @@ module Repull
|
|
|
1488
1488
|
return data, status_code, headers
|
|
1489
1489
|
end
|
|
1490
1490
|
|
|
1491
|
+
# Submit CiiRUS credentials for a Connect session
|
|
1492
|
+
# Completes a credentials-pattern connection for CiiRUS with the property manager's CiiRUS API username and password. **What syncs.** Units become listings (with descriptions, photos, amenities, rooms and house rules); reservations (with their charge and tax breakdown and payments) and reviews are imported, then polled for changes. Bookings can be created, quoted, changed and cancelled in CiiRUS — see `capabilities.reservations` on `GET /v1/connect/ciirus`. Guest messages are not available through CiiRUS's API. **Where the credentials come from.** The CiiRUS API Explorer gives the API username and password after signing in with the CiiRUS MC username and company password; CiiRUS support can also issue them. Credentials that see several suppliers (management companies) also need `managementCompanyUserId`. **IP whitelist.** CiiRUS only accepts calls from whitelisted IP addresses, and answers a wrong password and a non-whitelisted address the same way. When this returns `invalid_credentials` with correct credentials, ask CiiRUS support to whitelist Repull for the API user. The credentials are validated against CiiRUS before anything is stored, so invalid ones return `invalid_credentials` rather than creating a dead connection. On success only the credential fields below are stored, and the first sync of listings and reservations is queued. CiiRUS has no webhooks: after the first sync, reservation changes are picked up by polling about once a minute. Reconnecting replaces the stored credentials on the workspace's existing CiiRUS connection — the `pmsConnectionId` stays the same. No API key required when called with a `sessionId` — the session is the capability token.
|
|
1493
|
+
# @param submit_ciirus_credentials_request [SubmitCiirusCredentialsRequest]
|
|
1494
|
+
# @param [Hash] opts the optional parameters
|
|
1495
|
+
# @return [SubmitCiirusCredentials200Response]
|
|
1496
|
+
def submit_ciirus_credentials(submit_ciirus_credentials_request, opts = {})
|
|
1497
|
+
data, _status_code, _headers = submit_ciirus_credentials_with_http_info(submit_ciirus_credentials_request, opts)
|
|
1498
|
+
data
|
|
1499
|
+
end
|
|
1500
|
+
|
|
1501
|
+
# Submit CiiRUS credentials for a Connect session
|
|
1502
|
+
# Completes a credentials-pattern connection for CiiRUS with the property manager's CiiRUS API username and password. **What syncs.** Units become listings (with descriptions, photos, amenities, rooms and house rules); reservations (with their charge and tax breakdown and payments) and reviews are imported, then polled for changes. Bookings can be created, quoted, changed and cancelled in CiiRUS — see `capabilities.reservations` on `GET /v1/connect/ciirus`. Guest messages are not available through CiiRUS's API. **Where the credentials come from.** The CiiRUS API Explorer gives the API username and password after signing in with the CiiRUS MC username and company password; CiiRUS support can also issue them. Credentials that see several suppliers (management companies) also need `managementCompanyUserId`. **IP whitelist.** CiiRUS only accepts calls from whitelisted IP addresses, and answers a wrong password and a non-whitelisted address the same way. When this returns `invalid_credentials` with correct credentials, ask CiiRUS support to whitelist Repull for the API user. The credentials are validated against CiiRUS before anything is stored, so invalid ones return `invalid_credentials` rather than creating a dead connection. On success only the credential fields below are stored, and the first sync of listings and reservations is queued. CiiRUS has no webhooks: after the first sync, reservation changes are picked up by polling about once a minute. Reconnecting replaces the stored credentials on the workspace's existing CiiRUS connection — the `pmsConnectionId` stays the same. No API key required when called with a `sessionId` — the session is the capability token.
|
|
1503
|
+
# @param submit_ciirus_credentials_request [SubmitCiirusCredentialsRequest]
|
|
1504
|
+
# @param [Hash] opts the optional parameters
|
|
1505
|
+
# @return [Array<(SubmitCiirusCredentials200Response, Integer, Hash)>] SubmitCiirusCredentials200Response data, response status code and response headers
|
|
1506
|
+
def submit_ciirus_credentials_with_http_info(submit_ciirus_credentials_request, opts = {})
|
|
1507
|
+
if @api_client.config.debugging
|
|
1508
|
+
@api_client.config.logger.debug 'Calling API: ConnectApi.submit_ciirus_credentials ...'
|
|
1509
|
+
end
|
|
1510
|
+
# verify the required parameter 'submit_ciirus_credentials_request' is set
|
|
1511
|
+
if @api_client.config.client_side_validation && submit_ciirus_credentials_request.nil?
|
|
1512
|
+
fail ArgumentError, "Missing the required parameter 'submit_ciirus_credentials_request' when calling ConnectApi.submit_ciirus_credentials"
|
|
1513
|
+
end
|
|
1514
|
+
# resource path
|
|
1515
|
+
local_var_path = '/v1/connect/ciirus/credentials'
|
|
1516
|
+
|
|
1517
|
+
# query parameters
|
|
1518
|
+
query_params = opts[:query_params] || {}
|
|
1519
|
+
|
|
1520
|
+
# header parameters
|
|
1521
|
+
header_params = opts[:header_params] || {}
|
|
1522
|
+
# HTTP header 'Accept' (if needed)
|
|
1523
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1524
|
+
# HTTP header 'Content-Type'
|
|
1525
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1526
|
+
if !content_type.nil?
|
|
1527
|
+
header_params['Content-Type'] = content_type
|
|
1528
|
+
end
|
|
1529
|
+
|
|
1530
|
+
# form parameters
|
|
1531
|
+
form_params = opts[:form_params] || {}
|
|
1532
|
+
|
|
1533
|
+
# http body (model)
|
|
1534
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(submit_ciirus_credentials_request)
|
|
1535
|
+
|
|
1536
|
+
# return_type
|
|
1537
|
+
return_type = opts[:debug_return_type] || 'SubmitCiirusCredentials200Response'
|
|
1538
|
+
|
|
1539
|
+
# auth_names
|
|
1540
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1541
|
+
|
|
1542
|
+
new_options = opts.merge(
|
|
1543
|
+
:operation => :"ConnectApi.submit_ciirus_credentials",
|
|
1544
|
+
:header_params => header_params,
|
|
1545
|
+
:query_params => query_params,
|
|
1546
|
+
:form_params => form_params,
|
|
1547
|
+
:body => post_body,
|
|
1548
|
+
:auth_names => auth_names,
|
|
1549
|
+
:return_type => return_type
|
|
1550
|
+
)
|
|
1551
|
+
|
|
1552
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1553
|
+
if @api_client.config.debugging
|
|
1554
|
+
@api_client.config.logger.debug "API called: ConnectApi#submit_ciirus_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1555
|
+
end
|
|
1556
|
+
return data, status_code, headers
|
|
1557
|
+
end
|
|
1558
|
+
|
|
1491
1559
|
# Submit Cloudbeds credentials for a Connect session
|
|
1492
1560
|
# Completes a credentials-pattern connection for Cloudbeds with a property (or organization) API key, created in Cloudbeds under Apps & Marketplace → API Credentials. In Cloudbeds a listing is a room type and its rooms are units. A booking with several rooms becomes one reservation per room. The key is validated and the properties it can see are read before anything is stored. On success Repull subscribes to the property's Cloudbeds webhooks (reservations, guests, room blocks) and queues the first sync. Cloudbeds keys expire if unused for 30 days; the connection's regular sync keeps them alive. No API key required when called with a `sessionId` — the session is the capability token.
|
|
1493
1561
|
# @param submit_cloudbeds_credentials_request [SubmitCloudbedsCredentialsRequest]
|
|
@@ -101,7 +101,7 @@ module Repull
|
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
# Get conversation detail
|
|
104
|
-
# Returns one thread (the same shape as the list-row `Conversation`) plus expanded `host` (from `airbnb_hosts` for the thread's `host_id`) and `guest` (resolved via the thread's `reservation_id`, with up to 50 contacts) blocks. A conversation that belongs to an inactive listing (by the thread's listing or its reservation's listing) returns `403 listing_inactive`. Inactive listings keep syncing; activate the listing to use it here.
|
|
104
|
+
# Returns one thread (the same shape as the list-row `Conversation`) plus expanded `host` (from `airbnb_hosts` for the thread's `host_id`) and `guest` (resolved via the thread's `reservation_id`, with up to 50 contacts) blocks. On an inquiry (no reservation yet) `guest` carries the first name Airbnb shares with the inquiry; contacts such as the phone number arrive once the guest books. A conversation that belongs to an inactive listing (by the thread's listing or its reservation's listing) returns `403 listing_inactive`. Inactive listings keep syncing; activate the listing to use it here.
|
|
105
105
|
# @param id [Integer] Internal Repull thread id.
|
|
106
106
|
# @param [Hash] opts the optional parameters
|
|
107
107
|
# @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`.
|
|
@@ -112,7 +112,7 @@ module Repull
|
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
# Get conversation detail
|
|
115
|
-
# Returns one thread (the same shape as the list-row `Conversation`) plus expanded `host` (from `airbnb_hosts` for the thread's `host_id`) and `guest` (resolved via the thread's `reservation_id`, with up to 50 contacts) blocks. A conversation that belongs to an inactive listing (by the thread's listing or its reservation's listing) returns `403 listing_inactive`. Inactive listings keep syncing; activate the listing to use it here.
|
|
115
|
+
# Returns one thread (the same shape as the list-row `Conversation`) plus expanded `host` (from `airbnb_hosts` for the thread's `host_id`) and `guest` (resolved via the thread's `reservation_id`, with up to 50 contacts) blocks. On an inquiry (no reservation yet) `guest` carries the first name Airbnb shares with the inquiry; contacts such as the phone number arrive once the guest books. A conversation that belongs to an inactive listing (by the thread's listing or its reservation's listing) returns `403 listing_inactive`. Inactive listings keep syncing; activate the listing to use it here.
|
|
116
116
|
# @param id [Integer] Internal Repull thread id.
|
|
117
117
|
# @param [Hash] opts the optional parameters
|
|
118
118
|
# @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`.
|
|
@@ -170,7 +170,7 @@ module Repull
|
|
|
170
170
|
end
|
|
171
171
|
|
|
172
172
|
# Create a reservation
|
|
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, Track): 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. | | Track | ✓ | ✓ | ✓ | ✓ | ✓ | Track decides Hold vs Confirmed from the property's channel mode; a set price on a Channel Key needs \"Allow Custom Pricing\"; a unit change needs `moveReasonId` on the connection; a date change re-prices at Track's current rates. | 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.
|
|
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, Track, CiiRUS): 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. | | Track | ✓ | ✓ | ✓ | ✓ | ✓ | Track decides Hold vs Confirmed from the property's channel mode; a set price on a Channel Key needs \"Allow Custom Pricing\"; a unit change needs `moveReasonId` on the connection; a date change re-prices at Track's current rates. | | CiiRUS | ✓ | ✓ | ✓ | ✓ | ✓ | A set price is the rent, with CiiRUS adding its taxes; no tentative holds. | 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.
|
|
174
174
|
# @param reservation_create_request [ReservationCreateRequest]
|
|
175
175
|
# @param [Hash] opts the optional parameters
|
|
176
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.
|
|
@@ -182,7 +182,7 @@ module Repull
|
|
|
182
182
|
end
|
|
183
183
|
|
|
184
184
|
# Create a reservation
|
|
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, Track): 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. | | Track | ✓ | ✓ | ✓ | ✓ | ✓ | Track decides Hold vs Confirmed from the property's channel mode; a set price on a Channel Key needs \"Allow Custom Pricing\"; a unit change needs `moveReasonId` on the connection; a date change re-prices at Track's current rates. | 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.
|
|
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, Track, CiiRUS): 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. | | Track | ✓ | ✓ | ✓ | ✓ | ✓ | Track decides Hold vs Confirmed from the property's channel mode; a set price on a Channel Key needs \"Allow Custom Pricing\"; a unit change needs `moveReasonId` on the connection; a date change re-prices at Track's current rates. | | CiiRUS | ✓ | ✓ | ✓ | ✓ | ✓ | A set price is the rent, with CiiRUS adding its taxes; no tentative holds. | 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.
|
|
186
186
|
# @param reservation_create_request [ReservationCreateRequest]
|
|
187
187
|
# @param [Hash] opts the optional parameters
|
|
188
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.
|
|
@@ -532,7 +532,7 @@ module Repull
|
|
|
532
532
|
end
|
|
533
533
|
|
|
534
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. | | Track | ✓ | ✓ | ✓ | ✓ | ✓ | Track decides Hold vs Confirmed from the property's channel mode; a set price on a Channel Key needs \"Allow Custom Pricing\"; a unit change needs `moveReasonId` on the connection; a date change re-prices at Track's current rates. | 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.
|
|
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. | | Track | ✓ | ✓ | ✓ | ✓ | ✓ | Track decides Hold vs Confirmed from the property's channel mode; a set price on a Channel Key needs \"Allow Custom Pricing\"; a unit change needs `moveReasonId` on the connection; a date change re-prices at Track's current rates. | | CiiRUS | ✓ | ✓ | ✓ | ✓ | ✓ | A set price is the rent, with CiiRUS adding its taxes; no tentative holds. | 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
536
|
# @param reservation_quote_request [ReservationQuoteRequest]
|
|
537
537
|
# @param [Hash] opts the optional parameters
|
|
538
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.
|
|
@@ -543,7 +543,7 @@ module Repull
|
|
|
543
543
|
end
|
|
544
544
|
|
|
545
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. | | Track | ✓ | ✓ | ✓ | ✓ | ✓ | Track decides Hold vs Confirmed from the property's channel mode; a set price on a Channel Key needs \"Allow Custom Pricing\"; a unit change needs `moveReasonId` on the connection; a date change re-prices at Track's current rates. | 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.
|
|
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. | | Track | ✓ | ✓ | ✓ | ✓ | ✓ | Track decides Hold vs Confirmed from the property's channel mode; a set price on a Channel Key needs \"Allow Custom Pricing\"; a unit change needs `moveReasonId` on the connection; a date change re-prices at Track's current rates. | | CiiRUS | ✓ | ✓ | ✓ | ✓ | ✓ | A set price is the rent, with CiiRUS adding its taxes; no tentative holds. | 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
547
|
# @param reservation_quote_request [ReservationQuoteRequest]
|
|
548
548
|
# @param [Hash] opts the optional parameters
|
|
549
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.
|
|
@@ -30,6 +30,9 @@ module Repull
|
|
|
30
30
|
# Why the connection was lost. `refresh_token_rejected` — upstream OAuth refresh endpoint returned a hard rejection. `manual_disconnect` — host/admin disconnected via the dashboard. `auth_expired` — credentials aged out without ever being used. `revoked_upstream` — provider notified us the user revoked access.
|
|
31
31
|
attr_accessor :reason
|
|
32
32
|
|
|
33
|
+
# The listings this account holds in your workspace — the ones that stop syncing until it is reconnected. Identity only; inactive listings included. Matches `channels[].account` on `GET /v1/listings`. Empty when the account has no listings here.
|
|
34
|
+
attr_accessor :listings
|
|
35
|
+
|
|
33
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
37
|
def self.attribute_map
|
|
35
38
|
{
|
|
@@ -38,7 +41,8 @@ module Repull
|
|
|
38
41
|
:'connection_id' => :'connectionId',
|
|
39
42
|
:'provider' => :'provider',
|
|
40
43
|
:'disconnected_at' => :'disconnectedAt',
|
|
41
|
-
:'reason' => :'reason'
|
|
44
|
+
:'reason' => :'reason',
|
|
45
|
+
:'listings' => :'listings'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
44
48
|
|
|
@@ -60,7 +64,8 @@ module Repull
|
|
|
60
64
|
:'connection_id' => :'String',
|
|
61
65
|
:'provider' => :'String',
|
|
62
66
|
:'disconnected_at' => :'Time',
|
|
63
|
-
:'reason' => :'String'
|
|
67
|
+
:'reason' => :'String',
|
|
68
|
+
:'listings' => :'Array<AccountDisconnectedPayloadListingsInner>'
|
|
64
69
|
}
|
|
65
70
|
end
|
|
66
71
|
|
|
@@ -110,6 +115,12 @@ module Repull
|
|
|
110
115
|
if attributes.key?(:'reason')
|
|
111
116
|
self.reason = attributes[:'reason']
|
|
112
117
|
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'listings')
|
|
120
|
+
if (value = attributes[:'listings']).is_a?(Array)
|
|
121
|
+
self.listings = value
|
|
122
|
+
end
|
|
123
|
+
end
|
|
113
124
|
end
|
|
114
125
|
|
|
115
126
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -137,7 +148,8 @@ module Repull
|
|
|
137
148
|
connection_id == o.connection_id &&
|
|
138
149
|
provider == o.provider &&
|
|
139
150
|
disconnected_at == o.disconnected_at &&
|
|
140
|
-
reason == o.reason
|
|
151
|
+
reason == o.reason &&
|
|
152
|
+
listings == o.listings
|
|
141
153
|
end
|
|
142
154
|
|
|
143
155
|
# @see the `==` method
|
|
@@ -149,7 +161,7 @@ module Repull
|
|
|
149
161
|
# Calculates hash code according to all attributes.
|
|
150
162
|
# @return [Integer] Hash code
|
|
151
163
|
def hash
|
|
152
|
-
[workspace_id, account_id, connection_id, provider, disconnected_at, reason].hash
|
|
164
|
+
[workspace_id, account_id, connection_id, provider, disconnected_at, reason, listings].hash
|
|
153
165
|
end
|
|
154
166
|
|
|
155
167
|
# Builds the object from hash
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | unlimited (10 included, then billed per listing) | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Repull
|
|
17
|
+
class AccountDisconnectedPayloadListingsInner < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'id' => :'id',
|
|
26
|
+
:'name' => :'name'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'id' => :'Integer',
|
|
44
|
+
:'name' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
:'name'
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AccountDisconnectedPayloadListingsInner` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AccountDisconnectedPayloadListingsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'id')
|
|
72
|
+
self.id = attributes[:'id']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'name')
|
|
76
|
+
self.name = attributes[:'name']
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properties with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Checks equality by comparing each attribute.
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def ==(o)
|
|
98
|
+
return true if self.equal?(o)
|
|
99
|
+
self.class == o.class &&
|
|
100
|
+
id == o.id &&
|
|
101
|
+
name == o.name
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @see the `==` method
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def eql?(o)
|
|
107
|
+
self == o
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Calculates hash code according to all attributes.
|
|
111
|
+
# @return [Integer] Hash code
|
|
112
|
+
def hash
|
|
113
|
+
[id, name].hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def self.build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
transformed_hash = {}
|
|
123
|
+
openapi_types.each_pair do |key, type|
|
|
124
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = nil
|
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
127
|
+
# check to ensure the input is an array given that the attribute
|
|
128
|
+
# is documented as an array but the input is not
|
|
129
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
130
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
131
|
+
end
|
|
132
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
new(transformed_hash)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Returns the object in the form of hash
|
|
140
|
+
# @return [Hash] Returns the object in the form of hash
|
|
141
|
+
def to_hash
|
|
142
|
+
hash = {}
|
|
143
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
144
|
+
value = self.send(attr)
|
|
145
|
+
if value.nil?
|
|
146
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
147
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
hash[param] = _to_hash(value)
|
|
151
|
+
end
|
|
152
|
+
hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
end
|
|
@@ -34,10 +34,10 @@ module Repull
|
|
|
34
34
|
# Why a blocked date is blocked. Airbnb requires it whenever `availability` is `unavailable`; when you leave it out, Repull sends **`BLOCKED_BY_HOST`**. Use `OUTSIDE_RESERVATION` for a date held by a booking made on another channel.
|
|
35
35
|
attr_accessor :busy_subtype
|
|
36
36
|
|
|
37
|
-
# Minimum length of stay for the date(s).
|
|
37
|
+
# Minimum length of stay for the date(s), 1–1125. Send `-1` to drop the date's own minimum so it follows the listing default again (`default_min_nights`). `0` and `null` do not clear it.
|
|
38
38
|
attr_accessor :min_nights
|
|
39
39
|
|
|
40
|
-
# Maximum length of stay for the date(s)
|
|
40
|
+
# Maximum length of stay for the date(s), 1–1125 and no lower than `min_nights`. Send `-1` to drop the date's own maximum so it follows the listing default again (`default_max_nights`).
|
|
41
41
|
attr_accessor :max_nights
|
|
42
42
|
|
|
43
43
|
# Closed-to-arrival — no check-ins on the affected date(s).
|
|
@@ -189,16 +189,16 @@ module Repull
|
|
|
189
189
|
invalid_properties.push('invalid value for "min_nights", must be smaller than or equal to 1125.')
|
|
190
190
|
end
|
|
191
191
|
|
|
192
|
-
if !@min_nights.nil? && @min_nights < 1
|
|
193
|
-
invalid_properties.push('invalid value for "min_nights", must be greater than or equal to 1.')
|
|
192
|
+
if !@min_nights.nil? && @min_nights < -1
|
|
193
|
+
invalid_properties.push('invalid value for "min_nights", must be greater than or equal to -1.')
|
|
194
194
|
end
|
|
195
195
|
|
|
196
196
|
if !@max_nights.nil? && @max_nights > 1125
|
|
197
197
|
invalid_properties.push('invalid value for "max_nights", must be smaller than or equal to 1125.')
|
|
198
198
|
end
|
|
199
199
|
|
|
200
|
-
if !@max_nights.nil? && @max_nights < 1
|
|
201
|
-
invalid_properties.push('invalid value for "max_nights", must be greater than or equal to 1.')
|
|
200
|
+
if !@max_nights.nil? && @max_nights < -1
|
|
201
|
+
invalid_properties.push('invalid value for "max_nights", must be greater than or equal to -1.')
|
|
202
202
|
end
|
|
203
203
|
|
|
204
204
|
invalid_properties
|
|
@@ -211,9 +211,9 @@ module Repull
|
|
|
211
211
|
return false if !@dates.nil? && @dates.length < 1
|
|
212
212
|
return false if !@daily_price.nil? && @daily_price < 0
|
|
213
213
|
return false if !@min_nights.nil? && @min_nights > 1125
|
|
214
|
-
return false if !@min_nights.nil? && @min_nights < 1
|
|
214
|
+
return false if !@min_nights.nil? && @min_nights < -1
|
|
215
215
|
return false if !@max_nights.nil? && @max_nights > 1125
|
|
216
|
-
return false if !@max_nights.nil? && @max_nights < 1
|
|
216
|
+
return false if !@max_nights.nil? && @max_nights < -1
|
|
217
217
|
true
|
|
218
218
|
end
|
|
219
219
|
|
|
@@ -244,8 +244,8 @@ module Repull
|
|
|
244
244
|
fail ArgumentError, 'invalid value for "min_nights", must be smaller than or equal to 1125.'
|
|
245
245
|
end
|
|
246
246
|
|
|
247
|
-
if !min_nights.nil? && min_nights < 1
|
|
248
|
-
fail ArgumentError, 'invalid value for "min_nights", must be greater than or equal to 1.'
|
|
247
|
+
if !min_nights.nil? && min_nights < -1
|
|
248
|
+
fail ArgumentError, 'invalid value for "min_nights", must be greater than or equal to -1.'
|
|
249
249
|
end
|
|
250
250
|
|
|
251
251
|
@min_nights = min_nights
|
|
@@ -258,8 +258,8 @@ module Repull
|
|
|
258
258
|
fail ArgumentError, 'invalid value for "max_nights", must be smaller than or equal to 1125.'
|
|
259
259
|
end
|
|
260
260
|
|
|
261
|
-
if !max_nights.nil? && max_nights < 1
|
|
262
|
-
fail ArgumentError, 'invalid value for "max_nights", must be greater than or equal to 1.'
|
|
261
|
+
if !max_nights.nil? && max_nights < -1
|
|
262
|
+
fail ArgumentError, 'invalid value for "max_nights", must be greater than or equal to -1.'
|
|
263
263
|
end
|
|
264
264
|
|
|
265
265
|
@max_nights = max_nights
|
|
@@ -33,6 +33,8 @@ module Repull
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :check_out
|
|
35
35
|
|
|
36
|
+
attr_accessor :guest
|
|
37
|
+
|
|
36
38
|
attr_accessor :guests
|
|
37
39
|
|
|
38
40
|
attr_accessor :expected_payout
|
|
@@ -61,6 +63,7 @@ module Repull
|
|
|
61
63
|
:'status' => :'status',
|
|
62
64
|
:'check_in' => :'checkIn',
|
|
63
65
|
:'check_out' => :'checkOut',
|
|
66
|
+
:'guest' => :'guest',
|
|
64
67
|
:'guests' => :'guests',
|
|
65
68
|
:'expected_payout' => :'expectedPayout',
|
|
66
69
|
:'reservation_id' => :'reservationId',
|
|
@@ -92,6 +95,7 @@ module Repull
|
|
|
92
95
|
:'status' => :'String',
|
|
93
96
|
:'check_in' => :'Date',
|
|
94
97
|
:'check_out' => :'Date',
|
|
98
|
+
:'guest' => :'InquiryWebhookObjectGuest',
|
|
95
99
|
:'guests' => :'InquiryWebhookObjectGuests',
|
|
96
100
|
:'expected_payout' => :'InquiryWebhookObjectExpectedPayout',
|
|
97
101
|
:'reservation_id' => :'String',
|
|
@@ -167,6 +171,10 @@ module Repull
|
|
|
167
171
|
self.check_out = attributes[:'check_out']
|
|
168
172
|
end
|
|
169
173
|
|
|
174
|
+
if attributes.key?(:'guest')
|
|
175
|
+
self.guest = attributes[:'guest']
|
|
176
|
+
end
|
|
177
|
+
|
|
170
178
|
if attributes.key?(:'guests')
|
|
171
179
|
self.guests = attributes[:'guests']
|
|
172
180
|
end
|
|
@@ -257,6 +265,7 @@ module Repull
|
|
|
257
265
|
status == o.status &&
|
|
258
266
|
check_in == o.check_in &&
|
|
259
267
|
check_out == o.check_out &&
|
|
268
|
+
guest == o.guest &&
|
|
260
269
|
guests == o.guests &&
|
|
261
270
|
expected_payout == o.expected_payout &&
|
|
262
271
|
reservation_id == o.reservation_id &&
|
|
@@ -276,7 +285,7 @@ module Repull
|
|
|
276
285
|
# Calculates hash code according to all attributes.
|
|
277
286
|
# @return [Integer] Hash code
|
|
278
287
|
def hash
|
|
279
|
-
[id, conversation_id, listing_id, channel, status, check_in, check_out, guests, expected_payout, reservation_id, relayed_by, respond_by, responded_at, created_at, updated_at].hash
|
|
288
|
+
[id, conversation_id, listing_id, channel, status, check_in, check_out, guest, guests, expected_payout, reservation_id, relayed_by, respond_by, responded_at, created_at, updated_at].hash
|
|
280
289
|
end
|
|
281
290
|
|
|
282
291
|
# Builds the object from hash
|