repull 0.2.42 → 0.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/repull/api/airbnb_api.rb +2 -2
- data/lib/repull/api/listings_api.rb +146 -6
- data/lib/repull/api/reservations_api.rb +93 -0
- data/lib/repull/models/account_disconnected_payload.rb +3 -2
- data/lib/repull/models/get_listing_markups200_response.rb +15 -4
- data/lib/repull/models/get_listing_markups200_response_vrbo_inner.rb +181 -0
- data/lib/repull/models/get_reservation_summary200_response.rb +353 -0
- data/lib/repull/models/get_reservation_summary200_response_totals_inner.rb +478 -0
- data/lib/repull/models/get_vrbo_publish_job200_response.rb +199 -0
- data/lib/repull/models/get_vrbo_publish_job200_response_job.rb +300 -0
- data/lib/repull/models/get_vrbo_publish_job200_response_job_rejected_photos_inner.rb +157 -0
- data/lib/repull/models/map_connect_booking_rooms_response.rb +44 -5
- data/lib/repull/models/message.rb +29 -5
- data/lib/repull/models/message_actor.rb +159 -0
- data/lib/repull/models/message_reaction.rb +178 -0
- data/lib/repull/models/publish_listing_to_vrbo_request.rb +158 -0
- data/lib/repull/models/reservation.rb +12 -1
- data/lib/repull/models/reservation_message_reaction_event.rb +281 -0
- data/lib/repull/models/reservation_message_reaction_payload.rb +225 -0
- data/lib/repull/models/reservation_message_reaction_payload_reaction.rb +175 -0
- data/lib/repull/models/reservation_message_read_event.rb +281 -0
- data/lib/repull/models/reservation_message_read_payload.rb +227 -0
- data/lib/repull/models/reservation_message_updated_payload.rb +1 -1
- data/lib/repull/models/set_listing_markup_request.rb +16 -6
- data/lib/repull/models/update_airbnb_message_request.rb +1 -1
- 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 +14 -0
- data/openapi/v1.json +1055 -14
- data/scripts/regen.sh +1 -1
- metadata +16 -2
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`, or upgrade at `https://repull.dev/dashboard/billing` to activate them all. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\").
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Repull
|
|
17
|
+
class GetVrboPublishJob200ResponseJob < ApiModelBase
|
|
18
|
+
# Pass to `GET /v1/listings/{id}/publish/vrbo?jobId=`.
|
|
19
|
+
attr_accessor :job_id
|
|
20
|
+
|
|
21
|
+
attr_accessor :status
|
|
22
|
+
|
|
23
|
+
attr_accessor :listing_id
|
|
24
|
+
|
|
25
|
+
# The Vrbo account (connection `vrbo:<accountId>`) the listing is created in.
|
|
26
|
+
attr_accessor :account_id
|
|
27
|
+
|
|
28
|
+
# Steps Vrbo has finished, in order: create, amenities, property type, rooms, photos, headline + description, house rules, rate, booking options, publish, fees, cancellation policy, …
|
|
29
|
+
attr_accessor :steps
|
|
30
|
+
|
|
31
|
+
# Vrbo's reason when `status` is `failed`.
|
|
32
|
+
attr_accessor :error
|
|
33
|
+
|
|
34
|
+
# The new Vrbo listing number, once Vrbo has published it.
|
|
35
|
+
attr_accessor :vrbo_listing_number
|
|
36
|
+
|
|
37
|
+
# The Vrbo property being built. Send it back as `propertyId` to finish a run that failed part-way.
|
|
38
|
+
attr_accessor :property_id
|
|
39
|
+
|
|
40
|
+
# The new Vrbo unit is linked to the listing with calendar sync on, and the whole calendar has been queued to Vrbo.
|
|
41
|
+
attr_accessor :linked
|
|
42
|
+
|
|
43
|
+
# Photos Vrbo's review refused (position in the listing's order, and Vrbo's reason).
|
|
44
|
+
attr_accessor :rejected_photos
|
|
45
|
+
|
|
46
|
+
# POST only: where the Vrbo listing departs from the listing's content because of a Vrbo rule.
|
|
47
|
+
attr_accessor :adjustments
|
|
48
|
+
|
|
49
|
+
# POST only: set when an unfinished Vrbo property of this listing is completed instead of starting a new one.
|
|
50
|
+
attr_accessor :resumed_property_id
|
|
51
|
+
|
|
52
|
+
class EnumAttributeValidator
|
|
53
|
+
attr_reader :datatype
|
|
54
|
+
attr_reader :allowable_values
|
|
55
|
+
|
|
56
|
+
def initialize(datatype, allowable_values)
|
|
57
|
+
@allowable_values = allowable_values.map do |value|
|
|
58
|
+
case datatype.to_s
|
|
59
|
+
when /Integer/i
|
|
60
|
+
value.to_i
|
|
61
|
+
when /Float/i
|
|
62
|
+
value.to_f
|
|
63
|
+
else
|
|
64
|
+
value
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def valid?(value)
|
|
70
|
+
!value || allowable_values.include?(value)
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
75
|
+
def self.attribute_map
|
|
76
|
+
{
|
|
77
|
+
:'job_id' => :'jobId',
|
|
78
|
+
:'status' => :'status',
|
|
79
|
+
:'listing_id' => :'listingId',
|
|
80
|
+
:'account_id' => :'accountId',
|
|
81
|
+
:'steps' => :'steps',
|
|
82
|
+
:'error' => :'error',
|
|
83
|
+
:'vrbo_listing_number' => :'vrboListingNumber',
|
|
84
|
+
:'property_id' => :'propertyId',
|
|
85
|
+
:'linked' => :'linked',
|
|
86
|
+
:'rejected_photos' => :'rejectedPhotos',
|
|
87
|
+
:'adjustments' => :'adjustments',
|
|
88
|
+
:'resumed_property_id' => :'resumedPropertyId'
|
|
89
|
+
}
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Returns attribute mapping this model knows about
|
|
93
|
+
def self.acceptable_attribute_map
|
|
94
|
+
attribute_map
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Returns all the JSON keys this model knows about
|
|
98
|
+
def self.acceptable_attributes
|
|
99
|
+
acceptable_attribute_map.values
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Attribute type mapping.
|
|
103
|
+
def self.openapi_types
|
|
104
|
+
{
|
|
105
|
+
:'job_id' => :'String',
|
|
106
|
+
:'status' => :'String',
|
|
107
|
+
:'listing_id' => :'Integer',
|
|
108
|
+
:'account_id' => :'Integer',
|
|
109
|
+
:'steps' => :'Array<String>',
|
|
110
|
+
:'error' => :'String',
|
|
111
|
+
:'vrbo_listing_number' => :'String',
|
|
112
|
+
:'property_id' => :'String',
|
|
113
|
+
:'linked' => :'Boolean',
|
|
114
|
+
:'rejected_photos' => :'Array<GetVrboPublishJob200ResponseJobRejectedPhotosInner>',
|
|
115
|
+
:'adjustments' => :'Array<String>',
|
|
116
|
+
:'resumed_property_id' => :'String'
|
|
117
|
+
}
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# List of attributes with nullable: true
|
|
121
|
+
def self.openapi_nullable
|
|
122
|
+
Set.new([
|
|
123
|
+
:'error',
|
|
124
|
+
:'vrbo_listing_number',
|
|
125
|
+
:'property_id',
|
|
126
|
+
:'resumed_property_id'
|
|
127
|
+
])
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Initializes the object
|
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
132
|
+
def initialize(attributes = {})
|
|
133
|
+
if (!attributes.is_a?(Hash))
|
|
134
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetVrboPublishJob200ResponseJob` initialize method"
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
138
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
139
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
140
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
141
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetVrboPublishJob200ResponseJob`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
142
|
+
end
|
|
143
|
+
h[k.to_sym] = v
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'job_id')
|
|
147
|
+
self.job_id = attributes[:'job_id']
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'status')
|
|
151
|
+
self.status = attributes[:'status']
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'listing_id')
|
|
155
|
+
self.listing_id = attributes[:'listing_id']
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'account_id')
|
|
159
|
+
self.account_id = attributes[:'account_id']
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'steps')
|
|
163
|
+
if (value = attributes[:'steps']).is_a?(Array)
|
|
164
|
+
self.steps = value
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'error')
|
|
169
|
+
self.error = attributes[:'error']
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'vrbo_listing_number')
|
|
173
|
+
self.vrbo_listing_number = attributes[:'vrbo_listing_number']
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'property_id')
|
|
177
|
+
self.property_id = attributes[:'property_id']
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'linked')
|
|
181
|
+
self.linked = attributes[:'linked']
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'rejected_photos')
|
|
185
|
+
if (value = attributes[:'rejected_photos']).is_a?(Array)
|
|
186
|
+
self.rejected_photos = value
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'adjustments')
|
|
191
|
+
if (value = attributes[:'adjustments']).is_a?(Array)
|
|
192
|
+
self.adjustments = value
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'resumed_property_id')
|
|
197
|
+
self.resumed_property_id = attributes[:'resumed_property_id']
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
202
|
+
# @return Array for valid properties with the reasons
|
|
203
|
+
def list_invalid_properties
|
|
204
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
205
|
+
invalid_properties = Array.new
|
|
206
|
+
invalid_properties
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Check to see if the all the properties in the model are valid
|
|
210
|
+
# @return true if the model is valid
|
|
211
|
+
def valid?
|
|
212
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
213
|
+
status_validator = EnumAttributeValidator.new('String', ["running", "done", "failed"])
|
|
214
|
+
return false unless status_validator.valid?(@status)
|
|
215
|
+
true
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
219
|
+
# @param [Object] status Object to be assigned
|
|
220
|
+
def status=(status)
|
|
221
|
+
validator = EnumAttributeValidator.new('String', ["running", "done", "failed"])
|
|
222
|
+
unless validator.valid?(status)
|
|
223
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
224
|
+
end
|
|
225
|
+
@status = status
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Checks equality by comparing each attribute.
|
|
229
|
+
# @param [Object] Object to be compared
|
|
230
|
+
def ==(o)
|
|
231
|
+
return true if self.equal?(o)
|
|
232
|
+
self.class == o.class &&
|
|
233
|
+
job_id == o.job_id &&
|
|
234
|
+
status == o.status &&
|
|
235
|
+
listing_id == o.listing_id &&
|
|
236
|
+
account_id == o.account_id &&
|
|
237
|
+
steps == o.steps &&
|
|
238
|
+
error == o.error &&
|
|
239
|
+
vrbo_listing_number == o.vrbo_listing_number &&
|
|
240
|
+
property_id == o.property_id &&
|
|
241
|
+
linked == o.linked &&
|
|
242
|
+
rejected_photos == o.rejected_photos &&
|
|
243
|
+
adjustments == o.adjustments &&
|
|
244
|
+
resumed_property_id == o.resumed_property_id
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# @see the `==` method
|
|
248
|
+
# @param [Object] Object to be compared
|
|
249
|
+
def eql?(o)
|
|
250
|
+
self == o
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Calculates hash code according to all attributes.
|
|
254
|
+
# @return [Integer] Hash code
|
|
255
|
+
def hash
|
|
256
|
+
[job_id, status, listing_id, account_id, steps, error, vrbo_listing_number, property_id, linked, rejected_photos, adjustments, resumed_property_id].hash
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Builds the object from hash
|
|
260
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
261
|
+
# @return [Object] Returns the model itself
|
|
262
|
+
def self.build_from_hash(attributes)
|
|
263
|
+
return nil unless attributes.is_a?(Hash)
|
|
264
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
265
|
+
transformed_hash = {}
|
|
266
|
+
openapi_types.each_pair do |key, type|
|
|
267
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
268
|
+
transformed_hash["#{key}"] = nil
|
|
269
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
270
|
+
# check to ensure the input is an array given that the attribute
|
|
271
|
+
# is documented as an array but the input is not
|
|
272
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
273
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
274
|
+
end
|
|
275
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
276
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
new(transformed_hash)
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Returns the object in the form of hash
|
|
283
|
+
# @return [Hash] Returns the object in the form of hash
|
|
284
|
+
def to_hash
|
|
285
|
+
hash = {}
|
|
286
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
287
|
+
value = self.send(attr)
|
|
288
|
+
if value.nil?
|
|
289
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
290
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
hash[param] = _to_hash(value)
|
|
294
|
+
end
|
|
295
|
+
hash
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
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 listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`, or upgrade at `https://repull.dev/dashboard/billing` to activate them all. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\").
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Repull
|
|
17
|
+
class GetVrboPublishJob200ResponseJobRejectedPhotosInner < ApiModelBase
|
|
18
|
+
attr_accessor :photo
|
|
19
|
+
|
|
20
|
+
attr_accessor :reason
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'photo' => :'photo',
|
|
26
|
+
:'reason' => :'reason'
|
|
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
|
+
:'photo' => :'Integer',
|
|
44
|
+
:'reason' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
:'photo',
|
|
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::GetVrboPublishJob200ResponseJobRejectedPhotosInner` 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::GetVrboPublishJob200ResponseJobRejectedPhotosInner`. 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?(:'photo')
|
|
72
|
+
self.photo = attributes[:'photo']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'reason')
|
|
76
|
+
self.reason = attributes[:'reason']
|
|
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
|
+
photo == o.photo &&
|
|
101
|
+
reason == o.reason
|
|
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
|
+
[photo, reason].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
|
|
@@ -33,6 +33,12 @@ module Repull
|
|
|
33
33
|
# How many reservations Booking.com returned for the property. Equal to `reservationsImported` unless some could not be attached to a listing — so `0` here means Booking.com had none. `null` when the sync could not run.
|
|
34
34
|
attr_accessor :reservations_found
|
|
35
35
|
|
|
36
|
+
# Ids of the listings this call created from Booking.com rooms (`create: true`). They start without a calendar: Booking.com shows those rooms closed and nothing is sent to Booking.com for them until they have one. Give a listing a calendar by setting its prices and availability with `PUT /v1/availability/{propertyId}`, or by mapping the same home from Airbnb so its calendar is used. Rooms mapped to an existing listing are not listed: that listing's calendar is pushed as before.
|
|
37
|
+
attr_accessor :needs_calendar
|
|
38
|
+
|
|
39
|
+
# Plain-language explanation of `needsCalendar`, present only when it is non-empty.
|
|
40
|
+
attr_accessor :calendar_note
|
|
41
|
+
|
|
36
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
43
|
def self.attribute_map
|
|
38
44
|
{
|
|
@@ -42,7 +48,9 @@ module Repull
|
|
|
42
48
|
:'session_id' => :'sessionId',
|
|
43
49
|
:'connection_id' => :'connectionId',
|
|
44
50
|
:'reservations_imported' => :'reservationsImported',
|
|
45
|
-
:'reservations_found' => :'reservationsFound'
|
|
51
|
+
:'reservations_found' => :'reservationsFound',
|
|
52
|
+
:'needs_calendar' => :'needsCalendar',
|
|
53
|
+
:'calendar_note' => :'calendarNote'
|
|
46
54
|
}
|
|
47
55
|
end
|
|
48
56
|
|
|
@@ -65,7 +73,9 @@ module Repull
|
|
|
65
73
|
:'session_id' => :'String',
|
|
66
74
|
:'connection_id' => :'String',
|
|
67
75
|
:'reservations_imported' => :'Integer',
|
|
68
|
-
:'reservations_found' => :'Integer'
|
|
76
|
+
:'reservations_found' => :'Integer',
|
|
77
|
+
:'needs_calendar' => :'Array<String>',
|
|
78
|
+
:'calendar_note' => :'String'
|
|
69
79
|
}
|
|
70
80
|
end
|
|
71
81
|
|
|
@@ -73,7 +83,7 @@ module Repull
|
|
|
73
83
|
def self.openapi_nullable
|
|
74
84
|
Set.new([
|
|
75
85
|
:'reservations_imported',
|
|
76
|
-
:'reservations_found'
|
|
86
|
+
:'reservations_found',
|
|
77
87
|
])
|
|
78
88
|
end
|
|
79
89
|
|
|
@@ -128,6 +138,18 @@ module Repull
|
|
|
128
138
|
if attributes.key?(:'reservations_found')
|
|
129
139
|
self.reservations_found = attributes[:'reservations_found']
|
|
130
140
|
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'needs_calendar')
|
|
143
|
+
if (value = attributes[:'needs_calendar']).is_a?(Array)
|
|
144
|
+
self.needs_calendar = value
|
|
145
|
+
end
|
|
146
|
+
else
|
|
147
|
+
self.needs_calendar = nil
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'calendar_note')
|
|
151
|
+
self.calendar_note = attributes[:'calendar_note']
|
|
152
|
+
end
|
|
131
153
|
end
|
|
132
154
|
|
|
133
155
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -151,6 +173,10 @@ module Repull
|
|
|
151
173
|
invalid_properties.push('invalid value for "connection_id", connection_id cannot be nil.')
|
|
152
174
|
end
|
|
153
175
|
|
|
176
|
+
if @needs_calendar.nil?
|
|
177
|
+
invalid_properties.push('invalid value for "needs_calendar", needs_calendar cannot be nil.')
|
|
178
|
+
end
|
|
179
|
+
|
|
154
180
|
invalid_properties
|
|
155
181
|
end
|
|
156
182
|
|
|
@@ -162,6 +188,7 @@ module Repull
|
|
|
162
188
|
return false if @mapped.nil?
|
|
163
189
|
return false if @session_id.nil?
|
|
164
190
|
return false if @connection_id.nil?
|
|
191
|
+
return false if @needs_calendar.nil?
|
|
165
192
|
true
|
|
166
193
|
end
|
|
167
194
|
|
|
@@ -205,6 +232,16 @@ module Repull
|
|
|
205
232
|
@connection_id = connection_id
|
|
206
233
|
end
|
|
207
234
|
|
|
235
|
+
# Custom attribute writer method with validation
|
|
236
|
+
# @param [Object] needs_calendar Value to be assigned
|
|
237
|
+
def needs_calendar=(needs_calendar)
|
|
238
|
+
if needs_calendar.nil?
|
|
239
|
+
fail ArgumentError, 'needs_calendar cannot be nil'
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
@needs_calendar = needs_calendar
|
|
243
|
+
end
|
|
244
|
+
|
|
208
245
|
# Checks equality by comparing each attribute.
|
|
209
246
|
# @param [Object] Object to be compared
|
|
210
247
|
def ==(o)
|
|
@@ -216,7 +253,9 @@ module Repull
|
|
|
216
253
|
session_id == o.session_id &&
|
|
217
254
|
connection_id == o.connection_id &&
|
|
218
255
|
reservations_imported == o.reservations_imported &&
|
|
219
|
-
reservations_found == o.reservations_found
|
|
256
|
+
reservations_found == o.reservations_found &&
|
|
257
|
+
needs_calendar == o.needs_calendar &&
|
|
258
|
+
calendar_note == o.calendar_note
|
|
220
259
|
end
|
|
221
260
|
|
|
222
261
|
# @see the `==` method
|
|
@@ -228,7 +267,7 @@ module Repull
|
|
|
228
267
|
# Calculates hash code according to all attributes.
|
|
229
268
|
# @return [Integer] Hash code
|
|
230
269
|
def hash
|
|
231
|
-
[success, mapped, unmapped, session_id, connection_id, reservations_imported, reservations_found].hash
|
|
270
|
+
[success, mapped, unmapped, session_id, connection_id, reservations_imported, reservations_found, needs_calendar, calendar_note].hash
|
|
232
271
|
end
|
|
233
272
|
|
|
234
273
|
# Builds the object from hash
|
|
@@ -59,8 +59,15 @@ module Repull
|
|
|
59
59
|
# When the message reached the channel. `null` while it is `sending` or when it `failed`.
|
|
60
60
|
attr_accessor :delivered_at
|
|
61
61
|
|
|
62
|
+
# Who read it depends on `direction`. **Outbound** (your message): when the guest first read it, from the channel's read receipts — Airbnb reports them; on other channels it stays `null`. Changes are sent as `reservation.message.read`. **Inbound** (the guest's message): when your team answered it or marked it handled.
|
|
62
63
|
attr_accessor :read_at
|
|
63
64
|
|
|
65
|
+
# Inbound messages only: when the host or a co-host first read it on the channel, from the channel's read receipts (Airbnb reports them). `null` for your own messages, on other channels, and until your side has opened the conversation since it arrived.
|
|
66
|
+
attr_accessor :host_read_at
|
|
67
|
+
|
|
68
|
+
# Reactions on this message, oldest first. Airbnb reports them; empty on other channels. Added and removed reactions are sent as `reservation.message.reaction`. To react, `PATCH /v1/channels/airbnb/messaging/{threadId}/messages/{messageId}` with `action: \"react\"`.
|
|
69
|
+
attr_accessor :reactions
|
|
70
|
+
|
|
64
71
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
65
72
|
def self.attribute_map
|
|
66
73
|
{
|
|
@@ -80,7 +87,9 @@ module Repull
|
|
|
80
87
|
:'ai_generated' => :'aiGenerated',
|
|
81
88
|
:'sent_at' => :'sentAt',
|
|
82
89
|
:'delivered_at' => :'deliveredAt',
|
|
83
|
-
:'read_at' => :'readAt'
|
|
90
|
+
:'read_at' => :'readAt',
|
|
91
|
+
:'host_read_at' => :'hostReadAt',
|
|
92
|
+
:'reactions' => :'reactions'
|
|
84
93
|
}
|
|
85
94
|
end
|
|
86
95
|
|
|
@@ -113,7 +122,9 @@ module Repull
|
|
|
113
122
|
:'ai_generated' => :'Boolean',
|
|
114
123
|
:'sent_at' => :'Time',
|
|
115
124
|
:'delivered_at' => :'Time',
|
|
116
|
-
:'read_at' => :'Time'
|
|
125
|
+
:'read_at' => :'Time',
|
|
126
|
+
:'host_read_at' => :'Time',
|
|
127
|
+
:'reactions' => :'Array<MessageReaction>'
|
|
117
128
|
}
|
|
118
129
|
end
|
|
119
130
|
|
|
@@ -127,7 +138,8 @@ module Repull
|
|
|
127
138
|
:'channel',
|
|
128
139
|
:'translated_body',
|
|
129
140
|
:'delivered_at',
|
|
130
|
-
:'read_at'
|
|
141
|
+
:'read_at',
|
|
142
|
+
:'host_read_at',
|
|
131
143
|
])
|
|
132
144
|
end
|
|
133
145
|
|
|
@@ -216,6 +228,16 @@ module Repull
|
|
|
216
228
|
if attributes.key?(:'read_at')
|
|
217
229
|
self.read_at = attributes[:'read_at']
|
|
218
230
|
end
|
|
231
|
+
|
|
232
|
+
if attributes.key?(:'host_read_at')
|
|
233
|
+
self.host_read_at = attributes[:'host_read_at']
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if attributes.key?(:'reactions')
|
|
237
|
+
if (value = attributes[:'reactions']).is_a?(Array)
|
|
238
|
+
self.reactions = value
|
|
239
|
+
end
|
|
240
|
+
end
|
|
219
241
|
end
|
|
220
242
|
|
|
221
243
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -254,7 +276,9 @@ module Repull
|
|
|
254
276
|
ai_generated == o.ai_generated &&
|
|
255
277
|
sent_at == o.sent_at &&
|
|
256
278
|
delivered_at == o.delivered_at &&
|
|
257
|
-
read_at == o.read_at
|
|
279
|
+
read_at == o.read_at &&
|
|
280
|
+
host_read_at == o.host_read_at &&
|
|
281
|
+
reactions == o.reactions
|
|
258
282
|
end
|
|
259
283
|
|
|
260
284
|
# @see the `==` method
|
|
@@ -266,7 +290,7 @@ module Repull
|
|
|
266
290
|
# Calculates hash code according to all attributes.
|
|
267
291
|
# @return [Integer] Hash code
|
|
268
292
|
def hash
|
|
269
|
-
[id, external_message_id, direction, status, status_reason, sender_type, sender_name, sender_avatar, channel, body, translated_body, attachments, is_automated, ai_generated, sent_at, delivered_at, read_at].hash
|
|
293
|
+
[id, external_message_id, direction, status, status_reason, sender_type, sender_name, sender_avatar, channel, body, translated_body, attachments, is_automated, ai_generated, sent_at, delivered_at, read_at, host_read_at, reactions].hash
|
|
270
294
|
end
|
|
271
295
|
|
|
272
296
|
# Builds the object from hash
|