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
@@ -0,0 +1,250 @@
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 PreviewConversationSpecialOfferRequestGuests < ApiModelBase
18
+ attr_accessor :adults
19
+
20
+ attr_accessor :children
21
+
22
+ attr_accessor :infants
23
+
24
+ attr_accessor :pets
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'adults' => :'adults',
30
+ :'children' => :'children',
31
+ :'infants' => :'infants',
32
+ :'pets' => :'pets'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'adults' => :'Integer',
50
+ :'children' => :'Integer',
51
+ :'infants' => :'Integer',
52
+ :'pets' => :'Integer'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::PreviewConversationSpecialOfferRequestGuests` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::PreviewConversationSpecialOfferRequestGuests`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'adults')
79
+ self.adults = attributes[:'adults']
80
+ end
81
+
82
+ if attributes.key?(:'children')
83
+ self.children = attributes[:'children']
84
+ end
85
+
86
+ if attributes.key?(:'infants')
87
+ self.infants = attributes[:'infants']
88
+ end
89
+
90
+ if attributes.key?(:'pets')
91
+ self.pets = attributes[:'pets']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if !@adults.nil? && @adults < 1
101
+ invalid_properties.push('invalid value for "adults", must be greater than or equal to 1.')
102
+ end
103
+
104
+ if !@children.nil? && @children < 0
105
+ invalid_properties.push('invalid value for "children", must be greater than or equal to 0.')
106
+ end
107
+
108
+ if !@infants.nil? && @infants < 0
109
+ invalid_properties.push('invalid value for "infants", must be greater than or equal to 0.')
110
+ end
111
+
112
+ if !@pets.nil? && @pets < 0
113
+ invalid_properties.push('invalid value for "pets", must be greater than or equal to 0.')
114
+ end
115
+
116
+ invalid_properties
117
+ end
118
+
119
+ # Check to see if the all the properties in the model are valid
120
+ # @return true if the model is valid
121
+ def valid?
122
+ warn '[DEPRECATED] the `valid?` method is obsolete'
123
+ return false if !@adults.nil? && @adults < 1
124
+ return false if !@children.nil? && @children < 0
125
+ return false if !@infants.nil? && @infants < 0
126
+ return false if !@pets.nil? && @pets < 0
127
+ true
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] adults Value to be assigned
132
+ def adults=(adults)
133
+ if adults.nil?
134
+ fail ArgumentError, 'adults cannot be nil'
135
+ end
136
+
137
+ if adults < 1
138
+ fail ArgumentError, 'invalid value for "adults", must be greater than or equal to 1.'
139
+ end
140
+
141
+ @adults = adults
142
+ end
143
+
144
+ # Custom attribute writer method with validation
145
+ # @param [Object] children Value to be assigned
146
+ def children=(children)
147
+ if children.nil?
148
+ fail ArgumentError, 'children cannot be nil'
149
+ end
150
+
151
+ if children < 0
152
+ fail ArgumentError, 'invalid value for "children", must be greater than or equal to 0.'
153
+ end
154
+
155
+ @children = children
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] infants Value to be assigned
160
+ def infants=(infants)
161
+ if infants.nil?
162
+ fail ArgumentError, 'infants cannot be nil'
163
+ end
164
+
165
+ if infants < 0
166
+ fail ArgumentError, 'invalid value for "infants", must be greater than or equal to 0.'
167
+ end
168
+
169
+ @infants = infants
170
+ end
171
+
172
+ # Custom attribute writer method with validation
173
+ # @param [Object] pets Value to be assigned
174
+ def pets=(pets)
175
+ if pets.nil?
176
+ fail ArgumentError, 'pets cannot be nil'
177
+ end
178
+
179
+ if pets < 0
180
+ fail ArgumentError, 'invalid value for "pets", must be greater than or equal to 0.'
181
+ end
182
+
183
+ @pets = pets
184
+ end
185
+
186
+ # Checks equality by comparing each attribute.
187
+ # @param [Object] Object to be compared
188
+ def ==(o)
189
+ return true if self.equal?(o)
190
+ self.class == o.class &&
191
+ adults == o.adults &&
192
+ children == o.children &&
193
+ infants == o.infants &&
194
+ pets == o.pets
195
+ end
196
+
197
+ # @see the `==` method
198
+ # @param [Object] Object to be compared
199
+ def eql?(o)
200
+ self == o
201
+ end
202
+
203
+ # Calculates hash code according to all attributes.
204
+ # @return [Integer] Hash code
205
+ def hash
206
+ [adults, children, infants, pets].hash
207
+ end
208
+
209
+ # Builds the object from hash
210
+ # @param [Hash] attributes Model attributes in the form of hash
211
+ # @return [Object] Returns the model itself
212
+ def self.build_from_hash(attributes)
213
+ return nil unless attributes.is_a?(Hash)
214
+ attributes = attributes.transform_keys(&:to_sym)
215
+ transformed_hash = {}
216
+ openapi_types.each_pair do |key, type|
217
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
218
+ transformed_hash["#{key}"] = nil
219
+ elsif type =~ /\AArray<(.*)>/i
220
+ # check to ensure the input is an array given that the attribute
221
+ # is documented as an array but the input is not
222
+ if attributes[attribute_map[key]].is_a?(Array)
223
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
224
+ end
225
+ elsif !attributes[attribute_map[key]].nil?
226
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
227
+ end
228
+ end
229
+ new(transformed_hash)
230
+ end
231
+
232
+ # Returns the object in the form of hash
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_hash
235
+ hash = {}
236
+ self.class.attribute_map.each_pair do |attr, param|
237
+ value = self.send(attr)
238
+ if value.nil?
239
+ is_nullable = self.class.openapi_nullable.include?(attr)
240
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
241
+ end
242
+
243
+ hash[param] = _to_hash(value)
244
+ end
245
+ hash
246
+ end
247
+
248
+ end
249
+
250
+ end
@@ -14,8 +14,11 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # A vacation rental property in your Repull workspace. Backed by the core `listings` row — enriched per-PMS fields (bedrooms, property type, provider id, etc.) live in provider-specific detail tables and are NOT returned here. Field availability differs by endpoint: - `channels` is returned by the list endpoint (`GET /v1/properties`) only. - `latitude`, `longitude`, `createdAt`, and `amenities` are returned by the detail endpoint (`GET /v1/properties/{id}`) only. `amenities` requires `?include=amenities`. An **inactive** property (`status: inactive`) appears only in the list endpoint, and only when `?status=inactive|all` asks for it. Such a row carries identity fields only — `id`, `name`, `status`, `lifecycleStatus`, `channels`, `updatedAt` — so every other field is absent until the property is activated. Every other endpoint answers `403 listing_inactive` for it.
17
+ # A vacation rental property in your Repull workspace. Backed by the core `listings` row — enriched per-PMS fields (bedrooms, property type, provider id, etc.) live in provider-specific detail tables and are NOT returned here. Field availability differs by endpoint: - `channels` is returned by the list endpoint (`GET /v1/properties`) only. - `latitude`, `longitude`, `createdAt`, and `amenities` are returned by the detail endpoint (`GET /v1/properties/{id}`) only. `amenities` requires `?include=amenities`. An **inactive** property (`status: inactive`) appears only in the list endpoint, and only when `?status=inactive|all` asks for it. Such a row carries identity fields only — `id`, `name`, `status`, `lifecycleStatus`, `channels`, `accounts`, `updatedAt` — so every other field is absent until the property is activated. Every other endpoint answers `403 listing_inactive` for it.
18
18
  class Property < ApiModelBase
19
+ # The connected account the property belongs to on each channel it is on. List endpoint.
20
+ attr_accessor :accounts
21
+
19
22
  # Internal Repull property ID. Equal to the listing id (`listings.id`); the same integer is used as `listingId` on reservations and `propertyId` on availability.
20
23
  attr_accessor :id
21
24
 
@@ -57,6 +60,7 @@ module Repull
57
60
  # Attribute mapping from ruby-style variable name to JSON key.
58
61
  def self.attribute_map
59
62
  {
63
+ :'accounts' => :'accounts',
60
64
  :'id' => :'id',
61
65
  :'name' => :'name',
62
66
  :'address' => :'address',
@@ -86,6 +90,7 @@ module Repull
86
90
  # Attribute type mapping.
87
91
  def self.openapi_types
88
92
  {
93
+ :'accounts' => :'Array<RecordAccount>',
89
94
  :'id' => :'String',
90
95
  :'name' => :'String',
91
96
  :'address' => :'String',
@@ -130,6 +135,12 @@ module Repull
130
135
  h[k.to_sym] = v
131
136
  }
132
137
 
138
+ if attributes.key?(:'accounts')
139
+ if (value = attributes[:'accounts']).is_a?(Array)
140
+ self.accounts = value
141
+ end
142
+ end
143
+
133
144
  if attributes.key?(:'id')
134
145
  self.id = attributes[:'id']
135
146
  end
@@ -207,6 +218,7 @@ module Repull
207
218
  def ==(o)
208
219
  return true if self.equal?(o)
209
220
  self.class == o.class &&
221
+ accounts == o.accounts &&
210
222
  id == o.id &&
211
223
  name == o.name &&
212
224
  address == o.address &&
@@ -231,7 +243,7 @@ module Repull
231
243
  # Calculates hash code according to all attributes.
232
244
  # @return [Integer] Hash code
233
245
  def hash
234
- [id, name, address, city, latitude, longitude, currency, status, lifecycle_status, created_at, updated_at, channels, amenities].hash
246
+ [accounts, id, name, address, city, latitude, longitude, currency, status, lifecycle_status, created_at, updated_at, channels, amenities].hash
235
247
  end
236
248
 
237
249
  # Builds the object from hash
@@ -0,0 +1,170 @@
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
+ # The connected account a record belongs to — keyed exactly like the webhook `account` block and `connect.session.completed`, so one `provider:externalAccountId` key routes reads and events to the same user. `null` when it cannot be resolved (never guessed).
18
+ class RecordAccount < ApiModelBase
19
+ # airbnb, booking, booking_extranet, vrbo, or the PMS id (hostaway, cloudbeds, …).
20
+ attr_accessor :provider
21
+
22
+ # The provider's own account id — Airbnb host id, Booking.com hotel id, Extranet login, Vrbo account, or the PMS account.
23
+ attr_accessor :external_account_id
24
+
25
+ # Repull connection id (`X-Account-Id`), when the account has one. A string, like every id in API responses.
26
+ attr_accessor :connection_id
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'provider' => :'provider',
32
+ :'external_account_id' => :'externalAccountId',
33
+ :'connection_id' => :'connectionId'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'provider' => :'String',
51
+ :'external_account_id' => :'String',
52
+ :'connection_id' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'connection_id'
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::RecordAccount` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ acceptable_attribute_map = self.class.acceptable_attribute_map
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!acceptable_attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::RecordAccount`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'provider')
80
+ self.provider = attributes[:'provider']
81
+ end
82
+
83
+ if attributes.key?(:'external_account_id')
84
+ self.external_account_id = attributes[:'external_account_id']
85
+ end
86
+
87
+ if attributes.key?(:'connection_id')
88
+ self.connection_id = attributes[:'connection_id']
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
104
+ true
105
+ end
106
+
107
+ # Checks equality by comparing each attribute.
108
+ # @param [Object] Object to be compared
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ provider == o.provider &&
113
+ external_account_id == o.external_account_id &&
114
+ connection_id == o.connection_id
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ def hash
126
+ [provider, external_account_id, connection_id].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ attributes = attributes.transform_keys(&:to_sym)
135
+ transformed_hash = {}
136
+ openapi_types.each_pair do |key, type|
137
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = nil
139
+ elsif type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[attribute_map[key]].is_a?(Array)
143
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
144
+ end
145
+ elsif !attributes[attribute_map[key]].nil?
146
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
147
+ end
148
+ end
149
+ new(transformed_hash)
150
+ end
151
+
152
+ # Returns the object in the form of hash
153
+ # @return [Hash] Returns the object in the form of hash
154
+ def to_hash
155
+ hash = {}
156
+ self.class.attribute_map.each_pair do |attr, param|
157
+ value = self.send(attr)
158
+ if value.nil?
159
+ is_nullable = self.class.openapi_nullable.include?(attr)
160
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
161
+ end
162
+
163
+ hash[param] = _to_hash(value)
164
+ end
165
+ hash
166
+ end
167
+
168
+ end
169
+
170
+ end
@@ -18,10 +18,14 @@ module Repull
18
18
  # Reply text. `response` is accepted as an alias.
19
19
  attr_accessor :message
20
20
 
21
+ # VRBO: the name the response is signed with (the connected account's host name otherwise). Ignored on other channels.
22
+ attr_accessor :name
23
+
21
24
  # Attribute mapping from ruby-style variable name to JSON key.
22
25
  def self.attribute_map
23
26
  {
24
- :'message' => :'message'
27
+ :'message' => :'message',
28
+ :'name' => :'name'
25
29
  }
26
30
  end
27
31
 
@@ -38,7 +42,8 @@ module Repull
38
42
  # Attribute type mapping.
39
43
  def self.openapi_types
40
44
  {
41
- :'message' => :'String'
45
+ :'message' => :'String',
46
+ :'name' => :'String'
42
47
  }
43
48
  end
44
49
 
@@ -69,6 +74,10 @@ module Repull
69
74
  else
70
75
  self.message = nil
71
76
  end
77
+
78
+ if attributes.key?(:'name')
79
+ self.name = attributes[:'name']
80
+ end
72
81
  end
73
82
 
74
83
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -80,6 +89,10 @@ module Repull
80
89
  invalid_properties.push('invalid value for "message", message cannot be nil.')
81
90
  end
82
91
 
92
+ if !@name.nil? && @name.to_s.length > 80
93
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 80.')
94
+ end
95
+
83
96
  invalid_properties
84
97
  end
85
98
 
@@ -88,6 +101,7 @@ module Repull
88
101
  def valid?
89
102
  warn '[DEPRECATED] the `valid?` method is obsolete'
90
103
  return false if @message.nil?
104
+ return false if !@name.nil? && @name.to_s.length > 80
91
105
  true
92
106
  end
93
107
 
@@ -101,12 +115,27 @@ module Repull
101
115
  @message = message
102
116
  end
103
117
 
118
+ # Custom attribute writer method with validation
119
+ # @param [Object] name Value to be assigned
120
+ def name=(name)
121
+ if name.nil?
122
+ fail ArgumentError, 'name cannot be nil'
123
+ end
124
+
125
+ if name.to_s.length > 80
126
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 80.'
127
+ end
128
+
129
+ @name = name
130
+ end
131
+
104
132
  # Checks equality by comparing each attribute.
105
133
  # @param [Object] Object to be compared
106
134
  def ==(o)
107
135
  return true if self.equal?(o)
108
136
  self.class == o.class &&
109
- message == o.message
137
+ message == o.message &&
138
+ name == o.name
110
139
  end
111
140
 
112
141
  # @see the `==` method
@@ -118,7 +147,7 @@ module Repull
118
147
  # Calculates hash code according to all attributes.
119
148
  # @return [Integer] Hash code
120
149
  def hash
121
- [message].hash
150
+ [message, name].hash
122
151
  end
123
152
 
124
153
  # Builds the object from hash
@@ -16,6 +16,9 @@ require 'time'
16
16
  module Repull
17
17
  # A booking/reservation from a connected PMS. Identical shape between list-row (`GET /v1/reservations`) and detail (`GET /v1/reservations/{id}`) — SDK consumers can use the same type for both. The canonical (post-2026-05) shape uses nested `primaryGuest`, `occupancy`, `financials` blocks. The legacy flat fields (`guestId`, `totalPrice`, `currency`, `guestDetails`) remain populated for back-compat and are marked `deprecated` here. New consumers should read from the nested blocks; existing consumers continue to work unchanged.
18
18
  class Reservation < ApiModelBase
19
+ # The connected account this reservation belongs to. List endpoint.
20
+ attr_accessor :account
21
+
19
22
  # Internal Repull reservation ID
20
23
  attr_accessor :id
21
24
 
@@ -91,6 +94,7 @@ module Repull
91
94
  # Attribute mapping from ruby-style variable name to JSON key.
92
95
  def self.attribute_map
93
96
  {
97
+ :'account' => :'account',
94
98
  :'id' => :'id',
95
99
  :'listing_id' => :'listingId',
96
100
  :'guest_id' => :'guestId',
@@ -132,6 +136,7 @@ module Repull
132
136
  # Attribute type mapping.
133
137
  def self.openapi_types
134
138
  {
139
+ :'account' => :'RecordAccount',
135
140
  :'id' => :'String',
136
141
  :'listing_id' => :'String',
137
142
  :'guest_id' => :'String',
@@ -163,6 +168,7 @@ module Repull
163
168
  # List of attributes with nullable: true
164
169
  def self.openapi_nullable
165
170
  Set.new([
171
+ :'account',
166
172
  :'check_in_time',
167
173
  :'check_out_time',
168
174
  :'source',
@@ -189,6 +195,10 @@ module Repull
189
195
  h[k.to_sym] = v
190
196
  }
191
197
 
198
+ if attributes.key?(:'account')
199
+ self.account = attributes[:'account']
200
+ end
201
+
192
202
  if attributes.key?(:'id')
193
203
  self.id = attributes[:'id']
194
204
  else
@@ -448,6 +458,7 @@ module Repull
448
458
  def ==(o)
449
459
  return true if self.equal?(o)
450
460
  self.class == o.class &&
461
+ account == o.account &&
451
462
  id == o.id &&
452
463
  listing_id == o.listing_id &&
453
464
  guest_id == o.guest_id &&
@@ -484,7 +495,7 @@ module Repull
484
495
  # Calculates hash code according to all attributes.
485
496
  # @return [Integer] Hash code
486
497
  def hash
487
- [id, listing_id, guest_id, check_in, check_out, check_in_time, check_out_time, status, status_detail, pending_reason, respond_by, source, platform, confirmation_code, unit, primary_guest, occupancy, financials, total_price, currency, guest_details, created_at, updated_at, booked_at, guest_name].hash
498
+ [account, id, listing_id, guest_id, check_in, check_out, check_in_time, check_out_time, status, status_detail, pending_reason, respond_by, source, platform, confirmation_code, unit, primary_guest, occupancy, financials, total_price, currency, guest_details, created_at, updated_at, booked_at, guest_name].hash
488
499
  end
489
500
 
490
501
  # Builds the object from hash