repull 0.2.46 → 0.2.47
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/booking_com_api.rb +4 -4
- data/lib/repull/api/connect_api.rb +2 -2
- data/lib/repull/api/connections_api.rb +70 -0
- data/lib/repull/api/listings_api.rb +4 -4
- data/lib/repull/models/booking_property_action_request.rb +13 -3
- data/lib/repull/models/booking_property_action_response.rb +33 -19
- data/lib/repull/models/booking_property_open_result.rb +264 -0
- data/lib/repull/models/connect_session_abandoned_payload.rb +24 -2
- data/lib/repull/models/listing_active_response.rb +16 -4
- data/lib/repull/models/listing_status_batch_response.rb +16 -4
- data/lib/repull/models/map_connect_booking_rooms_response_property_status.rb +3 -3
- data/lib/repull/models/start_connection_import202_response.rb +147 -0
- data/lib/repull/models/start_connection_import202_response_data.rb +269 -0
- data/lib/repull/models/start_connection_import_request.rb +184 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +4 -0
- data/openapi/v1.json +193 -13
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 915baeb146a8767e8cf355845ff601561c409c6890cc0e815ba036decd8d3f97
|
|
4
|
+
data.tar.gz: 53d5416b50c42fb446c8b9709e0bb5365e5ffe39d6fab84c6fedb3c2a474517b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d930d0d562ae464fa8a340af142439d1f739c171dfabda8fefd6cd39fefb73dc924a4e0ca94d30555fb3e365996045fd4cb24ada956a59c79d41bfd9ef40d20
|
|
7
|
+
data.tar.gz: 532624a8c82b995407831aad97cfaf44f8021b57ad54c67d78cab9b4c6f83c94311c3e310f96385c77a953ff97de9ed8ccc4927b2d3e3ae67c4f403eeade71e4
|
|
@@ -87,8 +87,8 @@ module Repull
|
|
|
87
87
|
return data, status_code, headers
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
# Take a property off sale / put it back (unlist/relist)
|
|
91
|
-
# Stop this listing's Booking.com property being sold, or start it again. `id` is a **Repull listing id**, not a Booking.com hotel id, as on the GET. **Booking.com has no unlist, so this is an availability write.** Airbnb has a real deactivate; Booking.com does not. `unlist` closes the mapped room across the whole forward window, so the property stops selling. `relist` is not its mirror image: it re-syncs the true calendar, so dates that are genuinely blocked (a reservation, an owner stay) stay blocked and only the closure `unlist` wrote lifts. Re-opening everything would sell dates that are not for sale. **Which property gets closed.** A listing can be mapped to more than one Booking.com property — the same unit re-listed under a new property keeps its old mapping, and workspaces routinely sit on five or six. With exactly one, send nothing. With several, name one with `hotelId` (or `?hotel_id=`); omit it and the request is refused with **`409 ambiguous_booking_mapping`** listing the candidates, and nothing is written. That refusal matters more here than on a publish: writing content into the wrong property is recoverable, closing the wrong property's availability takes real inventory off sale while the property you meant keeps selling. Naming a property this listing is not mapped to is a `404` that names the ones it is. **This does not change the listing in Repull.** `active` — what Repull bills and serves — is untouched by both actions and is deliberately not echoed in the response, so the two ideas can never be read as one field. To take a listing off the market on every channel at once, use `POST /v1/listings/{id}/offline`. Any other action returns a structured `422` naming the ones that are supported. To push content use `POST /v1/listings/{id}/publish/booking`; to map rooms use `POST /v1/connect/booking/map-rooms`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
90
|
+
# Take a property off sale / put it back, or open / close it (unlist/relist/open/close)
|
|
91
|
+
# Stop this listing's Booking.com property being sold, or start it again. `id` is a **Repull listing id**, not a Booking.com hotel id, as on the GET. **Booking.com has no unlist, so this is an availability write.** Airbnb has a real deactivate; Booking.com does not. `unlist` closes the mapped room across the whole forward window, so the property stops selling. `relist` is not its mirror image: it re-syncs the true calendar, so dates that are genuinely blocked (a reservation, an owner stay) stay blocked and only the closure `unlist` wrote lifts. Re-opening everything would sell dates that are not for sale. **Which property gets closed.** A listing can be mapped to more than one Booking.com property — the same unit re-listed under a new property keeps its old mapping, and workspaces routinely sit on five or six. With exactly one, send nothing. With several, name one with `hotelId` (or `?hotel_id=`); omit it and the request is refused with **`409 ambiguous_booking_mapping`** listing the candidates, and nothing is written. That refusal matters more here than on a publish: writing content into the wrong property is recoverable, closing the wrong property's availability takes real inventory off sale while the property you meant keeps selling. Naming a property this listing is not mapped to is a `404` that names the ones it is. **This does not change the listing in Repull.** `active` — what Repull bills and serves — is untouched by both actions and is deliberately not echoed in the response, so the two ideas can never be read as one field. To take a listing off the market on every channel at once, use `POST /v1/listings/{id}/offline`. **Opening and closing the property on Booking.com.** `open` runs Booking.com's readiness check and, only if it passes, opens the property. On a property that is not ready it changes nothing and answers **`422 booking_rejected`** with Booking.com's own reasons in `blockers` (for example \"Room 1554900501 does not have kitchen or kitchenette\"), so it is safe to ask. It opens a property Booking.com has in a build stage (`XML: Being built`, `XML: Ready to open`) or closed; an open property answers `changed: false`. `close` closes the property on Booking.com, with an optional `reason` (default `PROPERTY_NOT_AVAILABLE`). An inactive listing cannot be opened (`403 listing_inactive`), and neither can a property another inactive listing shares. **When Repull opens a property by itself.** Repull opens a Booking.com property automatically only while every listing mapped to it is active. Keep a listing that is not ready inactive and its property is never opened; activate it and Repull opens the property, provided Booking.com's own readiness check passes. Activate with `POST /v1/listings/status` (or `PATCH /v1/listings/{id}`); its response has a `bookingProperties` entry per property saying whether it opened. Deactivating never closes a property that is already open — use `close` for that. Any other action returns a structured `422` naming the ones that are supported. To push content use `POST /v1/listings/{id}/publish/booking`; to map rooms use `POST /v1/connect/booking/map-rooms`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
92
92
|
# @param id [Integer] Repull listing id — NOT a Booking.com hotel id.
|
|
93
93
|
# @param booking_property_action_request [BookingPropertyActionRequest]
|
|
94
94
|
# @param [Hash] opts the optional parameters
|
|
@@ -100,8 +100,8 @@ module Repull
|
|
|
100
100
|
data
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
# Take a property off sale / put it back (unlist/relist)
|
|
104
|
-
# Stop this listing's Booking.com property being sold, or start it again. `id` is a **Repull listing id**, not a Booking.com hotel id, as on the GET. **Booking.com has no unlist, so this is an availability write.** Airbnb has a real deactivate; Booking.com does not. `unlist` closes the mapped room across the whole forward window, so the property stops selling. `relist` is not its mirror image: it re-syncs the true calendar, so dates that are genuinely blocked (a reservation, an owner stay) stay blocked and only the closure `unlist` wrote lifts. Re-opening everything would sell dates that are not for sale. **Which property gets closed.** A listing can be mapped to more than one Booking.com property — the same unit re-listed under a new property keeps its old mapping, and workspaces routinely sit on five or six. With exactly one, send nothing. With several, name one with `hotelId` (or `?hotel_id=`); omit it and the request is refused with **`409 ambiguous_booking_mapping`** listing the candidates, and nothing is written. That refusal matters more here than on a publish: writing content into the wrong property is recoverable, closing the wrong property's availability takes real inventory off sale while the property you meant keeps selling. Naming a property this listing is not mapped to is a `404` that names the ones it is. **This does not change the listing in Repull.** `active` — what Repull bills and serves — is untouched by both actions and is deliberately not echoed in the response, so the two ideas can never be read as one field. To take a listing off the market on every channel at once, use `POST /v1/listings/{id}/offline`. Any other action returns a structured `422` naming the ones that are supported. To push content use `POST /v1/listings/{id}/publish/booking`; to map rooms use `POST /v1/connect/booking/map-rooms`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
103
|
+
# Take a property off sale / put it back, or open / close it (unlist/relist/open/close)
|
|
104
|
+
# Stop this listing's Booking.com property being sold, or start it again. `id` is a **Repull listing id**, not a Booking.com hotel id, as on the GET. **Booking.com has no unlist, so this is an availability write.** Airbnb has a real deactivate; Booking.com does not. `unlist` closes the mapped room across the whole forward window, so the property stops selling. `relist` is not its mirror image: it re-syncs the true calendar, so dates that are genuinely blocked (a reservation, an owner stay) stay blocked and only the closure `unlist` wrote lifts. Re-opening everything would sell dates that are not for sale. **Which property gets closed.** A listing can be mapped to more than one Booking.com property — the same unit re-listed under a new property keeps its old mapping, and workspaces routinely sit on five or six. With exactly one, send nothing. With several, name one with `hotelId` (or `?hotel_id=`); omit it and the request is refused with **`409 ambiguous_booking_mapping`** listing the candidates, and nothing is written. That refusal matters more here than on a publish: writing content into the wrong property is recoverable, closing the wrong property's availability takes real inventory off sale while the property you meant keeps selling. Naming a property this listing is not mapped to is a `404` that names the ones it is. **This does not change the listing in Repull.** `active` — what Repull bills and serves — is untouched by both actions and is deliberately not echoed in the response, so the two ideas can never be read as one field. To take a listing off the market on every channel at once, use `POST /v1/listings/{id}/offline`. **Opening and closing the property on Booking.com.** `open` runs Booking.com's readiness check and, only if it passes, opens the property. On a property that is not ready it changes nothing and answers **`422 booking_rejected`** with Booking.com's own reasons in `blockers` (for example \"Room 1554900501 does not have kitchen or kitchenette\"), so it is safe to ask. It opens a property Booking.com has in a build stage (`XML: Being built`, `XML: Ready to open`) or closed; an open property answers `changed: false`. `close` closes the property on Booking.com, with an optional `reason` (default `PROPERTY_NOT_AVAILABLE`). An inactive listing cannot be opened (`403 listing_inactive`), and neither can a property another inactive listing shares. **When Repull opens a property by itself.** Repull opens a Booking.com property automatically only while every listing mapped to it is active. Keep a listing that is not ready inactive and its property is never opened; activate it and Repull opens the property, provided Booking.com's own readiness check passes. Activate with `POST /v1/listings/status` (or `PATCH /v1/listings/{id}`); its response has a `bookingProperties` entry per property saying whether it opened. Deactivating never closes a property that is already open — use `close` for that. Any other action returns a structured `422` naming the ones that are supported. To push content use `POST /v1/listings/{id}/publish/booking`; to map rooms use `POST /v1/connect/booking/map-rooms`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
105
105
|
# @param id [Integer] Repull listing id — NOT a Booking.com hotel id.
|
|
106
106
|
# @param booking_property_action_request [BookingPropertyActionRequest]
|
|
107
107
|
# @param [Hash] opts the optional parameters
|
|
@@ -809,7 +809,7 @@ module Repull
|
|
|
809
809
|
end
|
|
810
810
|
|
|
811
811
|
# List PMS/OTA connections
|
|
812
|
-
# Returns every PMS and OTA connection in the workspace, each with its `status`. **Account ids.** `externalAccountId` is the platform's own account id (Airbnb host id, Booking.com hotel id, the Booking.com account id behind an Extranet login, the PMS account id; `null` when the platform does not give us one) and `id` is our connection record, the `X-Account-Id`. **Access level.** Every connection carries `accessType`: `read_only`, `messaging` or `full_access`, or `null` when unknown. Airbnb: the tier the host's token was granted with. Vrbo: bookings and messages only (`messaging`) or with the calendar push (`full_access`). Booking.com: always `full_access`. Booking.com Extranet: always `messaging` (reads reservations, messages and reviews and replies; never writes rates or availability). PMS: `read_only` when every write-policy switch is off, else `full_access`. See the `ConnectionAccessType` schema. **One entry per Booking.com Extranet login.** Each Booking.com account that invites the Repull user connects as its own login, with its own `externalAccountId` — the Booking.com account id (handle `booking_extranet:{externalAccountId}`). A new login adds an entry next to the existing ones and never replaces them
|
|
812
|
+
# Returns every PMS and OTA connection in the workspace, each with its `status`. **Account ids.** `externalAccountId` is the platform's own account id (Airbnb host id, Booking.com hotel id, the Booking.com account id behind an Extranet login, the PMS account id; `null` when the platform does not give us one) and `id` is our connection record, the `X-Account-Id`. **Access level.** Every connection carries `accessType`: `read_only`, `messaging` or `full_access`, or `null` when unknown. Airbnb: the tier the host's token was granted with. Vrbo: bookings and messages only (`messaging`) or with the calendar push (`full_access`). Booking.com: always `full_access`. Booking.com Extranet: always `messaging` (reads reservations, messages and reviews and replies; never writes rates or availability). PMS: `read_only` when every write-policy switch is off, else `full_access`. See the `ConnectionAccessType` schema. **One entry per Booking.com Extranet login.** Each Booking.com account that invites the Repull user connects as its own login, with its own `externalAccountId` — the Booking.com account id (handle `booking_extranet:{externalAccountId}`). A new login adds an entry next to the existing ones and never replaces them. Each login is its own connection with its own `id` (the `X-Account-Id`, and `account.id` in webhooks), and each login's listings, reservations, conversations and reviews stay under its own account (filter them with `?account=booking_extranet:{externalAccountId}`). **Spot connections that need attention.** A connection whose `status` is not `active` may need the host to do something before it works — most commonly a Booking.com Extranet connection where the invited user was granted only partial access (`status: \"needs_permissions\"`). A Smoobu connection still on a legacy single API key carries `action.reason: \"reauth_required\"` while its `status` is `active`: Smoobu stops accepting those keys on October 31, 2026, and `fixUrl` opens the form for a new API key + secret (the connection id stays the same). A Booking.com Extranet login whose rooms are imported but none matched to a listing carries `action.reason: \"needs_mapping\"` while its `status` is `active`: nothing syncs until the host maps the rooms, and `fixUrl` opens the room-mapping step. These connections carry two extra fields: - `action` — `{ required: true, reason, message }`. `reason` is a stable machine code (`needs_permissions`, `needs_mapping`, `reauth_required`); `message` is a host-facing one-liner describing what to do. - `fixUrl` — a durable link that reopens the hosted Connect flow **bound to that account, on the fix screen** (e.g. \"grant full access\" + a Re-check button). It is safe to store and show in your own dashboard. **Self-serve repair:** when `action.required` is true, surface a \"Fix\" button that opens `fixUrl` in a new tab (or embed it). The host resolves the issue (e.g. grants the user full access in Booking.com) and clicks Re-check; the import finishes on its own and the connection flips back to `active` — no re-invite, no support ticket. Poll this endpoint (or read it after the host returns) to confirm `action` has cleared.
|
|
813
813
|
# @param [Hash] opts the optional parameters
|
|
814
814
|
# @return [ConnectionListResponse]
|
|
815
815
|
def list_connections(opts = {})
|
|
@@ -818,7 +818,7 @@ module Repull
|
|
|
818
818
|
end
|
|
819
819
|
|
|
820
820
|
# List PMS/OTA connections
|
|
821
|
-
# Returns every PMS and OTA connection in the workspace, each with its `status`. **Account ids.** `externalAccountId` is the platform's own account id (Airbnb host id, Booking.com hotel id, the Booking.com account id behind an Extranet login, the PMS account id; `null` when the platform does not give us one) and `id` is our connection record, the `X-Account-Id`. **Access level.** Every connection carries `accessType`: `read_only`, `messaging` or `full_access`, or `null` when unknown. Airbnb: the tier the host's token was granted with. Vrbo: bookings and messages only (`messaging`) or with the calendar push (`full_access`). Booking.com: always `full_access`. Booking.com Extranet: always `messaging` (reads reservations, messages and reviews and replies; never writes rates or availability). PMS: `read_only` when every write-policy switch is off, else `full_access`. See the `ConnectionAccessType` schema. **One entry per Booking.com Extranet login.** Each Booking.com account that invites the Repull user connects as its own login, with its own `externalAccountId` — the Booking.com account id (handle `booking_extranet:{externalAccountId}`). A new login adds an entry next to the existing ones and never replaces them
|
|
821
|
+
# Returns every PMS and OTA connection in the workspace, each with its `status`. **Account ids.** `externalAccountId` is the platform's own account id (Airbnb host id, Booking.com hotel id, the Booking.com account id behind an Extranet login, the PMS account id; `null` when the platform does not give us one) and `id` is our connection record, the `X-Account-Id`. **Access level.** Every connection carries `accessType`: `read_only`, `messaging` or `full_access`, or `null` when unknown. Airbnb: the tier the host's token was granted with. Vrbo: bookings and messages only (`messaging`) or with the calendar push (`full_access`). Booking.com: always `full_access`. Booking.com Extranet: always `messaging` (reads reservations, messages and reviews and replies; never writes rates or availability). PMS: `read_only` when every write-policy switch is off, else `full_access`. See the `ConnectionAccessType` schema. **One entry per Booking.com Extranet login.** Each Booking.com account that invites the Repull user connects as its own login, with its own `externalAccountId` — the Booking.com account id (handle `booking_extranet:{externalAccountId}`). A new login adds an entry next to the existing ones and never replaces them. Each login is its own connection with its own `id` (the `X-Account-Id`, and `account.id` in webhooks), and each login's listings, reservations, conversations and reviews stay under its own account (filter them with `?account=booking_extranet:{externalAccountId}`). **Spot connections that need attention.** A connection whose `status` is not `active` may need the host to do something before it works — most commonly a Booking.com Extranet connection where the invited user was granted only partial access (`status: \"needs_permissions\"`). A Smoobu connection still on a legacy single API key carries `action.reason: \"reauth_required\"` while its `status` is `active`: Smoobu stops accepting those keys on October 31, 2026, and `fixUrl` opens the form for a new API key + secret (the connection id stays the same). A Booking.com Extranet login whose rooms are imported but none matched to a listing carries `action.reason: \"needs_mapping\"` while its `status` is `active`: nothing syncs until the host maps the rooms, and `fixUrl` opens the room-mapping step. These connections carry two extra fields: - `action` — `{ required: true, reason, message }`. `reason` is a stable machine code (`needs_permissions`, `needs_mapping`, `reauth_required`); `message` is a host-facing one-liner describing what to do. - `fixUrl` — a durable link that reopens the hosted Connect flow **bound to that account, on the fix screen** (e.g. \"grant full access\" + a Re-check button). It is safe to store and show in your own dashboard. **Self-serve repair:** when `action.required` is true, surface a \"Fix\" button that opens `fixUrl` in a new tab (or embed it). The host resolves the issue (e.g. grants the user full access in Booking.com) and clicks Re-check; the import finishes on its own and the connection flips back to `active` — no re-invite, no support ticket. Poll this endpoint (or read it after the host returns) to confirm `action` has cleared.
|
|
822
822
|
# @param [Hash] opts the optional parameters
|
|
823
823
|
# @return [Array<(ConnectionListResponse, Integer, Hash)>] ConnectionListResponse data, response status code and response headers
|
|
824
824
|
def list_connections_with_http_info(opts = {})
|
|
@@ -385,5 +385,75 @@ module Repull
|
|
|
385
385
|
end
|
|
386
386
|
return data, status_code, headers
|
|
387
387
|
end
|
|
388
|
+
|
|
389
|
+
# Refresh a connection's listings
|
|
390
|
+
# Refresh listings: picks up listings you've added on Airbnb since you connected. Re-reads the connected account's listings and their calendars (pricing and availability) now; a new property comes in as a new listing and existing listings are refreshed. Nothing else is re-imported: no reservations, conversations, reviews or payouts. The same import runs on its own once a day for every connected Airbnb account, and when the host reconnects. Call this when you know a property was just added and do not want to wait. New listings obey your plan's active-listing limit: past it, and when the property is unlisted on Airbnb, they arrive inactive. Existing listings keep their status. The import runs in the background (`202`). It is recorded like any other import (trigger `resync`, one `listings` stage): follow it on `GET /v1/connections/{id}/imports` or wait for `account.import.completed`, then read the new listings with `GET /v1/listings`. Airbnb connections only for now. Returns `409 conflict` while a listings import of the account is already running, and `409 connection_reauth_required` when the account is disconnected.
|
|
391
|
+
# @param id [String] Airbnb connection handle `airbnb:{hostId}` — the `provider` and `externalAccountId` of an Airbnb connection on `GET /v1/connect`, or the account of an `account.*` webhook.
|
|
392
|
+
# @param [Hash] opts the optional parameters
|
|
393
|
+
# @option opts [StartConnectionImportRequest] :start_connection_import_request
|
|
394
|
+
# @return [StartConnectionImport202Response]
|
|
395
|
+
def start_connection_import(id, opts = {})
|
|
396
|
+
data, _status_code, _headers = start_connection_import_with_http_info(id, opts)
|
|
397
|
+
data
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# Refresh a connection's listings
|
|
401
|
+
# Refresh listings: picks up listings you've added on Airbnb since you connected. Re-reads the connected account's listings and their calendars (pricing and availability) now; a new property comes in as a new listing and existing listings are refreshed. Nothing else is re-imported: no reservations, conversations, reviews or payouts. The same import runs on its own once a day for every connected Airbnb account, and when the host reconnects. Call this when you know a property was just added and do not want to wait. New listings obey your plan's active-listing limit: past it, and when the property is unlisted on Airbnb, they arrive inactive. Existing listings keep their status. The import runs in the background (`202`). It is recorded like any other import (trigger `resync`, one `listings` stage): follow it on `GET /v1/connections/{id}/imports` or wait for `account.import.completed`, then read the new listings with `GET /v1/listings`. Airbnb connections only for now. Returns `409 conflict` while a listings import of the account is already running, and `409 connection_reauth_required` when the account is disconnected.
|
|
402
|
+
# @param id [String] Airbnb connection handle `airbnb:{hostId}` — the `provider` and `externalAccountId` of an Airbnb connection on `GET /v1/connect`, or the account of an `account.*` webhook.
|
|
403
|
+
# @param [Hash] opts the optional parameters
|
|
404
|
+
# @option opts [StartConnectionImportRequest] :start_connection_import_request
|
|
405
|
+
# @return [Array<(StartConnectionImport202Response, Integer, Hash)>] StartConnectionImport202Response data, response status code and response headers
|
|
406
|
+
def start_connection_import_with_http_info(id, opts = {})
|
|
407
|
+
if @api_client.config.debugging
|
|
408
|
+
@api_client.config.logger.debug 'Calling API: ConnectionsApi.start_connection_import ...'
|
|
409
|
+
end
|
|
410
|
+
# verify the required parameter 'id' is set
|
|
411
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
412
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ConnectionsApi.start_connection_import"
|
|
413
|
+
end
|
|
414
|
+
# resource path
|
|
415
|
+
local_var_path = '/v1/connections/{id}/imports'.sub('{id}', CGI.escape(id.to_s))
|
|
416
|
+
|
|
417
|
+
# query parameters
|
|
418
|
+
query_params = opts[:query_params] || {}
|
|
419
|
+
|
|
420
|
+
# header parameters
|
|
421
|
+
header_params = opts[:header_params] || {}
|
|
422
|
+
# HTTP header 'Accept' (if needed)
|
|
423
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
424
|
+
# HTTP header 'Content-Type'
|
|
425
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
426
|
+
if !content_type.nil?
|
|
427
|
+
header_params['Content-Type'] = content_type
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# form parameters
|
|
431
|
+
form_params = opts[:form_params] || {}
|
|
432
|
+
|
|
433
|
+
# http body (model)
|
|
434
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'start_connection_import_request'])
|
|
435
|
+
|
|
436
|
+
# return_type
|
|
437
|
+
return_type = opts[:debug_return_type] || 'StartConnectionImport202Response'
|
|
438
|
+
|
|
439
|
+
# auth_names
|
|
440
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
441
|
+
|
|
442
|
+
new_options = opts.merge(
|
|
443
|
+
:operation => :"ConnectionsApi.start_connection_import",
|
|
444
|
+
:header_params => header_params,
|
|
445
|
+
:query_params => query_params,
|
|
446
|
+
:form_params => form_params,
|
|
447
|
+
:body => post_body,
|
|
448
|
+
:auth_names => auth_names,
|
|
449
|
+
:return_type => return_type
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
453
|
+
if @api_client.config.debugging
|
|
454
|
+
@api_client.config.logger.debug "API called: ConnectionsApi#start_connection_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
455
|
+
end
|
|
456
|
+
return data, status_code, headers
|
|
457
|
+
end
|
|
388
458
|
end
|
|
389
459
|
end
|
|
@@ -1288,7 +1288,7 @@ module Repull
|
|
|
1288
1288
|
end
|
|
1289
1289
|
|
|
1290
1290
|
# Activate or deactivate listings in bulk
|
|
1291
|
-
# Sets up to 500 listings active or inactive in one call. Send `{ \"listingIds\": [\"4118\", \"4119\"], \"active\": false }` to deactivate them, or `\"active\": true` to activate them. An inactive listing is not counted toward your plan's listing limit or billed. It is NOT deleted and the upstream channel (Airbnb / Booking.com / your PMS)
|
|
1291
|
+
# Sets up to 500 listings active or inactive in one call. Send `{ \"listingIds\": [\"4118\", \"4119\"], \"active\": false }` to deactivate them, or `\"active\": true` to activate them. An inactive listing is not counted toward your plan's listing limit or billed. It is NOT deleted and nothing is pushed to the upstream channel (Airbnb / Booking.com / your PMS) — its data keeps syncing, so it is complete the moment you activate it again. Until then it cannot be read, changed, or receive webhooks. **Activating opens the listing's Booking.com property.** Repull opens a Booking.com property automatically only while every listing mapped to it is active. Keep a listing that is not ready inactive and its property is never opened; activate it and Repull opens the property, provided Booking.com's own readiness check passes. `bookingProperties` in the response says, per property, whether it was opened or what Booking.com said is missing. Sending `active: true` again for a listing that is already active retries the open. Deactivating never closes a property that is already open — use the `close` action on `POST /v1/channels/booking/properties/{id}`. **All or nothing.** Nothing changes unless the whole request can be applied: - If any id is not one of your listings, the call returns `404` naming those ids. - If activating would take you over your plan's listing limit, the call returns `402 listings_limit_exceeded`. Only listings that are currently inactive count toward the new total, so re-sending ids that are already active never trips the limit. Deactivating is always allowed, including when your account is already over its limit — it is how you get back under it. **Idempotent.** Ids already in the requested state are returned in `unchanged`; ids this call changed are returned in `updated`. For a single listing, `PATCH /v1/listings/{id}` does the same.
|
|
1292
1292
|
# @param listing_status_batch_request [ListingStatusBatchRequest]
|
|
1293
1293
|
# @param [Hash] opts the optional parameters
|
|
1294
1294
|
# @return [ListingStatusBatchResponse]
|
|
@@ -1298,7 +1298,7 @@ module Repull
|
|
|
1298
1298
|
end
|
|
1299
1299
|
|
|
1300
1300
|
# Activate or deactivate listings in bulk
|
|
1301
|
-
# Sets up to 500 listings active or inactive in one call. Send `{ \"listingIds\": [\"4118\", \"4119\"], \"active\": false }` to deactivate them, or `\"active\": true` to activate them. An inactive listing is not counted toward your plan's listing limit or billed. It is NOT deleted and the upstream channel (Airbnb / Booking.com / your PMS)
|
|
1301
|
+
# Sets up to 500 listings active or inactive in one call. Send `{ \"listingIds\": [\"4118\", \"4119\"], \"active\": false }` to deactivate them, or `\"active\": true` to activate them. An inactive listing is not counted toward your plan's listing limit or billed. It is NOT deleted and nothing is pushed to the upstream channel (Airbnb / Booking.com / your PMS) — its data keeps syncing, so it is complete the moment you activate it again. Until then it cannot be read, changed, or receive webhooks. **Activating opens the listing's Booking.com property.** Repull opens a Booking.com property automatically only while every listing mapped to it is active. Keep a listing that is not ready inactive and its property is never opened; activate it and Repull opens the property, provided Booking.com's own readiness check passes. `bookingProperties` in the response says, per property, whether it was opened or what Booking.com said is missing. Sending `active: true` again for a listing that is already active retries the open. Deactivating never closes a property that is already open — use the `close` action on `POST /v1/channels/booking/properties/{id}`. **All or nothing.** Nothing changes unless the whole request can be applied: - If any id is not one of your listings, the call returns `404` naming those ids. - If activating would take you over your plan's listing limit, the call returns `402 listings_limit_exceeded`. Only listings that are currently inactive count toward the new total, so re-sending ids that are already active never trips the limit. Deactivating is always allowed, including when your account is already over its limit — it is how you get back under it. **Idempotent.** Ids already in the requested state are returned in `unchanged`; ids this call changed are returned in `updated`. For a single listing, `PATCH /v1/listings/{id}` does the same.
|
|
1302
1302
|
# @param listing_status_batch_request [ListingStatusBatchRequest]
|
|
1303
1303
|
# @param [Hash] opts the optional parameters
|
|
1304
1304
|
# @return [Array<(ListingStatusBatchResponse, Integer, Hash)>] ListingStatusBatchResponse data, response status code and response headers
|
|
@@ -1516,7 +1516,7 @@ module Repull
|
|
|
1516
1516
|
end
|
|
1517
1517
|
|
|
1518
1518
|
# Deactivate or reactivate a listing
|
|
1519
|
-
# Toggle a listing's active state. Send `{ \"active\": false }` to **deactivate** (exclude the listing from Repull) or `{ \"active\": true }` to **reactivate** it. \"Deactivate\" keeps the listing row — it is NOT a hard delete, and it NEVER touches the upstream channel (Airbnb / Hospitable / Booking.com). Repull only mutates its own copy of the inventory. Deactivating is the self-serve way to get back under the plan-listings cap without paying. Reactivation respects the plan-listings cap: if activating this listing would push you over the cap for your tier, the call returns `402 listings_limit_exceeded` and the listing stays inactive. Deactivate another listing or upgrade first. Idempotent: setting a listing to the state it's already in returns 200. To change many listings at once, all or nothing, use `POST /v1/listings/status`.
|
|
1519
|
+
# Toggle a listing's active state. Send `{ \"active\": false }` to **deactivate** (exclude the listing from Repull) or `{ \"active\": true }` to **reactivate** it. \"Deactivate\" keeps the listing row — it is NOT a hard delete, and it NEVER touches the upstream channel (Airbnb / Hospitable / Booking.com). Repull only mutates its own copy of the inventory. Activating opens the listing's Booking.com property if Booking.com still has it in a build stage and its check passes; `bookingProperties` in the response says what happened. Deactivating is the self-serve way to get back under the plan-listings cap without paying. Reactivation respects the plan-listings cap: if activating this listing would push you over the cap for your tier, the call returns `402 listings_limit_exceeded` and the listing stays inactive. Deactivate another listing or upgrade first. Idempotent: setting a listing to the state it's already in returns 200. To change many listings at once, all or nothing, use `POST /v1/listings/status`.
|
|
1520
1520
|
# @param id [Integer] Repull listing id
|
|
1521
1521
|
# @param listing_active_request [ListingActiveRequest]
|
|
1522
1522
|
# @param [Hash] opts the optional parameters
|
|
@@ -1527,7 +1527,7 @@ module Repull
|
|
|
1527
1527
|
end
|
|
1528
1528
|
|
|
1529
1529
|
# Deactivate or reactivate a listing
|
|
1530
|
-
# Toggle a listing's active state. Send `{ \"active\": false }` to **deactivate** (exclude the listing from Repull) or `{ \"active\": true }` to **reactivate** it. \"Deactivate\" keeps the listing row — it is NOT a hard delete, and it NEVER touches the upstream channel (Airbnb / Hospitable / Booking.com). Repull only mutates its own copy of the inventory. Deactivating is the self-serve way to get back under the plan-listings cap without paying. Reactivation respects the plan-listings cap: if activating this listing would push you over the cap for your tier, the call returns `402 listings_limit_exceeded` and the listing stays inactive. Deactivate another listing or upgrade first. Idempotent: setting a listing to the state it's already in returns 200. To change many listings at once, all or nothing, use `POST /v1/listings/status`.
|
|
1530
|
+
# Toggle a listing's active state. Send `{ \"active\": false }` to **deactivate** (exclude the listing from Repull) or `{ \"active\": true }` to **reactivate** it. \"Deactivate\" keeps the listing row — it is NOT a hard delete, and it NEVER touches the upstream channel (Airbnb / Hospitable / Booking.com). Repull only mutates its own copy of the inventory. Activating opens the listing's Booking.com property if Booking.com still has it in a build stage and its check passes; `bookingProperties` in the response says what happened. Deactivating is the self-serve way to get back under the plan-listings cap without paying. Reactivation respects the plan-listings cap: if activating this listing would push you over the cap for your tier, the call returns `402 listings_limit_exceeded` and the listing stays inactive. Deactivate another listing or upgrade first. Idempotent: setting a listing to the state it's already in returns 200. To change many listings at once, all or nothing, use `POST /v1/listings/status`.
|
|
1531
1531
|
# @param id [Integer] Repull listing id
|
|
1532
1532
|
# @param listing_active_request [ListingActiveRequest]
|
|
1533
1533
|
# @param [Hash] opts the optional parameters
|
|
@@ -14,11 +14,14 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# Take this listing's Booking.com property off sale
|
|
17
|
+
# Take this listing's Booking.com property off sale or put it back (`unlist` / `relist`), or open or close the property itself on Booking.com (`open` / `close`).
|
|
18
18
|
class BookingPropertyActionRequest < ApiModelBase
|
|
19
|
-
# `unlist` closes the room's availability across the whole forward window, so the property stops selling. `relist` re-syncs the real calendar: dates that are genuinely blocked (a reservation, an owner stay) stay blocked, and only the closure `unlist` wrote lifts. They are not mirror images, and that is deliberate.
|
|
19
|
+
# `unlist` closes the room's availability across the whole forward window, so the property stops selling. `relist` re-syncs the real calendar: dates that are genuinely blocked (a reservation, an owner stay) stay blocked, and only the closure `unlist` wrote lifts. They are not mirror images, and that is deliberate. `open` runs Booking.com's readiness check and opens the property only if it passes — on a property that is not ready it changes nothing and answers `422 booking_rejected` with Booking.com's reasons in `blockers`. It opens a property Booking.com has in a build stage (`XML: Being built`, `XML: Ready to open`) or closed. `close` closes the property on Booking.com with `reason`.
|
|
20
20
|
attr_accessor :action
|
|
21
21
|
|
|
22
|
+
# `close` only: the reason Booking.com records for closing the property. Default `PROPERTY_NOT_AVAILABLE`.
|
|
23
|
+
attr_accessor :reason
|
|
24
|
+
|
|
22
25
|
# Booking.com property to act on, for a listing mapped to more than one. Without it the request is refused with `409 ambiguous_booking_mapping` and nothing is written. `?hotel_id=` means the same thing; the body wins if you send both.
|
|
23
26
|
attr_accessor :hotel_id
|
|
24
27
|
|
|
@@ -26,6 +29,7 @@ module Repull
|
|
|
26
29
|
def self.attribute_map
|
|
27
30
|
{
|
|
28
31
|
:'action' => :'action',
|
|
32
|
+
:'reason' => :'reason',
|
|
29
33
|
:'hotel_id' => :'hotelId'
|
|
30
34
|
}
|
|
31
35
|
end
|
|
@@ -44,6 +48,7 @@ module Repull
|
|
|
44
48
|
def self.openapi_types
|
|
45
49
|
{
|
|
46
50
|
:'action' => :'String',
|
|
51
|
+
:'reason' => :'String',
|
|
47
52
|
:'hotel_id' => :'String'
|
|
48
53
|
}
|
|
49
54
|
end
|
|
@@ -76,6 +81,10 @@ module Repull
|
|
|
76
81
|
self.action = nil
|
|
77
82
|
end
|
|
78
83
|
|
|
84
|
+
if attributes.key?(:'reason')
|
|
85
|
+
self.reason = attributes[:'reason']
|
|
86
|
+
end
|
|
87
|
+
|
|
79
88
|
if attributes.key?(:'hotel_id')
|
|
80
89
|
self.hotel_id = attributes[:'hotel_id']
|
|
81
90
|
end
|
|
@@ -117,6 +126,7 @@ module Repull
|
|
|
117
126
|
return true if self.equal?(o)
|
|
118
127
|
self.class == o.class &&
|
|
119
128
|
action == o.action &&
|
|
129
|
+
reason == o.reason &&
|
|
120
130
|
hotel_id == o.hotel_id
|
|
121
131
|
end
|
|
122
132
|
|
|
@@ -129,7 +139,7 @@ module Repull
|
|
|
129
139
|
# Calculates hash code according to all attributes.
|
|
130
140
|
# @return [Integer] Hash code
|
|
131
141
|
def hash
|
|
132
|
-
[action, hotel_id].hash
|
|
142
|
+
[action, reason, hotel_id].hash
|
|
133
143
|
end
|
|
134
144
|
|
|
135
145
|
# Builds the object from hash
|
|
@@ -21,13 +21,22 @@ module Repull
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :action
|
|
23
23
|
|
|
24
|
+
# `open` / `close` only: the property's state on Booking.com after the call.
|
|
25
|
+
attr_accessor :property_status
|
|
26
|
+
|
|
27
|
+
# `open` / `close` only: false when the property was already in that state, so nothing was sent.
|
|
28
|
+
attr_accessor :changed
|
|
29
|
+
|
|
30
|
+
# `open` / `close` only: Booking.com's status for the property before the call, e.g. `XML: Ready to open`.
|
|
31
|
+
attr_accessor :booking_status
|
|
32
|
+
|
|
24
33
|
# The Booking.com property that was acted on. Always read it back — a listing can be mapped to several, and this states which one changed.
|
|
25
34
|
attr_accessor :hotel_id
|
|
26
35
|
|
|
27
36
|
# Booking.com's own room id the availability write addressed.
|
|
28
37
|
attr_accessor :room_booking_id
|
|
29
38
|
|
|
30
|
-
# Whether the property is now on sale. **This is the state of the property on Booking.com, not of the listing in Repull** — `active` (what Repull bills and serves) is untouched by both actions and is deliberately not echoed here so the two can never be read as one field.
|
|
39
|
+
# `unlist` / `relist` only. Whether the property is now on sale. **This is the state of the property on Booking.com, not of the listing in Repull** — `active` (what Repull bills and serves) is untouched by both actions and is deliberately not echoed here so the two can never be read as one field.
|
|
31
40
|
attr_accessor :selling
|
|
32
41
|
|
|
33
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -36,6 +45,9 @@ module Repull
|
|
|
36
45
|
:'listing_id' => :'listingId',
|
|
37
46
|
:'channel' => :'channel',
|
|
38
47
|
:'action' => :'action',
|
|
48
|
+
:'property_status' => :'propertyStatus',
|
|
49
|
+
:'changed' => :'changed',
|
|
50
|
+
:'booking_status' => :'bookingStatus',
|
|
39
51
|
:'hotel_id' => :'hotelId',
|
|
40
52
|
:'room_booking_id' => :'roomBookingId',
|
|
41
53
|
:'selling' => :'selling'
|
|
@@ -58,6 +70,9 @@ module Repull
|
|
|
58
70
|
:'listing_id' => :'String',
|
|
59
71
|
:'channel' => :'String',
|
|
60
72
|
:'action' => :'String',
|
|
73
|
+
:'property_status' => :'String',
|
|
74
|
+
:'changed' => :'Boolean',
|
|
75
|
+
:'booking_status' => :'String',
|
|
61
76
|
:'hotel_id' => :'String',
|
|
62
77
|
:'room_booking_id' => :'String',
|
|
63
78
|
:'selling' => :'Boolean'
|
|
@@ -67,6 +82,7 @@ module Repull
|
|
|
67
82
|
# List of attributes with nullable: true
|
|
68
83
|
def self.openapi_nullable
|
|
69
84
|
Set.new([
|
|
85
|
+
:'booking_status',
|
|
70
86
|
:'room_booking_id',
|
|
71
87
|
])
|
|
72
88
|
end
|
|
@@ -105,6 +121,18 @@ module Repull
|
|
|
105
121
|
self.action = nil
|
|
106
122
|
end
|
|
107
123
|
|
|
124
|
+
if attributes.key?(:'property_status')
|
|
125
|
+
self.property_status = attributes[:'property_status']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'changed')
|
|
129
|
+
self.changed = attributes[:'changed']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'booking_status')
|
|
133
|
+
self.booking_status = attributes[:'booking_status']
|
|
134
|
+
end
|
|
135
|
+
|
|
108
136
|
if attributes.key?(:'hotel_id')
|
|
109
137
|
self.hotel_id = attributes[:'hotel_id']
|
|
110
138
|
else
|
|
@@ -117,8 +145,6 @@ module Repull
|
|
|
117
145
|
|
|
118
146
|
if attributes.key?(:'selling')
|
|
119
147
|
self.selling = attributes[:'selling']
|
|
120
|
-
else
|
|
121
|
-
self.selling = nil
|
|
122
148
|
end
|
|
123
149
|
end
|
|
124
150
|
|
|
@@ -143,10 +169,6 @@ module Repull
|
|
|
143
169
|
invalid_properties.push('invalid value for "hotel_id", hotel_id cannot be nil.')
|
|
144
170
|
end
|
|
145
171
|
|
|
146
|
-
if @selling.nil?
|
|
147
|
-
invalid_properties.push('invalid value for "selling", selling cannot be nil.')
|
|
148
|
-
end
|
|
149
|
-
|
|
150
172
|
invalid_properties
|
|
151
173
|
end
|
|
152
174
|
|
|
@@ -158,7 +180,6 @@ module Repull
|
|
|
158
180
|
return false if @channel.nil?
|
|
159
181
|
return false if @action.nil?
|
|
160
182
|
return false if @hotel_id.nil?
|
|
161
|
-
return false if @selling.nil?
|
|
162
183
|
true
|
|
163
184
|
end
|
|
164
185
|
|
|
@@ -202,16 +223,6 @@ module Repull
|
|
|
202
223
|
@hotel_id = hotel_id
|
|
203
224
|
end
|
|
204
225
|
|
|
205
|
-
# Custom attribute writer method with validation
|
|
206
|
-
# @param [Object] selling Value to be assigned
|
|
207
|
-
def selling=(selling)
|
|
208
|
-
if selling.nil?
|
|
209
|
-
fail ArgumentError, 'selling cannot be nil'
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
@selling = selling
|
|
213
|
-
end
|
|
214
|
-
|
|
215
226
|
# Checks equality by comparing each attribute.
|
|
216
227
|
# @param [Object] Object to be compared
|
|
217
228
|
def ==(o)
|
|
@@ -220,6 +231,9 @@ module Repull
|
|
|
220
231
|
listing_id == o.listing_id &&
|
|
221
232
|
channel == o.channel &&
|
|
222
233
|
action == o.action &&
|
|
234
|
+
property_status == o.property_status &&
|
|
235
|
+
changed == o.changed &&
|
|
236
|
+
booking_status == o.booking_status &&
|
|
223
237
|
hotel_id == o.hotel_id &&
|
|
224
238
|
room_booking_id == o.room_booking_id &&
|
|
225
239
|
selling == o.selling
|
|
@@ -234,7 +248,7 @@ module Repull
|
|
|
234
248
|
# Calculates hash code according to all attributes.
|
|
235
249
|
# @return [Integer] Hash code
|
|
236
250
|
def hash
|
|
237
|
-
[listing_id, channel, action, hotel_id, room_booking_id, selling].hash
|
|
251
|
+
[listing_id, channel, action, property_status, changed, booking_status, hotel_id, room_booking_id, selling].hash
|
|
238
252
|
end
|
|
239
253
|
|
|
240
254
|
# Builds the object from hash
|