repull 0.2.42 → 0.2.43

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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +2 -2
  3. data/lib/repull/api/listings_api.rb +146 -6
  4. data/lib/repull/api/reservations_api.rb +93 -0
  5. data/lib/repull/models/account_disconnected_payload.rb +3 -2
  6. data/lib/repull/models/get_listing_markups200_response.rb +15 -4
  7. data/lib/repull/models/get_listing_markups200_response_vrbo_inner.rb +181 -0
  8. data/lib/repull/models/get_reservation_summary200_response.rb +353 -0
  9. data/lib/repull/models/get_reservation_summary200_response_totals_inner.rb +478 -0
  10. data/lib/repull/models/get_vrbo_publish_job200_response.rb +199 -0
  11. data/lib/repull/models/get_vrbo_publish_job200_response_job.rb +300 -0
  12. data/lib/repull/models/get_vrbo_publish_job200_response_job_rejected_photos_inner.rb +157 -0
  13. data/lib/repull/models/map_connect_booking_rooms_response.rb +44 -5
  14. data/lib/repull/models/message.rb +29 -5
  15. data/lib/repull/models/message_actor.rb +159 -0
  16. data/lib/repull/models/message_reaction.rb +178 -0
  17. data/lib/repull/models/publish_listing_to_vrbo_request.rb +158 -0
  18. data/lib/repull/models/reservation.rb +12 -1
  19. data/lib/repull/models/reservation_message_reaction_event.rb +281 -0
  20. data/lib/repull/models/reservation_message_reaction_payload.rb +225 -0
  21. data/lib/repull/models/reservation_message_reaction_payload_reaction.rb +175 -0
  22. data/lib/repull/models/reservation_message_read_event.rb +281 -0
  23. data/lib/repull/models/reservation_message_read_payload.rb +227 -0
  24. data/lib/repull/models/reservation_message_updated_payload.rb +1 -1
  25. data/lib/repull/models/set_listing_markup_request.rb +16 -6
  26. data/lib/repull/models/update_airbnb_message_request.rb +1 -1
  27. data/lib/repull/models/webhook_event.rb +4 -0
  28. data/lib/repull/models/webhook_event_type.rb +3 -1
  29. data/lib/repull/version.rb +1 -1
  30. data/lib/repull.rb +14 -0
  31. data/openapi/v1.json +1055 -14
  32. data/scripts/regen.sh +1 -1
  33. metadata +16 -2
@@ -0,0 +1,478 @@
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 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`, or upgrade at `https://repull.dev/dashboard/billing` to activate them all. 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\").
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 GetReservationSummary200ResponseTotalsInner < ApiModelBase
18
+ # Present when grouped by `month` (YYYY-MM).
19
+ attr_accessor :month
20
+
21
+ # Present when grouped by `listing`.
22
+ attr_accessor :listing_id
23
+
24
+ # Present when grouped by `listing`.
25
+ attr_accessor :listing_name
26
+
27
+ # Present when grouped by `channel`.
28
+ attr_accessor :channel
29
+
30
+ # Money is never added across currencies: a period with two currencies has one row per currency.
31
+ attr_accessor :currency
32
+
33
+ # Guest stays with at least one night counted (owner stays are in `ownerStays`).
34
+ attr_accessor :reservations
35
+
36
+ # Guest nights counted.
37
+ attr_accessor :nights
38
+
39
+ # What guests paid (`financials.totalPrice`). With `basis=stay`, a stay that crosses the window or a month edge brings only the share of its nights inside.
40
+ attr_accessor :revenue
41
+
42
+ # What the host receives (`financials.host.revenue`), for reservations where it is known.
43
+ attr_accessor :payout
44
+
45
+ # How many reservations `payout` covers.
46
+ attr_accessor :reservations_with_payout
47
+
48
+ # Accommodation per night (revenue per night when the accommodation subtotal is unknown).
49
+ attr_accessor :average_nightly_rate
50
+
51
+ attr_accessor :average_stay_nights
52
+
53
+ # Days between booking and check-in.
54
+ attr_accessor :average_lead_time_days
55
+
56
+ # Guest nights / available nights, 0–1. Only with `basis=stay`, and not when grouped by `channel`. Blocked nights are not subtracted from availability.
57
+ attr_accessor :occupancy
58
+
59
+ # Active listings × days in the period (one listing per row when grouped by `listing`).
60
+ attr_accessor :available_nights
61
+
62
+ attr_accessor :cancelled
63
+
64
+ attr_accessor :cancelled_revenue
65
+
66
+ # Requests awaiting an answer; not in revenue or nights.
67
+ attr_accessor :pending
68
+
69
+ attr_accessor :owner_stays
70
+
71
+ attr_accessor :owner_nights
72
+
73
+ # Attribute mapping from ruby-style variable name to JSON key.
74
+ def self.attribute_map
75
+ {
76
+ :'month' => :'month',
77
+ :'listing_id' => :'listingId',
78
+ :'listing_name' => :'listingName',
79
+ :'channel' => :'channel',
80
+ :'currency' => :'currency',
81
+ :'reservations' => :'reservations',
82
+ :'nights' => :'nights',
83
+ :'revenue' => :'revenue',
84
+ :'payout' => :'payout',
85
+ :'reservations_with_payout' => :'reservationsWithPayout',
86
+ :'average_nightly_rate' => :'averageNightlyRate',
87
+ :'average_stay_nights' => :'averageStayNights',
88
+ :'average_lead_time_days' => :'averageLeadTimeDays',
89
+ :'occupancy' => :'occupancy',
90
+ :'available_nights' => :'availableNights',
91
+ :'cancelled' => :'cancelled',
92
+ :'cancelled_revenue' => :'cancelledRevenue',
93
+ :'pending' => :'pending',
94
+ :'owner_stays' => :'ownerStays',
95
+ :'owner_nights' => :'ownerNights'
96
+ }
97
+ end
98
+
99
+ # Returns attribute mapping this model knows about
100
+ def self.acceptable_attribute_map
101
+ attribute_map
102
+ end
103
+
104
+ # Returns all the JSON keys this model knows about
105
+ def self.acceptable_attributes
106
+ acceptable_attribute_map.values
107
+ end
108
+
109
+ # Attribute type mapping.
110
+ def self.openapi_types
111
+ {
112
+ :'month' => :'String',
113
+ :'listing_id' => :'String',
114
+ :'listing_name' => :'String',
115
+ :'channel' => :'String',
116
+ :'currency' => :'String',
117
+ :'reservations' => :'Integer',
118
+ :'nights' => :'Integer',
119
+ :'revenue' => :'Float',
120
+ :'payout' => :'Float',
121
+ :'reservations_with_payout' => :'Integer',
122
+ :'average_nightly_rate' => :'Float',
123
+ :'average_stay_nights' => :'Float',
124
+ :'average_lead_time_days' => :'Float',
125
+ :'occupancy' => :'Float',
126
+ :'available_nights' => :'Float',
127
+ :'cancelled' => :'Integer',
128
+ :'cancelled_revenue' => :'Float',
129
+ :'pending' => :'Integer',
130
+ :'owner_stays' => :'Integer',
131
+ :'owner_nights' => :'Integer'
132
+ }
133
+ end
134
+
135
+ # List of attributes with nullable: true
136
+ def self.openapi_nullable
137
+ Set.new([
138
+ :'listing_name',
139
+ :'currency',
140
+ :'average_nightly_rate',
141
+ :'average_stay_nights',
142
+ :'average_lead_time_days',
143
+ :'occupancy',
144
+ :'available_nights',
145
+ ])
146
+ end
147
+
148
+ # Initializes the object
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ def initialize(attributes = {})
151
+ if (!attributes.is_a?(Hash))
152
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetReservationSummary200ResponseTotalsInner` initialize method"
153
+ end
154
+
155
+ # check to see if the attribute exists and convert string to symbol for hash key
156
+ acceptable_attribute_map = self.class.acceptable_attribute_map
157
+ attributes = attributes.each_with_object({}) { |(k, v), h|
158
+ if (!acceptable_attribute_map.key?(k.to_sym))
159
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetReservationSummary200ResponseTotalsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
160
+ end
161
+ h[k.to_sym] = v
162
+ }
163
+
164
+ if attributes.key?(:'month')
165
+ self.month = attributes[:'month']
166
+ end
167
+
168
+ if attributes.key?(:'listing_id')
169
+ self.listing_id = attributes[:'listing_id']
170
+ end
171
+
172
+ if attributes.key?(:'listing_name')
173
+ self.listing_name = attributes[:'listing_name']
174
+ end
175
+
176
+ if attributes.key?(:'channel')
177
+ self.channel = attributes[:'channel']
178
+ end
179
+
180
+ if attributes.key?(:'currency')
181
+ self.currency = attributes[:'currency']
182
+ else
183
+ self.currency = nil
184
+ end
185
+
186
+ if attributes.key?(:'reservations')
187
+ self.reservations = attributes[:'reservations']
188
+ else
189
+ self.reservations = nil
190
+ end
191
+
192
+ if attributes.key?(:'nights')
193
+ self.nights = attributes[:'nights']
194
+ else
195
+ self.nights = nil
196
+ end
197
+
198
+ if attributes.key?(:'revenue')
199
+ self.revenue = attributes[:'revenue']
200
+ else
201
+ self.revenue = nil
202
+ end
203
+
204
+ if attributes.key?(:'payout')
205
+ self.payout = attributes[:'payout']
206
+ else
207
+ self.payout = nil
208
+ end
209
+
210
+ if attributes.key?(:'reservations_with_payout')
211
+ self.reservations_with_payout = attributes[:'reservations_with_payout']
212
+ end
213
+
214
+ if attributes.key?(:'average_nightly_rate')
215
+ self.average_nightly_rate = attributes[:'average_nightly_rate']
216
+ end
217
+
218
+ if attributes.key?(:'average_stay_nights')
219
+ self.average_stay_nights = attributes[:'average_stay_nights']
220
+ end
221
+
222
+ if attributes.key?(:'average_lead_time_days')
223
+ self.average_lead_time_days = attributes[:'average_lead_time_days']
224
+ end
225
+
226
+ if attributes.key?(:'occupancy')
227
+ self.occupancy = attributes[:'occupancy']
228
+ end
229
+
230
+ if attributes.key?(:'available_nights')
231
+ self.available_nights = attributes[:'available_nights']
232
+ end
233
+
234
+ if attributes.key?(:'cancelled')
235
+ self.cancelled = attributes[:'cancelled']
236
+ else
237
+ self.cancelled = nil
238
+ end
239
+
240
+ if attributes.key?(:'cancelled_revenue')
241
+ self.cancelled_revenue = attributes[:'cancelled_revenue']
242
+ end
243
+
244
+ if attributes.key?(:'pending')
245
+ self.pending = attributes[:'pending']
246
+ else
247
+ self.pending = nil
248
+ end
249
+
250
+ if attributes.key?(:'owner_stays')
251
+ self.owner_stays = attributes[:'owner_stays']
252
+ else
253
+ self.owner_stays = nil
254
+ end
255
+
256
+ if attributes.key?(:'owner_nights')
257
+ self.owner_nights = attributes[:'owner_nights']
258
+ else
259
+ self.owner_nights = nil
260
+ end
261
+ end
262
+
263
+ # Show invalid properties with the reasons. Usually used together with valid?
264
+ # @return Array for valid properties with the reasons
265
+ def list_invalid_properties
266
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
267
+ invalid_properties = Array.new
268
+ if @reservations.nil?
269
+ invalid_properties.push('invalid value for "reservations", reservations cannot be nil.')
270
+ end
271
+
272
+ if @nights.nil?
273
+ invalid_properties.push('invalid value for "nights", nights cannot be nil.')
274
+ end
275
+
276
+ if @revenue.nil?
277
+ invalid_properties.push('invalid value for "revenue", revenue cannot be nil.')
278
+ end
279
+
280
+ if @payout.nil?
281
+ invalid_properties.push('invalid value for "payout", payout cannot be nil.')
282
+ end
283
+
284
+ if @cancelled.nil?
285
+ invalid_properties.push('invalid value for "cancelled", cancelled cannot be nil.')
286
+ end
287
+
288
+ if @pending.nil?
289
+ invalid_properties.push('invalid value for "pending", pending cannot be nil.')
290
+ end
291
+
292
+ if @owner_stays.nil?
293
+ invalid_properties.push('invalid value for "owner_stays", owner_stays cannot be nil.')
294
+ end
295
+
296
+ if @owner_nights.nil?
297
+ invalid_properties.push('invalid value for "owner_nights", owner_nights cannot be nil.')
298
+ end
299
+
300
+ invalid_properties
301
+ end
302
+
303
+ # Check to see if the all the properties in the model are valid
304
+ # @return true if the model is valid
305
+ def valid?
306
+ warn '[DEPRECATED] the `valid?` method is obsolete'
307
+ return false if @reservations.nil?
308
+ return false if @nights.nil?
309
+ return false if @revenue.nil?
310
+ return false if @payout.nil?
311
+ return false if @cancelled.nil?
312
+ return false if @pending.nil?
313
+ return false if @owner_stays.nil?
314
+ return false if @owner_nights.nil?
315
+ true
316
+ end
317
+
318
+ # Custom attribute writer method with validation
319
+ # @param [Object] reservations Value to be assigned
320
+ def reservations=(reservations)
321
+ if reservations.nil?
322
+ fail ArgumentError, 'reservations cannot be nil'
323
+ end
324
+
325
+ @reservations = reservations
326
+ end
327
+
328
+ # Custom attribute writer method with validation
329
+ # @param [Object] nights Value to be assigned
330
+ def nights=(nights)
331
+ if nights.nil?
332
+ fail ArgumentError, 'nights cannot be nil'
333
+ end
334
+
335
+ @nights = nights
336
+ end
337
+
338
+ # Custom attribute writer method with validation
339
+ # @param [Object] revenue Value to be assigned
340
+ def revenue=(revenue)
341
+ if revenue.nil?
342
+ fail ArgumentError, 'revenue cannot be nil'
343
+ end
344
+
345
+ @revenue = revenue
346
+ end
347
+
348
+ # Custom attribute writer method with validation
349
+ # @param [Object] payout Value to be assigned
350
+ def payout=(payout)
351
+ if payout.nil?
352
+ fail ArgumentError, 'payout cannot be nil'
353
+ end
354
+
355
+ @payout = payout
356
+ end
357
+
358
+ # Custom attribute writer method with validation
359
+ # @param [Object] cancelled Value to be assigned
360
+ def cancelled=(cancelled)
361
+ if cancelled.nil?
362
+ fail ArgumentError, 'cancelled cannot be nil'
363
+ end
364
+
365
+ @cancelled = cancelled
366
+ end
367
+
368
+ # Custom attribute writer method with validation
369
+ # @param [Object] pending Value to be assigned
370
+ def pending=(pending)
371
+ if pending.nil?
372
+ fail ArgumentError, 'pending cannot be nil'
373
+ end
374
+
375
+ @pending = pending
376
+ end
377
+
378
+ # Custom attribute writer method with validation
379
+ # @param [Object] owner_stays Value to be assigned
380
+ def owner_stays=(owner_stays)
381
+ if owner_stays.nil?
382
+ fail ArgumentError, 'owner_stays cannot be nil'
383
+ end
384
+
385
+ @owner_stays = owner_stays
386
+ end
387
+
388
+ # Custom attribute writer method with validation
389
+ # @param [Object] owner_nights Value to be assigned
390
+ def owner_nights=(owner_nights)
391
+ if owner_nights.nil?
392
+ fail ArgumentError, 'owner_nights cannot be nil'
393
+ end
394
+
395
+ @owner_nights = owner_nights
396
+ end
397
+
398
+ # Checks equality by comparing each attribute.
399
+ # @param [Object] Object to be compared
400
+ def ==(o)
401
+ return true if self.equal?(o)
402
+ self.class == o.class &&
403
+ month == o.month &&
404
+ listing_id == o.listing_id &&
405
+ listing_name == o.listing_name &&
406
+ channel == o.channel &&
407
+ currency == o.currency &&
408
+ reservations == o.reservations &&
409
+ nights == o.nights &&
410
+ revenue == o.revenue &&
411
+ payout == o.payout &&
412
+ reservations_with_payout == o.reservations_with_payout &&
413
+ average_nightly_rate == o.average_nightly_rate &&
414
+ average_stay_nights == o.average_stay_nights &&
415
+ average_lead_time_days == o.average_lead_time_days &&
416
+ occupancy == o.occupancy &&
417
+ available_nights == o.available_nights &&
418
+ cancelled == o.cancelled &&
419
+ cancelled_revenue == o.cancelled_revenue &&
420
+ pending == o.pending &&
421
+ owner_stays == o.owner_stays &&
422
+ owner_nights == o.owner_nights
423
+ end
424
+
425
+ # @see the `==` method
426
+ # @param [Object] Object to be compared
427
+ def eql?(o)
428
+ self == o
429
+ end
430
+
431
+ # Calculates hash code according to all attributes.
432
+ # @return [Integer] Hash code
433
+ def hash
434
+ [month, listing_id, listing_name, channel, currency, reservations, nights, revenue, payout, reservations_with_payout, average_nightly_rate, average_stay_nights, average_lead_time_days, occupancy, available_nights, cancelled, cancelled_revenue, pending, owner_stays, owner_nights].hash
435
+ end
436
+
437
+ # Builds the object from hash
438
+ # @param [Hash] attributes Model attributes in the form of hash
439
+ # @return [Object] Returns the model itself
440
+ def self.build_from_hash(attributes)
441
+ return nil unless attributes.is_a?(Hash)
442
+ attributes = attributes.transform_keys(&:to_sym)
443
+ transformed_hash = {}
444
+ openapi_types.each_pair do |key, type|
445
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
446
+ transformed_hash["#{key}"] = nil
447
+ elsif type =~ /\AArray<(.*)>/i
448
+ # check to ensure the input is an array given that the attribute
449
+ # is documented as an array but the input is not
450
+ if attributes[attribute_map[key]].is_a?(Array)
451
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
452
+ end
453
+ elsif !attributes[attribute_map[key]].nil?
454
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
455
+ end
456
+ end
457
+ new(transformed_hash)
458
+ end
459
+
460
+ # Returns the object in the form of hash
461
+ # @return [Hash] Returns the object in the form of hash
462
+ def to_hash
463
+ hash = {}
464
+ self.class.attribute_map.each_pair do |attr, param|
465
+ value = self.send(attr)
466
+ if value.nil?
467
+ is_nullable = self.class.openapi_nullable.include?(attr)
468
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
469
+ end
470
+
471
+ hash[param] = _to_hash(value)
472
+ end
473
+ hash
474
+ end
475
+
476
+ end
477
+
478
+ end
@@ -0,0 +1,199 @@
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 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`, or upgrade at `https://repull.dev/dashboard/billing` to activate them all. 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\").
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 GetVrboPublishJob200Response < ApiModelBase
18
+ attr_accessor :listing_id
19
+
20
+ attr_accessor :channel
21
+
22
+ attr_accessor :job
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'listing_id' => :'listingId',
50
+ :'channel' => :'channel',
51
+ :'job' => :'job'
52
+ }
53
+ end
54
+
55
+ # Returns attribute mapping this model knows about
56
+ def self.acceptable_attribute_map
57
+ attribute_map
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ acceptable_attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'listing_id' => :'Integer',
69
+ :'channel' => :'String',
70
+ :'job' => :'GetVrboPublishJob200ResponseJob'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetVrboPublishJob200Response` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ acceptable_attribute_map = self.class.acceptable_attribute_map
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!acceptable_attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetVrboPublishJob200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'listing_id')
97
+ self.listing_id = attributes[:'listing_id']
98
+ end
99
+
100
+ if attributes.key?(:'channel')
101
+ self.channel = attributes[:'channel']
102
+ end
103
+
104
+ if attributes.key?(:'job')
105
+ self.job = attributes[:'job']
106
+ end
107
+ end
108
+
109
+ # Show invalid properties with the reasons. Usually used together with valid?
110
+ # @return Array for valid properties with the reasons
111
+ def list_invalid_properties
112
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
113
+ invalid_properties = Array.new
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ channel_validator = EnumAttributeValidator.new('String', ["vrbo"])
122
+ return false unless channel_validator.valid?(@channel)
123
+ true
124
+ end
125
+
126
+ # Custom attribute writer method checking allowed values (enum).
127
+ # @param [Object] channel Object to be assigned
128
+ def channel=(channel)
129
+ validator = EnumAttributeValidator.new('String', ["vrbo"])
130
+ unless validator.valid?(channel)
131
+ fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
132
+ end
133
+ @channel = channel
134
+ end
135
+
136
+ # Checks equality by comparing each attribute.
137
+ # @param [Object] Object to be compared
138
+ def ==(o)
139
+ return true if self.equal?(o)
140
+ self.class == o.class &&
141
+ listing_id == o.listing_id &&
142
+ channel == o.channel &&
143
+ job == o.job
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(o)
149
+ self == o
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Integer] Hash code
154
+ def hash
155
+ [listing_id, channel, job].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def self.build_from_hash(attributes)
162
+ return nil unless attributes.is_a?(Hash)
163
+ attributes = attributes.transform_keys(&:to_sym)
164
+ transformed_hash = {}
165
+ openapi_types.each_pair do |key, type|
166
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = nil
168
+ elsif type =~ /\AArray<(.*)>/i
169
+ # check to ensure the input is an array given that the attribute
170
+ # is documented as an array but the input is not
171
+ if attributes[attribute_map[key]].is_a?(Array)
172
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
173
+ end
174
+ elsif !attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
176
+ end
177
+ end
178
+ new(transformed_hash)
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ end
198
+
199
+ end