repull 0.2.50 → 0.2.51
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.
- checksums.yaml +4 -4
- data/lib/repull/api/airbnb_api.rb +2 -2
- data/lib/repull/api/conversations_api.rb +2 -2
- data/lib/repull/models/account_notifications_missing_event.rb +282 -0
- data/lib/repull/models/account_notifications_missing_payload.rb +278 -0
- data/lib/repull/models/connect_status_accounts_inner.rb +12 -2
- data/lib/repull/models/conversation_message_status_changed_event.rb +282 -0
- data/lib/repull/models/conversation_message_status_changed_payload.rb +233 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_advance_notice.rb +14 -3
- data/lib/repull/models/guest.rb +35 -2
- data/lib/repull/models/guest_contact.rb +37 -5
- data/lib/repull/models/guest_phone_type.rb +40 -0
- data/lib/repull/models/guest_profile.rb +35 -1
- data/lib/repull/models/message.rb +2 -2
- data/lib/repull/models/reservation.rb +11 -1
- data/lib/repull/models/reservation_primary_guest.rb +45 -2
- data/lib/repull/models/send_message_response.rb +1 -0
- data/lib/repull/models/update_airbnb_booking_settings_request_advance_notice.rb +56 -17
- data/lib/repull/models/vrbo_notifications.rb +192 -0
- data/lib/repull/models/webhook_event.rb +4 -0
- data/lib/repull/models/webhook_event_type.rb +3 -1
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +6 -0
- data/openapi/v1.json +343 -17
- metadata +8 -2
|
@@ -42,9 +42,12 @@ module Repull
|
|
|
42
42
|
# Booking.com: a link that opens room mapping for this hotel (no new Connect session needed). Send the host to it when `action` is set.
|
|
43
43
|
attr_accessor :fix_url
|
|
44
44
|
|
|
45
|
-
# Vrbo only. When Vrbo's
|
|
45
|
+
# Deprecated: use `notifications`. Vrbo only. When Vrbo's FIRST notification reached `notificationEmail`; it stays set even if notifications later stop. `null` until then.
|
|
46
46
|
attr_accessor :notification_received_at
|
|
47
47
|
|
|
48
|
+
# Vrbo only. Whether Vrbo's notification emails reach Repull now (`state`), when the last one did, and the address to add. When `state` is `missing`, ask the host to add `address` on Vrbo; `account.notifications_missing` is sent when that happens.
|
|
49
|
+
attr_accessor :notifications
|
|
50
|
+
|
|
48
51
|
# Vrbo only. Whether another tool (such as a PMS) manages this account's calendar; while `calendar.managedBy` is set, calendar sync is off for all its units.
|
|
49
52
|
attr_accessor :calendar
|
|
50
53
|
|
|
@@ -90,6 +93,7 @@ module Repull
|
|
|
90
93
|
:'action' => :'action',
|
|
91
94
|
:'fix_url' => :'fixUrl',
|
|
92
95
|
:'notification_received_at' => :'notificationReceivedAt',
|
|
96
|
+
:'notifications' => :'notifications',
|
|
93
97
|
:'calendar' => :'calendar',
|
|
94
98
|
:'notification_email' => :'notificationEmail',
|
|
95
99
|
:'import' => :'import'
|
|
@@ -120,6 +124,7 @@ module Repull
|
|
|
120
124
|
:'action' => :'Object',
|
|
121
125
|
:'fix_url' => :'String',
|
|
122
126
|
:'notification_received_at' => :'Time',
|
|
127
|
+
:'notifications' => :'VrboNotifications',
|
|
123
128
|
:'calendar' => :'VrboCalendarAccess',
|
|
124
129
|
:'notification_email' => :'String',
|
|
125
130
|
:'import' => :'VrboImportStatus'
|
|
@@ -205,6 +210,10 @@ module Repull
|
|
|
205
210
|
self.notification_received_at = attributes[:'notification_received_at']
|
|
206
211
|
end
|
|
207
212
|
|
|
213
|
+
if attributes.key?(:'notifications')
|
|
214
|
+
self.notifications = attributes[:'notifications']
|
|
215
|
+
end
|
|
216
|
+
|
|
208
217
|
if attributes.key?(:'calendar')
|
|
209
218
|
self.calendar = attributes[:'calendar']
|
|
210
219
|
end
|
|
@@ -249,6 +258,7 @@ module Repull
|
|
|
249
258
|
action == o.action &&
|
|
250
259
|
fix_url == o.fix_url &&
|
|
251
260
|
notification_received_at == o.notification_received_at &&
|
|
261
|
+
notifications == o.notifications &&
|
|
252
262
|
calendar == o.calendar &&
|
|
253
263
|
notification_email == o.notification_email &&
|
|
254
264
|
import == o.import
|
|
@@ -263,7 +273,7 @@ module Repull
|
|
|
263
273
|
# Calculates hash code according to all attributes.
|
|
264
274
|
# @return [Integer] Hash code
|
|
265
275
|
def hash
|
|
266
|
-
[external_account_id, connection_id, name, picture_url, status, connected, email, access_type, action, fix_url, notification_received_at, calendar, notification_email, import].hash
|
|
276
|
+
[external_account_id, connection_id, name, picture_url, status, connected, email, access_type, action, fix_url, notification_received_at, notifications, calendar, notification_email, import].hash
|
|
267
277
|
end
|
|
268
278
|
|
|
269
279
|
# Builds the object from hash
|
|
@@ -0,0 +1,282 @@
|
|
|
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
|
+
# A message you sent was delivered or gave up after the send call returned. Update the message you show from `status` and `statusReason`.
|
|
18
|
+
class ConversationMessageStatusChangedEvent < ApiModelBase
|
|
19
|
+
# The event name. This field is `event`, not `type`.
|
|
20
|
+
attr_accessor :event
|
|
21
|
+
|
|
22
|
+
# Stable across every delivery and replay of this logical event — dedupe on it.
|
|
23
|
+
attr_accessor :event_id
|
|
24
|
+
|
|
25
|
+
attr_accessor :api_version
|
|
26
|
+
|
|
27
|
+
# When this delivery was built.
|
|
28
|
+
attr_accessor :timestamp
|
|
29
|
+
|
|
30
|
+
attr_accessor :account
|
|
31
|
+
|
|
32
|
+
attr_accessor :data
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'event' => :'event',
|
|
38
|
+
:'event_id' => :'eventId',
|
|
39
|
+
:'api_version' => :'apiVersion',
|
|
40
|
+
:'timestamp' => :'timestamp',
|
|
41
|
+
:'account' => :'account',
|
|
42
|
+
:'data' => :'data'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns attribute mapping this model knows about
|
|
47
|
+
def self.acceptable_attribute_map
|
|
48
|
+
attribute_map
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns all the JSON keys this model knows about
|
|
52
|
+
def self.acceptable_attributes
|
|
53
|
+
acceptable_attribute_map.values
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute type mapping.
|
|
57
|
+
def self.openapi_types
|
|
58
|
+
{
|
|
59
|
+
:'event' => :'String',
|
|
60
|
+
:'event_id' => :'String',
|
|
61
|
+
:'api_version' => :'String',
|
|
62
|
+
:'timestamp' => :'Time',
|
|
63
|
+
:'account' => :'WebhookEventAccount',
|
|
64
|
+
:'data' => :'ConversationMessageStatusChangedPayload'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
:'account',
|
|
72
|
+
])
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Initializes the object
|
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
77
|
+
def initialize(attributes = {})
|
|
78
|
+
if (!attributes.is_a?(Hash))
|
|
79
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ConversationMessageStatusChangedEvent` initialize method"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
83
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
85
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ConversationMessageStatusChangedEvent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
87
|
+
end
|
|
88
|
+
h[k.to_sym] = v
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'event')
|
|
92
|
+
self.event = attributes[:'event']
|
|
93
|
+
else
|
|
94
|
+
self.event = nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'event_id')
|
|
98
|
+
self.event_id = attributes[:'event_id']
|
|
99
|
+
else
|
|
100
|
+
self.event_id = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'api_version')
|
|
104
|
+
self.api_version = attributes[:'api_version']
|
|
105
|
+
else
|
|
106
|
+
self.api_version = nil
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'timestamp')
|
|
110
|
+
self.timestamp = attributes[:'timestamp']
|
|
111
|
+
else
|
|
112
|
+
self.timestamp = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'account')
|
|
116
|
+
self.account = attributes[:'account']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'data')
|
|
120
|
+
self.data = attributes[:'data']
|
|
121
|
+
else
|
|
122
|
+
self.data = nil
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
127
|
+
# @return Array for valid properties with the reasons
|
|
128
|
+
def list_invalid_properties
|
|
129
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
130
|
+
invalid_properties = Array.new
|
|
131
|
+
if @event.nil?
|
|
132
|
+
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if @event_id.nil?
|
|
136
|
+
invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if @api_version.nil?
|
|
140
|
+
invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if @timestamp.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if @data.nil?
|
|
148
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
invalid_properties
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Check to see if the all the properties in the model are valid
|
|
155
|
+
# @return true if the model is valid
|
|
156
|
+
def valid?
|
|
157
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
158
|
+
return false if @event.nil?
|
|
159
|
+
return false if @event_id.nil?
|
|
160
|
+
return false if @api_version.nil?
|
|
161
|
+
return false if @timestamp.nil?
|
|
162
|
+
return false if @data.nil?
|
|
163
|
+
true
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Custom attribute writer method with validation
|
|
167
|
+
# @param [Object] event Value to be assigned
|
|
168
|
+
def event=(event)
|
|
169
|
+
if event.nil?
|
|
170
|
+
fail ArgumentError, 'event cannot be nil'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
@event = event
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Custom attribute writer method with validation
|
|
177
|
+
# @param [Object] event_id Value to be assigned
|
|
178
|
+
def event_id=(event_id)
|
|
179
|
+
if event_id.nil?
|
|
180
|
+
fail ArgumentError, 'event_id cannot be nil'
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
@event_id = event_id
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Custom attribute writer method with validation
|
|
187
|
+
# @param [Object] api_version Value to be assigned
|
|
188
|
+
def api_version=(api_version)
|
|
189
|
+
if api_version.nil?
|
|
190
|
+
fail ArgumentError, 'api_version cannot be nil'
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
@api_version = api_version
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Custom attribute writer method with validation
|
|
197
|
+
# @param [Object] timestamp Value to be assigned
|
|
198
|
+
def timestamp=(timestamp)
|
|
199
|
+
if timestamp.nil?
|
|
200
|
+
fail ArgumentError, 'timestamp cannot be nil'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
@timestamp = timestamp
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Custom attribute writer method with validation
|
|
207
|
+
# @param [Object] data Value to be assigned
|
|
208
|
+
def data=(data)
|
|
209
|
+
if data.nil?
|
|
210
|
+
fail ArgumentError, 'data cannot be nil'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
@data = data
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Checks equality by comparing each attribute.
|
|
217
|
+
# @param [Object] Object to be compared
|
|
218
|
+
def ==(o)
|
|
219
|
+
return true if self.equal?(o)
|
|
220
|
+
self.class == o.class &&
|
|
221
|
+
event == o.event &&
|
|
222
|
+
event_id == o.event_id &&
|
|
223
|
+
api_version == o.api_version &&
|
|
224
|
+
timestamp == o.timestamp &&
|
|
225
|
+
account == o.account &&
|
|
226
|
+
data == o.data
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# @see the `==` method
|
|
230
|
+
# @param [Object] Object to be compared
|
|
231
|
+
def eql?(o)
|
|
232
|
+
self == o
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Calculates hash code according to all attributes.
|
|
236
|
+
# @return [Integer] Hash code
|
|
237
|
+
def hash
|
|
238
|
+
[event, event_id, api_version, timestamp, account, data].hash
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Builds the object from hash
|
|
242
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
243
|
+
# @return [Object] Returns the model itself
|
|
244
|
+
def self.build_from_hash(attributes)
|
|
245
|
+
return nil unless attributes.is_a?(Hash)
|
|
246
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
247
|
+
transformed_hash = {}
|
|
248
|
+
openapi_types.each_pair do |key, type|
|
|
249
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
250
|
+
transformed_hash["#{key}"] = nil
|
|
251
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
252
|
+
# check to ensure the input is an array given that the attribute
|
|
253
|
+
# is documented as an array but the input is not
|
|
254
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
255
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
256
|
+
end
|
|
257
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
258
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
new(transformed_hash)
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Returns the object in the form of hash
|
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
|
266
|
+
def to_hash
|
|
267
|
+
hash = {}
|
|
268
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
269
|
+
value = self.send(attr)
|
|
270
|
+
if value.nil?
|
|
271
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
272
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
hash[param] = _to_hash(value)
|
|
276
|
+
end
|
|
277
|
+
hash
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
end
|
|
@@ -0,0 +1,233 @@
|
|
|
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
|
+
# Payload for `conversation.message.status_changed`: a message you sent changed delivery status after the send call returned — a Vrbo reply accepted as `queued` (`202`) was delivered (`sent`) or gave up (`failed`).
|
|
18
|
+
class ConversationMessageStatusChangedPayload < ApiModelBase
|
|
19
|
+
# The conversation (`GET /v1/conversations/{id}`).
|
|
20
|
+
attr_accessor :conversation_id
|
|
21
|
+
|
|
22
|
+
# The message, as `id` on the send response and on `GET /v1/conversations/{id}/messages`.
|
|
23
|
+
attr_accessor :message_id
|
|
24
|
+
|
|
25
|
+
# The new delivery status.
|
|
26
|
+
attr_accessor :status
|
|
27
|
+
|
|
28
|
+
# Why it `failed`, in plain words. `null` when `sent`.
|
|
29
|
+
attr_accessor :status_reason
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'conversation_id' => :'conversationId',
|
|
35
|
+
:'message_id' => :'messageId',
|
|
36
|
+
:'status' => :'status',
|
|
37
|
+
:'status_reason' => :'statusReason'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns attribute mapping this model knows about
|
|
42
|
+
def self.acceptable_attribute_map
|
|
43
|
+
attribute_map
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns all the JSON keys this model knows about
|
|
47
|
+
def self.acceptable_attributes
|
|
48
|
+
acceptable_attribute_map.values
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'conversation_id' => :'String',
|
|
55
|
+
:'message_id' => :'String',
|
|
56
|
+
:'status' => :'String',
|
|
57
|
+
:'status_reason' => :'String'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
64
|
+
:'status_reason'
|
|
65
|
+
])
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Initializes the object
|
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
|
+
def initialize(attributes = {})
|
|
71
|
+
if (!attributes.is_a?(Hash))
|
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ConversationMessageStatusChangedPayload` initialize method"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
77
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ConversationMessageStatusChangedPayload`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
80
|
+
end
|
|
81
|
+
h[k.to_sym] = v
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'conversation_id')
|
|
85
|
+
self.conversation_id = attributes[:'conversation_id']
|
|
86
|
+
else
|
|
87
|
+
self.conversation_id = nil
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'message_id')
|
|
91
|
+
self.message_id = attributes[:'message_id']
|
|
92
|
+
else
|
|
93
|
+
self.message_id = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'status')
|
|
97
|
+
self.status = attributes[:'status']
|
|
98
|
+
else
|
|
99
|
+
self.status = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'status_reason')
|
|
103
|
+
self.status_reason = attributes[:'status_reason']
|
|
104
|
+
else
|
|
105
|
+
self.status_reason = nil
|
|
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
|
+
if @conversation_id.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "conversation_id", conversation_id cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @message_id.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @status.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
invalid_properties
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Check to see if the all the properties in the model are valid
|
|
130
|
+
# @return true if the model is valid
|
|
131
|
+
def valid?
|
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
133
|
+
return false if @conversation_id.nil?
|
|
134
|
+
return false if @message_id.nil?
|
|
135
|
+
return false if @status.nil?
|
|
136
|
+
true
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Custom attribute writer method with validation
|
|
140
|
+
# @param [Object] conversation_id Value to be assigned
|
|
141
|
+
def conversation_id=(conversation_id)
|
|
142
|
+
if conversation_id.nil?
|
|
143
|
+
fail ArgumentError, 'conversation_id cannot be nil'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
@conversation_id = conversation_id
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Custom attribute writer method with validation
|
|
150
|
+
# @param [Object] message_id Value to be assigned
|
|
151
|
+
def message_id=(message_id)
|
|
152
|
+
if message_id.nil?
|
|
153
|
+
fail ArgumentError, 'message_id cannot be nil'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
@message_id = message_id
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Custom attribute writer method with validation
|
|
160
|
+
# @param [Object] status Value to be assigned
|
|
161
|
+
def status=(status)
|
|
162
|
+
if status.nil?
|
|
163
|
+
fail ArgumentError, 'status cannot be nil'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
@status = status
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Checks equality by comparing each attribute.
|
|
170
|
+
# @param [Object] Object to be compared
|
|
171
|
+
def ==(o)
|
|
172
|
+
return true if self.equal?(o)
|
|
173
|
+
self.class == o.class &&
|
|
174
|
+
conversation_id == o.conversation_id &&
|
|
175
|
+
message_id == o.message_id &&
|
|
176
|
+
status == o.status &&
|
|
177
|
+
status_reason == o.status_reason
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# @see the `==` method
|
|
181
|
+
# @param [Object] Object to be compared
|
|
182
|
+
def eql?(o)
|
|
183
|
+
self == o
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Calculates hash code according to all attributes.
|
|
187
|
+
# @return [Integer] Hash code
|
|
188
|
+
def hash
|
|
189
|
+
[conversation_id, message_id, status, status_reason].hash
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Builds the object from hash
|
|
193
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
194
|
+
# @return [Object] Returns the model itself
|
|
195
|
+
def self.build_from_hash(attributes)
|
|
196
|
+
return nil unless attributes.is_a?(Hash)
|
|
197
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
198
|
+
transformed_hash = {}
|
|
199
|
+
openapi_types.each_pair do |key, type|
|
|
200
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
201
|
+
transformed_hash["#{key}"] = nil
|
|
202
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
203
|
+
# check to ensure the input is an array given that the attribute
|
|
204
|
+
# is documented as an array but the input is not
|
|
205
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
206
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
207
|
+
end
|
|
208
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
209
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
new(transformed_hash)
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Returns the object in the form of hash
|
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
|
217
|
+
def to_hash
|
|
218
|
+
hash = {}
|
|
219
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
220
|
+
value = self.send(attr)
|
|
221
|
+
if value.nil?
|
|
222
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
223
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
hash[param] = _to_hash(value)
|
|
227
|
+
end
|
|
228
|
+
hash
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
end
|
|
@@ -16,12 +16,15 @@ require 'time'
|
|
|
16
16
|
module Repull
|
|
17
17
|
# How much notice a booking needs.
|
|
18
18
|
class GetAirbnbBookingSettings200ResponseDataAdvanceNotice < ApiModelBase
|
|
19
|
-
#
|
|
19
|
+
# Airbnb's advance notice: 0-24, 48, 72 or 168. Airbnb counts it back from 11:59 PM on the check-in day, in the listing's time zone, so 0-23 is a same-day cutoff: `0` = same-day bookings until midnight, `1` = until 11 PM, `3` = until 9 PM. `24` and above = no same-day bookings.
|
|
20
20
|
attr_accessor :hours
|
|
21
21
|
|
|
22
|
-
# Derived: `hours
|
|
22
|
+
# Derived: `hours < 24`.
|
|
23
23
|
attr_accessor :same_day_bookings_allowed
|
|
24
24
|
|
|
25
|
+
# Derived: the last time a same-day booking is accepted, `HH:mm` in the listing's time (`00:00` = midnight). `null` when same-day bookings are off.
|
|
26
|
+
attr_accessor :same_day_cutoff
|
|
27
|
+
|
|
25
28
|
# Whether a guest may still REQUEST to book inside the notice window.
|
|
26
29
|
attr_accessor :allow_request_to_book
|
|
27
30
|
|
|
@@ -30,6 +33,7 @@ module Repull
|
|
|
30
33
|
{
|
|
31
34
|
:'hours' => :'hours',
|
|
32
35
|
:'same_day_bookings_allowed' => :'sameDayBookingsAllowed',
|
|
36
|
+
:'same_day_cutoff' => :'sameDayCutoff',
|
|
33
37
|
:'allow_request_to_book' => :'allowRequestToBook'
|
|
34
38
|
}
|
|
35
39
|
end
|
|
@@ -49,6 +53,7 @@ module Repull
|
|
|
49
53
|
{
|
|
50
54
|
:'hours' => :'Integer',
|
|
51
55
|
:'same_day_bookings_allowed' => :'Boolean',
|
|
56
|
+
:'same_day_cutoff' => :'String',
|
|
52
57
|
:'allow_request_to_book' => :'Boolean'
|
|
53
58
|
}
|
|
54
59
|
end
|
|
@@ -58,6 +63,7 @@ module Repull
|
|
|
58
63
|
Set.new([
|
|
59
64
|
:'hours',
|
|
60
65
|
:'same_day_bookings_allowed',
|
|
66
|
+
:'same_day_cutoff',
|
|
61
67
|
:'allow_request_to_book'
|
|
62
68
|
])
|
|
63
69
|
end
|
|
@@ -86,6 +92,10 @@ module Repull
|
|
|
86
92
|
self.same_day_bookings_allowed = attributes[:'same_day_bookings_allowed']
|
|
87
93
|
end
|
|
88
94
|
|
|
95
|
+
if attributes.key?(:'same_day_cutoff')
|
|
96
|
+
self.same_day_cutoff = attributes[:'same_day_cutoff']
|
|
97
|
+
end
|
|
98
|
+
|
|
89
99
|
if attributes.key?(:'allow_request_to_book')
|
|
90
100
|
self.allow_request_to_book = attributes[:'allow_request_to_book']
|
|
91
101
|
end
|
|
@@ -113,6 +123,7 @@ module Repull
|
|
|
113
123
|
self.class == o.class &&
|
|
114
124
|
hours == o.hours &&
|
|
115
125
|
same_day_bookings_allowed == o.same_day_bookings_allowed &&
|
|
126
|
+
same_day_cutoff == o.same_day_cutoff &&
|
|
116
127
|
allow_request_to_book == o.allow_request_to_book
|
|
117
128
|
end
|
|
118
129
|
|
|
@@ -125,7 +136,7 @@ module Repull
|
|
|
125
136
|
# Calculates hash code according to all attributes.
|
|
126
137
|
# @return [Integer] Hash code
|
|
127
138
|
def hash
|
|
128
|
-
[hours, same_day_bookings_allowed, allow_request_to_book].hash
|
|
139
|
+
[hours, same_day_bookings_allowed, same_day_cutoff, allow_request_to_book].hash
|
|
129
140
|
end
|
|
130
141
|
|
|
131
142
|
# Builds the object from hash
|