repull 0.2.55 → 0.2.57

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 (89) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +539 -2
  3. data/lib/repull/api/connect_api.rb +2 -2
  4. data/lib/repull/api/listings_api.rb +70 -0
  5. data/lib/repull/api/reservations_api.rb +4 -4
  6. data/lib/repull/api/reviews_api.rb +6 -6
  7. data/lib/repull/api/vrbo_api.rb +1174 -97
  8. data/lib/repull/models/create_vrbo_alteration200_response.rb +157 -0
  9. data/lib/repull/models/create_vrbo_alteration200_response_data.rb +202 -0
  10. data/lib/repull/models/create_vrbo_alteration200_response_data_before.rb +201 -0
  11. data/lib/repull/models/create_vrbo_alteration200_response_data_due_date.rb +168 -0
  12. data/lib/repull/models/create_vrbo_alteration200_response_data_payment.rb +168 -0
  13. data/lib/repull/models/create_vrbo_alteration200_response_data_payment_lines_inner.rb +157 -0
  14. data/lib/repull/models/create_vrbo_alteration200_response_data_payment_total.rb +159 -0
  15. data/lib/repull/models/create_vrbo_alteration201_response.rb +157 -0
  16. data/lib/repull/models/create_vrbo_alteration201_response_data.rb +193 -0
  17. data/lib/repull/models/create_vrbo_alteration_request.rb +305 -0
  18. data/lib/repull/models/create_vrbo_offer201_response.rb +104 -0
  19. data/lib/repull/models/create_vrbo_offer201_response_one_of.rb +175 -0
  20. data/lib/repull/models/create_vrbo_offer_request.rb +320 -0
  21. data/lib/repull/models/create_vrbo_offer_request_fees_inner.rb +199 -0
  22. data/lib/repull/models/create_vrbo_offer_request_guest_details.rb +278 -0
  23. data/lib/repull/models/get_airbnb_house_rules200_response.rb +190 -0
  24. data/lib/repull/models/get_airbnb_house_rules200_response_data.rb +247 -0
  25. data/lib/repull/models/get_airbnb_house_rules200_response_data_children.rb +148 -0
  26. data/lib/repull/models/get_airbnb_house_rules200_response_data_house_rules_inner.rb +168 -0
  27. data/lib/repull/models/get_airbnb_listing_cancellation200_response.rb +190 -0
  28. data/lib/repull/models/get_airbnb_listing_cancellation200_response_data.rb +203 -0
  29. data/lib/repull/models/get_airbnb_listing_cancellation200_response_data_non_refundable.rb +192 -0
  30. data/lib/repull/models/get_airbnb_listing_fees200_response.rb +192 -0
  31. data/lib/repull/models/get_airbnb_listing_fees200_response_data_inner.rb +251 -0
  32. data/lib/repull/models/get_airbnb_listing_taxes200_response.rb +192 -0
  33. data/lib/repull/models/get_airbnb_listing_taxes200_response_data_inner.rb +181 -0
  34. data/lib/repull/models/get_airbnb_location200_response.rb +190 -0
  35. data/lib/repull/models/get_airbnb_location200_response_data.rb +197 -0
  36. data/lib/repull/models/get_airbnb_location200_response_data_address.rb +198 -0
  37. data/lib/repull/models/get_vrbo_listing200_response_data_inner.rb +1 -1
  38. data/lib/repull/models/get_vrbo_listing_settings200_response.rb +217 -0
  39. data/lib/repull/models/get_vrbo_listing_settings200_response_data.rb +106 -0
  40. data/lib/repull/models/get_vrbo_listing_settings200_response_data_one_of.rb +149 -0
  41. data/lib/repull/models/get_vrbo_offer200_response.rb +290 -0
  42. data/lib/repull/models/get_vrbo_offer200_response_fees_inner.rb +166 -0
  43. data/lib/repull/models/get_vrbo_reservation200_response.rb +175 -0
  44. data/lib/repull/models/get_vrbo_reservation200_response_data.rb +310 -0
  45. data/lib/repull/models/get_vrbo_reservation200_response_data_available_actions_inner.rb +156 -0
  46. data/lib/repull/models/get_vrbo_reservation200_response_data_freshness.rb +219 -0
  47. data/lib/repull/models/get_vrbo_reservation200_response_data_freshness_accounts_inner.rb +174 -0
  48. data/lib/repull/models/get_vrbo_thread200_response.rb +159 -0
  49. data/lib/repull/models/list_vrbo_thread_messages200_response.rb +170 -0
  50. data/lib/repull/models/list_vrbo_thread_messages200_response_data_inner.rb +240 -0
  51. data/lib/repull/models/list_vrbo_threads200_response.rb +172 -0
  52. data/lib/repull/models/list_vrbo_threads200_response_data_inner.rb +219 -0
  53. data/lib/repull/models/list_vrbo_transactions200_response.rb +167 -0
  54. data/lib/repull/models/list_vrbo_transactions200_response_data_freshness.rb +220 -0
  55. data/lib/repull/models/list_vrbo_transactions200_response_data_inner.rb +362 -0
  56. data/lib/repull/models/list_vrbo_transactions200_response_data_inner_payout.rb +189 -0
  57. data/lib/repull/models/map_vrbo_listing_request.rb +1 -1
  58. data/lib/repull/models/pull_listing_from_vrbo200_response.rb +273 -0
  59. data/lib/repull/models/pull_listing_from_vrbo_request.rb +149 -0
  60. data/lib/repull/models/send_vrbo_message_request.rb +186 -0
  61. data/lib/repull/models/submit_guest_review200_response.rb +26 -4
  62. data/lib/repull/models/submit_vrbo_guest_review200_response.rb +176 -0
  63. data/lib/repull/models/submit_vrbo_guest_review_request.rb +195 -0
  64. data/lib/repull/models/submit_vrbo_guest_review_request_category_ratings_inner.rb +218 -0
  65. data/lib/repull/models/sync_vrbo_transactions200_response.rb +167 -0
  66. data/lib/repull/models/sync_vrbo_transactions200_response_accounts_inner.rb +183 -0
  67. data/lib/repull/models/sync_vrbo_transactions200_response_accounts_inner_error.rb +156 -0
  68. data/lib/repull/models/sync_vrbo_transactions_request.rb +156 -0
  69. data/lib/repull/models/update_airbnb_house_rules200_response.rb +187 -0
  70. data/lib/repull/models/update_airbnb_house_rules_request.rb +191 -0
  71. data/lib/repull/models/update_airbnb_listing_cancellation200_response.rb +147 -0
  72. data/lib/repull/models/update_airbnb_listing_cancellation200_response_data.rb +158 -0
  73. data/lib/repull/models/update_airbnb_listing_cancellation_request.rb +201 -0
  74. data/lib/repull/models/update_airbnb_listing_cancellation_request_non_refundable.rb +182 -0
  75. data/lib/repull/models/update_airbnb_listing_fees200_response.rb +150 -0
  76. data/lib/repull/models/update_airbnb_listing_fees_request.rb +175 -0
  77. data/lib/repull/models/vrbo_login200_response.rb +2 -2
  78. data/lib/repull/models/vrbo_login_request.rb +13 -3
  79. data/lib/repull/models/vrbo_reservation_action200_response.rb +166 -0
  80. data/lib/repull/models/vrbo_reservation_action200_response_data.rb +215 -0
  81. data/lib/repull/models/vrbo_reservation_action200_response_data_payment.rb +169 -0
  82. data/lib/repull/models/vrbo_reservation_action200_response_data_penalties.rb +168 -0
  83. data/lib/repull/models/vrbo_reservation_action200_response_data_terms_inner.rb +158 -0
  84. data/lib/repull/models/vrbo_reservation_action_request.rb +268 -0
  85. data/lib/repull/models/withdraw_vrbo_offer200_response.rb +165 -0
  86. data/lib/repull/version.rb +1 -1
  87. data/lib/repull.rb +73 -0
  88. data/openapi/v1.json +4689 -202
  89. metadata +75 -2
@@ -0,0 +1,305 @@
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 CreateVrboAlterationRequest < ApiModelBase
18
+ attr_accessor :confirmation_code
19
+
20
+ attr_accessor :check_in
21
+
22
+ attr_accessor :check_out
23
+
24
+ attr_accessor :check_in_time
25
+
26
+ attr_accessor :check_out_time
27
+
28
+ attr_accessor :number_of_adults
29
+
30
+ attr_accessor :number_of_children
31
+
32
+ attr_accessor :pets
33
+
34
+ # The new rent for the stay, in the booking's currency; Vrbo adds its fees and taxes.
35
+ attr_accessor :rent_amount
36
+
37
+ # Change the stay without changing what the guest pays.
38
+ attr_accessor :keep_original_price
39
+
40
+ # When the guest must pay any difference (Vrbo's default otherwise).
41
+ attr_accessor :payment_due_date
42
+
43
+ # Vrbo's dry run only: nothing is changed.
44
+ attr_accessor :preview
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'confirmation_code' => :'confirmation_code',
50
+ :'check_in' => :'check_in',
51
+ :'check_out' => :'check_out',
52
+ :'check_in_time' => :'check_in_time',
53
+ :'check_out_time' => :'check_out_time',
54
+ :'number_of_adults' => :'number_of_adults',
55
+ :'number_of_children' => :'number_of_children',
56
+ :'pets' => :'pets',
57
+ :'rent_amount' => :'rent_amount',
58
+ :'keep_original_price' => :'keep_original_price',
59
+ :'payment_due_date' => :'payment_due_date',
60
+ :'preview' => :'preview'
61
+ }
62
+ end
63
+
64
+ # Returns attribute mapping this model knows about
65
+ def self.acceptable_attribute_map
66
+ attribute_map
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ acceptable_attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'confirmation_code' => :'String',
78
+ :'check_in' => :'Date',
79
+ :'check_out' => :'Date',
80
+ :'check_in_time' => :'String',
81
+ :'check_out_time' => :'String',
82
+ :'number_of_adults' => :'Integer',
83
+ :'number_of_children' => :'Integer',
84
+ :'pets' => :'Boolean',
85
+ :'rent_amount' => :'Float',
86
+ :'keep_original_price' => :'Boolean',
87
+ :'payment_due_date' => :'Date',
88
+ :'preview' => :'Boolean'
89
+ }
90
+ end
91
+
92
+ # List of attributes with nullable: true
93
+ def self.openapi_nullable
94
+ Set.new([
95
+ ])
96
+ end
97
+
98
+ # Initializes the object
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ def initialize(attributes = {})
101
+ if (!attributes.is_a?(Hash))
102
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::CreateVrboAlterationRequest` initialize method"
103
+ end
104
+
105
+ # check to see if the attribute exists and convert string to symbol for hash key
106
+ acceptable_attribute_map = self.class.acceptable_attribute_map
107
+ attributes = attributes.each_with_object({}) { |(k, v), h|
108
+ if (!acceptable_attribute_map.key?(k.to_sym))
109
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::CreateVrboAlterationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
110
+ end
111
+ h[k.to_sym] = v
112
+ }
113
+
114
+ if attributes.key?(:'confirmation_code')
115
+ self.confirmation_code = attributes[:'confirmation_code']
116
+ else
117
+ self.confirmation_code = nil
118
+ end
119
+
120
+ if attributes.key?(:'check_in')
121
+ self.check_in = attributes[:'check_in']
122
+ end
123
+
124
+ if attributes.key?(:'check_out')
125
+ self.check_out = attributes[:'check_out']
126
+ end
127
+
128
+ if attributes.key?(:'check_in_time')
129
+ self.check_in_time = attributes[:'check_in_time']
130
+ end
131
+
132
+ if attributes.key?(:'check_out_time')
133
+ self.check_out_time = attributes[:'check_out_time']
134
+ end
135
+
136
+ if attributes.key?(:'number_of_adults')
137
+ self.number_of_adults = attributes[:'number_of_adults']
138
+ end
139
+
140
+ if attributes.key?(:'number_of_children')
141
+ self.number_of_children = attributes[:'number_of_children']
142
+ end
143
+
144
+ if attributes.key?(:'pets')
145
+ self.pets = attributes[:'pets']
146
+ end
147
+
148
+ if attributes.key?(:'rent_amount')
149
+ self.rent_amount = attributes[:'rent_amount']
150
+ end
151
+
152
+ if attributes.key?(:'keep_original_price')
153
+ self.keep_original_price = attributes[:'keep_original_price']
154
+ end
155
+
156
+ if attributes.key?(:'payment_due_date')
157
+ self.payment_due_date = attributes[:'payment_due_date']
158
+ end
159
+
160
+ if attributes.key?(:'preview')
161
+ self.preview = attributes[:'preview']
162
+ end
163
+ end
164
+
165
+ # Show invalid properties with the reasons. Usually used together with valid?
166
+ # @return Array for valid properties with the reasons
167
+ def list_invalid_properties
168
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
169
+ invalid_properties = Array.new
170
+ if @confirmation_code.nil?
171
+ invalid_properties.push('invalid value for "confirmation_code", confirmation_code cannot be nil.')
172
+ end
173
+
174
+ if !@number_of_adults.nil? && @number_of_adults < 1
175
+ invalid_properties.push('invalid value for "number_of_adults", must be greater than or equal to 1.')
176
+ end
177
+
178
+ if !@number_of_children.nil? && @number_of_children < 0
179
+ invalid_properties.push('invalid value for "number_of_children", must be greater than or equal to 0.')
180
+ end
181
+
182
+ invalid_properties
183
+ end
184
+
185
+ # Check to see if the all the properties in the model are valid
186
+ # @return true if the model is valid
187
+ def valid?
188
+ warn '[DEPRECATED] the `valid?` method is obsolete'
189
+ return false if @confirmation_code.nil?
190
+ return false if !@number_of_adults.nil? && @number_of_adults < 1
191
+ return false if !@number_of_children.nil? && @number_of_children < 0
192
+ true
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] confirmation_code Value to be assigned
197
+ def confirmation_code=(confirmation_code)
198
+ if confirmation_code.nil?
199
+ fail ArgumentError, 'confirmation_code cannot be nil'
200
+ end
201
+
202
+ @confirmation_code = confirmation_code
203
+ end
204
+
205
+ # Custom attribute writer method with validation
206
+ # @param [Object] number_of_adults Value to be assigned
207
+ def number_of_adults=(number_of_adults)
208
+ if number_of_adults.nil?
209
+ fail ArgumentError, 'number_of_adults cannot be nil'
210
+ end
211
+
212
+ if number_of_adults < 1
213
+ fail ArgumentError, 'invalid value for "number_of_adults", must be greater than or equal to 1.'
214
+ end
215
+
216
+ @number_of_adults = number_of_adults
217
+ end
218
+
219
+ # Custom attribute writer method with validation
220
+ # @param [Object] number_of_children Value to be assigned
221
+ def number_of_children=(number_of_children)
222
+ if number_of_children.nil?
223
+ fail ArgumentError, 'number_of_children cannot be nil'
224
+ end
225
+
226
+ if number_of_children < 0
227
+ fail ArgumentError, 'invalid value for "number_of_children", must be greater than or equal to 0.'
228
+ end
229
+
230
+ @number_of_children = number_of_children
231
+ end
232
+
233
+ # Checks equality by comparing each attribute.
234
+ # @param [Object] Object to be compared
235
+ def ==(o)
236
+ return true if self.equal?(o)
237
+ self.class == o.class &&
238
+ confirmation_code == o.confirmation_code &&
239
+ check_in == o.check_in &&
240
+ check_out == o.check_out &&
241
+ check_in_time == o.check_in_time &&
242
+ check_out_time == o.check_out_time &&
243
+ number_of_adults == o.number_of_adults &&
244
+ number_of_children == o.number_of_children &&
245
+ pets == o.pets &&
246
+ rent_amount == o.rent_amount &&
247
+ keep_original_price == o.keep_original_price &&
248
+ payment_due_date == o.payment_due_date &&
249
+ preview == o.preview
250
+ end
251
+
252
+ # @see the `==` method
253
+ # @param [Object] Object to be compared
254
+ def eql?(o)
255
+ self == o
256
+ end
257
+
258
+ # Calculates hash code according to all attributes.
259
+ # @return [Integer] Hash code
260
+ def hash
261
+ [confirmation_code, check_in, check_out, check_in_time, check_out_time, number_of_adults, number_of_children, pets, rent_amount, keep_original_price, payment_due_date, preview].hash
262
+ end
263
+
264
+ # Builds the object from hash
265
+ # @param [Hash] attributes Model attributes in the form of hash
266
+ # @return [Object] Returns the model itself
267
+ def self.build_from_hash(attributes)
268
+ return nil unless attributes.is_a?(Hash)
269
+ attributes = attributes.transform_keys(&:to_sym)
270
+ transformed_hash = {}
271
+ openapi_types.each_pair do |key, type|
272
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
273
+ transformed_hash["#{key}"] = nil
274
+ elsif type =~ /\AArray<(.*)>/i
275
+ # check to ensure the input is an array given that the attribute
276
+ # is documented as an array but the input is not
277
+ if attributes[attribute_map[key]].is_a?(Array)
278
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
279
+ end
280
+ elsif !attributes[attribute_map[key]].nil?
281
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
282
+ end
283
+ end
284
+ new(transformed_hash)
285
+ end
286
+
287
+ # Returns the object in the form of hash
288
+ # @return [Hash] Returns the object in the form of hash
289
+ def to_hash
290
+ hash = {}
291
+ self.class.attribute_map.each_pair do |attr, param|
292
+ value = self.send(attr)
293
+ if value.nil?
294
+ is_nullable = self.class.openapi_nullable.include?(attr)
295
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
296
+ end
297
+
298
+ hash[param] = _to_hash(value)
299
+ end
300
+ hash
301
+ end
302
+
303
+ end
304
+
305
+ end
@@ -0,0 +1,104 @@
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
+ module CreateVrboOffer201Response
18
+ class << self
19
+ # List of class defined in oneOf (OpenAPI v3)
20
+ def openapi_one_of
21
+ [
22
+ :'CreateVrboOffer201ResponseOneOf',
23
+ :'GetVrboOffer200Response'
24
+ ]
25
+ end
26
+
27
+ # Builds the object
28
+ # @param [Mixed] Data to be matched against the list of oneOf items
29
+ # @return [Object] Returns the model or the data itself
30
+ def build(data)
31
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
32
+ # Note:
33
+ # - We do not attempt to check whether exactly one item matches.
34
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
35
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
36
+ # - TODO: scalar values are de facto behaving as if they were nullable.
37
+ # - TODO: logging when debugging is set.
38
+ openapi_one_of.each do |klass|
39
+ begin
40
+ next if klass == :AnyType # "nullable: true"
41
+ return find_and_cast_into_type(klass, data)
42
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
43
+ end
44
+ end
45
+
46
+ openapi_one_of.include?(:AnyType) ? data : nil
47
+ end
48
+
49
+ private
50
+
51
+ SchemaMismatchError = Class.new(StandardError)
52
+
53
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
54
+ def find_and_cast_into_type(klass, data)
55
+ return if data.nil?
56
+
57
+ case klass.to_s
58
+ when 'Boolean'
59
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
60
+ when 'Float'
61
+ return data if data.instance_of?(Float)
62
+ when 'Integer'
63
+ return data if data.instance_of?(Integer)
64
+ when 'Time'
65
+ return Time.parse(data)
66
+ when 'Date'
67
+ return Date.iso8601(data)
68
+ when 'String'
69
+ return data if data.instance_of?(String)
70
+ when 'Object' # "type: object"
71
+ return data if data.instance_of?(Hash)
72
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
73
+ if data.instance_of?(Array)
74
+ sub_type = Regexp.last_match[:sub_type]
75
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
76
+ end
77
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
78
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
79
+ sub_type = Regexp.last_match[:sub_type]
80
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
81
+ end
82
+ else # model
83
+ const = Repull.const_get(klass)
84
+ if const
85
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
86
+ model = const.build(data)
87
+ return model if model
88
+ else
89
+ # raise if data contains keys that are not known to the model
90
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
91
+ model = const.build_from_hash(data)
92
+ return model if model
93
+ end
94
+ end
95
+ end
96
+
97
+ raise # if no match by now, raise
98
+ rescue
99
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
100
+ end
101
+ end
102
+ end
103
+
104
+ end
@@ -0,0 +1,175 @@
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 CreateVrboOffer201ResponseOneOf < ApiModelBase
18
+ attr_accessor :conversation_id
19
+
20
+ attr_accessor :channel
21
+
22
+ attr_accessor :status
23
+
24
+ attr_accessor :message
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'conversation_id' => :'conversationId',
30
+ :'channel' => :'channel',
31
+ :'status' => :'status',
32
+ :'message' => :'message'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'conversation_id' => :'String',
50
+ :'channel' => :'String',
51
+ :'status' => :'String',
52
+ :'message' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'message'
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::CreateVrboOffer201ResponseOneOf` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ acceptable_attribute_map = self.class.acceptable_attribute_map
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!acceptable_attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::CreateVrboOffer201ResponseOneOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'conversation_id')
80
+ self.conversation_id = attributes[:'conversation_id']
81
+ end
82
+
83
+ if attributes.key?(:'channel')
84
+ self.channel = attributes[:'channel']
85
+ end
86
+
87
+ if attributes.key?(:'status')
88
+ self.status = attributes[:'status']
89
+ end
90
+
91
+ if attributes.key?(:'message')
92
+ self.message = attributes[:'message']
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
+ true
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ conversation_id == o.conversation_id &&
117
+ channel == o.channel &&
118
+ status == o.status &&
119
+ message == o.message
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [conversation_id, channel, status, message].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ attributes = attributes.transform_keys(&:to_sym)
140
+ transformed_hash = {}
141
+ openapi_types.each_pair do |key, type|
142
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = nil
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[attribute_map[key]].is_a?(Array)
148
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
+ end
150
+ elsif !attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
+ end
153
+ end
154
+ new(transformed_hash)
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ if value.nil?
164
+ is_nullable = self.class.openapi_nullable.include?(attr)
165
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
166
+ end
167
+
168
+ hash[param] = _to_hash(value)
169
+ end
170
+ hash
171
+ end
172
+
173
+ end
174
+
175
+ end