repull 0.2.24 → 0.2.26

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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/connect_api.rb +619 -2
  3. data/lib/repull/api/connections_api.rb +312 -0
  4. data/lib/repull/api/conversations_api.rb +154 -18
  5. data/lib/repull/api/health_api.rb +5 -5
  6. data/lib/repull/api/listings_api.rb +67 -4
  7. data/lib/repull/api/properties_api.rb +3 -0
  8. data/lib/repull/api/reservations_api.rb +3 -0
  9. data/lib/repull/api/reviews_api.rb +5 -2
  10. data/lib/repull/api/vrbo_api.rb +4 -4
  11. data/lib/repull/models/apply_connection_mappings200_response.rb +167 -0
  12. data/lib/repull/models/apply_connection_mappings200_response_results_inner.rb +184 -0
  13. data/lib/repull/models/apply_connection_mappings_request.rb +175 -0
  14. data/lib/repull/models/apply_connection_mappings_request_mappings_inner.rb +193 -0
  15. data/lib/repull/models/auto_map_connection_units200_response.rb +176 -0
  16. data/lib/repull/models/auto_map_connection_units_request.rb +156 -0
  17. data/lib/repull/models/channel_market_state_item.rb +15 -4
  18. data/lib/repull/models/connect_session_completed_event.rb +281 -0
  19. data/lib/repull/models/connect_session_completed_payload.rb +210 -0
  20. data/lib/repull/models/connect_status.rb +25 -5
  21. data/lib/repull/models/connect_status_accounts_inner.rb +71 -4
  22. data/lib/repull/models/conversation.rb +12 -1
  23. data/lib/repull/models/conversation_capabilities.rb +260 -0
  24. data/lib/repull/models/conversation_detail.rb +25 -5
  25. data/lib/repull/models/create_connect_session_request.rb +24 -2
  26. data/lib/repull/models/create_connection_request.rb +8 -8
  27. data/lib/repull/models/create_conversation_special_offer201_response.rb +127 -4
  28. data/lib/repull/models/create_conversation_special_offer201_response_fees_inner.rb +166 -0
  29. data/lib/repull/models/create_conversation_special_offer201_response_lines_inner.rb +157 -0
  30. data/lib/repull/models/create_conversation_special_offer_request.rb +91 -52
  31. data/lib/repull/models/create_conversation_special_offer_request_fees_inner.rb +199 -0
  32. data/lib/repull/models/get_booking_extranet_login_config200_response.rb +147 -0
  33. data/lib/repull/models/get_booking_extranet_login_status200_response.rb +192 -0
  34. data/lib/repull/models/get_channel_health200_response.rb +190 -0
  35. data/lib/repull/models/get_channel_health200_response_vrbo.rb +197 -0
  36. data/lib/repull/models/get_connect_write_policy200_response.rb +166 -0
  37. data/lib/repull/models/get_listing_calendar_sync200_response.rb +192 -0
  38. data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner.rb +331 -0
  39. data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner_problems_inner.rb +157 -0
  40. data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner_queue.rb +212 -0
  41. data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner_queue_last_push.rb +268 -0
  42. data/lib/repull/models/invite_booking_extranet_user200_response.rb +174 -0
  43. data/lib/repull/models/invite_booking_extranet_user_request.rb +173 -0
  44. data/lib/repull/models/list_connection_units200_response.rb +242 -0
  45. data/lib/repull/models/list_connection_units200_response_listing_options_inner.rb +165 -0
  46. data/lib/repull/models/list_connection_units200_response_units_inner.rb +194 -0
  47. data/lib/repull/models/listing_publish_status_connection.rb +34 -1
  48. data/lib/repull/models/pms_write_policy.rb +191 -0
  49. data/lib/repull/models/pms_write_policy_calendar.rb +219 -0
  50. data/lib/repull/models/pms_write_policy_reservations.rb +219 -0
  51. data/lib/repull/models/preapprove_conversation201_response.rb +47 -6
  52. data/lib/repull/models/preapprove_conversation_request.rb +34 -5
  53. data/lib/repull/models/preview_conversation_special_offer_request.rb +231 -0
  54. data/lib/repull/models/preview_conversation_special_offer_request_fees_inner.rb +199 -0
  55. data/lib/repull/models/preview_conversation_special_offer_request_guests.rb +250 -0
  56. data/lib/repull/models/property.rb +14 -2
  57. data/lib/repull/models/record_account.rb +170 -0
  58. data/lib/repull/models/reply_to_review_request.rb +33 -4
  59. data/lib/repull/models/reservation.rb +12 -1
  60. data/lib/repull/models/review.rb +12 -1
  61. data/lib/repull/models/search_connect_session_listing_options200_response.rb +158 -0
  62. data/lib/repull/models/search_connect_session_listing_options200_response_data_inner.rb +166 -0
  63. data/lib/repull/models/search_connection_listing_options200_response.rb +159 -0
  64. data/lib/repull/models/send_message_request.rb +1 -1
  65. data/lib/repull/models/start_booking_extranet_login200_response.rb +174 -0
  66. data/lib/repull/models/start_booking_extranet_login_request.rb +225 -0
  67. data/lib/repull/models/submit_cloudbeds_credentials200_response.rb +10 -1
  68. data/lib/repull/models/submit_cloudbeds_credentials_request.rb +11 -1
  69. data/lib/repull/models/submit_mews_credentials200_response.rb +10 -1
  70. data/lib/repull/models/submit_mews_credentials_request.rb +11 -1
  71. data/lib/repull/models/update_connect_write_policy_request.rb +157 -0
  72. data/lib/repull/models/update_connect_write_policy_request_calendar.rb +165 -0
  73. data/lib/repull/models/update_connect_write_policy_request_reservations.rb +165 -0
  74. data/lib/repull/models/vrbo_import_status.rb +249 -0
  75. data/lib/repull/models/vrbo_login200_response.rb +235 -0
  76. data/lib/repull/models/vrbo_login_request.rb +271 -0
  77. data/lib/repull/models/webhook_event.rb +2 -0
  78. data/lib/repull/models/webhook_event_type.rb +2 -1
  79. data/lib/repull/models/withdraw_conversation_preapproval200_response.rb +226 -0
  80. data/lib/repull/models/withdraw_conversation_special_offer200_response.rb +29 -1
  81. data/lib/repull/version.rb +1 -1
  82. data/lib/repull.rb +47 -0
  83. data/openapi/v1.json +2810 -74
  84. data/scripts/regen.sh +1 -1
  85. metadata +49 -2
@@ -22,8 +22,8 @@ module Repull
22
22
  # Airbnb only — selects the OAuth scope set. 'read_only' grants read-only scopes; 'messaging' grants read scopes plus message read/send but NOT property management, so it can coexist with another app (e.g. an existing PMS) that already holds property management on the same Airbnb account; 'full_access' (default) grants full host scopes including the exclusive property management (only one app per Airbnb account can hold it). The hosted consent screen normally lets the host pick a tier; passing `accessType` explicitly fixes the tier and hides that choice, so the host can only continue with the tier you requested. Omit it to let the host choose.
23
23
  attr_accessor :access_type
24
24
 
25
- # PMS providers — API key.
26
- attr_accessor :api_key
25
+ # Airbnb + Booking.com — your own correlation token, e.g. your user id (at most 500 characters). Echoed on the redirect back (`&state=`) and in the `connect.session.completed` webhook.
26
+ attr_accessor :state
27
27
 
28
28
  # Plumguide — client ID.
29
29
  attr_accessor :client_id
@@ -61,7 +61,7 @@ module Repull
61
61
  {
62
62
  :'redirect_url' => :'redirectUrl',
63
63
  :'access_type' => :'accessType',
64
- :'api_key' => :'apiKey',
64
+ :'state' => :'state',
65
65
  :'client_id' => :'clientId',
66
66
  :'client_secret' => :'clientSecret',
67
67
  :'locale' => :'locale'
@@ -83,7 +83,7 @@ module Repull
83
83
  {
84
84
  :'redirect_url' => :'String',
85
85
  :'access_type' => :'String',
86
- :'api_key' => :'String',
86
+ :'state' => :'String',
87
87
  :'client_id' => :'String',
88
88
  :'client_secret' => :'String',
89
89
  :'locale' => :'String'
@@ -123,8 +123,8 @@ module Repull
123
123
  self.access_type = 'full_access'
124
124
  end
125
125
 
126
- if attributes.key?(:'api_key')
127
- self.api_key = attributes[:'api_key']
126
+ if attributes.key?(:'state')
127
+ self.state = attributes[:'state']
128
128
  end
129
129
 
130
130
  if attributes.key?(:'client_id')
@@ -174,7 +174,7 @@ module Repull
174
174
  self.class == o.class &&
175
175
  redirect_url == o.redirect_url &&
176
176
  access_type == o.access_type &&
177
- api_key == o.api_key &&
177
+ state == o.state &&
178
178
  client_id == o.client_id &&
179
179
  client_secret == o.client_secret &&
180
180
  locale == o.locale
@@ -189,7 +189,7 @@ module Repull
189
189
  # Calculates hash code according to all attributes.
190
190
  # @return [Integer] Hash code
191
191
  def hash
192
- [redirect_url, access_type, api_key, client_id, client_secret, locale].hash
192
+ [redirect_url, access_type, state, client_id, client_secret, locale].hash
193
193
  end
194
194
 
195
195
  # Builds the object from hash
@@ -15,13 +15,16 @@ require 'time'
15
15
 
16
16
  module Repull
17
17
  class CreateConversationSpecialOffer201Response < ApiModelBase
18
- # Airbnb special-offer id. Use it to read or withdraw the offer.
18
+ # The offer id — use it to read or withdraw the offer. Airbnb’s special-offer id; on VRBO, where a conversation has one live offer, `current`.
19
19
  attr_accessor :id
20
20
 
21
21
  # Repull conversation id the offer was sent on.
22
22
  attr_accessor :conversation_id
23
23
 
24
- # Airbnb’s status for the offer: `active` (the guest can book it), `accepted`, `declined`, `expired` or `voided` (withdrawn).
24
+ # The channel the offer is on.
25
+ attr_accessor :channel
26
+
27
+ # Airbnb: its status for the offer — `active` (the guest can book it), `accepted`, `declined`, `expired` or `voided` (withdrawn). VRBO: `sent` (just sent), `current` (the live offer) or `preview` (recalculated, not sent).
25
28
  attr_accessor :status
26
29
 
27
30
  # Repull listing id, when known.
@@ -38,19 +41,63 @@ module Repull
38
41
 
39
42
  attr_accessor :guests
40
43
 
41
- # Total for the stay, in the listing’s Airbnb currency.
44
+ # What the guest pays for the stay. Airbnb: the total you set. VRBO: VRBO’s own total, including its taxes and service fee.
42
45
  attr_accessor :total_price
43
46
 
47
+ # Currency of the amounts, when the channel states it (VRBO).
48
+ attr_accessor :currency
49
+
50
+ # VRBO: rent for the stay, excluding fees and taxes. Null on Airbnb (priced by one total).
51
+ attr_accessor :rental_amount
52
+
53
+ # VRBO: its automatic stay discount on the rent, when the offer carries one.
54
+ attr_accessor :discount
55
+
56
+ # VRBO: the offer’s fees by type. Empty on Airbnb.
57
+ attr_accessor :fees
58
+
59
+ # VRBO: refundable damage deposit; null for none.
60
+ attr_accessor :damage_deposit
61
+
62
+ # VRBO: its offer summary line by line, in VRBO’s words (nights, fees, taxes, total traveler payment, payout).
63
+ attr_accessor :lines
64
+
65
+ # The message sent to the guest with the offer (VRBO).
66
+ attr_accessor :message
67
+
44
68
  attr_accessor :created_at
45
69
 
46
70
  # When the guest can no longer book the offer (Airbnb gives them 24 hours).
47
71
  attr_accessor :expires_at
48
72
 
73
+ class EnumAttributeValidator
74
+ attr_reader :datatype
75
+ attr_reader :allowable_values
76
+
77
+ def initialize(datatype, allowable_values)
78
+ @allowable_values = allowable_values.map do |value|
79
+ case datatype.to_s
80
+ when /Integer/i
81
+ value.to_i
82
+ when /Float/i
83
+ value.to_f
84
+ else
85
+ value
86
+ end
87
+ end
88
+ end
89
+
90
+ def valid?(value)
91
+ !value || allowable_values.include?(value)
92
+ end
93
+ end
94
+
49
95
  # Attribute mapping from ruby-style variable name to JSON key.
50
96
  def self.attribute_map
51
97
  {
52
98
  :'id' => :'id',
53
99
  :'conversation_id' => :'conversationId',
100
+ :'channel' => :'channel',
54
101
  :'status' => :'status',
55
102
  :'listing_id' => :'listingId',
56
103
  :'airbnb_listing_id' => :'airbnbListingId',
@@ -59,6 +106,13 @@ module Repull
59
106
  :'nights' => :'nights',
60
107
  :'guests' => :'guests',
61
108
  :'total_price' => :'totalPrice',
109
+ :'currency' => :'currency',
110
+ :'rental_amount' => :'rentalAmount',
111
+ :'discount' => :'discount',
112
+ :'fees' => :'fees',
113
+ :'damage_deposit' => :'damageDeposit',
114
+ :'lines' => :'lines',
115
+ :'message' => :'message',
62
116
  :'created_at' => :'createdAt',
63
117
  :'expires_at' => :'expiresAt'
64
118
  }
@@ -79,6 +133,7 @@ module Repull
79
133
  {
80
134
  :'id' => :'String',
81
135
  :'conversation_id' => :'String',
136
+ :'channel' => :'String',
82
137
  :'status' => :'String',
83
138
  :'listing_id' => :'String',
84
139
  :'airbnb_listing_id' => :'String',
@@ -87,6 +142,13 @@ module Repull
87
142
  :'nights' => :'Integer',
88
143
  :'guests' => :'CreateConversationSpecialOffer201ResponseGuests',
89
144
  :'total_price' => :'Float',
145
+ :'currency' => :'String',
146
+ :'rental_amount' => :'Float',
147
+ :'discount' => :'Float',
148
+ :'fees' => :'Array<CreateConversationSpecialOffer201ResponseFeesInner>',
149
+ :'damage_deposit' => :'Float',
150
+ :'lines' => :'Array<CreateConversationSpecialOffer201ResponseLinesInner>',
151
+ :'message' => :'String',
90
152
  :'created_at' => :'Time',
91
153
  :'expires_at' => :'Time'
92
154
  }
@@ -104,6 +166,11 @@ module Repull
104
166
  :'nights',
105
167
  :'guests',
106
168
  :'total_price',
169
+ :'currency',
170
+ :'rental_amount',
171
+ :'discount',
172
+ :'damage_deposit',
173
+ :'message',
107
174
  :'created_at',
108
175
  :'expires_at'
109
176
  ])
@@ -137,6 +204,10 @@ module Repull
137
204
  self.conversation_id = nil
138
205
  end
139
206
 
207
+ if attributes.key?(:'channel')
208
+ self.channel = attributes[:'channel']
209
+ end
210
+
140
211
  if attributes.key?(:'status')
141
212
  self.status = attributes[:'status']
142
213
  else
@@ -179,6 +250,38 @@ module Repull
179
250
  self.total_price = nil
180
251
  end
181
252
 
253
+ if attributes.key?(:'currency')
254
+ self.currency = attributes[:'currency']
255
+ end
256
+
257
+ if attributes.key?(:'rental_amount')
258
+ self.rental_amount = attributes[:'rental_amount']
259
+ end
260
+
261
+ if attributes.key?(:'discount')
262
+ self.discount = attributes[:'discount']
263
+ end
264
+
265
+ if attributes.key?(:'fees')
266
+ if (value = attributes[:'fees']).is_a?(Array)
267
+ self.fees = value
268
+ end
269
+ end
270
+
271
+ if attributes.key?(:'damage_deposit')
272
+ self.damage_deposit = attributes[:'damage_deposit']
273
+ end
274
+
275
+ if attributes.key?(:'lines')
276
+ if (value = attributes[:'lines']).is_a?(Array)
277
+ self.lines = value
278
+ end
279
+ end
280
+
281
+ if attributes.key?(:'message')
282
+ self.message = attributes[:'message']
283
+ end
284
+
182
285
  if attributes.key?(:'created_at')
183
286
  self.created_at = attributes[:'created_at']
184
287
  end
@@ -205,6 +308,8 @@ module Repull
205
308
  def valid?
206
309
  warn '[DEPRECATED] the `valid?` method is obsolete'
207
310
  return false if @conversation_id.nil?
311
+ channel_validator = EnumAttributeValidator.new('String', ["airbnb", "vrbo"])
312
+ return false unless channel_validator.valid?(@channel)
208
313
  true
209
314
  end
210
315
 
@@ -218,6 +323,16 @@ module Repull
218
323
  @conversation_id = conversation_id
219
324
  end
220
325
 
326
+ # Custom attribute writer method checking allowed values (enum).
327
+ # @param [Object] channel Object to be assigned
328
+ def channel=(channel)
329
+ validator = EnumAttributeValidator.new('String', ["airbnb", "vrbo"])
330
+ unless validator.valid?(channel)
331
+ fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
332
+ end
333
+ @channel = channel
334
+ end
335
+
221
336
  # Checks equality by comparing each attribute.
222
337
  # @param [Object] Object to be compared
223
338
  def ==(o)
@@ -225,6 +340,7 @@ module Repull
225
340
  self.class == o.class &&
226
341
  id == o.id &&
227
342
  conversation_id == o.conversation_id &&
343
+ channel == o.channel &&
228
344
  status == o.status &&
229
345
  listing_id == o.listing_id &&
230
346
  airbnb_listing_id == o.airbnb_listing_id &&
@@ -233,6 +349,13 @@ module Repull
233
349
  nights == o.nights &&
234
350
  guests == o.guests &&
235
351
  total_price == o.total_price &&
352
+ currency == o.currency &&
353
+ rental_amount == o.rental_amount &&
354
+ discount == o.discount &&
355
+ fees == o.fees &&
356
+ damage_deposit == o.damage_deposit &&
357
+ lines == o.lines &&
358
+ message == o.message &&
236
359
  created_at == o.created_at &&
237
360
  expires_at == o.expires_at
238
361
  end
@@ -246,7 +369,7 @@ module Repull
246
369
  # Calculates hash code according to all attributes.
247
370
  # @return [Integer] Hash code
248
371
  def hash
249
- [id, conversation_id, status, listing_id, airbnb_listing_id, check_in, check_out, nights, guests, total_price, created_at, expires_at].hash
372
+ [id, conversation_id, channel, status, listing_id, airbnb_listing_id, check_in, check_out, nights, guests, total_price, currency, rental_amount, discount, fees, damage_deposit, lines, message, created_at, expires_at].hash
250
373
  end
251
374
 
252
375
  # Builds the object from hash
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class CreateConversationSpecialOffer201ResponseFeesInner < ApiModelBase
18
+ attr_accessor :type
19
+
20
+ attr_accessor :value
21
+
22
+ attr_accessor :label
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'type' => :'type',
28
+ :'value' => :'value',
29
+ :'label' => :'label'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'type' => :'String',
47
+ :'value' => :'Float',
48
+ :'label' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ :'label'
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::CreateConversationSpecialOffer201ResponseFeesInner` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ acceptable_attribute_map = self.class.acceptable_attribute_map
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!acceptable_attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::CreateConversationSpecialOffer201ResponseFeesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'type')
76
+ self.type = attributes[:'type']
77
+ end
78
+
79
+ if attributes.key?(:'value')
80
+ self.value = attributes[:'value']
81
+ end
82
+
83
+ if attributes.key?(:'label')
84
+ self.label = attributes[:'label']
85
+ end
86
+ end
87
+
88
+ # Show invalid properties with the reasons. Usually used together with valid?
89
+ # @return Array for valid properties with the reasons
90
+ def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
92
+ invalid_properties = Array.new
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
+ true
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ type == o.type &&
109
+ value == o.value &&
110
+ label == o.label
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [type, value, label].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Returns the object in the form of hash
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_hash
151
+ hash = {}
152
+ self.class.attribute_map.each_pair do |attr, param|
153
+ value = self.send(attr)
154
+ if value.nil?
155
+ is_nullable = self.class.openapi_nullable.include?(attr)
156
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
+ end
158
+
159
+ hash[param] = _to_hash(value)
160
+ end
161
+ hash
162
+ end
163
+
164
+ end
165
+
166
+ end
@@ -0,0 +1,157 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class CreateConversationSpecialOffer201ResponseLinesInner < ApiModelBase
18
+ attr_accessor :label
19
+
20
+ attr_accessor :value
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'label' => :'label',
26
+ :'value' => :'value'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'label' => :'String',
44
+ :'value' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ :'value'
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::CreateConversationSpecialOffer201ResponseLinesInner` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::CreateConversationSpecialOffer201ResponseLinesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'label')
72
+ self.label = attributes[:'label']
73
+ end
74
+
75
+ if attributes.key?(:'value')
76
+ self.value = attributes[:'value']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ warn '[DEPRECATED] the `valid?` method is obsolete'
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(o)
98
+ return true if self.equal?(o)
99
+ self.class == o.class &&
100
+ label == o.label &&
101
+ value == o.value
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [label, value].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ transformed_hash = {}
123
+ openapi_types.each_pair do |key, type|
124
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = nil
126
+ elsif type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[attribute_map[key]].is_a?(Array)
130
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
131
+ end
132
+ elsif !attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
134
+ end
135
+ end
136
+ new(transformed_hash)
137
+ end
138
+
139
+ # Returns the object in the form of hash
140
+ # @return [Hash] Returns the object in the form of hash
141
+ def to_hash
142
+ hash = {}
143
+ self.class.attribute_map.each_pair do |attr, param|
144
+ value = self.send(attr)
145
+ if value.nil?
146
+ is_nullable = self.class.openapi_nullable.include?(attr)
147
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
148
+ end
149
+
150
+ hash[param] = _to_hash(value)
151
+ end
152
+ hash
153
+ end
154
+
155
+ end
156
+
157
+ end