repull 0.2.0

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 (222) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +10 -0
  3. data/LICENSE +21 -0
  4. data/README.md +121 -0
  5. data/Rakefile +10 -0
  6. data/examples/connect_airbnb.rb +33 -0
  7. data/examples/quickstart.rb +22 -0
  8. data/lib/repull/api/ai_api.rb +86 -0
  9. data/lib/repull/api/airbnb_api.rb +1155 -0
  10. data/lib/repull/api/atlas_api.rb +194 -0
  11. data/lib/repull/api/availability_api.rb +167 -0
  12. data/lib/repull/api/billing_api.rb +139 -0
  13. data/lib/repull/api/booking_com_api.rb +617 -0
  14. data/lib/repull/api/connect_api.rb +672 -0
  15. data/lib/repull/api/conversations_api.rb +263 -0
  16. data/lib/repull/api/guests_api.rb +171 -0
  17. data/lib/repull/api/listings_api.rb +509 -0
  18. data/lib/repull/api/markets_api.rb +320 -0
  19. data/lib/repull/api/plumguide_api.rb +299 -0
  20. data/lib/repull/api/pricing_api.rb +453 -0
  21. data/lib/repull/api/properties_api.rb +166 -0
  22. data/lib/repull/api/reservations_api.rb +387 -0
  23. data/lib/repull/api/reviews_api.rb +208 -0
  24. data/lib/repull/api/schema_api.rb +347 -0
  25. data/lib/repull/api/system_api.rb +79 -0
  26. data/lib/repull/api/vrbo_api.rb +262 -0
  27. data/lib/repull/api/webhooks_api.rb +867 -0
  28. data/lib/repull/api_client.rb +397 -0
  29. data/lib/repull/api_error.rb +58 -0
  30. data/lib/repull/api_model_base.rb +88 -0
  31. data/lib/repull/configuration.rb +313 -0
  32. data/lib/repull/models/ai_operation.rb +158 -0
  33. data/lib/repull/models/airbnb_listing.rb +229 -0
  34. data/lib/repull/models/airbnb_listing_list_response.rb +158 -0
  35. data/lib/repull/models/airbnb_reservation.rb +224 -0
  36. data/lib/repull/models/airbnb_reservation_list_response.rb +158 -0
  37. data/lib/repull/models/airbnb_review.rb +222 -0
  38. data/lib/repull/models/airbnb_review_list_response.rb +158 -0
  39. data/lib/repull/models/airbnb_thread.rb +188 -0
  40. data/lib/repull/models/airbnb_thread_list_response.rb +158 -0
  41. data/lib/repull/models/booking_connect_listing_option.rb +201 -0
  42. data/lib/repull/models/booking_connect_room.rb +251 -0
  43. data/lib/repull/models/booking_connect_rooms_response.rb +274 -0
  44. data/lib/repull/models/booking_conversation.rb +178 -0
  45. data/lib/repull/models/booking_conversation_list_response.rb +158 -0
  46. data/lib/repull/models/booking_pricing_rate_update.rb +310 -0
  47. data/lib/repull/models/booking_pricing_rate_update_date_range.rb +190 -0
  48. data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +179 -0
  49. data/lib/repull/models/booking_pricing_response.rb +157 -0
  50. data/lib/repull/models/booking_pricing_update_request.rb +176 -0
  51. data/lib/repull/models/booking_pricing_update_response.rb +199 -0
  52. data/lib/repull/models/booking_property.rb +188 -0
  53. data/lib/repull/models/booking_property_list_response.rb +158 -0
  54. data/lib/repull/models/booking_room_mapping.rb +177 -0
  55. data/lib/repull/models/booking_verify_hotel_request.rb +193 -0
  56. data/lib/repull/models/booking_verify_hotel_response.rb +285 -0
  57. data/lib/repull/models/bulk_pricing_failure.rb +177 -0
  58. data/lib/repull/models/bulk_pricing_item.rb +202 -0
  59. data/lib/repull/models/bulk_pricing_request.rb +212 -0
  60. data/lib/repull/models/bulk_pricing_response.rb +170 -0
  61. data/lib/repull/models/calendar_day.rb +174 -0
  62. data/lib/repull/models/calendar_response.rb +149 -0
  63. data/lib/repull/models/connect_host.rb +194 -0
  64. data/lib/repull/models/connect_provider.rb +365 -0
  65. data/lib/repull/models/connect_provider_list_response.rb +149 -0
  66. data/lib/repull/models/connect_session.rb +228 -0
  67. data/lib/repull/models/connect_status.rb +207 -0
  68. data/lib/repull/models/connection.rb +195 -0
  69. data/lib/repull/models/connection_list_response.rb +158 -0
  70. data/lib/repull/models/conversation.rb +257 -0
  71. data/lib/repull/models/conversation_detail.rb +284 -0
  72. data/lib/repull/models/conversation_guest.rb +178 -0
  73. data/lib/repull/models/conversation_guest_contact.rb +174 -0
  74. data/lib/repull/models/conversation_host.rb +186 -0
  75. data/lib/repull/models/conversation_list_response.rb +159 -0
  76. data/lib/repull/models/conversation_message_attachment.rb +174 -0
  77. data/lib/repull/models/create_ai_operation200_response.rb +156 -0
  78. data/lib/repull/models/create_billing_checkout_request.rb +181 -0
  79. data/lib/repull/models/create_connect_session_request.rb +189 -0
  80. data/lib/repull/models/create_connection_request.rb +225 -0
  81. data/lib/repull/models/create_reservation_request.rb +313 -0
  82. data/lib/repull/models/create_webhook_request.rb +211 -0
  83. data/lib/repull/models/custom_schema.rb +303 -0
  84. data/lib/repull/models/custom_schema_create.rb +253 -0
  85. data/lib/repull/models/custom_schema_create_response.rb +300 -0
  86. data/lib/repull/models/custom_schema_delete_response.rb +164 -0
  87. data/lib/repull/models/custom_schema_list_response.rb +159 -0
  88. data/lib/repull/models/custom_schema_summary.rb +300 -0
  89. data/lib/repull/models/custom_schema_update.rb +199 -0
  90. data/lib/repull/models/error.rb +165 -0
  91. data/lib/repull/models/error_error.rb +357 -0
  92. data/lib/repull/models/error_error_support.rb +167 -0
  93. data/lib/repull/models/get_health200_response.rb +156 -0
  94. data/lib/repull/models/guest.rb +271 -0
  95. data/lib/repull/models/guest_contact.rb +186 -0
  96. data/lib/repull/models/guest_flag.rb +179 -0
  97. data/lib/repull/models/guest_list_response.rb +159 -0
  98. data/lib/repull/models/guest_note.rb +187 -0
  99. data/lib/repull/models/guest_profile.rb +337 -0
  100. data/lib/repull/models/guest_reservations_summary.rb +175 -0
  101. data/lib/repull/models/listing.rb +216 -0
  102. data/lib/repull/models/listing_address.rb +158 -0
  103. data/lib/repull/models/listing_channel.rb +176 -0
  104. data/lib/repull/models/listing_comp.rb +272 -0
  105. data/lib/repull/models/listing_comp_nightly.rb +166 -0
  106. data/lib/repull/models/listing_comp_ratings.rb +157 -0
  107. data/lib/repull/models/listing_comps_response.rb +197 -0
  108. data/lib/repull/models/listing_content.rb +249 -0
  109. data/lib/repull/models/listing_create_request.rb +364 -0
  110. data/lib/repull/models/listing_create_response.rb +148 -0
  111. data/lib/repull/models/listing_generate_content_request.rb +192 -0
  112. data/lib/repull/models/listing_generate_content_response.rb +165 -0
  113. data/lib/repull/models/listing_list_response.rb +158 -0
  114. data/lib/repull/models/listing_pricing_apply_request.rb +193 -0
  115. data/lib/repull/models/listing_pricing_apply_response.rb +169 -0
  116. data/lib/repull/models/listing_pricing_history_entry.rb +212 -0
  117. data/lib/repull/models/listing_pricing_history_response.rb +159 -0
  118. data/lib/repull/models/listing_pricing_recommendation.rb +269 -0
  119. data/lib/repull/models/listing_pricing_response.rb +187 -0
  120. data/lib/repull/models/listing_pricing_response_comp_summary.rb +178 -0
  121. data/lib/repull/models/listing_pricing_response_date_range.rb +156 -0
  122. data/lib/repull/models/listing_pricing_response_listing.rb +191 -0
  123. data/lib/repull/models/listing_pricing_strategy.rb +317 -0
  124. data/lib/repull/models/listing_pricing_strategy_input.rb +264 -0
  125. data/lib/repull/models/listing_publish_airbnb_request.rb +171 -0
  126. data/lib/repull/models/listing_publish_response.rb +166 -0
  127. data/lib/repull/models/listing_publish_status_channel.rb +197 -0
  128. data/lib/repull/models/listing_publish_status_response.rb +158 -0
  129. data/lib/repull/models/listing_quality_tier.rb +175 -0
  130. data/lib/repull/models/listing_segment.rb +229 -0
  131. data/lib/repull/models/listing_segment_recommendation.rb +170 -0
  132. data/lib/repull/models/listing_segments_response.rb +230 -0
  133. data/lib/repull/models/listing_segments_response_scope.rb +159 -0
  134. data/lib/repull/models/map_connect_booking_rooms_request.rb +202 -0
  135. data/lib/repull/models/map_connect_booking_rooms_response.rb +243 -0
  136. data/lib/repull/models/market_browse_category.rb +158 -0
  137. data/lib/repull/models/market_browse_entry.rb +197 -0
  138. data/lib/repull/models/market_browse_featured.rb +188 -0
  139. data/lib/repull/models/market_browse_response.rb +158 -0
  140. data/lib/repull/models/market_calendar_day.rb +257 -0
  141. data/lib/repull/models/market_calendar_day_events_inner.rb +177 -0
  142. data/lib/repull/models/market_calendar_response.rb +178 -0
  143. data/lib/repull/models/market_detail_response.rb +269 -0
  144. data/lib/repull/models/market_detail_response_price_distribution_inner.rb +186 -0
  145. data/lib/repull/models/market_detail_response_property_type_mix_inner.rb +166 -0
  146. data/lib/repull/models/market_detail_response_supply_trend_inner.rb +156 -0
  147. data/lib/repull/models/market_detail_response_top_comps.rb +187 -0
  148. data/lib/repull/models/market_event.rb +257 -0
  149. data/lib/repull/models/market_my_listing.rb +242 -0
  150. data/lib/repull/models/market_summary.rb +259 -0
  151. data/lib/repull/models/market_top_comp.rb +275 -0
  152. data/lib/repull/models/markets_overview_response.rb +219 -0
  153. data/lib/repull/models/markets_overview_response_browse.rb +173 -0
  154. data/lib/repull/models/markets_overview_response_subscriptions.rb +157 -0
  155. data/lib/repull/models/markets_overview_response_totals.rb +165 -0
  156. data/lib/repull/models/message.rb +289 -0
  157. data/lib/repull/models/message_list_response.rb +159 -0
  158. data/lib/repull/models/pagination.rb +188 -0
  159. data/lib/repull/models/plumguide_listing.rb +167 -0
  160. data/lib/repull/models/plumguide_listing_list_response.rb +158 -0
  161. data/lib/repull/models/property.rb +271 -0
  162. data/lib/repull/models/property_list_response.rb +158 -0
  163. data/lib/repull/models/reservation.rb +457 -0
  164. data/lib/repull/models/reservation_list_response.rb +159 -0
  165. data/lib/repull/models/review.rb +357 -0
  166. data/lib/repull/models/review_category.rb +169 -0
  167. data/lib/repull/models/review_list_response.rb +159 -0
  168. data/lib/repull/models/review_response.rb +158 -0
  169. data/lib/repull/models/rotate_webhook_secret200_response.rb +165 -0
  170. data/lib/repull/models/select_connect_provider_request.rb +165 -0
  171. data/lib/repull/models/select_provider_response.rb +176 -0
  172. data/lib/repull/models/test_webhook_request.rb +165 -0
  173. data/lib/repull/models/update_availability_request.rb +149 -0
  174. data/lib/repull/models/update_listing_pricing_strategy200_response.rb +147 -0
  175. data/lib/repull/models/update_reservation_request.rb +174 -0
  176. data/lib/repull/models/update_webhook_request.rb +211 -0
  177. data/lib/repull/models/vrbo_listing.rb +167 -0
  178. data/lib/repull/models/vrbo_listing_list_response.rb +158 -0
  179. data/lib/repull/models/vrbo_reservation.rb +185 -0
  180. data/lib/repull/models/vrbo_reservation_list_response.rb +158 -0
  181. data/lib/repull/models/webhook_delivery.rb +243 -0
  182. data/lib/repull/models/webhook_delivery_detail.rb +261 -0
  183. data/lib/repull/models/webhook_delivery_list_response.rb +158 -0
  184. data/lib/repull/models/webhook_event_catalog.rb +149 -0
  185. data/lib/repull/models/webhook_event_catalog_domains_inner.rb +167 -0
  186. data/lib/repull/models/webhook_event_catalog_domains_inner_events_inner.rb +183 -0
  187. data/lib/repull/models/webhook_list_response.rb +158 -0
  188. data/lib/repull/models/webhook_subscription.rb +294 -0
  189. data/lib/repull/version.rb +15 -0
  190. data/lib/repull.rb +217 -0
  191. data/openapi/v1.json +8923 -0
  192. data/repull.gemspec +43 -0
  193. data/scripts/regen.sh +55 -0
  194. data/spec/api/ai_api_spec.rb +47 -0
  195. data/spec/api/airbnb_api_spec.rb +238 -0
  196. data/spec/api/availability_api_spec.rb +62 -0
  197. data/spec/api/billing_api_spec.rb +57 -0
  198. data/spec/api/booking_com_api_spec.rb +115 -0
  199. data/spec/api/connect_api_spec.rb +82 -0
  200. data/spec/api/conversations_api_spec.rb +68 -0
  201. data/spec/api/guests_api_spec.rb +59 -0
  202. data/spec/api/plumguide_api_spec.rb +85 -0
  203. data/spec/api/properties_api_spec.rb +60 -0
  204. data/spec/api/reservations_api_spec.rb +97 -0
  205. data/spec/api/system_api_spec.rb +45 -0
  206. data/spec/api/vrbo_api_spec.rb +55 -0
  207. data/spec/api/webhooks_api_spec.rb +69 -0
  208. data/spec/models/ai_operation_spec.rb +46 -0
  209. data/spec/models/calendar_day_spec.rb +54 -0
  210. data/spec/models/connect_host_spec.rb +60 -0
  211. data/spec/models/connect_status_spec.rb +76 -0
  212. data/spec/models/connection_spec.rb +70 -0
  213. data/spec/models/conversation_spec.rb +66 -0
  214. data/spec/models/error_error_spec.rb +54 -0
  215. data/spec/models/error_spec.rb +36 -0
  216. data/spec/models/guest_spec.rb +72 -0
  217. data/spec/models/message_spec.rb +70 -0
  218. data/spec/models/property_spec.rb +114 -0
  219. data/spec/models/reservation_spec.rb +128 -0
  220. data/spec/models/webhook_subscription_spec.rb +60 -0
  221. data/spec/spec_helper.rb +111 -0
  222. metadata +337 -0
@@ -0,0 +1,275 @@
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_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## 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`, `pro`, `enterprise`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields.
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 MarketTopComp < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :platform_listing_id
21
+
22
+ attr_accessor :title
23
+
24
+ attr_accessor :property_type
25
+
26
+ attr_accessor :bedrooms
27
+
28
+ attr_accessor :max_guests
29
+
30
+ attr_accessor :rating
31
+
32
+ attr_accessor :review_count
33
+
34
+ attr_accessor :current_nightly_rate
35
+
36
+ attr_accessor :thumbnail_url
37
+
38
+ attr_accessor :lat
39
+
40
+ attr_accessor :lng
41
+
42
+ attr_accessor :url
43
+
44
+ attr_accessor :distance_km
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'id' => :'id',
50
+ :'platform_listing_id' => :'platformListingId',
51
+ :'title' => :'title',
52
+ :'property_type' => :'propertyType',
53
+ :'bedrooms' => :'bedrooms',
54
+ :'max_guests' => :'maxGuests',
55
+ :'rating' => :'rating',
56
+ :'review_count' => :'reviewCount',
57
+ :'current_nightly_rate' => :'currentNightlyRate',
58
+ :'thumbnail_url' => :'thumbnailUrl',
59
+ :'lat' => :'lat',
60
+ :'lng' => :'lng',
61
+ :'url' => :'url',
62
+ :'distance_km' => :'distanceKm'
63
+ }
64
+ end
65
+
66
+ # Returns attribute mapping this model knows about
67
+ def self.acceptable_attribute_map
68
+ attribute_map
69
+ end
70
+
71
+ # Returns all the JSON keys this model knows about
72
+ def self.acceptable_attributes
73
+ acceptable_attribute_map.values
74
+ end
75
+
76
+ # Attribute type mapping.
77
+ def self.openapi_types
78
+ {
79
+ :'id' => :'String',
80
+ :'platform_listing_id' => :'String',
81
+ :'title' => :'String',
82
+ :'property_type' => :'String',
83
+ :'bedrooms' => :'Integer',
84
+ :'max_guests' => :'Integer',
85
+ :'rating' => :'Float',
86
+ :'review_count' => :'Integer',
87
+ :'current_nightly_rate' => :'Float',
88
+ :'thumbnail_url' => :'String',
89
+ :'lat' => :'Float',
90
+ :'lng' => :'Float',
91
+ :'url' => :'String',
92
+ :'distance_km' => :'Float'
93
+ }
94
+ end
95
+
96
+ # List of attributes with nullable: true
97
+ def self.openapi_nullable
98
+ Set.new([
99
+ :'title',
100
+ :'property_type',
101
+ :'bedrooms',
102
+ :'max_guests',
103
+ :'rating',
104
+ :'review_count',
105
+ :'current_nightly_rate',
106
+ :'thumbnail_url',
107
+ :'lat',
108
+ :'lng',
109
+ :'distance_km'
110
+ ])
111
+ end
112
+
113
+ # Initializes the object
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ def initialize(attributes = {})
116
+ if (!attributes.is_a?(Hash))
117
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::MarketTopComp` initialize method"
118
+ end
119
+
120
+ # check to see if the attribute exists and convert string to symbol for hash key
121
+ acceptable_attribute_map = self.class.acceptable_attribute_map
122
+ attributes = attributes.each_with_object({}) { |(k, v), h|
123
+ if (!acceptable_attribute_map.key?(k.to_sym))
124
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::MarketTopComp`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
125
+ end
126
+ h[k.to_sym] = v
127
+ }
128
+
129
+ if attributes.key?(:'id')
130
+ self.id = attributes[:'id']
131
+ end
132
+
133
+ if attributes.key?(:'platform_listing_id')
134
+ self.platform_listing_id = attributes[:'platform_listing_id']
135
+ end
136
+
137
+ if attributes.key?(:'title')
138
+ self.title = attributes[:'title']
139
+ end
140
+
141
+ if attributes.key?(:'property_type')
142
+ self.property_type = attributes[:'property_type']
143
+ end
144
+
145
+ if attributes.key?(:'bedrooms')
146
+ self.bedrooms = attributes[:'bedrooms']
147
+ end
148
+
149
+ if attributes.key?(:'max_guests')
150
+ self.max_guests = attributes[:'max_guests']
151
+ end
152
+
153
+ if attributes.key?(:'rating')
154
+ self.rating = attributes[:'rating']
155
+ end
156
+
157
+ if attributes.key?(:'review_count')
158
+ self.review_count = attributes[:'review_count']
159
+ end
160
+
161
+ if attributes.key?(:'current_nightly_rate')
162
+ self.current_nightly_rate = attributes[:'current_nightly_rate']
163
+ end
164
+
165
+ if attributes.key?(:'thumbnail_url')
166
+ self.thumbnail_url = attributes[:'thumbnail_url']
167
+ end
168
+
169
+ if attributes.key?(:'lat')
170
+ self.lat = attributes[:'lat']
171
+ end
172
+
173
+ if attributes.key?(:'lng')
174
+ self.lng = attributes[:'lng']
175
+ end
176
+
177
+ if attributes.key?(:'url')
178
+ self.url = attributes[:'url']
179
+ end
180
+
181
+ if attributes.key?(:'distance_km')
182
+ self.distance_km = attributes[:'distance_km']
183
+ end
184
+ end
185
+
186
+ # Show invalid properties with the reasons. Usually used together with valid?
187
+ # @return Array for valid properties with the reasons
188
+ def list_invalid_properties
189
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
190
+ invalid_properties = Array.new
191
+ invalid_properties
192
+ end
193
+
194
+ # Check to see if the all the properties in the model are valid
195
+ # @return true if the model is valid
196
+ def valid?
197
+ warn '[DEPRECATED] the `valid?` method is obsolete'
198
+ true
199
+ end
200
+
201
+ # Checks equality by comparing each attribute.
202
+ # @param [Object] Object to be compared
203
+ def ==(o)
204
+ return true if self.equal?(o)
205
+ self.class == o.class &&
206
+ id == o.id &&
207
+ platform_listing_id == o.platform_listing_id &&
208
+ title == o.title &&
209
+ property_type == o.property_type &&
210
+ bedrooms == o.bedrooms &&
211
+ max_guests == o.max_guests &&
212
+ rating == o.rating &&
213
+ review_count == o.review_count &&
214
+ current_nightly_rate == o.current_nightly_rate &&
215
+ thumbnail_url == o.thumbnail_url &&
216
+ lat == o.lat &&
217
+ lng == o.lng &&
218
+ url == o.url &&
219
+ distance_km == o.distance_km
220
+ end
221
+
222
+ # @see the `==` method
223
+ # @param [Object] Object to be compared
224
+ def eql?(o)
225
+ self == o
226
+ end
227
+
228
+ # Calculates hash code according to all attributes.
229
+ # @return [Integer] Hash code
230
+ def hash
231
+ [id, platform_listing_id, title, property_type, bedrooms, max_guests, rating, review_count, current_nightly_rate, thumbnail_url, lat, lng, url, distance_km].hash
232
+ end
233
+
234
+ # Builds the object from hash
235
+ # @param [Hash] attributes Model attributes in the form of hash
236
+ # @return [Object] Returns the model itself
237
+ def self.build_from_hash(attributes)
238
+ return nil unless attributes.is_a?(Hash)
239
+ attributes = attributes.transform_keys(&:to_sym)
240
+ transformed_hash = {}
241
+ openapi_types.each_pair do |key, type|
242
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
243
+ transformed_hash["#{key}"] = nil
244
+ elsif type =~ /\AArray<(.*)>/i
245
+ # check to ensure the input is an array given that the attribute
246
+ # is documented as an array but the input is not
247
+ if attributes[attribute_map[key]].is_a?(Array)
248
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
249
+ end
250
+ elsif !attributes[attribute_map[key]].nil?
251
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
252
+ end
253
+ end
254
+ new(transformed_hash)
255
+ end
256
+
257
+ # Returns the object in the form of hash
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_hash
260
+ hash = {}
261
+ self.class.attribute_map.each_pair do |attr, param|
262
+ value = self.send(attr)
263
+ if value.nil?
264
+ is_nullable = self.class.openapi_nullable.include?(attr)
265
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
266
+ end
267
+
268
+ hash[param] = _to_hash(value)
269
+ end
270
+ hash
271
+ end
272
+
273
+ end
274
+
275
+ end
@@ -0,0 +1,219 @@
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_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## 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`, `pro`, `enterprise`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields.
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
+ # Overview of every market the customer operates in, plus auxiliary discovery slices. Wraps the canonical `{ data, pagination }` envelope around the per-city KPI list (`data`) so SDK consumers see the same shape they get from every other list endpoint. Auxiliary fields (`totals`, `myListings`, `browse`, `freeMarket`, `subscriptions`, `tier`) are returned as siblings because they are NOT paginated. The overview returns every market in one shot — `nextCursor` is always `null` and `hasMore` is always `false`.
18
+ class MarketsOverviewResponse < ApiModelBase
19
+ # Per-city KPIs for every market the customer operates in.
20
+ attr_accessor :data
21
+
22
+ attr_accessor :pagination
23
+
24
+ attr_accessor :totals
25
+
26
+ attr_accessor :my_listings
27
+
28
+ # City auto-assigned as the customer's free market (largest by listing count). Null for customers with no listings.
29
+ attr_accessor :free_market
30
+
31
+ attr_accessor :subscriptions
32
+
33
+ # Resolved Repull tier (free / pro / scale).
34
+ attr_accessor :tier
35
+
36
+ attr_accessor :browse
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'data' => :'data',
42
+ :'pagination' => :'pagination',
43
+ :'totals' => :'totals',
44
+ :'my_listings' => :'myListings',
45
+ :'free_market' => :'freeMarket',
46
+ :'subscriptions' => :'subscriptions',
47
+ :'tier' => :'tier',
48
+ :'browse' => :'browse'
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
+ :'data' => :'Array<MarketSummary>',
66
+ :'pagination' => :'Pagination',
67
+ :'totals' => :'MarketsOverviewResponseTotals',
68
+ :'my_listings' => :'Array<MarketMyListing>',
69
+ :'free_market' => :'String',
70
+ :'subscriptions' => :'MarketsOverviewResponseSubscriptions',
71
+ :'tier' => :'String',
72
+ :'browse' => :'MarketsOverviewResponseBrowse'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ :'free_market',
80
+ ])
81
+ end
82
+
83
+ # Initializes the object
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ def initialize(attributes = {})
86
+ if (!attributes.is_a?(Hash))
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::MarketsOverviewResponse` initialize method"
88
+ end
89
+
90
+ # check to see if the attribute exists and convert string to symbol for hash key
91
+ acceptable_attribute_map = self.class.acceptable_attribute_map
92
+ attributes = attributes.each_with_object({}) { |(k, v), h|
93
+ if (!acceptable_attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::MarketsOverviewResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
95
+ end
96
+ h[k.to_sym] = v
97
+ }
98
+
99
+ if attributes.key?(:'data')
100
+ if (value = attributes[:'data']).is_a?(Array)
101
+ self.data = value
102
+ end
103
+ end
104
+
105
+ if attributes.key?(:'pagination')
106
+ self.pagination = attributes[:'pagination']
107
+ end
108
+
109
+ if attributes.key?(:'totals')
110
+ self.totals = attributes[:'totals']
111
+ end
112
+
113
+ if attributes.key?(:'my_listings')
114
+ if (value = attributes[:'my_listings']).is_a?(Array)
115
+ self.my_listings = value
116
+ end
117
+ end
118
+
119
+ if attributes.key?(:'free_market')
120
+ self.free_market = attributes[:'free_market']
121
+ end
122
+
123
+ if attributes.key?(:'subscriptions')
124
+ self.subscriptions = attributes[:'subscriptions']
125
+ end
126
+
127
+ if attributes.key?(:'tier')
128
+ self.tier = attributes[:'tier']
129
+ end
130
+
131
+ if attributes.key?(:'browse')
132
+ self.browse = attributes[:'browse']
133
+ end
134
+ end
135
+
136
+ # Show invalid properties with the reasons. Usually used together with valid?
137
+ # @return Array for valid properties with the reasons
138
+ def list_invalid_properties
139
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
140
+ invalid_properties = Array.new
141
+ invalid_properties
142
+ end
143
+
144
+ # Check to see if the all the properties in the model are valid
145
+ # @return true if the model is valid
146
+ def valid?
147
+ warn '[DEPRECATED] the `valid?` method is obsolete'
148
+ true
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ data == o.data &&
157
+ pagination == o.pagination &&
158
+ totals == o.totals &&
159
+ my_listings == o.my_listings &&
160
+ free_market == o.free_market &&
161
+ subscriptions == o.subscriptions &&
162
+ tier == o.tier &&
163
+ browse == o.browse
164
+ end
165
+
166
+ # @see the `==` method
167
+ # @param [Object] Object to be compared
168
+ def eql?(o)
169
+ self == o
170
+ end
171
+
172
+ # Calculates hash code according to all attributes.
173
+ # @return [Integer] Hash code
174
+ def hash
175
+ [data, pagination, totals, my_listings, free_market, subscriptions, tier, browse].hash
176
+ end
177
+
178
+ # Builds the object from hash
179
+ # @param [Hash] attributes Model attributes in the form of hash
180
+ # @return [Object] Returns the model itself
181
+ def self.build_from_hash(attributes)
182
+ return nil unless attributes.is_a?(Hash)
183
+ attributes = attributes.transform_keys(&:to_sym)
184
+ transformed_hash = {}
185
+ openapi_types.each_pair do |key, type|
186
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
187
+ transformed_hash["#{key}"] = nil
188
+ elsif type =~ /\AArray<(.*)>/i
189
+ # check to ensure the input is an array given that the attribute
190
+ # is documented as an array but the input is not
191
+ if attributes[attribute_map[key]].is_a?(Array)
192
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
193
+ end
194
+ elsif !attributes[attribute_map[key]].nil?
195
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
196
+ end
197
+ end
198
+ new(transformed_hash)
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ end
218
+
219
+ end
@@ -0,0 +1,173 @@
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_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## 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`, `pro`, `enterprise`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields.
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
+ # Lightweight discovery summary. Use `/v1/markets/browse` for the full paginated catalog.
18
+ class MarketsOverviewResponseBrowse < ApiModelBase
19
+ # Top ~50 markets by listing volume the customer doesn't already operate in.
20
+ attr_accessor :featured
21
+
22
+ # Top 50 countries by tracked-city count.
23
+ attr_accessor :categories
24
+
25
+ # Total Atlas-tracked cities in the catalog.
26
+ attr_accessor :total_available
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'featured' => :'featured',
32
+ :'categories' => :'categories',
33
+ :'total_available' => :'totalAvailable'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'featured' => :'Array<MarketBrowseFeatured>',
51
+ :'categories' => :'Array<MarketBrowseCategory>',
52
+ :'total_available' => :'Integer'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::MarketsOverviewResponseBrowse` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::MarketsOverviewResponseBrowse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'featured')
79
+ if (value = attributes[:'featured']).is_a?(Array)
80
+ self.featured = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'categories')
85
+ if (value = attributes[:'categories']).is_a?(Array)
86
+ self.categories = value
87
+ end
88
+ end
89
+
90
+ if attributes.key?(:'total_available')
91
+ self.total_available = attributes[:'total_available']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ featured == o.featured &&
116
+ categories == o.categories &&
117
+ total_available == o.total_available
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [featured, categories, total_available].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ attributes = attributes.transform_keys(&:to_sym)
138
+ transformed_hash = {}
139
+ openapi_types.each_pair do |key, type|
140
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = nil
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[attribute_map[key]].is_a?(Array)
146
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
+ end
148
+ elsif !attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
150
+ end
151
+ end
152
+ new(transformed_hash)
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ if value.nil?
162
+ is_nullable = self.class.openapi_nullable.include?(attr)
163
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
164
+ end
165
+
166
+ hash[param] = _to_hash(value)
167
+ end
168
+ hash
169
+ end
170
+
171
+ end
172
+
173
+ end