repull 0.2.8 → 0.2.10

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 (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +1443 -182
  3. data/lib/repull/api/availability_api.rb +24 -92
  4. data/lib/repull/api/billing_api.rb +186 -15
  5. data/lib/repull/api/booking_com_api.rb +532 -41
  6. data/lib/repull/api/listings_api.rb +74 -0
  7. data/lib/repull/api/plumguide_api.rb +245 -0
  8. data/lib/repull/api/reservations_api.rb +0 -197
  9. data/lib/repull/api/sandbox_api.rb +136 -0
  10. data/lib/repull/api/vrbo_api.rb +0 -126
  11. data/lib/repull/models/acknowledge_booking_reservations_request.rb +176 -0
  12. data/lib/repull/models/{create_studio_project201_response_data.rb → airbnb_alteration.rb} +44 -52
  13. data/lib/repull/models/airbnb_amenity.rb +171 -0
  14. data/lib/repull/models/{get_studio_deployment200_response.rb → airbnb_availability_write_request.rb} +52 -10
  15. data/lib/repull/models/airbnb_calendar_operation.rb +250 -0
  16. data/lib/repull/models/airbnb_listing_action_request.rb +198 -0
  17. data/lib/repull/models/{update_availability_request.rb → airbnb_pricing_write_request.rb} +100 -11
  18. data/lib/repull/models/booking_availability_update.rb +276 -0
  19. data/lib/repull/models/booking_availability_update_request.rb +230 -0
  20. data/lib/repull/models/{generate_studio_completion_request_project_id.rb → booking_availability_update_request_property_id.rb} +2 -2
  21. data/lib/repull/models/booking_availability_update_request_updates_inner.rb +104 -0
  22. data/lib/repull/models/booking_pricing_rate_update.rb +1 -0
  23. data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +65 -6
  24. data/lib/repull/models/booking_setup_request.rb +220 -0
  25. data/lib/repull/models/create_airbnb_alteration_request.rb +195 -0
  26. data/lib/repull/models/{create_studio_deployment201_response_data.rb → create_airbnb_offer_request.rb} +42 -30
  27. data/lib/repull/models/{create_studio_project_request.rb → create_booking_webhook_request.rb} +36 -47
  28. data/lib/repull/models/{generate_studio_completion200_response.rb → delete_airbnb_listing_photo200_response.rb} +10 -10
  29. data/lib/repull/models/{delete_studio_project200_response.rb → get_airbnb_alteration200_response.rb} +50 -7
  30. data/lib/repull/models/{delete_studio_project_file200_response.rb → get_airbnb_listing_quality200_response.rb} +37 -7
  31. data/lib/repull/models/{create_studio_project_generation201_response.rb → get_airbnb_listing_settings200_response.rb} +37 -7
  32. data/lib/repull/models/{delete_studio_deployment200_response.rb → get_airbnb_thread200_response.rb} +50 -7
  33. data/lib/repull/models/{list_studio_deployments200_response.rb → get_usage_logs200_response.rb} +17 -8
  34. data/lib/repull/models/get_usage_logs200_response_data_inner.rb +264 -0
  35. data/lib/repull/models/{create_studio_deployment201_response.rb → get_usage_logs200_response_pagination.rb} +29 -10
  36. data/lib/repull/models/get_usage_summary200_response.rb +232 -0
  37. data/lib/repull/models/get_usage_summary200_response_breakdown_inner.rb +183 -0
  38. data/lib/repull/models/{delete_studio_deployment200_response_data.rb → get_usage_summary200_response_limits.rb} +18 -16
  39. data/lib/repull/models/{delete_studio_project200_response_data.rb → get_usage_summary200_response_remaining.rb} +18 -16
  40. data/lib/repull/models/{create_studio_project_generation201_response_data.rb → get_usage_summary200_response_status_distribution.rb} +31 -22
  41. data/lib/repull/models/{upsert_studio_project_file_request.rb → get_usage_summary200_response_timeline_inner.rb} +28 -28
  42. data/lib/repull/models/{create_studio_project_generation_request.rb → get_usage_summary200_response_totals.rb} +28 -28
  43. data/lib/repull/models/{create_studio_project201_response.rb → get_usage_summary200_response_used.rb} +19 -10
  44. data/lib/repull/models/get_usage_tier200_response.rb +183 -0
  45. data/lib/repull/models/{list_studio_projects200_response.rb → get_usage_tier200_response_limits.rb} +31 -12
  46. data/lib/repull/models/{update_reservation_request.rb → get_usage_tier200_response_remaining.rb} +25 -31
  47. data/lib/repull/models/{get_studio_project200_response.rb → get_usage_tier200_response_used.rb} +28 -10
  48. data/lib/repull/models/list_airbnb_alterations200_response.rb +192 -0
  49. data/lib/repull/models/list_airbnb_listing_amenities200_response.rb +190 -0
  50. data/lib/repull/models/{create_studio_deployment_request.rb → list_airbnb_listing_amenities200_response_data.rb} +23 -28
  51. data/lib/repull/models/{list_studio_project_files200_response.rb → list_airbnb_transactions200_response.rb} +50 -7
  52. data/lib/repull/models/listing_content_update_request.rb +243 -0
  53. data/lib/repull/models/{upsert_studio_project_file200_response.rb → listing_content_update_request_address.rb} +53 -10
  54. data/lib/repull/models/listing_content_update_request_amenities.rb +105 -0
  55. data/lib/repull/models/listing_content_update_request_amenities_one_of_inner.rb +196 -0
  56. data/lib/repull/models/listing_content_update_request_occupancy.rb +179 -0
  57. data/lib/repull/{api/ai_api.rb → models/listing_content_update_request_photos_inner.rb} +77 -59
  58. data/lib/repull/models/{generate_studio_completion200_response_data.rb → listing_content_update_request_photos_inner_one_of.rb} +81 -66
  59. data/lib/repull/models/listing_content_update_request_policies.rb +253 -0
  60. data/lib/repull/models/{create_ai_operation200_response.rb → listing_content_update_response.rb} +32 -16
  61. data/lib/repull/models/map_airbnb_listing_request.rb +215 -0
  62. data/lib/repull/models/{create_reservation_request.rb → map_airbnb_listing_response.rb} +137 -116
  63. data/lib/repull/models/property.rb +42 -69
  64. data/lib/repull/models/property_availability.rb +222 -0
  65. data/lib/repull/models/property_availability_day.rb +247 -0
  66. data/lib/repull/models/reservation.rb +28 -1
  67. data/lib/repull/models/sandbox_fixture_ref.rb +193 -0
  68. data/lib/repull/models/{delete_studio_project_file200_response_data.rb → sandbox_reset_result.rb} +72 -11
  69. data/lib/repull/models/sandbox_reset_result_deleted.rb +216 -0
  70. data/lib/repull/models/sandbox_seed_result.rb +278 -0
  71. data/lib/repull/models/{update_studio_project_request.rb → update_airbnb_message_request.rb} +43 -24
  72. data/lib/repull/models/update_booking_charges_request.rb +194 -0
  73. data/lib/repull/version.rb +1 -1
  74. data/lib/repull.rb +59 -34
  75. data/openapi/v1.json +3956 -2522
  76. metadata +61 -36
  77. data/lib/repull/api/studio_api.rb +0 -1094
  78. data/lib/repull/models/generate_studio_completion_request.rb +0 -305
  79. data/lib/repull/models/upsert_studio_project_file200_response_data.rb +0 -147
@@ -0,0 +1,278 @@
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_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## 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 `resets_at` 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
+ Contact: ivan@vanio.ai
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
+ # Result of provisioning the sandbox fixture set.
18
+ class SandboxSeedResult < ApiModelBase
19
+ attr_accessor :customer_id
20
+
21
+ attr_accessor :seeded_at
22
+
23
+ # 3 sample listings.
24
+ attr_accessor :listings
25
+
26
+ # 5 reservations across the lifecycle: created, modified, cancelled, date-changed, pending.
27
+ attr_accessor :reservations
28
+
29
+ # 2 fake connected provider accounts: Airbnb + Booking.com.
30
+ attr_accessor :connections
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'customer_id' => :'customerId',
36
+ :'seeded_at' => :'seededAt',
37
+ :'listings' => :'listings',
38
+ :'reservations' => :'reservations',
39
+ :'connections' => :'connections'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'customer_id' => :'String',
57
+ :'seeded_at' => :'Time',
58
+ :'listings' => :'Array<SandboxFixtureRef>',
59
+ :'reservations' => :'Array<SandboxFixtureRef>',
60
+ :'connections' => :'Array<SandboxFixtureRef>'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::SandboxSeedResult` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::SandboxSeedResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'customer_id')
87
+ self.customer_id = attributes[:'customer_id']
88
+ else
89
+ self.customer_id = nil
90
+ end
91
+
92
+ if attributes.key?(:'seeded_at')
93
+ self.seeded_at = attributes[:'seeded_at']
94
+ else
95
+ self.seeded_at = nil
96
+ end
97
+
98
+ if attributes.key?(:'listings')
99
+ if (value = attributes[:'listings']).is_a?(Array)
100
+ self.listings = value
101
+ end
102
+ else
103
+ self.listings = nil
104
+ end
105
+
106
+ if attributes.key?(:'reservations')
107
+ if (value = attributes[:'reservations']).is_a?(Array)
108
+ self.reservations = value
109
+ end
110
+ else
111
+ self.reservations = nil
112
+ end
113
+
114
+ if attributes.key?(:'connections')
115
+ if (value = attributes[:'connections']).is_a?(Array)
116
+ self.connections = value
117
+ end
118
+ else
119
+ self.connections = nil
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
127
+ invalid_properties = Array.new
128
+ if @customer_id.nil?
129
+ invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.')
130
+ end
131
+
132
+ if @seeded_at.nil?
133
+ invalid_properties.push('invalid value for "seeded_at", seeded_at cannot be nil.')
134
+ end
135
+
136
+ if @listings.nil?
137
+ invalid_properties.push('invalid value for "listings", listings cannot be nil.')
138
+ end
139
+
140
+ if @reservations.nil?
141
+ invalid_properties.push('invalid value for "reservations", reservations cannot be nil.')
142
+ end
143
+
144
+ if @connections.nil?
145
+ invalid_properties.push('invalid value for "connections", connections cannot be nil.')
146
+ end
147
+
148
+ invalid_properties
149
+ end
150
+
151
+ # Check to see if the all the properties in the model are valid
152
+ # @return true if the model is valid
153
+ def valid?
154
+ warn '[DEPRECATED] the `valid?` method is obsolete'
155
+ return false if @customer_id.nil?
156
+ return false if @seeded_at.nil?
157
+ return false if @listings.nil?
158
+ return false if @reservations.nil?
159
+ return false if @connections.nil?
160
+ true
161
+ end
162
+
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] customer_id Value to be assigned
165
+ def customer_id=(customer_id)
166
+ if customer_id.nil?
167
+ fail ArgumentError, 'customer_id cannot be nil'
168
+ end
169
+
170
+ @customer_id = customer_id
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] seeded_at Value to be assigned
175
+ def seeded_at=(seeded_at)
176
+ if seeded_at.nil?
177
+ fail ArgumentError, 'seeded_at cannot be nil'
178
+ end
179
+
180
+ @seeded_at = seeded_at
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] listings Value to be assigned
185
+ def listings=(listings)
186
+ if listings.nil?
187
+ fail ArgumentError, 'listings cannot be nil'
188
+ end
189
+
190
+ @listings = listings
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] reservations Value to be assigned
195
+ def reservations=(reservations)
196
+ if reservations.nil?
197
+ fail ArgumentError, 'reservations cannot be nil'
198
+ end
199
+
200
+ @reservations = reservations
201
+ end
202
+
203
+ # Custom attribute writer method with validation
204
+ # @param [Object] connections Value to be assigned
205
+ def connections=(connections)
206
+ if connections.nil?
207
+ fail ArgumentError, 'connections cannot be nil'
208
+ end
209
+
210
+ @connections = connections
211
+ end
212
+
213
+ # Checks equality by comparing each attribute.
214
+ # @param [Object] Object to be compared
215
+ def ==(o)
216
+ return true if self.equal?(o)
217
+ self.class == o.class &&
218
+ customer_id == o.customer_id &&
219
+ seeded_at == o.seeded_at &&
220
+ listings == o.listings &&
221
+ reservations == o.reservations &&
222
+ connections == o.connections
223
+ end
224
+
225
+ # @see the `==` method
226
+ # @param [Object] Object to be compared
227
+ def eql?(o)
228
+ self == o
229
+ end
230
+
231
+ # Calculates hash code according to all attributes.
232
+ # @return [Integer] Hash code
233
+ def hash
234
+ [customer_id, seeded_at, listings, reservations, connections].hash
235
+ end
236
+
237
+ # Builds the object from hash
238
+ # @param [Hash] attributes Model attributes in the form of hash
239
+ # @return [Object] Returns the model itself
240
+ def self.build_from_hash(attributes)
241
+ return nil unless attributes.is_a?(Hash)
242
+ attributes = attributes.transform_keys(&:to_sym)
243
+ transformed_hash = {}
244
+ openapi_types.each_pair do |key, type|
245
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
246
+ transformed_hash["#{key}"] = nil
247
+ elsif type =~ /\AArray<(.*)>/i
248
+ # check to ensure the input is an array given that the attribute
249
+ # is documented as an array but the input is not
250
+ if attributes[attribute_map[key]].is_a?(Array)
251
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
252
+ end
253
+ elsif !attributes[attribute_map[key]].nil?
254
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
255
+ end
256
+ end
257
+ new(transformed_hash)
258
+ end
259
+
260
+ # Returns the object in the form of hash
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_hash
263
+ hash = {}
264
+ self.class.attribute_map.each_pair do |attr, param|
265
+ value = self.send(attr)
266
+ if value.nil?
267
+ is_nullable = self.class.openapi_nullable.include?(attr)
268
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
269
+ end
270
+
271
+ hash[param] = _to_hash(value)
272
+ end
273
+ hash
274
+ end
275
+
276
+ end
277
+
278
+ end
@@ -14,10 +14,15 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class UpdateStudioProjectRequest < ApiModelBase
18
- attr_accessor :name
17
+ class UpdateAirbnbMessageRequest < ApiModelBase
18
+ # Operation to perform on the message.
19
+ attr_accessor :action
19
20
 
20
- attr_accessor :status
21
+ # New message text. Required when `action` is `edit`.
22
+ attr_accessor :message
23
+
24
+ # Reaction to add. Required when `action` is `react`.
25
+ attr_accessor :reaction
21
26
 
22
27
  class EnumAttributeValidator
23
28
  attr_reader :datatype
@@ -44,8 +49,9 @@ module Repull
44
49
  # Attribute mapping from ruby-style variable name to JSON key.
45
50
  def self.attribute_map
46
51
  {
47
- :'name' => :'name',
48
- :'status' => :'status'
52
+ :'action' => :'action',
53
+ :'message' => :'message',
54
+ :'reaction' => :'reaction'
49
55
  }
50
56
  end
51
57
 
@@ -62,8 +68,9 @@ module Repull
62
68
  # Attribute type mapping.
63
69
  def self.openapi_types
64
70
  {
65
- :'name' => :'String',
66
- :'status' => :'String'
71
+ :'action' => :'String',
72
+ :'message' => :'String',
73
+ :'reaction' => :'String'
67
74
  }
68
75
  end
69
76
 
@@ -77,24 +84,30 @@ module Repull
77
84
  # @param [Hash] attributes Model attributes in the form of hash
78
85
  def initialize(attributes = {})
79
86
  if (!attributes.is_a?(Hash))
80
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::UpdateStudioProjectRequest` initialize method"
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::UpdateAirbnbMessageRequest` initialize method"
81
88
  end
82
89
 
83
90
  # check to see if the attribute exists and convert string to symbol for hash key
84
91
  acceptable_attribute_map = self.class.acceptable_attribute_map
85
92
  attributes = attributes.each_with_object({}) { |(k, v), h|
86
93
  if (!acceptable_attribute_map.key?(k.to_sym))
87
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::UpdateStudioProjectRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::UpdateAirbnbMessageRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
95
  end
89
96
  h[k.to_sym] = v
90
97
  }
91
98
 
92
- if attributes.key?(:'name')
93
- self.name = attributes[:'name']
99
+ if attributes.key?(:'action')
100
+ self.action = attributes[:'action']
101
+ else
102
+ self.action = nil
103
+ end
104
+
105
+ if attributes.key?(:'message')
106
+ self.message = attributes[:'message']
94
107
  end
95
108
 
96
- if attributes.key?(:'status')
97
- self.status = attributes[:'status']
109
+ if attributes.key?(:'reaction')
110
+ self.reaction = attributes[:'reaction']
98
111
  end
99
112
  end
100
113
 
@@ -103,6 +116,10 @@ module Repull
103
116
  def list_invalid_properties
104
117
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
118
  invalid_properties = Array.new
119
+ if @action.nil?
120
+ invalid_properties.push('invalid value for "action", action cannot be nil.')
121
+ end
122
+
106
123
  invalid_properties
107
124
  end
108
125
 
@@ -110,19 +127,20 @@ module Repull
110
127
  # @return true if the model is valid
111
128
  def valid?
112
129
  warn '[DEPRECATED] the `valid?` method is obsolete'
113
- status_validator = EnumAttributeValidator.new('String', ["draft", "building", "live", "archived"])
114
- return false unless status_validator.valid?(@status)
130
+ return false if @action.nil?
131
+ action_validator = EnumAttributeValidator.new('String', ["edit", "unsend", "read", "react"])
132
+ return false unless action_validator.valid?(@action)
115
133
  true
116
134
  end
117
135
 
118
136
  # Custom attribute writer method checking allowed values (enum).
119
- # @param [Object] status Object to be assigned
120
- def status=(status)
121
- validator = EnumAttributeValidator.new('String', ["draft", "building", "live", "archived"])
122
- unless validator.valid?(status)
123
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
137
+ # @param [Object] action Object to be assigned
138
+ def action=(action)
139
+ validator = EnumAttributeValidator.new('String', ["edit", "unsend", "read", "react"])
140
+ unless validator.valid?(action)
141
+ fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}."
124
142
  end
125
- @status = status
143
+ @action = action
126
144
  end
127
145
 
128
146
  # Checks equality by comparing each attribute.
@@ -130,8 +148,9 @@ module Repull
130
148
  def ==(o)
131
149
  return true if self.equal?(o)
132
150
  self.class == o.class &&
133
- name == o.name &&
134
- status == o.status
151
+ action == o.action &&
152
+ message == o.message &&
153
+ reaction == o.reaction
135
154
  end
136
155
 
137
156
  # @see the `==` method
@@ -143,7 +162,7 @@ module Repull
143
162
  # Calculates hash code according to all attributes.
144
163
  # @return [Integer] Hash code
145
164
  def hash
146
- [name, status].hash
165
+ [action, message, reaction].hash
147
166
  end
148
167
 
149
168
  # Builds the object from hash
@@ -0,0 +1,194 @@
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_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## 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 `resets_at` 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
+ Contact: ivan@vanio.ai
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 UpdateBookingChargesRequest < ApiModelBase
18
+ # Booking.com hotel/property id.
19
+ attr_accessor :property_id
20
+
21
+ # Full charge set to apply.
22
+ attr_accessor :charges
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'property_id' => :'property_id',
28
+ :'charges' => :'charges'
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
+ :'property_id' => :'String',
46
+ :'charges' => :'Array<Hash<String, Object>>'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::UpdateBookingChargesRequest` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::UpdateBookingChargesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'property_id')
73
+ self.property_id = attributes[:'property_id']
74
+ else
75
+ self.property_id = nil
76
+ end
77
+
78
+ if attributes.key?(:'charges')
79
+ if (value = attributes[:'charges']).is_a?(Array)
80
+ self.charges = value
81
+ end
82
+ else
83
+ self.charges = nil
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ if @property_id.nil?
93
+ invalid_properties.push('invalid value for "property_id", property_id cannot be nil.')
94
+ end
95
+
96
+ if @charges.nil?
97
+ invalid_properties.push('invalid value for "charges", charges cannot be nil.')
98
+ end
99
+
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ return false if @property_id.nil?
108
+ return false if @charges.nil?
109
+ true
110
+ end
111
+
112
+ # Custom attribute writer method with validation
113
+ # @param [Object] property_id Value to be assigned
114
+ def property_id=(property_id)
115
+ if property_id.nil?
116
+ fail ArgumentError, 'property_id cannot be nil'
117
+ end
118
+
119
+ @property_id = property_id
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param [Object] charges Value to be assigned
124
+ def charges=(charges)
125
+ if charges.nil?
126
+ fail ArgumentError, 'charges cannot be nil'
127
+ end
128
+
129
+ @charges = charges
130
+ end
131
+
132
+ # Checks equality by comparing each attribute.
133
+ # @param [Object] Object to be compared
134
+ def ==(o)
135
+ return true if self.equal?(o)
136
+ self.class == o.class &&
137
+ property_id == o.property_id &&
138
+ charges == o.charges
139
+ end
140
+
141
+ # @see the `==` method
142
+ # @param [Object] Object to be compared
143
+ def eql?(o)
144
+ self == o
145
+ end
146
+
147
+ # Calculates hash code according to all attributes.
148
+ # @return [Integer] Hash code
149
+ def hash
150
+ [property_id, charges].hash
151
+ end
152
+
153
+ # Builds the object from hash
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ # @return [Object] Returns the model itself
156
+ def self.build_from_hash(attributes)
157
+ return nil unless attributes.is_a?(Hash)
158
+ attributes = attributes.transform_keys(&:to_sym)
159
+ transformed_hash = {}
160
+ openapi_types.each_pair do |key, type|
161
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = nil
163
+ elsif type =~ /\AArray<(.*)>/i
164
+ # check to ensure the input is an array given that the attribute
165
+ # is documented as an array but the input is not
166
+ if attributes[attribute_map[key]].is_a?(Array)
167
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
168
+ end
169
+ elsif !attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
171
+ end
172
+ end
173
+ new(transformed_hash)
174
+ end
175
+
176
+ # Returns the object in the form of hash
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_hash
179
+ hash = {}
180
+ self.class.attribute_map.each_pair do |attr, param|
181
+ value = self.send(attr)
182
+ if value.nil?
183
+ is_nullable = self.class.openapi_nullable.include?(attr)
184
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
185
+ end
186
+
187
+ hash[param] = _to_hash(value)
188
+ end
189
+ hash
190
+ end
191
+
192
+ end
193
+
194
+ end
@@ -11,5 +11,5 @@ Generator version: 7.22.0
11
11
  =end
12
12
 
13
13
  module Repull
14
- VERSION = '0.2.8'
14
+ VERSION = '0.2.10'
15
15
  end