repull 0.2.18 → 0.2.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db31d9b9fe03869bb22646bfd0c6b8c31e28359e22f601380c94d036d1b060e4
4
- data.tar.gz: 95baad96e6eb93f6c759d646cb9140492c47831f991165469e13ddad65ee9444
3
+ metadata.gz: 15403dd52cdecbf29d07692c41b91b6b3b52f305b42217c3efd4921bd2aaf739
4
+ data.tar.gz: 3d7f250db469714186c929035e61717ef62e4c53d8b5979f7a05141c135bc6ef
5
5
  SHA512:
6
- metadata.gz: d7027f2ef9616d8f190542d959b0ca97abb74046618d2eaf801bd74c183c1cb8389304295bd560e0924b2d9709647328200bb255fb2cb34d949965e5fc8b0913
7
- data.tar.gz: 902507f20e5e3121e1231ee19c42947e60f756c563d18d24346b618464dc2ae994e454914e8d1ffb41cf15084314e4e0072881ff5c6cfc29d4781e41a790a126
6
+ metadata.gz: 51b184c8b51787aa6696489f016a8aa01f96e212f4b64530b9717b3f32f5506652240d631d19ba6ad308c92eab7ca3d38d8a9329b94a554b1041b3f7fefb8e58
7
+ data.tar.gz: dc48f72c12261d1fbf453fd674a39d8f985f46bf9ab0d2b3757056987b4012195cd4d68a8db1d3c3aa56c421dd71ee0f0a2509e573192f6fd60d6e1bf5a7a55e
@@ -172,7 +172,7 @@ module Repull
172
172
  end
173
173
 
174
174
  # Booking.com property setup actions
175
- # Action-router for putting a property onto Booking.com — including building one from nothing. Select the step with `action`. ## Opening a property - `create-property` — create a NEW Booking.com property for a Repull listing (`listing_id`). Creates the property, its first room, a rate plan and the room-rate product that makes the room sellable, seeds availability and rates, syncs the calendar, then sends the notification that starts Booking's validation. Returns 201. - `add-room` — add another room type (and its sellable product) to a property (`listing_id`, `property_id`). Returns 201. - `add-unit` — raise the number of identical units on an existing room (`listing_id`, `property_id`, `room_id`). - `advance` — re-send the summary notification for a property (`property_id`) to move it out of the \"XML: Being built\" stage. ## Account and policy steps - `create-legal-entity` — register a legal entity directly (returns 201). Not normally needed: see the legal-entity rules below. - `check-legal-status` — always `404`. A legal entity's details are readable for any id on the connectivity-provider credentials every workspace shares, and nothing records which workspace registered which entity, so no entity can be shown to be yours. `create-property` resolves it for you. - `check-readiness` — check whether a property is ready to open (`property_id`). - `open-property` — open the property for sale (`property_id`). - `set-contacts` — set property contacts (`property_id`, `contacts`). - `set-policies` — set property policies (`property_id`, plus policy fields). ## Three things about Booking.com that cost real money **A newly created property is NOT sellable.** Booking holds it at \"XML: Being built\" until it validates the summary notification. `create-property` sends that notification, but it can fail on its own after everything else succeeded — the response always reports `status: \"being_built\"` and `sellable: false`, never a guess. Use `advance` to re-send it, and check the Extranet for the stage. **A room with no ACTIVE rate plan is invisible.** Booking only renders rooms that have at least one active product linkage (room × rate plan). A room can be created successfully, return a `roomId`, and never appear on the property page. If `rateId` comes back `null` from `create-property` or `add-room`, that is exactly what happened: activate a rate plan on the property in the Extranet, then add the room again. **The room name is shown to travellers.** It is taken from the listing's name and appears on the Booking.com property page. Internal nicknames belong on the property's partner reference, not on the room. ## The legal entity is resolved, not asked for A property is created against the legal entity Booking.com contracts with, invoices and pays. You do not normally send one: 1. If this workspace already creates properties under a legal entity, that one is reused. A second is never registered. 2. If it has none and the request carries `legal_entity` (`company_name`, `legal_contact_name`, `legal_contact_email`), one is registered and used. Booking.com emails the legal contact a contract; creation only succeeds once it is signed. 3. If it has none and no `legal_entity`, the request is refused with `422 legal_entity_required` naming the fields — a contracted company is never invented. `legal_entity_id` overrides all of that. An id that already carries another workspace's properties is refused with `403 legal_entity_not_yours` before anything is created. ## What you do not control Properties are created against Booking's **production** target only. A test-target property cannot be sold through and there is no route back from one, so `target` is not a parameter — sending it changes nothing. These are fixed on every created property and are not parameters: property category (Apartment), initial room count (1), and the property contact record (a placeholder name, email and phone). Set the real contacts afterwards with `set-contacts`. Latitude and longitude come from the listing and are adjusted slightly to clear Booking.com's duplicate detection — send the property's true position on the listing and do not pre-adjust it yourself. The listing's name, check-in/check-out times, currency, capacity and price come from the listing. Its postal code is taken from the listing's own `postalCode`; when the listing has none, it falls back to a connected Airbnb listing. A listing with neither is created without a postal code, so set `postalCode` on the listing first. ## Guards Every action that takes a `property_id` requires a property connected to this workspace; any other id returns `404 not_found`. Every action that takes a `listing_id` requires a listing in this workspace; any other id returns `404 not_found`. `create-property` refuses a listing with no coordinates (`422 missing_coordinates`) before anything is created — creating a Booking.com property cannot be undone. `create-property` is subject to the same published-listing gate as the dashboard: no plan, or the plan's listing limit reached, returns `403 billing_error` with `used` and `limit`, and nothing is created. Returns `403 listing_inactive` when the listing — or any listing mapped to the Booking.com property — is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated. If a property is created and a later step fails, the response is `422 booking_create_partial` carrying `property_id`. The property EXISTS. Do not retry `create-property`, which would open a second one — continue with `add-room` and `advance`.
175
+ # Action-router for putting a property onto Booking.com — including building one from nothing. Select the step with `action`. ## Opening a property - `create-property` — create a NEW Booking.com property for a Repull listing (`listing_id`). Creates the property, its first room with the listing's beds, a rate plan and the room-rate product that makes the room sellable (under the listing's cancellation policy), sets the contact and invoice details and the facilities, seeds availability and rates, syncs the calendar, then runs Booking.com's readiness check and reports what still blocks opening in `warnings`. Send `contact` (`name`, `email`, `phone` in international form); without it the workspace owner is used, and a workspace with no usable contact is refused before anything is created. Returns 201. - `add-room` — add another room type (and its sellable product) to a property (`listing_id`, `property_id`). Returns 201. - `add-unit` — raise the number of identical units on an existing room (`listing_id`, `property_id`, `room_id`). - `advance` — run Booking.com's readiness check for a property (`property_id`) and, when it passes, open it. Returns `checked`, `opened`, `sellable` and `blockers` — Booking.com's own reasons it cannot open yet. ## Account and policy steps - `create-legal-entity` — register a legal entity directly (returns 201). Not normally needed: see the legal-entity rules below. - `check-legal-status` — always `404`. A legal entity's details are readable for any id on the connectivity-provider credentials every workspace shares, and nothing records which workspace registered which entity, so no entity can be shown to be yours. `create-property` resolves it for you. - `check-readiness` — whether a property is ready to open (`property_id`): `ready` and `blockers`, without trying to open it. - `open-property` — open the property for sale (`property_id`). Refused with `422 booking_rejected` naming the blockers when it is not ready. - `set-contacts` — set property contacts (`property_id`, `contacts` in Booking.com's Contacts API shape; at most one carries the `general` profile). - `set-policies` — add a cancellation policy (`property_id`, `policyCode`, optional `prepaymentRequired`). House rules, pets, children and the damage deposit are `POST /v1/channels/booking/content` with `type: \"settings\"`. ## Three things about Booking.com that cost real money **A newly created property is NOT sellable.** Booking.com opens it only when its readiness check passes, and the check names what is missing — a main photo still processing, no availability, a licence the region requires. The response always reports `status: \"being_built\"` and `sellable: false`, never a guess, with the reasons in `warnings`. Resolve them, then `advance`. **A room with no ACTIVE rate plan is invisible.** Booking only renders rooms that have at least one active product linkage (room × rate plan). A room can be created successfully, return a `roomId`, and never appear on the property page. If `rateId` comes back `null` from `create-property` or `add-room`, that is exactly what happened: activate a rate plan on the property in the Extranet, then add the room again. **Room names are Booking.com's.** Travellers see one of Booking.com's standard names (\"Two-Bedroom Apartment\"), chosen from the listing's bedrooms. The listing's own name is kept as the operator-side reference, never shown to guests. ## The legal entity is resolved, not asked for A property is created against the legal entity Booking.com contracts with, invoices and pays. You do not normally send one: 1. If this workspace already creates properties under a legal entity, that one is reused. A second is never registered. 2. If it has none and the request carries `legal_entity` (`company_name`, `legal_contact_name`, `legal_contact_email`), one is registered and used. Booking.com emails the legal contact a contract; creation only succeeds once it is signed. 3. If it has none and no `legal_entity`, the request is refused with `422 legal_entity_required` naming the fields — a contracted company is never invented. `legal_entity_id` overrides all of that. An id that already carries another workspace's properties is refused with `403 legal_entity_not_yours` before anything is created. ## What you do not control Properties are created against Booking's **production** target only. A test-target property cannot be sold through and there is no route back from one, so `target` is not a parameter — sending it changes nothing. The property category comes from the listing's property type (Apartment when it has none; Holiday home, Villa or Chalet when it says so). The initial room count is 1. Latitude and longitude come from the listing and are adjusted slightly to clear Booking.com's duplicate detection — send the property's true position on the listing and do not pre-adjust it yourself. The listing's name, check-in/check-out times, currency, capacity and price come from the listing. Its postal code is taken from the listing's own `postalCode`; when the listing has none, it falls back to a connected Airbnb listing. A listing with neither is created without a postal code, so set `postalCode` on the listing first. ## Guards Every action that takes a `property_id` requires a property connected to this workspace; any other id returns `404 not_found`. Every action that takes a `listing_id` requires a listing in this workspace; any other id returns `404 not_found`. `create-property` refuses a listing with no coordinates (`422 missing_coordinates`) before anything is created — creating a Booking.com property cannot be undone. `create-property` is subject to the same published-listing gate as the dashboard: no plan, or the plan's listing limit reached, returns `403 billing_error` with `used` and `limit`, and nothing is created. Returns `403 listing_inactive` when the listing — or any listing mapped to the Booking.com property — is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated. If a property is created and a later step fails, the response is `422 booking_create_partial` carrying `property_id`. The property EXISTS. Do not retry `create-property`, which would open a second one — continue with `add-room` and `advance`.
176
176
  # @param booking_setup_request [BookingSetupRequest]
177
177
  # @param [Hash] opts the optional parameters
178
178
  # @return [nil]
@@ -182,7 +182,7 @@ module Repull
182
182
  end
183
183
 
184
184
  # Booking.com property setup actions
185
- # Action-router for putting a property onto Booking.com — including building one from nothing. Select the step with `action`. ## Opening a property - `create-property` — create a NEW Booking.com property for a Repull listing (`listing_id`). Creates the property, its first room, a rate plan and the room-rate product that makes the room sellable, seeds availability and rates, syncs the calendar, then sends the notification that starts Booking's validation. Returns 201. - `add-room` — add another room type (and its sellable product) to a property (`listing_id`, `property_id`). Returns 201. - `add-unit` — raise the number of identical units on an existing room (`listing_id`, `property_id`, `room_id`). - `advance` — re-send the summary notification for a property (`property_id`) to move it out of the \"XML: Being built\" stage. ## Account and policy steps - `create-legal-entity` — register a legal entity directly (returns 201). Not normally needed: see the legal-entity rules below. - `check-legal-status` — always `404`. A legal entity's details are readable for any id on the connectivity-provider credentials every workspace shares, and nothing records which workspace registered which entity, so no entity can be shown to be yours. `create-property` resolves it for you. - `check-readiness` — check whether a property is ready to open (`property_id`). - `open-property` — open the property for sale (`property_id`). - `set-contacts` — set property contacts (`property_id`, `contacts`). - `set-policies` — set property policies (`property_id`, plus policy fields). ## Three things about Booking.com that cost real money **A newly created property is NOT sellable.** Booking holds it at \"XML: Being built\" until it validates the summary notification. `create-property` sends that notification, but it can fail on its own after everything else succeeded — the response always reports `status: \"being_built\"` and `sellable: false`, never a guess. Use `advance` to re-send it, and check the Extranet for the stage. **A room with no ACTIVE rate plan is invisible.** Booking only renders rooms that have at least one active product linkage (room × rate plan). A room can be created successfully, return a `roomId`, and never appear on the property page. If `rateId` comes back `null` from `create-property` or `add-room`, that is exactly what happened: activate a rate plan on the property in the Extranet, then add the room again. **The room name is shown to travellers.** It is taken from the listing's name and appears on the Booking.com property page. Internal nicknames belong on the property's partner reference, not on the room. ## The legal entity is resolved, not asked for A property is created against the legal entity Booking.com contracts with, invoices and pays. You do not normally send one: 1. If this workspace already creates properties under a legal entity, that one is reused. A second is never registered. 2. If it has none and the request carries `legal_entity` (`company_name`, `legal_contact_name`, `legal_contact_email`), one is registered and used. Booking.com emails the legal contact a contract; creation only succeeds once it is signed. 3. If it has none and no `legal_entity`, the request is refused with `422 legal_entity_required` naming the fields — a contracted company is never invented. `legal_entity_id` overrides all of that. An id that already carries another workspace's properties is refused with `403 legal_entity_not_yours` before anything is created. ## What you do not control Properties are created against Booking's **production** target only. A test-target property cannot be sold through and there is no route back from one, so `target` is not a parameter — sending it changes nothing. These are fixed on every created property and are not parameters: property category (Apartment), initial room count (1), and the property contact record (a placeholder name, email and phone). Set the real contacts afterwards with `set-contacts`. Latitude and longitude come from the listing and are adjusted slightly to clear Booking.com's duplicate detection — send the property's true position on the listing and do not pre-adjust it yourself. The listing's name, check-in/check-out times, currency, capacity and price come from the listing. Its postal code is taken from the listing's own `postalCode`; when the listing has none, it falls back to a connected Airbnb listing. A listing with neither is created without a postal code, so set `postalCode` on the listing first. ## Guards Every action that takes a `property_id` requires a property connected to this workspace; any other id returns `404 not_found`. Every action that takes a `listing_id` requires a listing in this workspace; any other id returns `404 not_found`. `create-property` refuses a listing with no coordinates (`422 missing_coordinates`) before anything is created — creating a Booking.com property cannot be undone. `create-property` is subject to the same published-listing gate as the dashboard: no plan, or the plan's listing limit reached, returns `403 billing_error` with `used` and `limit`, and nothing is created. Returns `403 listing_inactive` when the listing — or any listing mapped to the Booking.com property — is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated. If a property is created and a later step fails, the response is `422 booking_create_partial` carrying `property_id`. The property EXISTS. Do not retry `create-property`, which would open a second one — continue with `add-room` and `advance`.
185
+ # Action-router for putting a property onto Booking.com — including building one from nothing. Select the step with `action`. ## Opening a property - `create-property` — create a NEW Booking.com property for a Repull listing (`listing_id`). Creates the property, its first room with the listing's beds, a rate plan and the room-rate product that makes the room sellable (under the listing's cancellation policy), sets the contact and invoice details and the facilities, seeds availability and rates, syncs the calendar, then runs Booking.com's readiness check and reports what still blocks opening in `warnings`. Send `contact` (`name`, `email`, `phone` in international form); without it the workspace owner is used, and a workspace with no usable contact is refused before anything is created. Returns 201. - `add-room` — add another room type (and its sellable product) to a property (`listing_id`, `property_id`). Returns 201. - `add-unit` — raise the number of identical units on an existing room (`listing_id`, `property_id`, `room_id`). - `advance` — run Booking.com's readiness check for a property (`property_id`) and, when it passes, open it. Returns `checked`, `opened`, `sellable` and `blockers` — Booking.com's own reasons it cannot open yet. ## Account and policy steps - `create-legal-entity` — register a legal entity directly (returns 201). Not normally needed: see the legal-entity rules below. - `check-legal-status` — always `404`. A legal entity's details are readable for any id on the connectivity-provider credentials every workspace shares, and nothing records which workspace registered which entity, so no entity can be shown to be yours. `create-property` resolves it for you. - `check-readiness` — whether a property is ready to open (`property_id`): `ready` and `blockers`, without trying to open it. - `open-property` — open the property for sale (`property_id`). Refused with `422 booking_rejected` naming the blockers when it is not ready. - `set-contacts` — set property contacts (`property_id`, `contacts` in Booking.com's Contacts API shape; at most one carries the `general` profile). - `set-policies` — add a cancellation policy (`property_id`, `policyCode`, optional `prepaymentRequired`). House rules, pets, children and the damage deposit are `POST /v1/channels/booking/content` with `type: \"settings\"`. ## Three things about Booking.com that cost real money **A newly created property is NOT sellable.** Booking.com opens it only when its readiness check passes, and the check names what is missing — a main photo still processing, no availability, a licence the region requires. The response always reports `status: \"being_built\"` and `sellable: false`, never a guess, with the reasons in `warnings`. Resolve them, then `advance`. **A room with no ACTIVE rate plan is invisible.** Booking only renders rooms that have at least one active product linkage (room × rate plan). A room can be created successfully, return a `roomId`, and never appear on the property page. If `rateId` comes back `null` from `create-property` or `add-room`, that is exactly what happened: activate a rate plan on the property in the Extranet, then add the room again. **Room names are Booking.com's.** Travellers see one of Booking.com's standard names (\"Two-Bedroom Apartment\"), chosen from the listing's bedrooms. The listing's own name is kept as the operator-side reference, never shown to guests. ## The legal entity is resolved, not asked for A property is created against the legal entity Booking.com contracts with, invoices and pays. You do not normally send one: 1. If this workspace already creates properties under a legal entity, that one is reused. A second is never registered. 2. If it has none and the request carries `legal_entity` (`company_name`, `legal_contact_name`, `legal_contact_email`), one is registered and used. Booking.com emails the legal contact a contract; creation only succeeds once it is signed. 3. If it has none and no `legal_entity`, the request is refused with `422 legal_entity_required` naming the fields — a contracted company is never invented. `legal_entity_id` overrides all of that. An id that already carries another workspace's properties is refused with `403 legal_entity_not_yours` before anything is created. ## What you do not control Properties are created against Booking's **production** target only. A test-target property cannot be sold through and there is no route back from one, so `target` is not a parameter — sending it changes nothing. The property category comes from the listing's property type (Apartment when it has none; Holiday home, Villa or Chalet when it says so). The initial room count is 1. Latitude and longitude come from the listing and are adjusted slightly to clear Booking.com's duplicate detection — send the property's true position on the listing and do not pre-adjust it yourself. The listing's name, check-in/check-out times, currency, capacity and price come from the listing. Its postal code is taken from the listing's own `postalCode`; when the listing has none, it falls back to a connected Airbnb listing. A listing with neither is created without a postal code, so set `postalCode` on the listing first. ## Guards Every action that takes a `property_id` requires a property connected to this workspace; any other id returns `404 not_found`. Every action that takes a `listing_id` requires a listing in this workspace; any other id returns `404 not_found`. `create-property` refuses a listing with no coordinates (`422 missing_coordinates`) before anything is created — creating a Booking.com property cannot be undone. `create-property` is subject to the same published-listing gate as the dashboard: no plan, or the plan's listing limit reached, returns `403 billing_error` with `used` and `limit`, and nothing is created. Returns `403 listing_inactive` when the listing — or any listing mapped to the Booking.com property — is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated. If a property is created and a later step fails, the response is `422 booking_create_partial` carrying `property_id`. The property EXISTS. Do not retry `create-property`, which would open a second one — continue with `add-room` and `advance`.
186
186
  # @param booking_setup_request [BookingSetupRequest]
187
187
  # @param [Hash] opts the optional parameters
188
188
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -378,7 +378,7 @@ module Repull
378
378
  # @option opts [Date] :start_date Window start (ISO YYYY-MM-DD).
379
379
  # @option opts [Integer] :number_of_days Window length in days.
380
380
  # @option opts [String] :room_id Restrict to a single Booking.com room id.
381
- # @option opts [Boolean] :room_level When true, returns room-level (vs rate-plan-level) state.
381
+ # @option opts [Boolean] :room_level Defaults to &#x60;true&#x60;: availability per room, which is how Booking.com keeps inventory and how Vanio reads it. Send &#x60;false&#x60; for the per-rate read — its &#x60;roomsToSell&#x60; is often 0 for rooms that are on sale.
382
382
  # @return [BookingAvailabilityStateResponse]
383
383
  def get_booking_availability(property_id, opts = {})
384
384
  data, _status_code, _headers = get_booking_availability_with_http_info(property_id, opts)
@@ -392,7 +392,7 @@ module Repull
392
392
  # @option opts [Date] :start_date Window start (ISO YYYY-MM-DD).
393
393
  # @option opts [Integer] :number_of_days Window length in days.
394
394
  # @option opts [String] :room_id Restrict to a single Booking.com room id.
395
- # @option opts [Boolean] :room_level When true, returns room-level (vs rate-plan-level) state.
395
+ # @option opts [Boolean] :room_level Defaults to &#x60;true&#x60;: availability per room, which is how Booking.com keeps inventory and how Vanio reads it. Send &#x60;false&#x60; for the per-rate read — its &#x60;roomsToSell&#x60; is often 0 for rooms that are on sale.
396
396
  # @return [Array<(BookingAvailabilityStateResponse, Integer, Hash)>] BookingAvailabilityStateResponse data, response status code and response headers
397
397
  def get_booking_availability_with_http_info(property_id, opts = {})
398
398
  if @api_client.config.debugging
@@ -512,27 +512,44 @@ module Repull
512
512
  end
513
513
 
514
514
  # Get Booking.com content
515
- # Fetch the current content (descriptions, amenities, photos) for a Booking.com property. Used to round-trip edits through Repull. `property_id` must be a Booking.com property connected to this workspace (`GET /v1/channels/booking/properties` lists them). Any other id — including one connected to a different workspace — returns `404 not_found`, the same answer as an id that does not exist. Returns `403 listing_inactive` when any listing mapped to the Booking.com property is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
515
+ # Read one kind of content for a Booking.com property, straight from Booking.com. | `type` | What it is | |---|---| | `photos` | The property's photos. Add `room_id` to read one room's gallery. | | `facilities` | Property facilities, or a room's with `room_id` (Booking.com's ids — `GET` returns them). | | `description` | The property description. Booking.com rewrites what you send into its own multilingual copy; allow about 3 hours to appear. | | `settings` | House rules, pets, children, damage deposit, invoice recipient, booking model. | | `policies` | Cancellation and prepayment policies. | | `licences` | The region's licence rules and the licence on file. | | `checkin_methods` | How guests get in (holiday homes). | | `contacts` | Who Booking.com contacts about the property. | `amenities` is accepted as another name for `facilities`, and `descriptions` for `description`. `property_id` must be a Booking.com property connected to this workspace (`GET /v1/channels/booking/properties` lists them). Any other id — including one connected to a different workspace — returns `404 not_found`, the same answer as an id that does not exist. Returns `403 listing_inactive` when any listing mapped to the Booking.com property is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
516
+ # @param property_id [String] Booking.com property id.
516
517
  # @param [Hash] opts the optional parameters
518
+ # @option opts [String] :type Which content to read. (default to 'photos')
519
+ # @option opts [String] :room_id A Booking.com room id, for &#x60;photos&#x60;, &#x60;facilities&#x60; and &#x60;licences&#x60;.
517
520
  # @return [nil]
518
- def get_booking_content(opts = {})
519
- get_booking_content_with_http_info(opts)
521
+ def get_booking_content(property_id, opts = {})
522
+ get_booking_content_with_http_info(property_id, opts)
520
523
  nil
521
524
  end
522
525
 
523
526
  # Get Booking.com content
524
- # Fetch the current content (descriptions, amenities, photos) for a Booking.com property. Used to round-trip edits through Repull. &#x60;property_id&#x60; must be a Booking.com property connected to this workspace (&#x60;GET /v1/channels/booking/properties&#x60; lists them). Any other id — including one connected to a different workspace — returns &#x60;404 not_found&#x60;, the same answer as an id that does not exist. Returns &#x60;403 listing_inactive&#x60; when any listing mapped to the Booking.com property is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
527
+ # Read one kind of content for a Booking.com property, straight from Booking.com. | &#x60;type&#x60; | What it is | |---|---| | &#x60;photos&#x60; | The property&#39;s photos. Add &#x60;room_id&#x60; to read one room&#39;s gallery. | | &#x60;facilities&#x60; | Property facilities, or a room&#39;s with &#x60;room_id&#x60; (Booking.com&#39;s ids — &#x60;GET&#x60; returns them). | | &#x60;description&#x60; | The property description. Booking.com rewrites what you send into its own multilingual copy; allow about 3 hours to appear. | | &#x60;settings&#x60; | House rules, pets, children, damage deposit, invoice recipient, booking model. | | &#x60;policies&#x60; | Cancellation and prepayment policies. | | &#x60;licences&#x60; | The region&#39;s licence rules and the licence on file. | | &#x60;checkin_methods&#x60; | How guests get in (holiday homes). | | &#x60;contacts&#x60; | Who Booking.com contacts about the property. | &#x60;amenities&#x60; is accepted as another name for &#x60;facilities&#x60;, and &#x60;descriptions&#x60; for &#x60;description&#x60;. &#x60;property_id&#x60; must be a Booking.com property connected to this workspace (&#x60;GET /v1/channels/booking/properties&#x60; lists them). Any other id — including one connected to a different workspace — returns &#x60;404 not_found&#x60;, the same answer as an id that does not exist. Returns &#x60;403 listing_inactive&#x60; when any listing mapped to the Booking.com property is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
528
+ # @param property_id [String] Booking.com property id.
525
529
  # @param [Hash] opts the optional parameters
530
+ # @option opts [String] :type Which content to read. (default to 'photos')
531
+ # @option opts [String] :room_id A Booking.com room id, for &#x60;photos&#x60;, &#x60;facilities&#x60; and &#x60;licences&#x60;.
526
532
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
527
- def get_booking_content_with_http_info(opts = {})
533
+ def get_booking_content_with_http_info(property_id, opts = {})
528
534
  if @api_client.config.debugging
529
535
  @api_client.config.logger.debug 'Calling API: BookingComApi.get_booking_content ...'
530
536
  end
537
+ # verify the required parameter 'property_id' is set
538
+ if @api_client.config.client_side_validation && property_id.nil?
539
+ fail ArgumentError, "Missing the required parameter 'property_id' when calling BookingComApi.get_booking_content"
540
+ end
541
+ allowable_values = ["photos", "facilities", "description", "settings", "policies", "licences", "checkin_methods", "contacts"]
542
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
543
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
544
+ end
531
545
  # resource path
532
546
  local_var_path = '/v1/channels/booking/content'
533
547
 
534
548
  # query parameters
535
549
  query_params = opts[:query_params] || {}
550
+ query_params[:'property_id'] = property_id
551
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
552
+ query_params[:'room_id'] = opts[:'room_id'] if !opts[:'room_id'].nil?
536
553
 
537
554
  # header parameters
538
555
  header_params = opts[:header_params] || {}
@@ -575,7 +592,7 @@ module Repull
575
592
  # @option opts [Date] :start_date
576
593
  # @option opts [Integer] :number_of_days
577
594
  # @option opts [String] :room_id
578
- # @option opts [Boolean] :room_level When true, returns room-level (vs rate-plan-level) availability.
595
+ # @option opts [Boolean] :room_level Defaults to &#x60;true&#x60;: availability per room, which is how Booking.com keeps inventory and how Vanio reads it. Send &#x60;false&#x60; for the per-rate read — its &#x60;roomsToSell&#x60; is often 0 for rooms that are on sale.
579
596
  # @option opts [String] :hotel_id Booking.com hotel id, when this listing is published under more than one property. Omit it and a read uses the oldest mapping (reporting the rest in &#x60;otherHotelIds&#x60;), while a write is refused with &#x60;409 ambiguous_booking_mapping&#x60; rather than guess. &#x60;GET /v1/channels/booking/properties&#x60; lists the valid ids.
580
597
  # @return [BookingPricingResponse]
581
598
  def get_booking_listing_pricing(id, opts = {})
@@ -590,7 +607,7 @@ module Repull
590
607
  # @option opts [Date] :start_date
591
608
  # @option opts [Integer] :number_of_days
592
609
  # @option opts [String] :room_id
593
- # @option opts [Boolean] :room_level When true, returns room-level (vs rate-plan-level) availability.
610
+ # @option opts [Boolean] :room_level Defaults to &#x60;true&#x60;: availability per room, which is how Booking.com keeps inventory and how Vanio reads it. Send &#x60;false&#x60; for the per-rate read — its &#x60;roomsToSell&#x60; is often 0 for rooms that are on sale.
594
611
  # @option opts [String] :hotel_id Booking.com hotel id, when this listing is published under more than one property. Omit it and a read uses the oldest mapping (reporting the rest in &#x60;otherHotelIds&#x60;), while a write is refused with &#x60;409 ambiguous_booking_mapping&#x60; rather than guess. &#x60;GET /v1/channels/booking/properties&#x60; lists the valid ids.
595
612
  # @return [Array<(BookingPricingResponse, Integer, Hash)>] BookingPricingResponse data, response status code and response headers
596
613
  def get_booking_listing_pricing_with_http_info(id, opts = {})
@@ -1080,6 +1097,74 @@ module Repull
1080
1097
  return data, status_code, headers
1081
1098
  end
1082
1099
 
1100
+ # Map a Booking.com room to a Repull listing
1101
+ # Link a Booking.com room to a canonical Repull listing — the API-key equivalent of the room mapping the hosted Connect flow performs, and the counterpart of `POST /v1/channels/airbnb/listings/map`. Discover `roomBookingId` with `GET /v1/channels/booking/properties/{id}/rooms`, which returns every room of a property with the `roomId` this route takes. Booking.com attaches at the ROOM level: a property is a building and its rooms are what a guest books, so each room maps to one listing. Pass `listingId: null` to unmap a room and remove its channel link. The room mapping and its channel link are repointed together in one transaction, so a link can never outlive the mapping it describes — a stale link keeps routing that room's reservations to the previous listing. Re-sending a mapping that is already in place writes nothing (`alreadyMapped: true`). **The property's reservations are pulled as part of the call.** Once the room is mapped, every active reservation Booking.com holds for the property is imported and attached to its listing — `reservationsImported` says how many were processed. One already present is left as it is, so re-sending never duplicates. You do not need a follow-up call: reservations that arrived before the room was mapped are never picked up by the regular sync, so this is the moment they are brought in. It runs on every successful map, including a re-send, so re-sending retries an import that did not run. If the import cannot run, the mapping still stands and `reservationsImported` is `null`. A property with a long booking history can take tens of seconds. Unmapping pulls nothing. Unlike the Airbnb route, there is no conflict when the target listing already carries another Booking.com room: one listing served by several rooms is a normal arrangement and is not refused. Scope is enforced on both sides against your workspace — the room's property and the target listing. A room or listing belonging to another workspace returns the same 404 as one that does not exist. Returns `403 listing_inactive` when the target listing, or the listing the room is mapped to now, is inactive; nothing is changed.
1102
+ # @param map_booking_room_request [MapBookingRoomRequest]
1103
+ # @param [Hash] opts the optional parameters
1104
+ # @return [MapBookingRoomResponse]
1105
+ def map_booking_room(map_booking_room_request, opts = {})
1106
+ data, _status_code, _headers = map_booking_room_with_http_info(map_booking_room_request, opts)
1107
+ data
1108
+ end
1109
+
1110
+ # Map a Booking.com room to a Repull listing
1111
+ # Link a Booking.com room to a canonical Repull listing — the API-key equivalent of the room mapping the hosted Connect flow performs, and the counterpart of &#x60;POST /v1/channels/airbnb/listings/map&#x60;. Discover &#x60;roomBookingId&#x60; with &#x60;GET /v1/channels/booking/properties/{id}/rooms&#x60;, which returns every room of a property with the &#x60;roomId&#x60; this route takes. Booking.com attaches at the ROOM level: a property is a building and its rooms are what a guest books, so each room maps to one listing. Pass &#x60;listingId: null&#x60; to unmap a room and remove its channel link. The room mapping and its channel link are repointed together in one transaction, so a link can never outlive the mapping it describes — a stale link keeps routing that room&#39;s reservations to the previous listing. Re-sending a mapping that is already in place writes nothing (&#x60;alreadyMapped: true&#x60;). **The property&#39;s reservations are pulled as part of the call.** Once the room is mapped, every active reservation Booking.com holds for the property is imported and attached to its listing — &#x60;reservationsImported&#x60; says how many were processed. One already present is left as it is, so re-sending never duplicates. You do not need a follow-up call: reservations that arrived before the room was mapped are never picked up by the regular sync, so this is the moment they are brought in. It runs on every successful map, including a re-send, so re-sending retries an import that did not run. If the import cannot run, the mapping still stands and &#x60;reservationsImported&#x60; is &#x60;null&#x60;. A property with a long booking history can take tens of seconds. Unmapping pulls nothing. Unlike the Airbnb route, there is no conflict when the target listing already carries another Booking.com room: one listing served by several rooms is a normal arrangement and is not refused. Scope is enforced on both sides against your workspace — the room&#39;s property and the target listing. A room or listing belonging to another workspace returns the same 404 as one that does not exist. Returns &#x60;403 listing_inactive&#x60; when the target listing, or the listing the room is mapped to now, is inactive; nothing is changed.
1112
+ # @param map_booking_room_request [MapBookingRoomRequest]
1113
+ # @param [Hash] opts the optional parameters
1114
+ # @return [Array<(MapBookingRoomResponse, Integer, Hash)>] MapBookingRoomResponse data, response status code and response headers
1115
+ def map_booking_room_with_http_info(map_booking_room_request, opts = {})
1116
+ if @api_client.config.debugging
1117
+ @api_client.config.logger.debug 'Calling API: BookingComApi.map_booking_room ...'
1118
+ end
1119
+ # verify the required parameter 'map_booking_room_request' is set
1120
+ if @api_client.config.client_side_validation && map_booking_room_request.nil?
1121
+ fail ArgumentError, "Missing the required parameter 'map_booking_room_request' when calling BookingComApi.map_booking_room"
1122
+ end
1123
+ # resource path
1124
+ local_var_path = '/v1/channels/booking/listings/map'
1125
+
1126
+ # query parameters
1127
+ query_params = opts[:query_params] || {}
1128
+
1129
+ # header parameters
1130
+ header_params = opts[:header_params] || {}
1131
+ # HTTP header 'Accept' (if needed)
1132
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1133
+ # HTTP header 'Content-Type'
1134
+ content_type = @api_client.select_header_content_type(['application/json'])
1135
+ if !content_type.nil?
1136
+ header_params['Content-Type'] = content_type
1137
+ end
1138
+
1139
+ # form parameters
1140
+ form_params = opts[:form_params] || {}
1141
+
1142
+ # http body (model)
1143
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(map_booking_room_request)
1144
+
1145
+ # return_type
1146
+ return_type = opts[:debug_return_type] || 'MapBookingRoomResponse'
1147
+
1148
+ # auth_names
1149
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1150
+
1151
+ new_options = opts.merge(
1152
+ :operation => :"BookingComApi.map_booking_room",
1153
+ :header_params => header_params,
1154
+ :query_params => query_params,
1155
+ :form_params => form_params,
1156
+ :body => post_body,
1157
+ :auth_names => auth_names,
1158
+ :return_type => return_type
1159
+ )
1160
+
1161
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1162
+ if @api_client.config.debugging
1163
+ @api_client.config.logger.debug "API called: BookingComApi#map_booking_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1164
+ end
1165
+ return data, status_code, headers
1166
+ end
1167
+
1083
1168
  # Reply to Booking.com review
1084
1169
  # Post a public host reply to a guest review on Booking.com. Booking allows one host reply per review — repeated POSTs are rejected by upstream. Booking.com does NOT support host-authored reviews of guests via the API (platform-level limitation), so this endpoint is reply-only. `property_id` must be a Booking.com property connected to this workspace (`GET /v1/channels/booking/properties` lists them). Any other id — including one connected to a different workspace — returns `404 not_found`, the same answer as an id that does not exist. Returns `403 listing_inactive` when any listing mapped to the Booking.com property is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1085
1170
  # @param reply_booking_review_request [ReplyBookingReviewRequest]
@@ -1353,22 +1438,28 @@ module Repull
1353
1438
  end
1354
1439
 
1355
1440
  # Update Booking.com content
1356
- # Push content changes (descriptions, amenities, photos) to Booking.com. Booking enforces editorial review on text fields — changes appear after their content moderation queue clears. `property_id` must be a Booking.com property connected to this workspace (`GET /v1/channels/booking/properties` lists them). Any other id — including one connected to a different workspace — returns `404 not_found`, the same answer as an id that does not exist. Returns `403 listing_inactive` when any listing mapped to the Booking.com property is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1441
+ # Write one kind of content to a Booking.com property only. Nothing on the canonical listing or on Airbnb changes. To send the listing's own content to every channel instead, use `PUT /v1/listings/{id}/content` and publish. | `type` | What it is | |---|---| | `photos` | The property's photos. Add `room_id` to read one room's gallery. | | `facilities` | Property facilities, or a room's with `room_id` (Booking.com's ids — `GET` returns them). | | `description` | The property description. Booking.com rewrites what you send into its own multilingual copy; allow about 3 hours to appear. | | `settings` | House rules, pets, children, damage deposit, invoice recipient, booking model. | | `policies` | Cancellation and prepayment policies. | | `licences` | The region's licence rules and the licence on file. | | `checkin_methods` | How guests get in (holiday homes). | | `contacts` | Who Booking.com contacts about the property. | `amenities` is accepted as another name for `facilities`, and `descriptions` for `description`. What each `type` takes: - `description`: `text`, optional `language` (default `en`). - `facilities`: `facilities: [{ facility_id | room_facility_id, state: \"PRESENT\" | \"MISSING\", instances? }]`. Facilities you do not send stay as they are. - `photos`: `photos: [{ url }]`, uploaded in the background. With `room_id`, send `photo_ids` instead to add photos that have finished processing to that room. - `settings`: `settings: { <block>: {…} }`, for example `{ \"pets\": { \"pets_allowed\": \"PETS_ALLOWED\" } }`. Each block is written separately and reported in `results`. - `policies`: `policyCode` (152 = free cancellation at any time, 1 = non-refundable, …), optional `prepaymentRequired`; add `policyId` to change an existing policy. A property holds at most 7 policies and none can be deleted. - `licences`: `variantId` and `contentData: [{ name, value }]`, from the rules `GET ?type=licences` returns; optional `room_id`. - `checkin_methods`: `methods: [{ checkin_method }]`, using a name from `GET ?type=checkin_methods` `available`. - `contacts`: `contacts: [...]` in Booking.com's contact shape. If Booking.com refuses the write, the response is `422 booking_rejected` with Booking.com's reason, even when Booking.com answered HTTP 200. Resending the same body will be refused again. `property_id` must be a Booking.com property connected to this workspace (`GET /v1/channels/booking/properties` lists them). Any other id — including one connected to a different workspace — returns `404 not_found`, the same answer as an id that does not exist. Returns `403 listing_inactive` when any listing mapped to the Booking.com property is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1442
+ # @param update_booking_content_request [UpdateBookingContentRequest]
1357
1443
  # @param [Hash] opts the optional parameters
1358
1444
  # @return [nil]
1359
- def update_booking_content(opts = {})
1360
- update_booking_content_with_http_info(opts)
1445
+ def update_booking_content(update_booking_content_request, opts = {})
1446
+ update_booking_content_with_http_info(update_booking_content_request, opts)
1361
1447
  nil
1362
1448
  end
1363
1449
 
1364
1450
  # Update Booking.com content
1365
- # Push content changes (descriptions, amenities, photos) to Booking.com. Booking enforces editorial review on text fields — changes appear after their content moderation queue clears. &#x60;property_id&#x60; must be a Booking.com property connected to this workspace (&#x60;GET /v1/channels/booking/properties&#x60; lists them). Any other id — including one connected to a different workspace — returns &#x60;404 not_found&#x60;, the same answer as an id that does not exist. Returns &#x60;403 listing_inactive&#x60; when any listing mapped to the Booking.com property is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1451
+ # Write one kind of content to a Booking.com property only. Nothing on the canonical listing or on Airbnb changes. To send the listing&#39;s own content to every channel instead, use &#x60;PUT /v1/listings/{id}/content&#x60; and publish. | &#x60;type&#x60; | What it is | |---|---| | &#x60;photos&#x60; | The property&#39;s photos. Add &#x60;room_id&#x60; to read one room&#39;s gallery. | | &#x60;facilities&#x60; | Property facilities, or a room&#39;s with &#x60;room_id&#x60; (Booking.com&#39;s ids — &#x60;GET&#x60; returns them). | | &#x60;description&#x60; | The property description. Booking.com rewrites what you send into its own multilingual copy; allow about 3 hours to appear. | | &#x60;settings&#x60; | House rules, pets, children, damage deposit, invoice recipient, booking model. | | &#x60;policies&#x60; | Cancellation and prepayment policies. | | &#x60;licences&#x60; | The region&#39;s licence rules and the licence on file. | | &#x60;checkin_methods&#x60; | How guests get in (holiday homes). | | &#x60;contacts&#x60; | Who Booking.com contacts about the property. | &#x60;amenities&#x60; is accepted as another name for &#x60;facilities&#x60;, and &#x60;descriptions&#x60; for &#x60;description&#x60;. What each &#x60;type&#x60; takes: - &#x60;description&#x60;: &#x60;text&#x60;, optional &#x60;language&#x60; (default &#x60;en&#x60;). - &#x60;facilities&#x60;: &#x60;facilities: [{ facility_id | room_facility_id, state: \&quot;PRESENT\&quot; | \&quot;MISSING\&quot;, instances? }]&#x60;. Facilities you do not send stay as they are. - &#x60;photos&#x60;: &#x60;photos: [{ url }]&#x60;, uploaded in the background. With &#x60;room_id&#x60;, send &#x60;photo_ids&#x60; instead to add photos that have finished processing to that room. - &#x60;settings&#x60;: &#x60;settings: { &lt;block&gt;: {…} }&#x60;, for example &#x60;{ \&quot;pets\&quot;: { \&quot;pets_allowed\&quot;: \&quot;PETS_ALLOWED\&quot; } }&#x60;. Each block is written separately and reported in &#x60;results&#x60;. - &#x60;policies&#x60;: &#x60;policyCode&#x60; (152 &#x3D; free cancellation at any time, 1 &#x3D; non-refundable, …), optional &#x60;prepaymentRequired&#x60;; add &#x60;policyId&#x60; to change an existing policy. A property holds at most 7 policies and none can be deleted. - &#x60;licences&#x60;: &#x60;variantId&#x60; and &#x60;contentData: [{ name, value }]&#x60;, from the rules &#x60;GET ?type&#x3D;licences&#x60; returns; optional &#x60;room_id&#x60;. - &#x60;checkin_methods&#x60;: &#x60;methods: [{ checkin_method }]&#x60;, using a name from &#x60;GET ?type&#x3D;checkin_methods&#x60; &#x60;available&#x60;. - &#x60;contacts&#x60;: &#x60;contacts: [...]&#x60; in Booking.com&#39;s contact shape. If Booking.com refuses the write, the response is &#x60;422 booking_rejected&#x60; with Booking.com&#39;s reason, even when Booking.com answered HTTP 200. Resending the same body will be refused again. &#x60;property_id&#x60; must be a Booking.com property connected to this workspace (&#x60;GET /v1/channels/booking/properties&#x60; lists them). Any other id — including one connected to a different workspace — returns &#x60;404 not_found&#x60;, the same answer as an id that does not exist. Returns &#x60;403 listing_inactive&#x60; when any listing mapped to the Booking.com property is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1452
+ # @param update_booking_content_request [UpdateBookingContentRequest]
1366
1453
  # @param [Hash] opts the optional parameters
1367
1454
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1368
- def update_booking_content_with_http_info(opts = {})
1455
+ def update_booking_content_with_http_info(update_booking_content_request, opts = {})
1369
1456
  if @api_client.config.debugging
1370
1457
  @api_client.config.logger.debug 'Calling API: BookingComApi.update_booking_content ...'
1371
1458
  end
1459
+ # verify the required parameter 'update_booking_content_request' is set
1460
+ if @api_client.config.client_side_validation && update_booking_content_request.nil?
1461
+ fail ArgumentError, "Missing the required parameter 'update_booking_content_request' when calling BookingComApi.update_booking_content"
1462
+ end
1372
1463
  # resource path
1373
1464
  local_var_path = '/v1/channels/booking/content'
1374
1465
 
@@ -1379,12 +1470,17 @@ module Repull
1379
1470
  header_params = opts[:header_params] || {}
1380
1471
  # HTTP header 'Accept' (if needed)
1381
1472
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1473
+ # HTTP header 'Content-Type'
1474
+ content_type = @api_client.select_header_content_type(['application/json'])
1475
+ if !content_type.nil?
1476
+ header_params['Content-Type'] = content_type
1477
+ end
1382
1478
 
1383
1479
  # form parameters
1384
1480
  form_params = opts[:form_params] || {}
1385
1481
 
1386
1482
  # http body (model)
1387
- post_body = opts[:debug_body]
1483
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_booking_content_request)
1388
1484
 
1389
1485
  # return_type
1390
1486
  return_type = opts[:debug_return_type]
@@ -39,6 +39,12 @@ module Repull
39
39
 
40
40
  attr_accessor :occupancy
41
41
 
42
+ # The listing's rooms and the beds in each — what Airbnb shows as the sleeping arrangements and needs before a listing can go live. FULL replacement: the rooms you send become the whole set. Omit to leave rooms untouched; send `[]` to clear them. Every entry is checked before anything is written, so a bad entry refuses the whole request with `422 invalid_params` naming it (e.g. `rooms[1].beds[0].quantity`) — a listing is never left with half its rooms. Values use Airbnb's vocabulary, which Booking.com room mapping also reads. This is a local write; publish to send it to a channel.
43
+ attr_accessor :rooms
44
+
45
+ # What the guest is asked to do before leaving. FULL replacement: omit to leave untouched; send `[]` to clear. An unknown `taskType` refuses the whole request with `422 invalid_params`. Published to Airbnb, which is the only channel with checkout tasks. Airbnb accepts them only from partner apps it has certified for the feature; until then the publish result reports Airbnb's own refusal for this section and every other section still lands.
46
+ attr_accessor :checkout_tasks
47
+
42
48
  attr_accessor :pricing
43
49
 
44
50
  attr_accessor :policies
@@ -61,6 +67,8 @@ module Repull
61
67
  :'address' => :'address',
62
68
  :'details' => :'details',
63
69
  :'occupancy' => :'occupancy',
70
+ :'rooms' => :'rooms',
71
+ :'checkout_tasks' => :'checkoutTasks',
64
72
  :'pricing' => :'pricing',
65
73
  :'policies' => :'policies',
66
74
  :'photos' => :'photos',
@@ -90,6 +98,8 @@ module Repull
90
98
  :'address' => :'ListingContentUpdateRequestAddress',
91
99
  :'details' => :'ListingContentUpdateRequestDetails',
92
100
  :'occupancy' => :'ListingContentUpdateRequestOccupancy',
101
+ :'rooms' => :'Array<ListingContentUpdateRequestRoomsInner>',
102
+ :'checkout_tasks' => :'Array<ListingContentUpdateRequestCheckoutTasksInner>',
93
103
  :'pricing' => :'ListingContentUpdateRequestPricing',
94
104
  :'policies' => :'ListingContentUpdateRequestPolicies',
95
105
  :'photos' => :'Array<ListingContentUpdateRequestPhotosInner>',
@@ -104,6 +114,8 @@ module Repull
104
114
  :'name',
105
115
  :'description',
106
116
  :'summary',
117
+ :'rooms',
118
+ :'checkout_tasks',
107
119
  ])
108
120
  end
109
121
 
@@ -159,6 +171,18 @@ module Repull
159
171
  self.occupancy = attributes[:'occupancy']
160
172
  end
161
173
 
174
+ if attributes.key?(:'rooms')
175
+ if (value = attributes[:'rooms']).is_a?(Array)
176
+ self.rooms = value
177
+ end
178
+ end
179
+
180
+ if attributes.key?(:'checkout_tasks')
181
+ if (value = attributes[:'checkout_tasks']).is_a?(Array)
182
+ self.checkout_tasks = value
183
+ end
184
+ end
185
+
162
186
  if attributes.key?(:'pricing')
163
187
  self.pricing = attributes[:'pricing']
164
188
  end
@@ -209,6 +233,8 @@ module Repull
209
233
  address == o.address &&
210
234
  details == o.details &&
211
235
  occupancy == o.occupancy &&
236
+ rooms == o.rooms &&
237
+ checkout_tasks == o.checkout_tasks &&
212
238
  pricing == o.pricing &&
213
239
  policies == o.policies &&
214
240
  photos == o.photos &&
@@ -224,7 +250,7 @@ module Repull
224
250
  # Calculates hash code according to all attributes.
225
251
  # @return [Integer] Hash code
226
252
  def hash
227
- [locale, title, name, description, summary, amenities, address, details, occupancy, pricing, policies, photos, photos_mode].hash
253
+ [locale, title, name, description, summary, amenities, address, details, occupancy, rooms, checkout_tasks, pricing, policies, photos, photos_mode].hash
228
254
  end
229
255
 
230
256
  # Builds the object from hash
@@ -0,0 +1,210 @@
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` | 50 | | `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
+ Contact: ivan@vanio.ai
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 ListingContentUpdateRequestCheckoutTasksInner < ApiModelBase
18
+ # Any casing is accepted; stored lowercase.
19
+ attr_accessor :task_type
20
+
21
+ # Detail shown to the guest with the task, e.g. \"Leave the keys on the kitchen counter\".
22
+ attr_accessor :instructions
23
+
24
+ attr_accessor :required
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'task_type' => :'taskType',
52
+ :'instructions' => :'instructions',
53
+ :'required' => :'required'
54
+ }
55
+ end
56
+
57
+ # Returns attribute mapping this model knows about
58
+ def self.acceptable_attribute_map
59
+ attribute_map
60
+ end
61
+
62
+ # Returns all the JSON keys this model knows about
63
+ def self.acceptable_attributes
64
+ acceptable_attribute_map.values
65
+ end
66
+
67
+ # Attribute type mapping.
68
+ def self.openapi_types
69
+ {
70
+ :'task_type' => :'String',
71
+ :'instructions' => :'String',
72
+ :'required' => :'Boolean'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ :'instructions',
80
+ :'required'
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListingContentUpdateRequestCheckoutTasksInner` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListingContentUpdateRequestCheckoutTasksInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'task_type')
101
+ self.task_type = attributes[:'task_type']
102
+ else
103
+ self.task_type = nil
104
+ end
105
+
106
+ if attributes.key?(:'instructions')
107
+ self.instructions = attributes[:'instructions']
108
+ end
109
+
110
+ if attributes.key?(:'required')
111
+ self.required = attributes[:'required']
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @task_type.nil?
121
+ invalid_properties.push('invalid value for "task_type", task_type cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @task_type.nil?
132
+ task_type_validator = EnumAttributeValidator.new('String', ["return_keys", "turn_things_off", "throw_trash", "lock_up", "gather_towels", "additional_requests"])
133
+ return false unless task_type_validator.valid?(@task_type)
134
+ true
135
+ end
136
+
137
+ # Custom attribute writer method checking allowed values (enum).
138
+ # @param [Object] task_type Object to be assigned
139
+ def task_type=(task_type)
140
+ validator = EnumAttributeValidator.new('String', ["return_keys", "turn_things_off", "throw_trash", "lock_up", "gather_towels", "additional_requests"])
141
+ unless validator.valid?(task_type)
142
+ fail ArgumentError, "invalid value for \"task_type\", must be one of #{validator.allowable_values}."
143
+ end
144
+ @task_type = task_type
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ task_type == o.task_type &&
153
+ instructions == o.instructions &&
154
+ required == o.required
155
+ end
156
+
157
+ # @see the `==` method
158
+ # @param [Object] Object to be compared
159
+ def eql?(o)
160
+ self == o
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Integer] Hash code
165
+ def hash
166
+ [task_type, instructions, required].hash
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def self.build_from_hash(attributes)
173
+ return nil unless attributes.is_a?(Hash)
174
+ attributes = attributes.transform_keys(&:to_sym)
175
+ transformed_hash = {}
176
+ openapi_types.each_pair do |key, type|
177
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = nil
179
+ elsif type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[attribute_map[key]].is_a?(Array)
183
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
184
+ end
185
+ elsif !attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
187
+ end
188
+ end
189
+ new(transformed_hash)
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ end
209
+
210
+ end