repull 0.2.54 → 0.2.55

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.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/listings_api.rb +4 -4
  3. data/lib/repull/api/vrbo_api.rb +1976 -798
  4. data/lib/repull/models/{update_vrbo_listing_rooms200_response.rb → add_vrbo_listing_photos200_response.rb} +60 -113
  5. data/lib/repull/models/{update_vrbo_listing_photos200_response_data.rb → add_vrbo_listing_photos200_response_data.rb} +4 -4
  6. data/lib/repull/models/add_vrbo_listing_photos_request.rb +184 -0
  7. data/lib/repull/models/{update_vrbo_listing_photos_request_add_inner.rb → add_vrbo_listing_photos_request_photos_inner.rb} +36 -13
  8. data/lib/repull/models/add_vrbo_listing_room_request.rb +309 -0
  9. data/lib/repull/models/add_vrbo_listing_video200_response.rb +57 -110
  10. data/lib/repull/models/add_vrbo_listing_video200_response_data.rb +1 -1
  11. data/lib/repull/models/get_vrbo_connection200_response.rb +147 -0
  12. data/lib/repull/models/get_vrbo_connection200_response_data.rb +210 -0
  13. data/lib/repull/models/get_vrbo_connection200_response_data_accounts_inner.rb +292 -0
  14. data/lib/repull/models/{update_vrbo_listing_translations_request.rb → get_vrbo_connection200_response_data_accounts_inner_sync.rb} +16 -20
  15. data/lib/repull/models/get_vrbo_listing200_response.rb +175 -0
  16. data/lib/repull/models/get_vrbo_listing200_response_data_freshness.rb +187 -0
  17. data/lib/repull/models/get_vrbo_listing200_response_data_freshness_accounts_inner.rb +194 -0
  18. data/lib/repull/models/get_vrbo_listing200_response_data_inner.rb +548 -0
  19. data/lib/repull/models/get_vrbo_listing200_response_data_inner_address.rb +208 -0
  20. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_rates.rb → get_vrbo_listing200_response_data_inner_capacity.rb} +31 -31
  21. data/lib/repull/models/get_vrbo_listing200_response_data_inner_capacity_pets.rb +158 -0
  22. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_translations.rb → get_vrbo_listing200_response_data_inner_content.rb} +20 -18
  23. data/lib/repull/models/get_vrbo_listing200_response_data_inner_rating.rb +158 -0
  24. data/lib/repull/models/get_vrbo_listing_additional_info200_response.rb +46 -98
  25. data/lib/repull/models/get_vrbo_listing_additional_info200_response_data.rb +1 -1
  26. data/lib/repull/models/get_vrbo_listing_additional_info200_response_data_freshness.rb +308 -0
  27. data/lib/repull/models/{get_vrbo_listing_content200_response_listing.rb → get_vrbo_listing_additional_info200_response_data_freshness_accounts_inner.rb} +42 -46
  28. data/lib/repull/models/get_vrbo_listing_amenities200_response.rb +46 -98
  29. data/lib/repull/models/get_vrbo_listing_amenities200_response_data.rb +1 -1
  30. data/lib/repull/models/get_vrbo_listing_availability200_response.rb +186 -0
  31. data/lib/repull/models/get_vrbo_listing_availability200_response_data.rb +104 -0
  32. data/lib/repull/models/get_vrbo_listing_availability200_response_data_one_of.rb +208 -0
  33. data/lib/repull/models/get_vrbo_listing_availability200_response_data_one_of_inner.rb +260 -0
  34. data/lib/repull/models/get_vrbo_listing_availability200_response_range.rb +156 -0
  35. data/lib/repull/models/get_vrbo_listing_booking_settings200_response.rb +46 -98
  36. data/lib/repull/models/get_vrbo_listing_booking_settings200_response_data.rb +1 -1
  37. data/lib/repull/models/get_vrbo_listing_cancellation200_response.rb +46 -98
  38. data/lib/repull/models/get_vrbo_listing_cancellation200_response_data.rb +1 -1
  39. data/lib/repull/models/{get_vrbo_listing_welcome_guide200_response.rb → get_vrbo_listing_checkin_guide200_response.rb} +49 -101
  40. data/lib/repull/models/{get_vrbo_listing_welcome_guide200_response_data.rb → get_vrbo_listing_checkin_guide200_response_data.rb} +12 -12
  41. data/lib/repull/models/{update_vrbo_listing_rooms_request_update_inner.rb → get_vrbo_listing_checkout_guide200_response.rb} +52 -61
  42. data/lib/repull/models/{update_vrbo_listing_rooms_request.rb → get_vrbo_listing_checkout_guide200_response_data.rb} +26 -27
  43. data/lib/repull/models/get_vrbo_listing_content200_response.rb +45 -81
  44. data/lib/repull/models/get_vrbo_listing_content200_response_sections.rb +28 -44
  45. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_welcome_guide.rb → get_vrbo_listing_content200_response_sections_checkin_guide.rb} +11 -11
  46. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_welcome_guide_access.rb → get_vrbo_listing_content200_response_sections_checkin_guide_access.rb} +3 -3
  47. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_welcome_guide_check_in.rb → get_vrbo_listing_content200_response_sections_checkin_guide_check_in.rb} +3 -3
  48. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_welcome_guide_contacts_inner.rb → get_vrbo_listing_content200_response_sections_checkin_guide_contacts_inner.rb} +3 -3
  49. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_welcome_guide_wifi.rb → get_vrbo_listing_content200_response_sections_checkin_guide_wifi.rb} +3 -3
  50. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_description.rb → get_vrbo_listing_content200_response_sections_descriptions_inner.rb} +26 -5
  51. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_description_limits.rb → get_vrbo_listing_content200_response_sections_descriptions_inner_limits.rb} +6 -5
  52. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_description_limits_headline.rb → get_vrbo_listing_content200_response_sections_descriptions_inner_limits_headline.rb} +3 -3
  53. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_property.rb → get_vrbo_listing_content200_response_sections_details.rb} +4 -4
  54. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_property_interior_size.rb → get_vrbo_listing_content200_response_sections_details_interior_size.rb} +3 -3
  55. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_registration.rb → get_vrbo_listing_content200_response_sections_permits.rb} +4 -4
  56. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_registration_fields_inner.rb → get_vrbo_listing_content200_response_sections_permits_fields_inner.rb} +3 -3
  57. data/lib/repull/models/{get_vrbo_listing_translations200_response.rb → get_vrbo_listing_descriptions200_response.rb} +61 -98
  58. data/lib/repull/models/{get_vrbo_listing_property200_response.rb → get_vrbo_listing_details200_response.rb} +49 -101
  59. data/lib/repull/models/{get_vrbo_listing_property200_response_data.rb → get_vrbo_listing_details200_response_data.rb} +5 -5
  60. data/lib/repull/models/get_vrbo_listing_fees200_response.rb +46 -98
  61. data/lib/repull/models/get_vrbo_listing_fees200_response_data.rb +1 -1
  62. data/lib/repull/models/get_vrbo_listing_house_rules200_response.rb +46 -98
  63. data/lib/repull/models/get_vrbo_listing_house_rules200_response_data.rb +1 -1
  64. data/lib/repull/models/get_vrbo_listing_location200_response.rb +46 -98
  65. data/lib/repull/models/get_vrbo_listing_location200_response_data.rb +1 -1
  66. data/lib/repull/models/get_vrbo_listing_payment_terms200_response.rb +46 -98
  67. data/lib/repull/models/get_vrbo_listing_payment_terms200_response_data.rb +1 -1
  68. data/lib/repull/models/{get_vrbo_listing_description200_response.rb → get_vrbo_listing_permits200_response.rb} +49 -101
  69. data/lib/repull/models/{get_vrbo_listing_registration200_response_data.rb → get_vrbo_listing_permits200_response_data.rb} +5 -5
  70. data/lib/repull/models/get_vrbo_listing_photos200_response.rb +46 -98
  71. data/lib/repull/models/get_vrbo_listing_photos200_response_data.rb +1 -1
  72. data/lib/repull/models/get_vrbo_listing_pricing200_response.rb +46 -98
  73. data/lib/repull/models/get_vrbo_listing_pricing200_response_data.rb +1 -1
  74. data/lib/repull/models/get_vrbo_listing_protection200_response.rb +46 -98
  75. data/lib/repull/models/get_vrbo_listing_protection200_response_data.rb +1 -1
  76. data/lib/repull/models/get_vrbo_listing_rates200_response.rb +46 -98
  77. data/lib/repull/models/get_vrbo_listing_rates200_response_data.rb +2 -2
  78. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_rates_days_inner.rb → get_vrbo_listing_rates200_response_data_days_inner.rb} +3 -3
  79. data/lib/repull/models/get_vrbo_listing_rooms200_response.rb +46 -98
  80. data/lib/repull/models/get_vrbo_listing_rooms200_response_data.rb +1 -1
  81. data/lib/repull/models/{get_vrbo_listing_registration200_response.rb → get_vrbo_listing_safety_disclosures200_response.rb} +49 -101
  82. data/lib/repull/models/get_vrbo_listing_safety_disclosures200_response_data.rb +151 -0
  83. data/lib/repull/models/get_vrbo_listing_story200_response.rb +46 -98
  84. data/lib/repull/models/get_vrbo_listing_story200_response_data.rb +1 -1
  85. data/lib/repull/models/get_vrbo_listing_taxes200_response.rb +46 -98
  86. data/lib/repull/models/get_vrbo_listing_taxes200_response_data.rb +1 -1
  87. data/lib/repull/models/get_vrbo_listing_videos200_response.rb +46 -98
  88. data/lib/repull/models/get_vrbo_listing_videos200_response_data.rb +1 -1
  89. data/lib/repull/models/get_vrbo_publish_job200_response_job.rb +1 -1
  90. data/lib/repull/models/{update_vrbo_listing_translations_request_set_inner.rb → map_vrbo_listing200_response.rb} +40 -41
  91. data/lib/repull/models/map_vrbo_listing_request.rb +205 -0
  92. data/lib/repull/models/reorder_vrbo_listing_photos_request.rb +184 -0
  93. data/lib/repull/models/set_vrbo_listing_cover_photo_request.rb +164 -0
  94. data/lib/repull/models/update_vrbo_listing_additional_info200_response.rb +57 -110
  95. data/lib/repull/models/update_vrbo_listing_additional_info200_response_data.rb +1 -1
  96. data/lib/repull/models/update_vrbo_listing_amenities200_response.rb +57 -110
  97. data/lib/repull/models/update_vrbo_listing_amenities200_response_data.rb +1 -1
  98. data/lib/repull/models/update_vrbo_listing_availability202_response.rb +156 -0
  99. data/lib/repull/models/{update_vrbo_listing_translations200_response_data.rb → update_vrbo_listing_availability202_response_data.rb} +25 -21
  100. data/lib/repull/models/update_vrbo_listing_availability_request.rb +220 -0
  101. data/lib/repull/models/update_vrbo_listing_availability_request_operations_inner.rb +299 -0
  102. data/lib/repull/models/update_vrbo_listing_booking_settings200_response.rb +57 -110
  103. data/lib/repull/models/update_vrbo_listing_booking_settings200_response_data.rb +1 -1
  104. data/lib/repull/models/update_vrbo_listing_cancellation200_response.rb +57 -110
  105. data/lib/repull/models/update_vrbo_listing_cancellation200_response_data.rb +1 -1
  106. data/lib/repull/models/{update_vrbo_listing_translations200_response.rb → update_vrbo_listing_checkin_guide200_response.rb} +60 -113
  107. data/lib/repull/models/{update_vrbo_listing_welcome_guide200_response_data.rb → update_vrbo_listing_checkin_guide200_response_data.rb} +12 -12
  108. data/lib/repull/models/{update_vrbo_listing_welcome_guide_request.rb → update_vrbo_listing_checkin_guide_request.rb} +10 -10
  109. data/lib/repull/models/{update_vrbo_listing_welcome_guide_request_access.rb → update_vrbo_listing_checkin_guide_request_access.rb} +3 -3
  110. data/lib/repull/models/{update_vrbo_listing_welcome_guide_request_check_in.rb → update_vrbo_listing_checkin_guide_request_check_in.rb} +3 -3
  111. data/lib/repull/models/{update_vrbo_listing_welcome_guide_request_wifi.rb → update_vrbo_listing_checkin_guide_request_wifi.rb} +3 -3
  112. data/lib/repull/models/{update_vrbo_listing_welcome_guide200_response.rb → update_vrbo_listing_descriptions200_response.rb} +63 -113
  113. data/lib/repull/models/{update_vrbo_listing_description_request.rb → update_vrbo_listing_descriptions_request.rb} +14 -4
  114. data/lib/repull/models/{update_vrbo_listing_photos200_response.rb → update_vrbo_listing_details200_response.rb} +60 -113
  115. data/lib/repull/models/{update_vrbo_listing_property200_response_data.rb → update_vrbo_listing_details200_response_data.rb} +5 -5
  116. data/lib/repull/models/{update_vrbo_listing_property_request.rb → update_vrbo_listing_details_request.rb} +4 -4
  117. data/lib/repull/models/{update_vrbo_listing_property_request_interior_size.rb → update_vrbo_listing_details_request_interior_size.rb} +3 -3
  118. data/lib/repull/models/update_vrbo_listing_fees200_response.rb +57 -110
  119. data/lib/repull/models/update_vrbo_listing_fees200_response_data.rb +1 -1
  120. data/lib/repull/models/update_vrbo_listing_house_rules200_response.rb +57 -110
  121. data/lib/repull/models/update_vrbo_listing_house_rules200_response_data.rb +1 -1
  122. data/lib/repull/models/update_vrbo_listing_location200_response.rb +57 -110
  123. data/lib/repull/models/update_vrbo_listing_location200_response_data.rb +1 -1
  124. data/lib/repull/models/update_vrbo_listing_payment_terms200_response.rb +57 -110
  125. data/lib/repull/models/update_vrbo_listing_payment_terms200_response_data.rb +1 -1
  126. data/lib/repull/models/{update_vrbo_listing_property200_response.rb → update_vrbo_listing_permits200_response.rb} +60 -113
  127. data/lib/repull/models/{update_vrbo_listing_registration200_response_data.rb → update_vrbo_listing_permits200_response_data.rb} +5 -5
  128. data/lib/repull/models/{update_vrbo_listing_registration_request.rb → update_vrbo_listing_permits_request.rb} +4 -4
  129. data/lib/repull/models/{update_vrbo_listing_registration_request_settings_inner.rb → update_vrbo_listing_permits_request_settings_inner.rb} +4 -4
  130. data/lib/repull/models/{update_vrbo_listing_registration_request_settings_inner_value.rb → update_vrbo_listing_permits_request_settings_inner_value.rb} +1 -1
  131. data/lib/repull/models/update_vrbo_listing_photo_request.rb +229 -0
  132. data/lib/repull/models/update_vrbo_listing_pricing200_response.rb +57 -110
  133. data/lib/repull/models/update_vrbo_listing_pricing200_response_data.rb +1 -1
  134. data/lib/repull/models/update_vrbo_listing_protection200_response.rb +57 -110
  135. data/lib/repull/models/update_vrbo_listing_protection200_response_data.rb +1 -1
  136. data/lib/repull/models/update_vrbo_listing_rates200_response.rb +57 -110
  137. data/lib/repull/models/update_vrbo_listing_rates200_response_data.rb +2 -2
  138. data/lib/repull/models/{update_vrbo_listing_description200_response.rb → update_vrbo_listing_room200_response.rb} +60 -113
  139. data/lib/repull/models/{update_vrbo_listing_rooms200_response_data.rb → update_vrbo_listing_room200_response_data.rb} +4 -4
  140. data/lib/repull/models/update_vrbo_listing_room_request.rb +254 -0
  141. data/lib/repull/models/{update_vrbo_listing_rooms_request_add_inner_amenities.rb → update_vrbo_listing_room_request_amenities.rb} +3 -3
  142. data/lib/repull/models/{update_vrbo_listing_rooms_request_add_inner_amenities_one_of_inner.rb → update_vrbo_listing_room_request_amenities_one_of_inner.rb} +3 -3
  143. data/lib/repull/models/{update_vrbo_listing_rooms_request_add_inner.rb → update_vrbo_listing_room_request_beds_inner.rb} +53 -47
  144. data/lib/repull/models/update_vrbo_listing_safety_disclosures200_response.rb +245 -0
  145. data/lib/repull/models/update_vrbo_listing_safety_disclosures200_response_data.rb +151 -0
  146. data/lib/repull/models/{get_vrbo_listing_translations200_response_data.rb → update_vrbo_listing_safety_disclosures_request.rb} +27 -24
  147. data/lib/repull/models/update_vrbo_listing_safety_disclosures_request_groups.rb +156 -0
  148. data/lib/repull/models/update_vrbo_listing_safety_disclosures_request_groups_home_safety.rb +166 -0
  149. data/lib/repull/models/update_vrbo_listing_story200_response.rb +57 -110
  150. data/lib/repull/models/update_vrbo_listing_story200_response_data.rb +1 -1
  151. data/lib/repull/models/update_vrbo_listing_taxes200_response.rb +57 -110
  152. data/lib/repull/models/update_vrbo_listing_taxes200_response_data.rb +1 -1
  153. data/lib/repull/models/{update_vrbo_listing_photos_request.rb → vrbo_listing_action200_response.rb} +47 -43
  154. data/lib/repull/models/vrbo_listing_action200_response_units_inner.rb +192 -0
  155. data/lib/repull/models/vrbo_listing_action_request.rb +210 -0
  156. data/lib/repull/version.rb +1 -1
  157. data/lib/repull.rb +89 -60
  158. data/openapi/v1.json +10116 -2944
  159. metadata +90 -61
  160. data/lib/repull/models/get_vrbo_listing_content200_response_sections_translations_items_inner.rb +0 -167
  161. data/lib/repull/models/get_vrbo_listing_description200_response_data.rb +0 -168
  162. data/lib/repull/models/update_vrbo_listing_description200_response_data.rb +0 -168
  163. data/lib/repull/models/update_vrbo_listing_registration200_response.rb +0 -298
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## 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`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
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 UpdateVrboListingAvailabilityRequest < ApiModelBase
18
+ attr_accessor :type
19
+
20
+ attr_accessor :operations
21
+
22
+ class EnumAttributeValidator
23
+ attr_reader :datatype
24
+ attr_reader :allowable_values
25
+
26
+ def initialize(datatype, allowable_values)
27
+ @allowable_values = allowable_values.map do |value|
28
+ case datatype.to_s
29
+ when /Integer/i
30
+ value.to_i
31
+ when /Float/i
32
+ value.to_f
33
+ else
34
+ value
35
+ end
36
+ end
37
+ end
38
+
39
+ def valid?(value)
40
+ !value || allowable_values.include?(value)
41
+ end
42
+ end
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'type' => :'type',
48
+ :'operations' => :'operations'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'type' => :'String',
66
+ :'operations' => :'Array<UpdateVrboListingAvailabilityRequestOperationsInner>'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::UpdateVrboListingAvailabilityRequest` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::UpdateVrboListingAvailabilityRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'type')
93
+ self.type = attributes[:'type']
94
+ else
95
+ self.type = 'calendar'
96
+ end
97
+
98
+ if attributes.key?(:'operations')
99
+ if (value = attributes[:'operations']).is_a?(Array)
100
+ self.operations = value
101
+ end
102
+ else
103
+ self.operations = nil
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
+ invalid_properties = Array.new
112
+ if @operations.nil?
113
+ invalid_properties.push('invalid value for "operations", operations cannot be nil.')
114
+ end
115
+
116
+ if @operations.length < 1
117
+ invalid_properties.push('invalid value for "operations", number of items must be greater than or equal to 1.')
118
+ end
119
+
120
+ invalid_properties
121
+ end
122
+
123
+ # Check to see if the all the properties in the model are valid
124
+ # @return true if the model is valid
125
+ def valid?
126
+ warn '[DEPRECATED] the `valid?` method is obsolete'
127
+ type_validator = EnumAttributeValidator.new('String', ["calendar"])
128
+ return false unless type_validator.valid?(@type)
129
+ return false if @operations.nil?
130
+ return false if @operations.length < 1
131
+ true
132
+ end
133
+
134
+ # Custom attribute writer method checking allowed values (enum).
135
+ # @param [Object] type Object to be assigned
136
+ def type=(type)
137
+ validator = EnumAttributeValidator.new('String', ["calendar"])
138
+ unless validator.valid?(type)
139
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
140
+ end
141
+ @type = type
142
+ end
143
+
144
+ # Custom attribute writer method with validation
145
+ # @param [Object] operations Value to be assigned
146
+ def operations=(operations)
147
+ if operations.nil?
148
+ fail ArgumentError, 'operations cannot be nil'
149
+ end
150
+
151
+ if operations.length < 1
152
+ fail ArgumentError, 'invalid value for "operations", number of items must be greater than or equal to 1.'
153
+ end
154
+
155
+ @operations = operations
156
+ end
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ type == o.type &&
164
+ operations == o.operations
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [type, operations].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ attributes = attributes.transform_keys(&:to_sym)
185
+ transformed_hash = {}
186
+ openapi_types.each_pair do |key, type|
187
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = nil
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[attribute_map[key]].is_a?(Array)
193
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
+ end
195
+ elsif !attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
+ end
198
+ end
199
+ new(transformed_hash)
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -0,0 +1,299 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## 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`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
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
+ # One write, applied to every night it names: `start_date` + `end_date` (inclusive) or `dates`. The fields are those of the Airbnb per-channel calendar operation.
18
+ class UpdateVrboListingAvailabilityRequestOperationsInner < ApiModelBase
19
+ attr_accessor :start_date
20
+
21
+ attr_accessor :end_date
22
+
23
+ # `YYYY-MM-DD`, or ranges as `YYYY-MM-DD:YYYY-MM-DD`.
24
+ attr_accessor :dates
25
+
26
+ # The nightly price on Vrbo, in the listing's Vrbo currency (sent as is — no markup).
27
+ attr_accessor :daily_price
28
+
29
+ # `unavailable` blocks the nights on Vrbo; `available` opens them (never a night a booking holds).
30
+ attr_accessor :availability
31
+
32
+ attr_accessor :min_nights
33
+
34
+ # No check-in on these nights.
35
+ attr_accessor :closed_to_arrival
36
+
37
+ # No check-out on these nights.
38
+ attr_accessor :closed_to_departure
39
+
40
+ class EnumAttributeValidator
41
+ attr_reader :datatype
42
+ attr_reader :allowable_values
43
+
44
+ def initialize(datatype, allowable_values)
45
+ @allowable_values = allowable_values.map do |value|
46
+ case datatype.to_s
47
+ when /Integer/i
48
+ value.to_i
49
+ when /Float/i
50
+ value.to_f
51
+ else
52
+ value
53
+ end
54
+ end
55
+ end
56
+
57
+ def valid?(value)
58
+ !value || allowable_values.include?(value)
59
+ end
60
+ end
61
+
62
+ # Attribute mapping from ruby-style variable name to JSON key.
63
+ def self.attribute_map
64
+ {
65
+ :'start_date' => :'start_date',
66
+ :'end_date' => :'end_date',
67
+ :'dates' => :'dates',
68
+ :'daily_price' => :'daily_price',
69
+ :'availability' => :'availability',
70
+ :'min_nights' => :'min_nights',
71
+ :'closed_to_arrival' => :'closed_to_arrival',
72
+ :'closed_to_departure' => :'closed_to_departure'
73
+ }
74
+ end
75
+
76
+ # Returns attribute mapping this model knows about
77
+ def self.acceptable_attribute_map
78
+ attribute_map
79
+ end
80
+
81
+ # Returns all the JSON keys this model knows about
82
+ def self.acceptable_attributes
83
+ acceptable_attribute_map.values
84
+ end
85
+
86
+ # Attribute type mapping.
87
+ def self.openapi_types
88
+ {
89
+ :'start_date' => :'Date',
90
+ :'end_date' => :'Date',
91
+ :'dates' => :'Array<String>',
92
+ :'daily_price' => :'Float',
93
+ :'availability' => :'String',
94
+ :'min_nights' => :'Integer',
95
+ :'closed_to_arrival' => :'Boolean',
96
+ :'closed_to_departure' => :'Boolean'
97
+ }
98
+ end
99
+
100
+ # List of attributes with nullable: true
101
+ def self.openapi_nullable
102
+ Set.new([
103
+ ])
104
+ end
105
+
106
+ # Initializes the object
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ def initialize(attributes = {})
109
+ if (!attributes.is_a?(Hash))
110
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::UpdateVrboListingAvailabilityRequestOperationsInner` initialize method"
111
+ end
112
+
113
+ # check to see if the attribute exists and convert string to symbol for hash key
114
+ acceptable_attribute_map = self.class.acceptable_attribute_map
115
+ attributes = attributes.each_with_object({}) { |(k, v), h|
116
+ if (!acceptable_attribute_map.key?(k.to_sym))
117
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::UpdateVrboListingAvailabilityRequestOperationsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
118
+ end
119
+ h[k.to_sym] = v
120
+ }
121
+
122
+ if attributes.key?(:'start_date')
123
+ self.start_date = attributes[:'start_date']
124
+ end
125
+
126
+ if attributes.key?(:'end_date')
127
+ self.end_date = attributes[:'end_date']
128
+ end
129
+
130
+ if attributes.key?(:'dates')
131
+ if (value = attributes[:'dates']).is_a?(Array)
132
+ self.dates = value
133
+ end
134
+ end
135
+
136
+ if attributes.key?(:'daily_price')
137
+ self.daily_price = attributes[:'daily_price']
138
+ end
139
+
140
+ if attributes.key?(:'availability')
141
+ self.availability = attributes[:'availability']
142
+ end
143
+
144
+ if attributes.key?(:'min_nights')
145
+ self.min_nights = attributes[:'min_nights']
146
+ end
147
+
148
+ if attributes.key?(:'closed_to_arrival')
149
+ self.closed_to_arrival = attributes[:'closed_to_arrival']
150
+ end
151
+
152
+ if attributes.key?(:'closed_to_departure')
153
+ self.closed_to_departure = attributes[:'closed_to_departure']
154
+ end
155
+ end
156
+
157
+ # Show invalid properties with the reasons. Usually used together with valid?
158
+ # @return Array for valid properties with the reasons
159
+ def list_invalid_properties
160
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
161
+ invalid_properties = Array.new
162
+ if !@daily_price.nil? && @daily_price <= 0
163
+ invalid_properties.push('invalid value for "daily_price", must be greater than 0.')
164
+ end
165
+
166
+ if !@min_nights.nil? && @min_nights > 365
167
+ invalid_properties.push('invalid value for "min_nights", must be smaller than or equal to 365.')
168
+ end
169
+
170
+ if !@min_nights.nil? && @min_nights < 1
171
+ invalid_properties.push('invalid value for "min_nights", must be greater than or equal to 1.')
172
+ end
173
+
174
+ invalid_properties
175
+ end
176
+
177
+ # Check to see if the all the properties in the model are valid
178
+ # @return true if the model is valid
179
+ def valid?
180
+ warn '[DEPRECATED] the `valid?` method is obsolete'
181
+ return false if !@daily_price.nil? && @daily_price <= 0
182
+ availability_validator = EnumAttributeValidator.new('String', ["available", "unavailable"])
183
+ return false unless availability_validator.valid?(@availability)
184
+ return false if !@min_nights.nil? && @min_nights > 365
185
+ return false if !@min_nights.nil? && @min_nights < 1
186
+ true
187
+ end
188
+
189
+ # Custom attribute writer method with validation
190
+ # @param [Object] daily_price Value to be assigned
191
+ def daily_price=(daily_price)
192
+ if daily_price.nil?
193
+ fail ArgumentError, 'daily_price cannot be nil'
194
+ end
195
+
196
+ if daily_price <= 0
197
+ fail ArgumentError, 'invalid value for "daily_price", must be greater than 0.'
198
+ end
199
+
200
+ @daily_price = daily_price
201
+ end
202
+
203
+ # Custom attribute writer method checking allowed values (enum).
204
+ # @param [Object] availability Object to be assigned
205
+ def availability=(availability)
206
+ validator = EnumAttributeValidator.new('String', ["available", "unavailable"])
207
+ unless validator.valid?(availability)
208
+ fail ArgumentError, "invalid value for \"availability\", must be one of #{validator.allowable_values}."
209
+ end
210
+ @availability = availability
211
+ end
212
+
213
+ # Custom attribute writer method with validation
214
+ # @param [Object] min_nights Value to be assigned
215
+ def min_nights=(min_nights)
216
+ if min_nights.nil?
217
+ fail ArgumentError, 'min_nights cannot be nil'
218
+ end
219
+
220
+ if min_nights > 365
221
+ fail ArgumentError, 'invalid value for "min_nights", must be smaller than or equal to 365.'
222
+ end
223
+
224
+ if min_nights < 1
225
+ fail ArgumentError, 'invalid value for "min_nights", must be greater than or equal to 1.'
226
+ end
227
+
228
+ @min_nights = min_nights
229
+ end
230
+
231
+ # Checks equality by comparing each attribute.
232
+ # @param [Object] Object to be compared
233
+ def ==(o)
234
+ return true if self.equal?(o)
235
+ self.class == o.class &&
236
+ start_date == o.start_date &&
237
+ end_date == o.end_date &&
238
+ dates == o.dates &&
239
+ daily_price == o.daily_price &&
240
+ availability == o.availability &&
241
+ min_nights == o.min_nights &&
242
+ closed_to_arrival == o.closed_to_arrival &&
243
+ closed_to_departure == o.closed_to_departure
244
+ end
245
+
246
+ # @see the `==` method
247
+ # @param [Object] Object to be compared
248
+ def eql?(o)
249
+ self == o
250
+ end
251
+
252
+ # Calculates hash code according to all attributes.
253
+ # @return [Integer] Hash code
254
+ def hash
255
+ [start_date, end_date, dates, daily_price, availability, min_nights, closed_to_arrival, closed_to_departure].hash
256
+ end
257
+
258
+ # Builds the object from hash
259
+ # @param [Hash] attributes Model attributes in the form of hash
260
+ # @return [Object] Returns the model itself
261
+ def self.build_from_hash(attributes)
262
+ return nil unless attributes.is_a?(Hash)
263
+ attributes = attributes.transform_keys(&:to_sym)
264
+ transformed_hash = {}
265
+ openapi_types.each_pair do |key, type|
266
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
267
+ transformed_hash["#{key}"] = nil
268
+ elsif type =~ /\AArray<(.*)>/i
269
+ # check to ensure the input is an array given that the attribute
270
+ # is documented as an array but the input is not
271
+ if attributes[attribute_map[key]].is_a?(Array)
272
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
273
+ end
274
+ elsif !attributes[attribute_map[key]].nil?
275
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
276
+ end
277
+ end
278
+ new(transformed_hash)
279
+ end
280
+
281
+ # Returns the object in the form of hash
282
+ # @return [Hash] Returns the object in the form of hash
283
+ def to_hash
284
+ hash = {}
285
+ self.class.attribute_map.each_pair do |attr, param|
286
+ value = self.send(attr)
287
+ if value.nil?
288
+ is_nullable = self.class.openapi_nullable.include?(attr)
289
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
290
+ end
291
+
292
+ hash[param] = _to_hash(value)
293
+ end
294
+ hash
295
+ end
296
+
297
+ end
298
+
299
+ end