repull 0.2.14 → 0.2.15

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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +1265 -125
  3. data/lib/repull/api/availability_api.rb +2 -2
  4. data/lib/repull/api/connect_api.rb +4 -4
  5. data/lib/repull/api/listings_api.rb +97 -13
  6. data/lib/repull/models/airbnb_account_freshness.rb +239 -0
  7. data/lib/repull/models/airbnb_alteration.rb +46 -2
  8. data/lib/repull/models/airbnb_alteration_create_request.rb +264 -0
  9. data/lib/repull/models/airbnb_connection.rb +69 -2
  10. data/lib/repull/models/airbnb_connection_host.rb +1 -1
  11. data/lib/repull/models/airbnb_content_write_response.rb +275 -0
  12. data/lib/repull/models/airbnb_data_freshness.rb +22 -10
  13. data/lib/repull/models/{create_airbnb_alteration_request.rb → airbnb_description_write_request.rb} +44 -47
  14. data/lib/repull/models/airbnb_description_write_request_description.rb +365 -0
  15. data/lib/repull/models/airbnb_listing.rb +12 -1
  16. data/lib/repull/models/airbnb_listing_action200_response.rb +105 -0
  17. data/lib/repull/models/airbnb_listing_action200_response_one_of.rb +157 -0
  18. data/lib/repull/models/airbnb_listing_action200_response_one_of1.rb +175 -0
  19. data/lib/repull/models/airbnb_listing_action_request.rb +2 -2
  20. data/lib/repull/models/airbnb_listing_details_response.rb +284 -0
  21. data/lib/repull/models/airbnb_listing_details_write_request.rb +209 -0
  22. data/lib/repull/models/airbnb_listing_details_write_request_check_in_option.rb +214 -0
  23. data/lib/repull/models/airbnb_listing_details_write_request_quiet_hours_inner.rb +190 -0
  24. data/lib/repull/models/airbnb_listing_lifecycle_response.rb +196 -0
  25. data/lib/repull/models/airbnb_permits_response.rb +163 -0
  26. data/lib/repull/models/airbnb_permits_response_cached_inner.rb +200 -0
  27. data/lib/repull/models/airbnb_permits_write_request.rb +176 -0
  28. data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +228 -0
  29. data/lib/repull/models/airbnb_permits_write_request_permits_inner_answers_inner.rb +198 -0
  30. data/lib/repull/models/airbnb_photo_position.rb +159 -0
  31. data/lib/repull/models/airbnb_publish_result.rb +263 -0
  32. data/lib/repull/models/airbnb_reservation.rb +23 -1
  33. data/lib/repull/models/airbnb_reservation_list_response.rb +13 -4
  34. data/lib/repull/models/airbnb_review.rb +23 -1
  35. data/lib/repull/models/airbnb_review_list_response.rb +13 -4
  36. data/lib/repull/models/airbnb_safety_disclosure.rb +202 -0
  37. data/lib/repull/models/airbnb_safety_disclosures_response.rb +162 -0
  38. data/lib/repull/models/airbnb_safety_disclosures_write_request.rb +176 -0
  39. data/lib/repull/models/airbnb_thread.rb +23 -1
  40. data/lib/repull/models/airbnb_thread_list_response.rb +13 -4
  41. data/lib/repull/models/airbnb_transaction.rb +23 -1
  42. data/lib/repull/models/create_airbnb_listing_room_request.rb +315 -0
  43. data/lib/repull/models/delete_airbnb_listing_photo200_response.rb +14 -4
  44. data/lib/repull/models/delete_airbnb_listing_room200_response.rb +157 -0
  45. data/lib/repull/models/error_error.rb +31 -1
  46. data/lib/repull/models/get_airbnb_booking_settings200_response.rb +190 -0
  47. data/lib/repull/models/get_airbnb_booking_settings200_response_data.rb +246 -0
  48. data/lib/repull/models/get_airbnb_booking_settings200_response_data_advance_notice.rb +172 -0
  49. data/lib/repull/models/get_airbnb_booking_settings200_response_data_booking_window.rb +160 -0
  50. data/lib/repull/models/get_airbnb_booking_settings200_response_data_cancellation.rb +203 -0
  51. data/lib/repull/models/get_airbnb_booking_settings200_response_data_cancellation_non_refundable.rb +218 -0
  52. data/lib/repull/models/get_airbnb_booking_settings200_response_data_check_in.rb +159 -0
  53. data/lib/repull/models/get_airbnb_booking_settings200_response_data_check_in_start.rb +104 -0
  54. data/lib/repull/models/get_airbnb_booking_settings200_response_data_check_out.rb +172 -0
  55. data/lib/repull/models/get_airbnb_booking_settings200_response_data_instant_book.rb +206 -0
  56. data/lib/repull/models/get_airbnb_booking_settings200_response_data_preparation_time.rb +173 -0
  57. data/lib/repull/models/get_airbnb_listing_details200_response.rb +192 -0
  58. data/lib/repull/models/list_airbnb_listing_permits200_response.rb +190 -0
  59. data/lib/repull/models/list_airbnb_listing_safety_disclosures200_response.rb +190 -0
  60. data/lib/repull/models/listing.rb +2 -1
  61. data/lib/repull/models/listing_content.rb +13 -2
  62. data/lib/repull/models/listing_content_update_request.rb +21 -2
  63. data/lib/repull/models/listing_content_update_request_details.rb +206 -0
  64. data/lib/repull/models/listing_content_update_request_policies.rb +95 -5
  65. data/lib/repull/models/listing_content_update_response.rb +1 -1
  66. data/lib/repull/models/listing_publish_airbnb_response.rb +165 -0
  67. data/lib/repull/models/listing_pull_airbnb_request.rb +149 -0
  68. data/lib/repull/models/listing_pull_response.rb +231 -0
  69. data/lib/repull/models/publish_section_error.rb +232 -0
  70. data/lib/repull/models/reorder_airbnb_listing_photos200_response.rb +191 -0
  71. data/lib/repull/models/reorder_airbnb_listing_photos200_response_data.rb +172 -0
  72. data/lib/repull/models/reorder_airbnb_listing_photos_request.rb +185 -0
  73. data/lib/repull/models/reservation.rb +23 -1
  74. data/lib/repull/models/reservation_webhook_object.rb +38 -5
  75. data/lib/repull/models/set_airbnb_listing_cover_photo200_response.rb +191 -0
  76. data/lib/repull/models/set_airbnb_listing_cover_photo200_response_data.rb +171 -0
  77. data/lib/repull/models/set_airbnb_listing_cover_photo_request.rb +165 -0
  78. data/lib/repull/models/update_airbnb_booking_settings200_response.rb +164 -0
  79. data/lib/repull/models/update_airbnb_booking_settings200_response_data.rb +205 -0
  80. data/lib/repull/models/update_airbnb_booking_settings_request.rb +202 -0
  81. data/lib/repull/models/update_airbnb_booking_settings_request_advance_notice.rb +183 -0
  82. data/lib/repull/models/update_airbnb_booking_settings_request_booking_window.rb +183 -0
  83. data/lib/repull/models/update_airbnb_booking_settings_request_cancellation.rb +201 -0
  84. data/lib/repull/models/update_airbnb_booking_settings_request_cancellation_non_refundable.rb +183 -0
  85. data/lib/repull/models/update_airbnb_booking_settings_request_check_in.rb +159 -0
  86. data/lib/repull/models/update_airbnb_booking_settings_request_check_out.rb +182 -0
  87. data/lib/repull/models/update_airbnb_booking_settings_request_instant_book.rb +203 -0
  88. data/lib/repull/models/update_airbnb_booking_settings_request_preparation_time.rb +182 -0
  89. data/lib/repull/models/update_airbnb_listing_amenities200_response.rb +191 -0
  90. data/lib/repull/models/update_airbnb_listing_amenities200_response_data.rb +158 -0
  91. data/lib/repull/models/update_airbnb_listing_amenities_request.rb +199 -0
  92. data/lib/repull/models/update_airbnb_listing_amenities_request_accessibility_amenities_inner.rb +246 -0
  93. data/lib/repull/models/update_airbnb_listing_amenities_request_amenities_inner.rb +218 -0
  94. data/lib/repull/models/update_airbnb_listing_permits200_response.rb +168 -0
  95. data/lib/repull/models/update_airbnb_listing_photo200_response.rb +194 -0
  96. data/lib/repull/models/update_airbnb_listing_photo_request.rb +242 -0
  97. data/lib/repull/models/update_airbnb_listing_room200_response.rb +194 -0
  98. data/lib/repull/models/update_airbnb_listing_room_request.rb +293 -0
  99. data/lib/repull/models/update_airbnb_listing_room_request_beds_inner.rb +209 -0
  100. data/lib/repull/models/update_airbnb_listing_room_request_room_amenities_inner.rb +182 -0
  101. data/lib/repull/models/update_airbnb_listing_room_request_room_amenities_inner_value.rb +105 -0
  102. data/lib/repull/models/update_airbnb_listing_safety_disclosures200_response.rb +180 -0
  103. data/lib/repull/models/upload_airbnb_listing_photos_request.rb +184 -0
  104. data/lib/repull/models/upload_airbnb_listing_photos_request_photos_inner.rb +305 -0
  105. data/lib/repull/models/upload_airbnb_listing_photos_request_photos_inner_listing_id.rb +105 -0
  106. data/lib/repull/version.rb +1 -1
  107. data/lib/repull.rb +78 -1
  108. data/openapi/v1.json +4523 -1282
  109. data/scripts/regen.sh +1 -1
  110. metadata +80 -3
@@ -33,6 +33,12 @@ module Repull
33
33
  # Resolved Vanio reservation id when the confirmation code matched a reservation in this workspace; null otherwise.
34
34
  attr_accessor :reservation_id
35
35
 
36
+ # Which connected Airbnb account this transaction belongs to — the Airbnb host id, as a string (they exceed 2^53). `null` on rows that name no listing (payouts).
37
+ attr_accessor :account_id
38
+
39
+ # Display name of that connected Airbnb account.
40
+ attr_accessor :account_name
41
+
36
42
  # Airbnb listing id.
37
43
  attr_accessor :listing_id
38
44
 
@@ -90,6 +96,8 @@ module Repull
90
96
  :'date' => :'date',
91
97
  :'confirmation_code' => :'confirmation_code',
92
98
  :'reservation_id' => :'reservation_id',
99
+ :'account_id' => :'account_id',
100
+ :'account_name' => :'account_name',
93
101
  :'listing_id' => :'listing_id',
94
102
  :'thread_id' => :'thread_id',
95
103
  :'nights' => :'nights',
@@ -133,6 +141,8 @@ module Repull
133
141
  :'date' => :'Date',
134
142
  :'confirmation_code' => :'String',
135
143
  :'reservation_id' => :'Integer',
144
+ :'account_id' => :'String',
145
+ :'account_name' => :'String',
136
146
  :'listing_id' => :'String',
137
147
  :'thread_id' => :'String',
138
148
  :'nights' => :'Integer',
@@ -165,6 +175,8 @@ module Repull
165
175
  :'date',
166
176
  :'confirmation_code',
167
177
  :'reservation_id',
178
+ :'account_id',
179
+ :'account_name',
168
180
  :'listing_id',
169
181
  :'thread_id',
170
182
  :'nights',
@@ -227,6 +239,14 @@ module Repull
227
239
  self.reservation_id = attributes[:'reservation_id']
228
240
  end
229
241
 
242
+ if attributes.key?(:'account_id')
243
+ self.account_id = attributes[:'account_id']
244
+ end
245
+
246
+ if attributes.key?(:'account_name')
247
+ self.account_name = attributes[:'account_name']
248
+ end
249
+
230
250
  if attributes.key?(:'listing_id')
231
251
  self.listing_id = attributes[:'listing_id']
232
252
  end
@@ -423,6 +443,8 @@ module Repull
423
443
  date == o.date &&
424
444
  confirmation_code == o.confirmation_code &&
425
445
  reservation_id == o.reservation_id &&
446
+ account_id == o.account_id &&
447
+ account_name == o.account_name &&
426
448
  listing_id == o.listing_id &&
427
449
  thread_id == o.thread_id &&
428
450
  nights == o.nights &&
@@ -455,7 +477,7 @@ module Repull
455
477
  # Calculates hash code according to all attributes.
456
478
  # @return [Integer] Hash code
457
479
  def hash
458
- [transaction_id, type, reference, date, confirmation_code, reservation_id, listing_id, thread_id, nights, reservation_start_date, booked_at, check_in, check_out, time_zone, guest_name, status, status_type, payout, currency, host_currency, amount, host_breakdown, guest_breakdown, unavailable_fields, standard_fees, tax_details, synced_at].hash
480
+ [transaction_id, type, reference, date, confirmation_code, reservation_id, account_id, account_name, listing_id, thread_id, nights, reservation_start_date, booked_at, check_in, check_out, time_zone, guest_name, status, status_type, payout, currency, host_currency, amount, host_breakdown, guest_breakdown, unavailable_fields, standard_fees, tax_details, synced_at].hash
459
481
  end
460
482
 
461
483
  # Builds the object from hash
@@ -0,0 +1,315 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ 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 CreateAirbnbListingRoomRequest < ApiModelBase
18
+ # The room's position among the listing's rooms. Airbnb keys rooms of the same type by this number, so two bedrooms are 1 and 2.
19
+ attr_accessor :room_number
20
+
21
+ attr_accessor :room_type
22
+
23
+ # The room's whole sleeping arrangement. Replaces what is there — send every bed, not just the changed one.
24
+ attr_accessor :beds
25
+
26
+ # Amenities attached to this room, not to the listing.
27
+ attr_accessor :room_amenities
28
+
29
+ attr_accessor :is_private
30
+
31
+ attr_accessor :metadata
32
+
33
+ attr_accessor :listing_id
34
+
35
+ class EnumAttributeValidator
36
+ attr_reader :datatype
37
+ attr_reader :allowable_values
38
+
39
+ def initialize(datatype, allowable_values)
40
+ @allowable_values = allowable_values.map do |value|
41
+ case datatype.to_s
42
+ when /Integer/i
43
+ value.to_i
44
+ when /Float/i
45
+ value.to_f
46
+ else
47
+ value
48
+ end
49
+ end
50
+ end
51
+
52
+ def valid?(value)
53
+ !value || allowable_values.include?(value)
54
+ end
55
+ end
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ def self.attribute_map
59
+ {
60
+ :'room_number' => :'room_number',
61
+ :'room_type' => :'room_type',
62
+ :'beds' => :'beds',
63
+ :'room_amenities' => :'room_amenities',
64
+ :'is_private' => :'is_private',
65
+ :'metadata' => :'metadata',
66
+ :'listing_id' => :'listing_id'
67
+ }
68
+ end
69
+
70
+ # Returns attribute mapping this model knows about
71
+ def self.acceptable_attribute_map
72
+ attribute_map
73
+ end
74
+
75
+ # Returns all the JSON keys this model knows about
76
+ def self.acceptable_attributes
77
+ acceptable_attribute_map.values
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.openapi_types
82
+ {
83
+ :'room_number' => :'Integer',
84
+ :'room_type' => :'String',
85
+ :'beds' => :'Array<UpdateAirbnbListingRoomRequestBedsInner>',
86
+ :'room_amenities' => :'Array<UpdateAirbnbListingRoomRequestRoomAmenitiesInner>',
87
+ :'is_private' => :'Boolean',
88
+ :'metadata' => :'Hash<String, Object>',
89
+ :'listing_id' => :'UploadAirbnbListingPhotosRequestPhotosInnerListingId'
90
+ }
91
+ end
92
+
93
+ # List of attributes with nullable: true
94
+ def self.openapi_nullable
95
+ Set.new([
96
+ ])
97
+ end
98
+
99
+ # Initializes the object
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ def initialize(attributes = {})
102
+ if (!attributes.is_a?(Hash))
103
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::CreateAirbnbListingRoomRequest` initialize method"
104
+ end
105
+
106
+ # check to see if the attribute exists and convert string to symbol for hash key
107
+ acceptable_attribute_map = self.class.acceptable_attribute_map
108
+ attributes = attributes.each_with_object({}) { |(k, v), h|
109
+ if (!acceptable_attribute_map.key?(k.to_sym))
110
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::CreateAirbnbListingRoomRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
111
+ end
112
+ h[k.to_sym] = v
113
+ }
114
+
115
+ if attributes.key?(:'room_number')
116
+ self.room_number = attributes[:'room_number']
117
+ else
118
+ self.room_number = nil
119
+ end
120
+
121
+ if attributes.key?(:'room_type')
122
+ self.room_type = attributes[:'room_type']
123
+ else
124
+ self.room_type = nil
125
+ end
126
+
127
+ if attributes.key?(:'beds')
128
+ if (value = attributes[:'beds']).is_a?(Array)
129
+ self.beds = value
130
+ end
131
+ end
132
+
133
+ if attributes.key?(:'room_amenities')
134
+ if (value = attributes[:'room_amenities']).is_a?(Array)
135
+ self.room_amenities = value
136
+ end
137
+ end
138
+
139
+ if attributes.key?(:'is_private')
140
+ self.is_private = attributes[:'is_private']
141
+ end
142
+
143
+ if attributes.key?(:'metadata')
144
+ if (value = attributes[:'metadata']).is_a?(Hash)
145
+ self.metadata = value
146
+ end
147
+ end
148
+
149
+ if attributes.key?(:'listing_id')
150
+ self.listing_id = attributes[:'listing_id']
151
+ end
152
+ end
153
+
154
+ # Show invalid properties with the reasons. Usually used together with valid?
155
+ # @return Array for valid properties with the reasons
156
+ def list_invalid_properties
157
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
158
+ invalid_properties = Array.new
159
+ if @room_number.nil?
160
+ invalid_properties.push('invalid value for "room_number", room_number cannot be nil.')
161
+ end
162
+
163
+ if @room_number < 1
164
+ invalid_properties.push('invalid value for "room_number", must be greater than or equal to 1.')
165
+ end
166
+
167
+ if @room_type.nil?
168
+ invalid_properties.push('invalid value for "room_type", room_type cannot be nil.')
169
+ end
170
+
171
+ if !@beds.nil? && @beds.length > 20
172
+ invalid_properties.push('invalid value for "beds", number of items must be less than or equal to 20.')
173
+ end
174
+
175
+ if !@room_amenities.nil? && @room_amenities.length > 50
176
+ invalid_properties.push('invalid value for "room_amenities", number of items must be less than or equal to 50.')
177
+ end
178
+
179
+ invalid_properties
180
+ end
181
+
182
+ # Check to see if the all the properties in the model are valid
183
+ # @return true if the model is valid
184
+ def valid?
185
+ warn '[DEPRECATED] the `valid?` method is obsolete'
186
+ return false if @room_number.nil?
187
+ return false if @room_number < 1
188
+ return false if @room_type.nil?
189
+ room_type_validator = EnumAttributeValidator.new('String', ["bedroom", "bathroom", "living_room", "kitchen", "studio", "dining_room", "family_room", "office", "garage", "laundry_room", "entrance_to_home", "recreation_area", "outdoor_space"])
190
+ return false unless room_type_validator.valid?(@room_type)
191
+ return false if !@beds.nil? && @beds.length > 20
192
+ return false if !@room_amenities.nil? && @room_amenities.length > 50
193
+ true
194
+ end
195
+
196
+ # Custom attribute writer method with validation
197
+ # @param [Object] room_number Value to be assigned
198
+ def room_number=(room_number)
199
+ if room_number.nil?
200
+ fail ArgumentError, 'room_number cannot be nil'
201
+ end
202
+
203
+ if room_number < 1
204
+ fail ArgumentError, 'invalid value for "room_number", must be greater than or equal to 1.'
205
+ end
206
+
207
+ @room_number = room_number
208
+ end
209
+
210
+ # Custom attribute writer method checking allowed values (enum).
211
+ # @param [Object] room_type Object to be assigned
212
+ def room_type=(room_type)
213
+ validator = EnumAttributeValidator.new('String', ["bedroom", "bathroom", "living_room", "kitchen", "studio", "dining_room", "family_room", "office", "garage", "laundry_room", "entrance_to_home", "recreation_area", "outdoor_space"])
214
+ unless validator.valid?(room_type)
215
+ fail ArgumentError, "invalid value for \"room_type\", must be one of #{validator.allowable_values}."
216
+ end
217
+ @room_type = room_type
218
+ end
219
+
220
+ # Custom attribute writer method with validation
221
+ # @param [Object] beds Value to be assigned
222
+ def beds=(beds)
223
+ if beds.nil?
224
+ fail ArgumentError, 'beds cannot be nil'
225
+ end
226
+
227
+ if beds.length > 20
228
+ fail ArgumentError, 'invalid value for "beds", number of items must be less than or equal to 20.'
229
+ end
230
+
231
+ @beds = beds
232
+ end
233
+
234
+ # Custom attribute writer method with validation
235
+ # @param [Object] room_amenities Value to be assigned
236
+ def room_amenities=(room_amenities)
237
+ if room_amenities.nil?
238
+ fail ArgumentError, 'room_amenities cannot be nil'
239
+ end
240
+
241
+ if room_amenities.length > 50
242
+ fail ArgumentError, 'invalid value for "room_amenities", number of items must be less than or equal to 50.'
243
+ end
244
+
245
+ @room_amenities = room_amenities
246
+ end
247
+
248
+ # Checks equality by comparing each attribute.
249
+ # @param [Object] Object to be compared
250
+ def ==(o)
251
+ return true if self.equal?(o)
252
+ self.class == o.class &&
253
+ room_number == o.room_number &&
254
+ room_type == o.room_type &&
255
+ beds == o.beds &&
256
+ room_amenities == o.room_amenities &&
257
+ is_private == o.is_private &&
258
+ metadata == o.metadata &&
259
+ listing_id == o.listing_id
260
+ end
261
+
262
+ # @see the `==` method
263
+ # @param [Object] Object to be compared
264
+ def eql?(o)
265
+ self == o
266
+ end
267
+
268
+ # Calculates hash code according to all attributes.
269
+ # @return [Integer] Hash code
270
+ def hash
271
+ [room_number, room_type, beds, room_amenities, is_private, metadata, listing_id].hash
272
+ end
273
+
274
+ # Builds the object from hash
275
+ # @param [Hash] attributes Model attributes in the form of hash
276
+ # @return [Object] Returns the model itself
277
+ def self.build_from_hash(attributes)
278
+ return nil unless attributes.is_a?(Hash)
279
+ attributes = attributes.transform_keys(&:to_sym)
280
+ transformed_hash = {}
281
+ openapi_types.each_pair do |key, type|
282
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
283
+ transformed_hash["#{key}"] = nil
284
+ elsif type =~ /\AArray<(.*)>/i
285
+ # check to ensure the input is an array given that the attribute
286
+ # is documented as an array but the input is not
287
+ if attributes[attribute_map[key]].is_a?(Array)
288
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
289
+ end
290
+ elsif !attributes[attribute_map[key]].nil?
291
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
292
+ end
293
+ end
294
+ new(transformed_hash)
295
+ end
296
+
297
+ # Returns the object in the form of hash
298
+ # @return [Hash] Returns the object in the form of hash
299
+ def to_hash
300
+ hash = {}
301
+ self.class.attribute_map.each_pair do |attr, param|
302
+ value = self.send(attr)
303
+ if value.nil?
304
+ is_nullable = self.class.openapi_nullable.include?(attr)
305
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
306
+ end
307
+
308
+ hash[param] = _to_hash(value)
309
+ end
310
+ hash
311
+ end
312
+
313
+ end
314
+
315
+ end
@@ -17,10 +17,14 @@ module Repull
17
17
  class DeleteAirbnbListingPhoto200Response < ApiModelBase
18
18
  attr_accessor :deleted
19
19
 
20
+ # Whether our own copy dropped the photo too.
21
+ attr_accessor :stored
22
+
20
23
  # Attribute mapping from ruby-style variable name to JSON key.
21
24
  def self.attribute_map
22
25
  {
23
- :'deleted' => :'deleted'
26
+ :'deleted' => :'deleted',
27
+ :'stored' => :'stored'
24
28
  }
25
29
  end
26
30
 
@@ -37,7 +41,8 @@ module Repull
37
41
  # Attribute type mapping.
38
42
  def self.openapi_types
39
43
  {
40
- :'deleted' => :'Boolean'
44
+ :'deleted' => :'Boolean',
45
+ :'stored' => :'Boolean'
41
46
  }
42
47
  end
43
48
 
@@ -66,6 +71,10 @@ module Repull
66
71
  if attributes.key?(:'deleted')
67
72
  self.deleted = attributes[:'deleted']
68
73
  end
74
+
75
+ if attributes.key?(:'stored')
76
+ self.stored = attributes[:'stored']
77
+ end
69
78
  end
70
79
 
71
80
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -88,7 +97,8 @@ module Repull
88
97
  def ==(o)
89
98
  return true if self.equal?(o)
90
99
  self.class == o.class &&
91
- deleted == o.deleted
100
+ deleted == o.deleted &&
101
+ stored == o.stored
92
102
  end
93
103
 
94
104
  # @see the `==` method
@@ -100,7 +110,7 @@ module Repull
100
110
  # Calculates hash code according to all attributes.
101
111
  # @return [Integer] Hash code
102
112
  def hash
103
- [deleted].hash
113
+ [deleted, stored].hash
104
114
  end
105
115
 
106
116
  # Builds the object from hash
@@ -0,0 +1,157 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan 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 DeleteAirbnbListingRoom200Response < ApiModelBase
18
+ attr_accessor :deleted
19
+
20
+ # Whether our own copy dropped the room too.
21
+ attr_accessor :stored
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'deleted' => :'deleted',
27
+ :'stored' => :'stored'
28
+ }
29
+ end
30
+
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ acceptable_attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'deleted' => :'Boolean',
45
+ :'stored' => :'Boolean'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::DeleteAirbnbListingRoom200Response` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::DeleteAirbnbListingRoom200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'deleted')
72
+ self.deleted = attributes[:'deleted']
73
+ end
74
+
75
+ if attributes.key?(:'stored')
76
+ self.stored = attributes[:'stored']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ warn '[DEPRECATED] the `valid?` method is obsolete'
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(o)
98
+ return true if self.equal?(o)
99
+ self.class == o.class &&
100
+ deleted == o.deleted &&
101
+ stored == o.stored
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [deleted, stored].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ transformed_hash = {}
123
+ openapi_types.each_pair do |key, type|
124
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = nil
126
+ elsif type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[attribute_map[key]].is_a?(Array)
130
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
131
+ end
132
+ elsif !attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
134
+ end
135
+ end
136
+ new(transformed_hash)
137
+ end
138
+
139
+ # Returns the object in the form of hash
140
+ # @return [Hash] Returns the object in the form of hash
141
+ def to_hash
142
+ hash = {}
143
+ self.class.attribute_map.each_pair do |attr, param|
144
+ value = self.send(attr)
145
+ if value.nil?
146
+ is_nullable = self.class.openapi_nullable.include?(attr)
147
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
148
+ end
149
+
150
+ hash[param] = _to_hash(value)
151
+ end
152
+ hash
153
+ end
154
+
155
+ end
156
+
157
+ end
@@ -51,6 +51,15 @@ module Repull
51
51
  # Every inactive listing the request involved. Present on `code: \"listing_inactive\"` (HTTP 403) — activate these ids and retry.
52
52
  attr_accessor :listing_ids
53
53
 
54
+ # The single Repull listing the error is about. Present on `code: \"listing_not_api_connected\"` (HTTP 403).
55
+ attr_accessor :listing_id
56
+
57
+ # Airbnb's own id for that listing, so the host can find it in Airbnb. Present on `code: \"listing_not_api_connected\"` (HTTP 403).
58
+ attr_accessor :airbnb_listing_id
59
+
60
+ # The listing's current Airbnb API sync category — why the write was refused. Present on `code: \"listing_not_api_connected\"` (HTTP 403).
61
+ attr_accessor :sync_category
62
+
54
63
  # Seconds the client should wait before retrying. Mirrors the `Retry-After` HTTP header. Present on rate-limit responses and on transient upstream failures that are safe to retry.
55
64
  attr_accessor :retry_after
56
65
 
@@ -71,6 +80,9 @@ module Repull
71
80
  :'endpoint' => :'endpoint',
72
81
  :'did_you_mean' => :'did_you_mean',
73
82
  :'listing_ids' => :'listing_ids',
83
+ :'listing_id' => :'listing_id',
84
+ :'airbnb_listing_id' => :'airbnb_listing_id',
85
+ :'sync_category' => :'sync_category',
74
86
  :'retry_after' => :'retry_after',
75
87
  :'support' => :'support'
76
88
  }
@@ -101,6 +113,9 @@ module Repull
101
113
  :'endpoint' => :'String',
102
114
  :'did_you_mean' => :'String',
103
115
  :'listing_ids' => :'Array<String>',
116
+ :'listing_id' => :'String',
117
+ :'airbnb_listing_id' => :'String',
118
+ :'sync_category' => :'String',
104
119
  :'retry_after' => :'Integer',
105
120
  :'support' => :'ErrorErrorSupport'
106
121
  }
@@ -193,6 +208,18 @@ module Repull
193
208
  end
194
209
  end
195
210
 
211
+ if attributes.key?(:'listing_id')
212
+ self.listing_id = attributes[:'listing_id']
213
+ end
214
+
215
+ if attributes.key?(:'airbnb_listing_id')
216
+ self.airbnb_listing_id = attributes[:'airbnb_listing_id']
217
+ end
218
+
219
+ if attributes.key?(:'sync_category')
220
+ self.sync_category = attributes[:'sync_category']
221
+ end
222
+
196
223
  if attributes.key?(:'retry_after')
197
224
  self.retry_after = attributes[:'retry_after']
198
225
  end
@@ -309,6 +336,9 @@ module Repull
309
336
  endpoint == o.endpoint &&
310
337
  did_you_mean == o.did_you_mean &&
311
338
  listing_ids == o.listing_ids &&
339
+ listing_id == o.listing_id &&
340
+ airbnb_listing_id == o.airbnb_listing_id &&
341
+ sync_category == o.sync_category &&
312
342
  retry_after == o.retry_after &&
313
343
  support == o.support
314
344
  end
@@ -322,7 +352,7 @@ module Repull
322
352
  # Calculates hash code according to all attributes.
323
353
  # @return [Integer] Hash code
324
354
  def hash
325
- [code, message, fix, docs_url, request_id, field, value_received, valid_values, valid_params, endpoint, did_you_mean, listing_ids, retry_after, support].hash
355
+ [code, message, fix, docs_url, request_id, field, value_received, valid_values, valid_params, endpoint, did_you_mean, listing_ids, listing_id, airbnb_listing_id, sync_category, retry_after, support].hash
326
356
  end
327
357
 
328
358
  # Builds the object from hash