repull 0.2.23 → 0.2.24

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: be99faa1ce8ed6c0f212d4e08868a97f1a17d60bfb706cf5a8d3e38edfba78ff
4
- data.tar.gz: 97fde1b3eb6f93014f233b7bf3fb7fbc5b4ad9b3d5273833e8245175f2444d4a
3
+ metadata.gz: 0ef9e3d00b0894f868278b60ac032cd39669bfdfd542e314688b5aa286654c8a
4
+ data.tar.gz: 0b219c72979e3474e6ffbf9e484d2a9e06d2706b1d483d5ccf558305d88cdba0
5
5
  SHA512:
6
- metadata.gz: f72d50e4e84bcf98d4e7800bd603aeb6b8bc7606ad6f1b4edd37296d58c6504e2303b03f1d2c2faefccde29576ddb4e7fce0a1d6fef4bab772fb32bb7fb7adf2
7
- data.tar.gz: 6075f9b6a4e73b0b088319fc366b06251730944d36390fda2e3bfd8003696a6e6037375b93b163b1036dd2c625ac7e7f12f11891bfc0bb5c8110f74d74797911
6
+ metadata.gz: 7b4d6c54fe8c846c208efcc8319b2a5d4288192d53b2746514e718ffb665d669f92d263a62f54c077e817bf8b052c6348217c3265b4a3bbc6179a36fca6d59fc
7
+ data.tar.gz: 12edb274453749fda46b30051243ab94c4d1a0b4106ead34953c2ebaf08324eaa3cdcc4a9a7c849d698bfbd7e0169539b5a3d2b63aaab0c1cc2ff694807624e1
@@ -745,7 +745,7 @@ module Repull
745
745
  end
746
746
 
747
747
  # Submit your review of a guest (publishes, final)
748
- # Submit your review of a guest — the review with `reviewerRole: \"host\"`. **Submitting publishes it and is final:** Airbnb has no draft and does not allow edits; a second submission is `409 review_already_submitted`. Airbnb accepts it up to 14 days after checkout (`expiresAt`). Required: `publicReview`, `isRevieweeRecommended` (whether you would host the guest again), and a 1–5 rating for **each** of `cleanliness`, `communication` and `respect_house_rules` — send `rating` to use one score for all three, `categoryRatings` to score them individually, or both (`rating` fills any category you did not rate). Optional: `privateFeedback`, a note to the guest that is not published. A request missing a required piece is refused with `422 invalid_params` naming it, before anything is sent to Airbnb. ```json { \"publicReview\": \"Joanne was a great guest.\", \"rating\": 5, \"privateFeedback\": \"Thanks for leaving the place so tidy!\", \"isRevieweeRecommended\": true } ``` A guest's review of you (`reviewerRole: \"guest\"`) cannot be written here — `409 not_host_review`; reply to it with `POST /v1/channels/airbnb/reviews/{id}/respond`. After the window closes: `409 review_window_closed`. Full guide: https://repull.dev/docs/channels/airbnb/reviews
748
+ # Submit your review of a guest — the review with `reviewerRole: \"host\"`. **Submitting publishes it and is final:** Airbnb has no draft and does not allow edits; a second submission is `409 review_already_submitted`. Airbnb accepts it up to 14 days after checkout (`expiresAt`). Required: `publicReview`, `isRevieweeRecommended` (whether you would host the guest again), and a 1–5 rating for **each** of `cleanliness`, `communication` and `respect_house_rules` — send `rating` to use one score for all three, `categoryRatings` to score them individually, or both (`rating` fills any category you did not rate). Optional: `privateFeedback`, a note to the guest that is not published. A request missing a required piece is refused with `422 invalid_params` naming it, before anything is sent to Airbnb. ```json { \"publicReview\": \"Joanne was a great guest.\", \"rating\": 5, \"privateFeedback\": \"Thanks for leaving the place so tidy!\", \"isRevieweeRecommended\": true } ``` A guest's review of you (`reviewerRole: \"guest\"`) cannot be written here — `409 not_host_review`; reply to it with `POST /v1/reviews/{id}/reply`. After the window closes: `409 review_window_closed`. The same submission is available channel-neutrally as `POST /v1/reviews/{id}/guest-review`. Guide: https://repull.dev/docs/reviews#review-a-guest
749
749
  # @param id [String] The review's `id` or `externalReviewId`, both as returned by `GET /v1/reviews`.
750
750
  # @param airbnb_host_review_submit [AirbnbHostReviewSubmit]
751
751
  # @param [Hash] opts the optional parameters
@@ -756,7 +756,7 @@ module Repull
756
756
  end
757
757
 
758
758
  # Submit your review of a guest (publishes, final)
759
- # Submit your review of a guest — the review with `reviewerRole: \"host\"`. **Submitting publishes it and is final:** Airbnb has no draft and does not allow edits; a second submission is `409 review_already_submitted`. Airbnb accepts it up to 14 days after checkout (`expiresAt`). Required: `publicReview`, `isRevieweeRecommended` (whether you would host the guest again), and a 1–5 rating for **each** of `cleanliness`, `communication` and `respect_house_rules` — send `rating` to use one score for all three, `categoryRatings` to score them individually, or both (`rating` fills any category you did not rate). Optional: `privateFeedback`, a note to the guest that is not published. A request missing a required piece is refused with `422 invalid_params` naming it, before anything is sent to Airbnb. ```json { \"publicReview\": \"Joanne was a great guest.\", \"rating\": 5, \"privateFeedback\": \"Thanks for leaving the place so tidy!\", \"isRevieweeRecommended\": true } ``` A guest's review of you (`reviewerRole: \"guest\"`) cannot be written here — `409 not_host_review`; reply to it with `POST /v1/channels/airbnb/reviews/{id}/respond`. After the window closes: `409 review_window_closed`. Full guide: https://repull.dev/docs/channels/airbnb/reviews
759
+ # Submit your review of a guest — the review with `reviewerRole: \"host\"`. **Submitting publishes it and is final:** Airbnb has no draft and does not allow edits; a second submission is `409 review_already_submitted`. Airbnb accepts it up to 14 days after checkout (`expiresAt`). Required: `publicReview`, `isRevieweeRecommended` (whether you would host the guest again), and a 1–5 rating for **each** of `cleanliness`, `communication` and `respect_house_rules` — send `rating` to use one score for all three, `categoryRatings` to score them individually, or both (`rating` fills any category you did not rate). Optional: `privateFeedback`, a note to the guest that is not published. A request missing a required piece is refused with `422 invalid_params` naming it, before anything is sent to Airbnb. ```json { \"publicReview\": \"Joanne was a great guest.\", \"rating\": 5, \"privateFeedback\": \"Thanks for leaving the place so tidy!\", \"isRevieweeRecommended\": true } ``` A guest's review of you (`reviewerRole: \"guest\"`) cannot be written here — `409 not_host_review`; reply to it with `POST /v1/reviews/{id}/reply`. After the window closes: `409 review_window_closed`. The same submission is available channel-neutrally as `POST /v1/reviews/{id}/guest-review`. Guide: https://repull.dev/docs/reviews#review-a-guest
760
760
  # @param id [String] The review's `id` or `externalReviewId`, both as returned by `GET /v1/reviews`.
761
761
  # @param airbnb_host_review_submit [AirbnbHostReviewSubmit]
762
762
  # @param [Hash] opts the optional parameters
@@ -2771,7 +2771,7 @@ module Repull
2771
2771
  end
2772
2772
 
2773
2773
  # Respond to Airbnb review
2774
- # Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2774
+ # **Deprecated — use `POST /v1/reviews/{id}/reply`**, which replies to a review from any channel. This route keeps working unchanged. Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2775
2775
  # @param id [String] Airbnb review id.
2776
2776
  # @param respond_airbnb_review_request [RespondAirbnbReviewRequest]
2777
2777
  # @param [Hash] opts the optional parameters
@@ -2782,7 +2782,7 @@ module Repull
2782
2782
  end
2783
2783
 
2784
2784
  # Respond to Airbnb review
2785
- # Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2785
+ # **Deprecated — use `POST /v1/reviews/{id}/reply`**, which replies to a review from any channel. This route keeps working unchanged. Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2786
2786
  # @param id [String] Airbnb review id.
2787
2787
  # @param respond_airbnb_review_request [RespondAirbnbReviewRequest]
2788
2788
  # @param [Hash] opts the optional parameters
@@ -2845,7 +2845,7 @@ module Repull
2845
2845
  end
2846
2846
 
2847
2847
  # Respond to / submit Airbnb review (legacy)
2848
- # Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility — prefer `PUT /v1/channels/airbnb/reviews/{id}` (edit) and `POST /v1/channels/airbnb/reviews/{id}/respond` (reply) for new integrations. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2848
+ # Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility — prefer `POST /v1/reviews/{id}/guest-review` (review a guest) and `POST /v1/reviews/{id}/reply` (reply) for new integrations. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2849
2849
  # @param [Hash] opts the optional parameters
2850
2850
  # @return [nil]
2851
2851
  def respond_airbnb_review_legacy(opts = {})
@@ -2854,7 +2854,7 @@ module Repull
2854
2854
  end
2855
2855
 
2856
2856
  # Respond to / submit Airbnb review (legacy)
2857
- # Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility — prefer `PUT /v1/channels/airbnb/reviews/{id}` (edit) and `POST /v1/channels/airbnb/reviews/{id}/respond` (reply) for new integrations. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2857
+ # Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility — prefer `POST /v1/reviews/{id}/guest-review` (review a guest) and `POST /v1/reviews/{id}/reply` (reply) for new integrations. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2858
2858
  # @param [Hash] opts the optional parameters
2859
2859
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2860
2860
  def respond_airbnb_review_legacy_with_http_info(opts = {})
@@ -217,7 +217,7 @@ module Repull
217
217
  end
218
218
 
219
219
  # Reply to a review on any channel
220
- # Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies are available on Airbnb today; a review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work. **Inactive listings:** a review of an inactive listing returns `403 listing_inactive` and no reply reaches the channel. Activate the listing first.
220
+ # Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies work on Airbnb and Booking.com. Each channel accepts one reply per review. A review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work. To review a guest (Airbnb only), use `POST /v1/reviews/{id}/guest-review`. **Inactive listings:** a review of an inactive listing returns `403 listing_inactive` and no reply reaches the channel. Activate the listing first.
221
221
  # @param id [Integer] Internal Repull review id.
222
222
  # @param reply_to_review_request [ReplyToReviewRequest]
223
223
  # @param [Hash] opts the optional parameters
@@ -228,7 +228,7 @@ module Repull
228
228
  end
229
229
 
230
230
  # Reply to a review on any channel
231
- # Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies are available on Airbnb today; a review from a channel without a reply API returns &#x60;422 unsupported_channel&#x60; naming the channels that do work. **Inactive listings:** a review of an inactive listing returns &#x60;403 listing_inactive&#x60; and no reply reaches the channel. Activate the listing first.
231
+ # Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies work on Airbnb and Booking.com. Each channel accepts one reply per review. A review from a channel without a reply API returns &#x60;422 unsupported_channel&#x60; naming the channels that do work. To review a guest (Airbnb only), use &#x60;POST /v1/reviews/{id}/guest-review&#x60;. **Inactive listings:** a review of an inactive listing returns &#x60;403 listing_inactive&#x60; and no reply reaches the channel. Activate the listing first.
232
232
  # @param id [Integer] Internal Repull review id.
233
233
  # @param reply_to_review_request [ReplyToReviewRequest]
234
234
  # @param [Hash] opts the optional parameters
@@ -289,5 +289,79 @@ module Repull
289
289
  end
290
290
  return data, status_code, headers
291
291
  end
292
+
293
+ # Review a guest (publishes, final)
294
+ # Submit your review of a guest — a review with `reviewerRole: \"host\"` from `GET /v1/reviews?reviewerRole=host`. Only Airbnb lets hosts review guests; a review from another channel returns `422 unsupported_channel`. **Submitting publishes it and is final:** Airbnb has no draft and does not allow edits; a second submission is `409 review_already_submitted`. Airbnb accepts it up to 14 days after checkout (`expiresAt`); after that, `409 review_window_closed`. Required: `publicReview`, `isRevieweeRecommended` (whether you would host the guest again), and a 1–5 rating for **each** of `cleanliness`, `communication` and `respect_house_rules` — send `rating` to use one score for all three, `categoryRatings` to score them individually, or both (`rating` fills any category you did not rate). Optional: `privateFeedback`, a note to the guest that is not published. A request missing a required piece is refused with `422 invalid_params` naming it, before anything is sent to Airbnb. ```json { \"publicReview\": \"Joanne was a great guest.\", \"rating\": 5, \"privateFeedback\": \"Thanks for leaving the place so tidy!\", \"isRevieweeRecommended\": true } ``` A guest's review of you (`reviewerRole: \"guest\"`) cannot be written here — `409 not_host_review`; answer it with `POST /v1/reviews/{id}/reply`. Same behaviour as `PUT /v1/channels/airbnb/reviews/{id}`. Guide: https://repull.dev/docs/reviews#review-a-guest
295
+ # @param id [Integer] The review &#x60;id&#x60; from &#x60;GET /v1/reviews&#x60;.
296
+ # @param airbnb_host_review_submit [AirbnbHostReviewSubmit]
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [SubmitGuestReview200Response]
299
+ def submit_guest_review(id, airbnb_host_review_submit, opts = {})
300
+ data, _status_code, _headers = submit_guest_review_with_http_info(id, airbnb_host_review_submit, opts)
301
+ data
302
+ end
303
+
304
+ # Review a guest (publishes, final)
305
+ # Submit your review of a guest — a review with &#x60;reviewerRole: \&quot;host\&quot;&#x60; from &#x60;GET /v1/reviews?reviewerRole&#x3D;host&#x60;. Only Airbnb lets hosts review guests; a review from another channel returns &#x60;422 unsupported_channel&#x60;. **Submitting publishes it and is final:** Airbnb has no draft and does not allow edits; a second submission is &#x60;409 review_already_submitted&#x60;. Airbnb accepts it up to 14 days after checkout (&#x60;expiresAt&#x60;); after that, &#x60;409 review_window_closed&#x60;. Required: &#x60;publicReview&#x60;, &#x60;isRevieweeRecommended&#x60; (whether you would host the guest again), and a 1–5 rating for **each** of &#x60;cleanliness&#x60;, &#x60;communication&#x60; and &#x60;respect_house_rules&#x60; — send &#x60;rating&#x60; to use one score for all three, &#x60;categoryRatings&#x60; to score them individually, or both (&#x60;rating&#x60; fills any category you did not rate). Optional: &#x60;privateFeedback&#x60;, a note to the guest that is not published. A request missing a required piece is refused with &#x60;422 invalid_params&#x60; naming it, before anything is sent to Airbnb. &#x60;&#x60;&#x60;json { \&quot;publicReview\&quot;: \&quot;Joanne was a great guest.\&quot;, \&quot;rating\&quot;: 5, \&quot;privateFeedback\&quot;: \&quot;Thanks for leaving the place so tidy!\&quot;, \&quot;isRevieweeRecommended\&quot;: true } &#x60;&#x60;&#x60; A guest&#39;s review of you (&#x60;reviewerRole: \&quot;guest\&quot;&#x60;) cannot be written here — &#x60;409 not_host_review&#x60;; answer it with &#x60;POST /v1/reviews/{id}/reply&#x60;. Same behaviour as &#x60;PUT /v1/channels/airbnb/reviews/{id}&#x60;. Guide: https://repull.dev/docs/reviews#review-a-guest
306
+ # @param id [Integer] The review &#x60;id&#x60; from &#x60;GET /v1/reviews&#x60;.
307
+ # @param airbnb_host_review_submit [AirbnbHostReviewSubmit]
308
+ # @param [Hash] opts the optional parameters
309
+ # @return [Array<(SubmitGuestReview200Response, Integer, Hash)>] SubmitGuestReview200Response data, response status code and response headers
310
+ def submit_guest_review_with_http_info(id, airbnb_host_review_submit, opts = {})
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug 'Calling API: ReviewsApi.submit_guest_review ...'
313
+ end
314
+ # verify the required parameter 'id' is set
315
+ if @api_client.config.client_side_validation && id.nil?
316
+ fail ArgumentError, "Missing the required parameter 'id' when calling ReviewsApi.submit_guest_review"
317
+ end
318
+ # verify the required parameter 'airbnb_host_review_submit' is set
319
+ if @api_client.config.client_side_validation && airbnb_host_review_submit.nil?
320
+ fail ArgumentError, "Missing the required parameter 'airbnb_host_review_submit' when calling ReviewsApi.submit_guest_review"
321
+ end
322
+ # resource path
323
+ local_var_path = '/v1/reviews/{id}/guest-review'.sub('{id}', CGI.escape(id.to_s))
324
+
325
+ # query parameters
326
+ query_params = opts[:query_params] || {}
327
+
328
+ # header parameters
329
+ header_params = opts[:header_params] || {}
330
+ # HTTP header 'Accept' (if needed)
331
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
332
+ # HTTP header 'Content-Type'
333
+ content_type = @api_client.select_header_content_type(['application/json'])
334
+ if !content_type.nil?
335
+ header_params['Content-Type'] = content_type
336
+ end
337
+
338
+ # form parameters
339
+ form_params = opts[:form_params] || {}
340
+
341
+ # http body (model)
342
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_host_review_submit)
343
+
344
+ # return_type
345
+ return_type = opts[:debug_return_type] || 'SubmitGuestReview200Response'
346
+
347
+ # auth_names
348
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
349
+
350
+ new_options = opts.merge(
351
+ :operation => :"ReviewsApi.submit_guest_review",
352
+ :header_params => header_params,
353
+ :query_params => query_params,
354
+ :form_params => form_params,
355
+ :body => post_body,
356
+ :auth_names => auth_names,
357
+ :return_type => return_type
358
+ )
359
+
360
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
361
+ if @api_client.config.debugging
362
+ @api_client.config.logger.debug "API called: ReviewsApi#submit_guest_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
363
+ end
364
+ return data, status_code, headers
365
+ end
292
366
  end
293
367
  end
@@ -0,0 +1,165 @@
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
+
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 SubmitGuestReview200Response < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :external_review_id
21
+
22
+ attr_accessor :submitted
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'id' => :'id',
28
+ :'external_review_id' => :'externalReviewId',
29
+ :'submitted' => :'submitted'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'id' => :'String',
47
+ :'external_review_id' => :'String',
48
+ :'submitted' => :'Boolean'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::SubmitGuestReview200Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::SubmitGuestReview200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'id')
75
+ self.id = attributes[:'id']
76
+ end
77
+
78
+ if attributes.key?(:'external_review_id')
79
+ self.external_review_id = attributes[:'external_review_id']
80
+ end
81
+
82
+ if attributes.key?(:'submitted')
83
+ self.submitted = attributes[:'submitted']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ id == o.id &&
108
+ external_review_id == o.external_review_id &&
109
+ submitted == o.submitted
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [id, external_review_id, submitted].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -11,5 +11,5 @@ Generator version: 7.22.0
11
11
  =end
12
12
 
13
13
  module Repull
14
- VERSION = '0.2.23'
14
+ VERSION = '0.2.24'
15
15
  end
data/lib/repull.rb CHANGED
@@ -510,6 +510,7 @@ require 'repull/models/submit_cloudbeds_credentials200_response_account_info'
510
510
  require 'repull/models/submit_cloudbeds_credentials200_response_webhooks'
511
511
  require 'repull/models/submit_cloudbeds_credentials_request'
512
512
  require 'repull/models/submit_cloudbeds_credentials_request_credentials'
513
+ require 'repull/models/submit_guest_review200_response'
513
514
  require 'repull/models/submit_guesty_credentials_request'
514
515
  require 'repull/models/submit_hospitable_credentials_request'
515
516
  require 'repull/models/submit_hostaway_credentials_request'
data/openapi/v1.json CHANGED
@@ -16421,7 +16421,7 @@
16421
16421
  "post": {
16422
16422
  "operationId": "replyToReview",
16423
16423
  "summary": "Reply to a review on any channel",
16424
- "description": "Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from.\n\nReplies are available on Airbnb today; a review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work.\n\n**Inactive listings:** a review of an inactive listing returns `403 listing_inactive` and no reply reaches the channel. Activate the listing first.",
16424
+ "description": "Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from.\n\nReplies work on Airbnb and Booking.com. Each channel accepts one reply per review. A review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work.\n\nTo review a guest (Airbnb only), use `POST /v1/reviews/{id}/guest-review`.\n\n**Inactive listings:** a review of an inactive listing returns `403 listing_inactive` and no reply reaches the channel. Activate the listing first.",
16425
16425
  "tags": [
16426
16426
  "Reviews"
16427
16427
  ],
@@ -18775,7 +18775,7 @@
18775
18775
  "post": {
18776
18776
  "operationId": "respond_airbnb_review_legacy",
18777
18777
  "summary": "Respond to / submit Airbnb review (legacy)",
18778
- "description": "Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility \u2014 prefer `PUT /v1/channels/airbnb/reviews/{id}` (edit) and `POST /v1/channels/airbnb/reviews/{id}/respond` (reply) for new integrations.\n\nReturns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.",
18778
+ "description": "Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility \u2014 prefer `POST /v1/reviews/{id}/guest-review` (review a guest) and `POST /v1/reviews/{id}/reply` (reply) for new integrations.\n\nReturns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.",
18779
18779
  "tags": [
18780
18780
  "Airbnb"
18781
18781
  ],
@@ -18806,7 +18806,7 @@
18806
18806
  "put": {
18807
18807
  "operationId": "edit_airbnb_review",
18808
18808
  "summary": "Submit your review of a guest (publishes, final)",
18809
- "description": "Submit your review of a guest \u2014 the review with `reviewerRole: \"host\"`. **Submitting publishes it and is final:** Airbnb has no draft and does not allow edits; a second submission is `409 review_already_submitted`. Airbnb accepts it up to 14 days after checkout (`expiresAt`).\n\nRequired: `publicReview`, `isRevieweeRecommended` (whether you would host the guest again), and a 1\u20135 rating for **each** of `cleanliness`, `communication` and `respect_house_rules` \u2014 send `rating` to use one score for all three, `categoryRatings` to score them individually, or both (`rating` fills any category you did not rate). Optional: `privateFeedback`, a note to the guest that is not published. A request missing a required piece is refused with `422 invalid_params` naming it, before anything is sent to Airbnb.\n\n```json\n{\n \"publicReview\": \"Joanne was a great guest.\",\n \"rating\": 5,\n \"privateFeedback\": \"Thanks for leaving the place so tidy!\",\n \"isRevieweeRecommended\": true\n}\n```\n\nA guest's review of you (`reviewerRole: \"guest\"`) cannot be written here \u2014 `409 not_host_review`; reply to it with `POST /v1/channels/airbnb/reviews/{id}/respond`. After the window closes: `409 review_window_closed`. Full guide: https://repull.dev/docs/channels/airbnb/reviews",
18809
+ "description": "Submit your review of a guest \u2014 the review with `reviewerRole: \"host\"`. **Submitting publishes it and is final:** Airbnb has no draft and does not allow edits; a second submission is `409 review_already_submitted`. Airbnb accepts it up to 14 days after checkout (`expiresAt`).\n\nRequired: `publicReview`, `isRevieweeRecommended` (whether you would host the guest again), and a 1\u20135 rating for **each** of `cleanliness`, `communication` and `respect_house_rules` \u2014 send `rating` to use one score for all three, `categoryRatings` to score them individually, or both (`rating` fills any category you did not rate). Optional: `privateFeedback`, a note to the guest that is not published. A request missing a required piece is refused with `422 invalid_params` naming it, before anything is sent to Airbnb.\n\n```json\n{\n \"publicReview\": \"Joanne was a great guest.\",\n \"rating\": 5,\n \"privateFeedback\": \"Thanks for leaving the place so tidy!\",\n \"isRevieweeRecommended\": true\n}\n```\n\nA guest's review of you (`reviewerRole: \"guest\"`) cannot be written here \u2014 `409 not_host_review`; reply to it with `POST /v1/reviews/{id}/reply`. After the window closes: `409 review_window_closed`.\n\nThe same submission is available channel-neutrally as `POST /v1/reviews/{id}/guest-review`. Guide: https://repull.dev/docs/reviews#review-a-guest",
18810
18810
  "tags": [
18811
18811
  "Airbnb"
18812
18812
  ],
@@ -18870,7 +18870,8 @@
18870
18870
  "post": {
18871
18871
  "operationId": "respond_airbnb_review",
18872
18872
  "summary": "Respond to Airbnb review",
18873
- "description": "Post a public host response to a guest review. Airbnb allows one response per review \u2014 repeated POSTs return 409. Response text is capped at 1000 characters.\n\nReturns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.",
18873
+ "deprecated": true,
18874
+ "description": "**Deprecated \u2014 use `POST /v1/reviews/{id}/reply`**, which replies to a review from any channel. This route keeps working unchanged.\n\nPost a public host response to a guest review. Airbnb allows one response per review \u2014 repeated POSTs return 409. Response text is capped at 1000 characters.\n\nReturns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.",
18874
18875
  "tags": [
18875
18876
  "Airbnb"
18876
18877
  ],
@@ -31390,6 +31391,95 @@
31390
31391
  }
31391
31392
  }
31392
31393
  }
31394
+ },
31395
+ "/v1/reviews/{id}/guest-review": {
31396
+ "post": {
31397
+ "operationId": "submitGuestReview",
31398
+ "summary": "Review a guest (publishes, final)",
31399
+ "description": "Submit your review of a guest \u2014 a review with `reviewerRole: \"host\"` from `GET /v1/reviews?reviewerRole=host`. Only Airbnb lets hosts review guests; a review from another channel returns `422 unsupported_channel`.\n\n**Submitting publishes it and is final:** Airbnb has no draft and does not allow edits; a second submission is `409 review_already_submitted`. Airbnb accepts it up to 14 days after checkout (`expiresAt`); after that, `409 review_window_closed`.\n\nRequired: `publicReview`, `isRevieweeRecommended` (whether you would host the guest again), and a 1\u20135 rating for **each** of `cleanliness`, `communication` and `respect_house_rules` \u2014 send `rating` to use one score for all three, `categoryRatings` to score them individually, or both (`rating` fills any category you did not rate). Optional: `privateFeedback`, a note to the guest that is not published. A request missing a required piece is refused with `422 invalid_params` naming it, before anything is sent to Airbnb.\n\n```json\n{\n \"publicReview\": \"Joanne was a great guest.\",\n \"rating\": 5,\n \"privateFeedback\": \"Thanks for leaving the place so tidy!\",\n \"isRevieweeRecommended\": true\n}\n```\n\nA guest's review of you (`reviewerRole: \"guest\"`) cannot be written here \u2014 `409 not_host_review`; answer it with `POST /v1/reviews/{id}/reply`. Same behaviour as `PUT /v1/channels/airbnb/reviews/{id}`. Guide: https://repull.dev/docs/reviews#review-a-guest",
31400
+ "tags": [
31401
+ "Reviews"
31402
+ ],
31403
+ "parameters": [
31404
+ {
31405
+ "name": "id",
31406
+ "in": "path",
31407
+ "required": true,
31408
+ "schema": {
31409
+ "type": "integer"
31410
+ },
31411
+ "description": "The review `id` from `GET /v1/reviews`."
31412
+ }
31413
+ ],
31414
+ "requestBody": {
31415
+ "required": true,
31416
+ "content": {
31417
+ "application/json": {
31418
+ "schema": {
31419
+ "$ref": "#/components/schemas/AirbnbHostReviewSubmit"
31420
+ }
31421
+ }
31422
+ }
31423
+ },
31424
+ "responses": {
31425
+ "200": {
31426
+ "description": "Review published on Airbnb",
31427
+ "content": {
31428
+ "application/json": {
31429
+ "schema": {
31430
+ "type": "object",
31431
+ "properties": {
31432
+ "id": {
31433
+ "type": "string"
31434
+ },
31435
+ "externalReviewId": {
31436
+ "type": "string"
31437
+ },
31438
+ "submitted": {
31439
+ "type": "boolean"
31440
+ }
31441
+ }
31442
+ }
31443
+ }
31444
+ }
31445
+ },
31446
+ "401": {
31447
+ "$ref": "#/components/responses/Unauthorized"
31448
+ },
31449
+ "403": {
31450
+ "$ref": "#/components/responses/ListingInactive"
31451
+ },
31452
+ "404": {
31453
+ "$ref": "#/components/responses/NotFound"
31454
+ },
31455
+ "409": {
31456
+ "description": "`review_already_submitted`, `not_host_review` or `review_window_closed`.",
31457
+ "content": {
31458
+ "application/json": {
31459
+ "schema": {
31460
+ "$ref": "#/components/schemas/Error"
31461
+ }
31462
+ }
31463
+ }
31464
+ },
31465
+ "422": {
31466
+ "description": "`invalid_params` (a required piece is missing, named in `field`) or `unsupported_channel` (the review is not from Airbnb).",
31467
+ "content": {
31468
+ "application/json": {
31469
+ "schema": {
31470
+ "$ref": "#/components/schemas/Error"
31471
+ }
31472
+ }
31473
+ }
31474
+ },
31475
+ "429": {
31476
+ "$ref": "#/components/responses/AirbnbRateLimited"
31477
+ },
31478
+ "502": {
31479
+ "$ref": "#/components/responses/AirbnbUpstreamError"
31480
+ }
31481
+ }
31482
+ }
31393
31483
  }
31394
31484
  }
31395
31485
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repull
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.23
4
+ version: 0.2.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nikolov
@@ -585,6 +585,7 @@ files:
585
585
  - lib/repull/models/submit_cloudbeds_credentials200_response_webhooks.rb
586
586
  - lib/repull/models/submit_cloudbeds_credentials_request.rb
587
587
  - lib/repull/models/submit_cloudbeds_credentials_request_credentials.rb
588
+ - lib/repull/models/submit_guest_review200_response.rb
588
589
  - lib/repull/models/submit_guesty_credentials_request.rb
589
590
  - lib/repull/models/submit_hospitable_credentials_request.rb
590
591
  - lib/repull/models/submit_hostaway_credentials_request.rb