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.
@@ -0,0 +1,192 @@
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
+ # Whether Vrbo's notification emails for this account reach Repull. Each one brings a new guest message or booking in within about a minute; without them Repull relies on its scheduled check, which is slower.
18
+ class VrboNotifications < ApiModelBase
19
+ # `active`: notifications arrive for this account's guest messages. `missing`: Repull found new guest messages and no notification came for them — ask the host to add `address` on Vrbo (or turn its notifications back on). `unknown`: no guest messages yet to judge by.
20
+ attr_accessor :state
21
+
22
+ # When the last Vrbo notification reached `address`. `null` when none ever has.
23
+ attr_accessor :last_received_at
24
+
25
+ # The address the host adds on Vrbo as a secondary email, with message and reservation notifications on.
26
+ attr_accessor :address
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'state' => :'state',
32
+ :'last_received_at' => :'lastReceivedAt',
33
+ :'address' => :'address'
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
+ :'state' => :'String',
51
+ :'last_received_at' => :'Time',
52
+ :'address' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'last_received_at',
60
+ :'address'
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::VrboNotifications` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::VrboNotifications`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'state')
81
+ self.state = attributes[:'state']
82
+ else
83
+ self.state = nil
84
+ end
85
+
86
+ if attributes.key?(:'last_received_at')
87
+ self.last_received_at = attributes[:'last_received_at']
88
+ else
89
+ self.last_received_at = nil
90
+ end
91
+
92
+ if attributes.key?(:'address')
93
+ self.address = attributes[:'address']
94
+ else
95
+ self.address = nil
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
+ invalid_properties = Array.new
104
+ if @state.nil?
105
+ invalid_properties.push('invalid value for "state", state cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @state.nil?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] state Value to be assigned
121
+ def state=(state)
122
+ if state.nil?
123
+ fail ArgumentError, 'state cannot be nil'
124
+ end
125
+
126
+ @state = state
127
+ end
128
+
129
+ # Checks equality by comparing each attribute.
130
+ # @param [Object] Object to be compared
131
+ def ==(o)
132
+ return true if self.equal?(o)
133
+ self.class == o.class &&
134
+ state == o.state &&
135
+ last_received_at == o.last_received_at &&
136
+ address == o.address
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [state, last_received_at, address].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ end
191
+
192
+ end
@@ -26,6 +26,7 @@ module Repull
26
26
  :'AccountImportCompletedEvent',
27
27
  :'AccountImportFailedEvent',
28
28
  :'AccountImportStartedEvent',
29
+ :'AccountNotificationsMissingEvent',
29
30
  :'AccountUnitsAddedEvent',
30
31
  :'AiOperationCompletedEvent',
31
32
  :'AiOperationFailedEvent',
@@ -34,6 +35,7 @@ module Repull
34
35
  :'ChannelSyncFailedEvent',
35
36
  :'ConnectSessionAbandonedEvent',
36
37
  :'ConnectSessionCompletedEvent',
38
+ :'ConversationMessageStatusChangedEvent',
37
39
  :'InquiryCreatedEvent',
38
40
  :'InquiryUpdatedEvent',
39
41
  :'ListingCreatedEvent',
@@ -80,6 +82,7 @@ module Repull
80
82
  :'account.import.completed' => :'AccountImportCompletedEvent',
81
83
  :'account.import.failed' => :'AccountImportFailedEvent',
82
84
  :'account.import.started' => :'AccountImportStartedEvent',
85
+ :'account.notifications_missing' => :'AccountNotificationsMissingEvent',
83
86
  :'account.units.added' => :'AccountUnitsAddedEvent',
84
87
  :'ai.operation.completed' => :'AiOperationCompletedEvent',
85
88
  :'ai.operation.failed' => :'AiOperationFailedEvent',
@@ -88,6 +91,7 @@ module Repull
88
91
  :'channel.sync.failed' => :'ChannelSyncFailedEvent',
89
92
  :'connect.session.abandoned' => :'ConnectSessionAbandonedEvent',
90
93
  :'connect.session.completed' => :'ConnectSessionCompletedEvent',
94
+ :'conversation.message.status_changed' => :'ConversationMessageStatusChangedEvent',
91
95
  :'inquiry.created' => :'InquiryCreatedEvent',
92
96
  :'inquiry.updated' => :'InquiryUpdatedEvent',
93
97
  :'listing.created' => :'ListingCreatedEvent',
@@ -19,6 +19,7 @@ module Repull
19
19
  RESERVATION_UPDATED = "reservation.updated".freeze
20
20
  RESERVATION_CANCELLED = "reservation.cancelled".freeze
21
21
  RESERVATION_MESSAGE_RECEIVED = "reservation.message.received".freeze
22
+ CONVERSATION_MESSAGE_STATUS_CHANGED = "conversation.message.status_changed".freeze
22
23
  RESERVATION_MESSAGE_SENT = "reservation.message.sent".freeze
23
24
  RESERVATION_MESSAGE_UPDATED = "reservation.message.updated".freeze
24
25
  RESERVATION_MESSAGE_READ = "reservation.message.read".freeze
@@ -47,6 +48,7 @@ module Repull
47
48
  ACCOUNT_IMPORT_FAILED = "account.import.failed".freeze
48
49
  ACCOUNT_UNITS_ADDED = "account.units.added".freeze
49
50
  ACCOUNT_CALENDAR_ACCESS_CHANGED = "account.calendar_access_changed".freeze
51
+ ACCOUNT_NOTIFICATIONS_MISSING = "account.notifications_missing".freeze
50
52
  REVIEW_CREATED = "review.created".freeze
51
53
  REVIEW_RESPONDED = "review.responded".freeze
52
54
  AI_OPERATION_COMPLETED = "ai.operation.completed".freeze
@@ -60,7 +62,7 @@ module Repull
60
62
  USAGE_QUOTA_WARNING = "usage.quota.warning".freeze
61
63
 
62
64
  def self.all_vars
63
- @all_vars ||= [RESERVATION_CREATED, RESERVATION_UPDATED, RESERVATION_CANCELLED, RESERVATION_MESSAGE_RECEIVED, RESERVATION_MESSAGE_SENT, RESERVATION_MESSAGE_UPDATED, RESERVATION_MESSAGE_READ, RESERVATION_MESSAGE_REACTION, RESERVATION_ALTERATION_CREATED, RESERVATION_ALTERATION_RESPONDED, RESERVATION_REQUEST_CREATED, RESERVATION_REQUEST_UPDATED, BOOKING_UNACKNOWLEDGED, CHANNEL_SYNC_FAILED, CHANNEL_DEGRADED, RESERVATION_THREAD_ASSIGNED, INQUIRY_CREATED, INQUIRY_UPDATED, LISTING_CREATED, LISTING_UPDATED, LISTING_DELETED, LISTING_SUSPENDED, LISTING_REACTIVATED, ACCOUNT_CREATED, CONNECT_SESSION_COMPLETED, CONNECT_SESSION_ABANDONED, ACCOUNT_DISCONNECTED, ACCOUNT_IMPORT_STARTED, ACCOUNT_IMPORT_COMPLETED, ACCOUNT_IMPORT_FAILED, ACCOUNT_UNITS_ADDED, ACCOUNT_CALENDAR_ACCESS_CHANGED, REVIEW_CREATED, REVIEW_RESPONDED, AI_OPERATION_COMPLETED, AI_OPERATION_FAILED, PAYMENT_COMPLETED, PAYMENT_REFUNDED, PAYOUT_COMPLETED, MIGRATION_COMPLETED, MIGRATION_FAILED, REPULL_PING, USAGE_QUOTA_WARNING].freeze
65
+ @all_vars ||= [RESERVATION_CREATED, RESERVATION_UPDATED, RESERVATION_CANCELLED, RESERVATION_MESSAGE_RECEIVED, CONVERSATION_MESSAGE_STATUS_CHANGED, RESERVATION_MESSAGE_SENT, RESERVATION_MESSAGE_UPDATED, RESERVATION_MESSAGE_READ, RESERVATION_MESSAGE_REACTION, RESERVATION_ALTERATION_CREATED, RESERVATION_ALTERATION_RESPONDED, RESERVATION_REQUEST_CREATED, RESERVATION_REQUEST_UPDATED, BOOKING_UNACKNOWLEDGED, CHANNEL_SYNC_FAILED, CHANNEL_DEGRADED, RESERVATION_THREAD_ASSIGNED, INQUIRY_CREATED, INQUIRY_UPDATED, LISTING_CREATED, LISTING_UPDATED, LISTING_DELETED, LISTING_SUSPENDED, LISTING_REACTIVATED, ACCOUNT_CREATED, CONNECT_SESSION_COMPLETED, CONNECT_SESSION_ABANDONED, ACCOUNT_DISCONNECTED, ACCOUNT_IMPORT_STARTED, ACCOUNT_IMPORT_COMPLETED, ACCOUNT_IMPORT_FAILED, ACCOUNT_UNITS_ADDED, ACCOUNT_CALENDAR_ACCESS_CHANGED, ACCOUNT_NOTIFICATIONS_MISSING, REVIEW_CREATED, REVIEW_RESPONDED, AI_OPERATION_COMPLETED, AI_OPERATION_FAILED, PAYMENT_COMPLETED, PAYMENT_REFUNDED, PAYOUT_COMPLETED, MIGRATION_COMPLETED, MIGRATION_FAILED, REPULL_PING, USAGE_QUOTA_WARNING].freeze
64
66
  end
65
67
 
66
68
  # Builds the enum from string
@@ -11,5 +11,5 @@ Generator version: 7.22.0
11
11
  =end
12
12
 
13
13
  module Repull
14
- VERSION = '0.2.50'
14
+ VERSION = '0.2.51'
15
15
  end
data/lib/repull.rb CHANGED
@@ -35,6 +35,8 @@ require 'repull/models/account_import_finished_payload'
35
35
  require 'repull/models/account_import_stage'
36
36
  require 'repull/models/account_import_started_event'
37
37
  require 'repull/models/account_import_started_payload'
38
+ require 'repull/models/account_notifications_missing_event'
39
+ require 'repull/models/account_notifications_missing_payload'
38
40
  require 'repull/models/account_units_added_event'
39
41
  require 'repull/models/account_units_added_payload'
40
42
  require 'repull/models/account_units_added_payload_hotels_inner'
@@ -212,6 +214,8 @@ require 'repull/models/conversation_guest_contact'
212
214
  require 'repull/models/conversation_host'
213
215
  require 'repull/models/conversation_list_response'
214
216
  require 'repull/models/conversation_message_attachment'
217
+ require 'repull/models/conversation_message_status_changed_event'
218
+ require 'repull/models/conversation_message_status_changed_payload'
215
219
  require 'repull/models/create_airbnb_listing_room_request'
216
220
  require 'repull/models/create_airbnb_offer_request'
217
221
  require 'repull/models/create_airbnb_offer_request_guest_details'
@@ -323,6 +327,7 @@ require 'repull/models/guest_create_response_pms'
323
327
  require 'repull/models/guest_flag'
324
328
  require 'repull/models/guest_list_response'
325
329
  require 'repull/models/guest_note'
330
+ require 'repull/models/guest_phone_type'
326
331
  require 'repull/models/guest_profile'
327
332
  require 'repull/models/guest_reservations_summary'
328
333
  require 'repull/models/guest_update_request'
@@ -798,6 +803,7 @@ require 'repull/models/vrbo_import_status'
798
803
  require 'repull/models/vrbo_listing'
799
804
  require 'repull/models/vrbo_login200_response'
800
805
  require 'repull/models/vrbo_login_request'
806
+ require 'repull/models/vrbo_notifications'
801
807
  require 'repull/models/vrbo_reservation'
802
808
  require 'repull/models/vrbo_reservation_list_response'
803
809
  require 'repull/models/webhook_delivery'