repull 0.2.29 → 0.2.31

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +2 -2
  3. data/lib/repull/api/billing_api.rb +68 -9
  4. data/lib/repull/api/connect_api.rb +139 -0
  5. data/lib/repull/api/conversations_api.rb +5 -2
  6. data/lib/repull/api/health_api.rb +2 -2
  7. data/lib/repull/api/hotels_api.rb +142 -0
  8. data/lib/repull/api/workspaces_api.rb +96 -0
  9. data/lib/repull/configuration.rb +0 -4
  10. data/lib/repull/models/availability_batch_write_request.rb +30 -1
  11. data/lib/repull/models/availability_write_request.rb +30 -1
  12. data/lib/repull/models/availability_write_settings.rb +33 -4
  13. data/lib/repull/models/connect_provider.rb +2 -2
  14. data/lib/repull/models/connect_session.rb +12 -2
  15. data/lib/repull/models/create_billing_checkout200_response.rb +156 -0
  16. data/lib/repull/models/create_billing_checkout_request.rb +2 -2
  17. data/lib/repull/models/create_connect_session_request.rb +13 -1
  18. data/lib/repull/models/create_connect_session_request_workspace.rb +1 -1
  19. data/lib/repull/models/get_billing200_response.rb +183 -0
  20. data/lib/repull/models/get_billing200_response_limits.rb +160 -0
  21. data/lib/repull/models/get_billing200_response_used.rb +156 -0
  22. data/lib/repull/models/get_channel_health200_response_vrbo.rb +11 -1
  23. data/lib/repull/models/get_hotel200_response.rb +252 -0
  24. data/lib/repull/models/get_hotel200_response_room_types_inner.rb +168 -0
  25. data/lib/repull/models/get_usage_summary200_response.rb +10 -1
  26. data/lib/repull/models/get_usage_summary200_response_credits.rb +186 -0
  27. data/lib/repull/models/list_hotels200_response.rb +158 -0
  28. data/lib/repull/models/list_hotels200_response_data_inner.rb +241 -0
  29. data/lib/repull/models/list_workspaces200_response.rb +158 -0
  30. data/lib/repull/models/listing.rb +50 -1
  31. data/lib/repull/models/listing_hotel.rb +202 -0
  32. data/lib/repull/models/record_account.rb +15 -5
  33. data/lib/repull/models/reservation_message_received_payload.rb +12 -1
  34. data/lib/repull/models/reservation_message_sent_payload.rb +12 -1
  35. data/lib/repull/models/reservation_message_updated_payload.rb +12 -1
  36. data/lib/repull/models/select_provider_response.rb +1 -1
  37. data/lib/repull/models/workspace.rb +265 -0
  38. data/lib/repull/version.rb +1 -1
  39. data/lib/repull.rb +14 -0
  40. data/openapi/v1.json +643 -28
  41. metadata +16 -2
@@ -30,6 +30,9 @@ module Repull
30
30
  # Optional whitelist of provider IDs the picker should expose. Omit to show every channel in the registry.
31
31
  attr_accessor :allowed_providers
32
32
 
33
+ # Also list PMSes Repull doesn't connect yet (`status: request-only` in `GET /v1/connect/providers?includeRequestOnly=true`), plus an Other PMS card. Picking one opens a form that collects the host's contact and access details for the Repull team and ends with \"A team member will contact you\". No connection is made: the redirect carries `status=requested&provider=<id>`, and no `connect.session.completed` webhook fires. Naming a request-only id in `allowedProviders` offers it without this flag.
34
+ attr_accessor :include_request_only
35
+
33
36
  # Optional UI language for the hosted Connect pages. Accepts any supported locale code (currently `en`, `fr`). When set it pins the language for the whole flow, overriding the workspace `default_language`. Unknown codes are ignored and the page falls back to the workspace default, then `Accept-Language`, then `en`. The end user can still override per-visit with a `?locale=` query param on the hosted page.
34
37
  attr_accessor :locale
35
38
 
@@ -73,6 +76,7 @@ module Repull
73
76
  :'reservation_history_months' => :'reservationHistoryMonths',
74
77
  :'access_type' => :'accessType',
75
78
  :'allowed_providers' => :'allowedProviders',
79
+ :'include_request_only' => :'includeRequestOnly',
76
80
  :'locale' => :'locale',
77
81
  :'purpose' => :'purpose',
78
82
  :'workspace' => :'workspace',
@@ -99,6 +103,7 @@ module Repull
99
103
  :'reservation_history_months' => :'Integer',
100
104
  :'access_type' => :'String',
101
105
  :'allowed_providers' => :'Array<String>',
106
+ :'include_request_only' => :'Boolean',
102
107
  :'locale' => :'String',
103
108
  :'purpose' => :'String',
104
109
  :'workspace' => :'CreateConnectSessionRequestWorkspace',
@@ -156,6 +161,12 @@ module Repull
156
161
  end
157
162
  end
158
163
 
164
+ if attributes.key?(:'include_request_only')
165
+ self.include_request_only = attributes[:'include_request_only']
166
+ else
167
+ self.include_request_only = false
168
+ end
169
+
159
170
  if attributes.key?(:'locale')
160
171
  self.locale = attributes[:'locale']
161
172
  end
@@ -273,6 +284,7 @@ module Repull
273
284
  reservation_history_months == o.reservation_history_months &&
274
285
  access_type == o.access_type &&
275
286
  allowed_providers == o.allowed_providers &&
287
+ include_request_only == o.include_request_only &&
276
288
  locale == o.locale &&
277
289
  purpose == o.purpose &&
278
290
  workspace == o.workspace &&
@@ -289,7 +301,7 @@ module Repull
289
301
  # Calculates hash code according to all attributes.
290
302
  # @return [Integer] Hash code
291
303
  def hash
292
- [redirect_url, state, reservation_history_months, access_type, allowed_providers, locale, purpose, workspace, copy, scope].hash
304
+ [redirect_url, state, reservation_history_months, access_type, allowed_providers, include_request_only, locale, purpose, workspace, copy, scope].hash
293
305
  end
294
306
 
295
307
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # Migrate only — the property manager being moved. Required unless you send `X-Workspace-Id` to reconnect an existing migration.
17
+ # Opens a new sub-workspace for this customer of yours and lands the connection there; the response returns its `workspaceId`, which you then send as `X-Workspace-Id`. Works with both purposes: a plain `connect` keeps the normal onboarding pages. Required for `migrate` unless you send `X-Workspace-Id` to reconnect an existing one. Don't send it together with `X-Workspace-Id`.
18
18
  class CreateConnectSessionRequestWorkspace < ApiModelBase
19
19
  attr_accessor :name
20
20
 
@@ -0,0 +1,183 @@
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` | unlimited (10 included, then billed per listing) | | `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 GetBilling200Response < ApiModelBase
18
+ attr_accessor :plan
19
+
20
+ attr_accessor :limits
21
+
22
+ attr_accessor :used
23
+
24
+ attr_accessor :resets_at
25
+
26
+ attr_accessor :manage_url
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'plan' => :'plan',
32
+ :'limits' => :'limits',
33
+ :'used' => :'used',
34
+ :'resets_at' => :'resetsAt',
35
+ :'manage_url' => :'manageUrl'
36
+ }
37
+ end
38
+
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ acceptable_attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'plan' => :'String',
53
+ :'limits' => :'GetBilling200ResponseLimits',
54
+ :'used' => :'GetBilling200ResponseUsed',
55
+ :'resets_at' => :'Time',
56
+ :'manage_url' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetBilling200Response` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetBilling200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'plan')
83
+ self.plan = attributes[:'plan']
84
+ end
85
+
86
+ if attributes.key?(:'limits')
87
+ self.limits = attributes[:'limits']
88
+ end
89
+
90
+ if attributes.key?(:'used')
91
+ self.used = attributes[:'used']
92
+ end
93
+
94
+ if attributes.key?(:'resets_at')
95
+ self.resets_at = attributes[:'resets_at']
96
+ end
97
+
98
+ if attributes.key?(:'manage_url')
99
+ self.manage_url = attributes[:'manage_url']
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
+ invalid_properties = Array.new
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
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ plan == o.plan &&
124
+ limits == o.limits &&
125
+ used == o.used &&
126
+ resets_at == o.resets_at &&
127
+ manage_url == o.manage_url
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [plan, limits, used, resets_at, manage_url].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ transformed_hash = {}
149
+ openapi_types.each_pair do |key, type|
150
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = nil
152
+ elsif type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[attribute_map[key]].is_a?(Array)
156
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
+ end
158
+ elsif !attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
160
+ end
161
+ end
162
+ new(transformed_hash)
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ if value.nil?
172
+ is_nullable = self.class.openapi_nullable.include?(attr)
173
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
174
+ end
175
+
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ end
182
+
183
+ end
@@ -0,0 +1,160 @@
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` | unlimited (10 included, then billed per listing) | | `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 GetBilling200ResponseLimits < ApiModelBase
18
+ # null = no limit
19
+ attr_accessor :monthly_requests
20
+
21
+ # null = no limit
22
+ attr_accessor :daily_requests
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'monthly_requests' => :'monthlyRequests',
28
+ :'daily_requests' => :'dailyRequests'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'monthly_requests' => :'Integer',
46
+ :'daily_requests' => :'Integer'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ :'monthly_requests',
54
+ :'daily_requests'
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetBilling200ResponseLimits` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetBilling200ResponseLimits`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'monthly_requests')
75
+ self.monthly_requests = attributes[:'monthly_requests']
76
+ end
77
+
78
+ if attributes.key?(:'daily_requests')
79
+ self.daily_requests = attributes[:'daily_requests']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ warn '[DEPRECATED] the `valid?` method is obsolete'
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ monthly_requests == o.monthly_requests &&
104
+ daily_requests == o.daily_requests
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [monthly_requests, daily_requests].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ return nil unless attributes.is_a?(Hash)
124
+ attributes = attributes.transform_keys(&:to_sym)
125
+ transformed_hash = {}
126
+ openapi_types.each_pair do |key, type|
127
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = nil
129
+ elsif type =~ /\AArray<(.*)>/i
130
+ # check to ensure the input is an array given that the attribute
131
+ # is documented as an array but the input is not
132
+ if attributes[attribute_map[key]].is_a?(Array)
133
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
134
+ end
135
+ elsif !attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
137
+ end
138
+ end
139
+ new(transformed_hash)
140
+ end
141
+
142
+ # Returns the object in the form of hash
143
+ # @return [Hash] Returns the object in the form of hash
144
+ def to_hash
145
+ hash = {}
146
+ self.class.attribute_map.each_pair do |attr, param|
147
+ value = self.send(attr)
148
+ if value.nil?
149
+ is_nullable = self.class.openapi_nullable.include?(attr)
150
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
151
+ end
152
+
153
+ hash[param] = _to_hash(value)
154
+ end
155
+ hash
156
+ end
157
+
158
+ end
159
+
160
+ end
@@ -0,0 +1,156 @@
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` | unlimited (10 included, then billed per listing) | | `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 GetBilling200ResponseUsed < ApiModelBase
18
+ attr_accessor :monthly_requests
19
+
20
+ attr_accessor :daily_requests
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'monthly_requests' => :'monthlyRequests',
26
+ :'daily_requests' => :'dailyRequests'
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
+ :'monthly_requests' => :'Integer',
44
+ :'daily_requests' => :'Integer'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetBilling200ResponseUsed` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetBilling200ResponseUsed`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'monthly_requests')
71
+ self.monthly_requests = attributes[:'monthly_requests']
72
+ end
73
+
74
+ if attributes.key?(:'daily_requests')
75
+ self.daily_requests = attributes[:'daily_requests']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ monthly_requests == o.monthly_requests &&
100
+ daily_requests == o.daily_requests
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [monthly_requests, daily_requests].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+
154
+ end
155
+
156
+ end
@@ -27,6 +27,9 @@ module Repull
27
27
  # Listings with a calendar push waiting.
28
28
  attr_accessor :calendar_queue_backlog
29
29
 
30
+ # Failed pushes in the window caused by Repull's own VRBO connector (a timeout, a browser session in use), not by VRBO. They are retried and never set `status`.
31
+ attr_accessor :connector_errors
32
+
30
33
  attr_accessor :calendar_oldest_wait_minutes
31
34
 
32
35
  # Hours the push failure rate is judged over.
@@ -39,6 +42,7 @@ module Repull
39
42
  :'accounts_signed_out' => :'accounts_signed_out',
40
43
  :'inbox_sync_late' => :'inbox_sync_late',
41
44
  :'calendar_queue_backlog' => :'calendar_queue_backlog',
45
+ :'connector_errors' => :'connector_errors',
42
46
  :'calendar_oldest_wait_minutes' => :'calendar_oldest_wait_minutes',
43
47
  :'window_hours' => :'window_hours'
44
48
  }
@@ -61,6 +65,7 @@ module Repull
61
65
  :'accounts_signed_out' => :'Integer',
62
66
  :'inbox_sync_late' => :'Integer',
63
67
  :'calendar_queue_backlog' => :'Integer',
68
+ :'connector_errors' => :'Integer',
64
69
  :'calendar_oldest_wait_minutes' => :'Integer',
65
70
  :'window_hours' => :'Integer'
66
71
  }
@@ -104,6 +109,10 @@ module Repull
104
109
  self.calendar_queue_backlog = attributes[:'calendar_queue_backlog']
105
110
  end
106
111
 
112
+ if attributes.key?(:'connector_errors')
113
+ self.connector_errors = attributes[:'connector_errors']
114
+ end
115
+
107
116
  if attributes.key?(:'calendar_oldest_wait_minutes')
108
117
  self.calendar_oldest_wait_minutes = attributes[:'calendar_oldest_wait_minutes']
109
118
  end
@@ -137,6 +146,7 @@ module Repull
137
146
  accounts_signed_out == o.accounts_signed_out &&
138
147
  inbox_sync_late == o.inbox_sync_late &&
139
148
  calendar_queue_backlog == o.calendar_queue_backlog &&
149
+ connector_errors == o.connector_errors &&
140
150
  calendar_oldest_wait_minutes == o.calendar_oldest_wait_minutes &&
141
151
  window_hours == o.window_hours
142
152
  end
@@ -150,7 +160,7 @@ module Repull
150
160
  # Calculates hash code according to all attributes.
151
161
  # @return [Integer] Hash code
152
162
  def hash
153
- [accounts_connected, accounts_signed_out, inbox_sync_late, calendar_queue_backlog, calendar_oldest_wait_minutes, window_hours].hash
163
+ [accounts_connected, accounts_signed_out, inbox_sync_late, calendar_queue_backlog, connector_errors, calendar_oldest_wait_minutes, window_hours].hash
154
164
  end
155
165
 
156
166
  # Builds the object from hash