repull 0.2.16 → 0.2.18

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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +10 -10
  3. data/lib/repull/api/booking_com_api.rb +86 -2
  4. data/lib/repull/api/conversations_api.rb +8 -8
  5. data/lib/repull/api/health_api.rb +0 -57
  6. data/lib/repull/api/listings_api.rb +182 -12
  7. data/lib/repull/api/migrate_api.rb +552 -0
  8. data/lib/repull/api/reservations_api.rb +6 -6
  9. data/lib/repull/models/airbnb_permits_response.rb +1 -1
  10. data/lib/repull/models/airbnb_permits_write_request.rb +1 -1
  11. data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +43 -4
  12. data/lib/repull/models/{airbnb_permits_write_request_permits_inner_answers_inner.rb → airbnb_permits_write_request_permits_inner_answers_value.rb} +22 -34
  13. data/lib/repull/models/airbnb_publish_result.rb +41 -2
  14. data/lib/repull/models/booking_property_action_request.rb +176 -0
  15. data/lib/repull/models/booking_property_action_response.rb +281 -0
  16. data/lib/repull/models/booking_publish_result.rb +245 -0
  17. data/lib/repull/models/booking_publish_section_error.rb +220 -0
  18. data/lib/repull/models/booking_setup_request.rb +44 -5
  19. data/lib/repull/models/booking_setup_request_legal_entity.rb +235 -0
  20. data/lib/repull/models/channel_market_state_item.rb +291 -0
  21. data/lib/repull/models/check_migration_cutover200_response.rb +147 -0
  22. data/lib/repull/models/check_migration_cutover_request.rb +175 -0
  23. data/lib/repull/models/check_migration_cutover_request_reservations_inner.rb +216 -0
  24. data/lib/repull/models/connect_provider.rb +18 -5
  25. data/lib/repull/models/connect_session.rb +25 -5
  26. data/lib/repull/models/create_connect_session_request.rb +81 -5
  27. data/lib/repull/models/create_connect_session_request_copy.rb +251 -0
  28. data/lib/repull/models/create_connect_session_request_workspace.rb +196 -0
  29. data/lib/repull/models/delete_migration200_response.rb +147 -0
  30. data/lib/repull/models/delete_migration200_response_data.rb +165 -0
  31. data/lib/repull/models/error_error.rb +11 -1
  32. data/lib/repull/models/get_migration200_response.rb +147 -0
  33. data/lib/repull/models/get_migration_channel_map200_response.rb +147 -0
  34. data/lib/repull/models/get_migration_report200_response.rb +147 -0
  35. data/lib/repull/models/inquiry_updated_payload.rb +1 -1
  36. data/lib/repull/models/list_inquiries200_response_data_inner.rb +1 -1
  37. data/lib/repull/models/list_migrations200_response.rb +158 -0
  38. data/lib/repull/models/listing_address_readiness.rb +171 -0
  39. data/lib/repull/models/listing_content_update_request.rb +10 -1
  40. data/lib/repull/models/listing_content_update_request_address.rb +40 -3
  41. data/lib/repull/models/listing_content_update_request_pricing.rb +235 -0
  42. data/lib/repull/models/listing_content_update_response.rb +1 -1
  43. data/lib/repull/models/listing_create_request.rb +71 -2
  44. data/lib/repull/models/listing_create_response.rb +14 -4
  45. data/lib/repull/models/listing_market_state_request.rb +149 -0
  46. data/lib/repull/models/listing_market_state_response.rb +221 -0
  47. data/lib/repull/models/listing_publish_booking_request.rb +149 -0
  48. data/lib/repull/models/{listing_publish_response.rb → listing_publish_booking_response.rb} +4 -5
  49. data/lib/repull/models/listing_publish_status_channel.rb +32 -1
  50. data/lib/repull/models/listing_publish_status_connection.rb +17 -5
  51. data/lib/repull/models/listing_publish_status_response.rb +13 -1
  52. data/lib/repull/models/migration.rb +303 -0
  53. data/lib/repull/models/migration_channel_map.rb +169 -0
  54. data/lib/repull/models/migration_channel_map_listings_inner.rb +208 -0
  55. data/lib/repull/models/migration_channel_map_listings_inner_airbnb.rb +156 -0
  56. data/lib/repull/models/migration_channel_map_listings_inner_booking.rb +156 -0
  57. data/lib/repull/models/migration_channel_map_sources_inner.rb +167 -0
  58. data/lib/repull/models/migration_completed_event.rb +309 -0
  59. data/lib/repull/models/migration_connections_inner.rb +195 -0
  60. data/lib/repull/models/migration_counts.rb +183 -0
  61. data/lib/repull/models/migration_cutover_check.rb +200 -0
  62. data/lib/repull/models/migration_cutover_check_mismatched_inner.rb +156 -0
  63. data/lib/repull/models/migration_failed_event.rb +309 -0
  64. data/lib/repull/models/migration_import_payload.rb +225 -0
  65. data/lib/repull/models/migration_import_payload_results_inner.rb +165 -0
  66. data/lib/repull/models/migration_import_run.rb +202 -0
  67. data/lib/repull/models/migration_import_run_results_inner.rb +165 -0
  68. data/lib/repull/models/migration_report.rb +179 -0
  69. data/lib/repull/models/migration_report_issues_inner.rb +229 -0
  70. data/lib/repull/models/migration_reservation_ref.rb +184 -0
  71. data/lib/repull/models/reservation.rb +12 -2
  72. data/lib/repull/models/reservation_request_updated_payload.rb +1 -1
  73. data/lib/repull/models/run_migration_import202_response.rb +147 -0
  74. data/lib/repull/models/run_migration_import202_response_data.rb +158 -0
  75. data/lib/repull/models/run_migration_import202_response_data_queued_inner.rb +174 -0
  76. data/lib/repull/models/run_migration_import_request.rb +182 -0
  77. data/lib/repull/models/webhook_event.rb +4 -0
  78. data/lib/repull/models/webhook_event_type.rb +3 -1
  79. data/lib/repull/version.rb +1 -1
  80. data/lib/repull.rb +48 -2
  81. data/openapi/v1.json +2398 -433
  82. data/scripts/regen.sh +1 -1
  83. metadata +50 -4
@@ -0,0 +1,235 @@
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
+ # The listing's standing rates. Partial like every other section: only the fields you send are written, and `null` clears one. Changing `defaultDailyPrice` or `weekendPrice` also moves the nights on the calendar that still carry the old rate and were written by us — a night you or a channel priced yourself is never touched, and neither is a blocked or reserved one. So a price change reaches the calendar without overwriting anyone's work. This is still a local write. Publish to send the new rates to a channel.
18
+ class ListingContentUpdateRequestPricing < ApiModelBase
19
+ # Nightly rate for every night that is not a weekend night.
20
+ attr_accessor :default_daily_price
21
+
22
+ # Nightly rate for Saturday and Sunday nights (UTC).
23
+ attr_accessor :weekend_price
24
+
25
+ attr_accessor :cleaning_fee
26
+
27
+ attr_accessor :price_per_extra_guest
28
+
29
+ attr_accessor :security_deposit
30
+
31
+ # Fraction, not a percentage: `0.1` is 10% off a stay of a week or more.
32
+ attr_accessor :weekly_discount
33
+
34
+ # Fraction, not a percentage.
35
+ attr_accessor :monthly_discount
36
+
37
+ # Guests covered by the nightly rate before `pricePerExtraGuest` applies.
38
+ attr_accessor :guests_included
39
+
40
+ # ISO 4217, e.g. `USD`.
41
+ attr_accessor :currency
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'default_daily_price' => :'defaultDailyPrice',
47
+ :'weekend_price' => :'weekendPrice',
48
+ :'cleaning_fee' => :'cleaningFee',
49
+ :'price_per_extra_guest' => :'pricePerExtraGuest',
50
+ :'security_deposit' => :'securityDeposit',
51
+ :'weekly_discount' => :'weeklyDiscount',
52
+ :'monthly_discount' => :'monthlyDiscount',
53
+ :'guests_included' => :'guestsIncluded',
54
+ :'currency' => :'currency'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'default_daily_price' => :'Float',
72
+ :'weekend_price' => :'Float',
73
+ :'cleaning_fee' => :'Float',
74
+ :'price_per_extra_guest' => :'Float',
75
+ :'security_deposit' => :'Float',
76
+ :'weekly_discount' => :'Float',
77
+ :'monthly_discount' => :'Float',
78
+ :'guests_included' => :'Integer',
79
+ :'currency' => :'String'
80
+ }
81
+ end
82
+
83
+ # List of attributes with nullable: true
84
+ def self.openapi_nullable
85
+ Set.new([
86
+ :'default_daily_price',
87
+ :'weekend_price',
88
+ :'cleaning_fee',
89
+ :'price_per_extra_guest',
90
+ :'security_deposit',
91
+ :'weekly_discount',
92
+ :'monthly_discount',
93
+ :'guests_included',
94
+ :'currency'
95
+ ])
96
+ end
97
+
98
+ # Initializes the object
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ def initialize(attributes = {})
101
+ if (!attributes.is_a?(Hash))
102
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListingContentUpdateRequestPricing` initialize method"
103
+ end
104
+
105
+ # check to see if the attribute exists and convert string to symbol for hash key
106
+ acceptable_attribute_map = self.class.acceptable_attribute_map
107
+ attributes = attributes.each_with_object({}) { |(k, v), h|
108
+ if (!acceptable_attribute_map.key?(k.to_sym))
109
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListingContentUpdateRequestPricing`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
110
+ end
111
+ h[k.to_sym] = v
112
+ }
113
+
114
+ if attributes.key?(:'default_daily_price')
115
+ self.default_daily_price = attributes[:'default_daily_price']
116
+ end
117
+
118
+ if attributes.key?(:'weekend_price')
119
+ self.weekend_price = attributes[:'weekend_price']
120
+ end
121
+
122
+ if attributes.key?(:'cleaning_fee')
123
+ self.cleaning_fee = attributes[:'cleaning_fee']
124
+ end
125
+
126
+ if attributes.key?(:'price_per_extra_guest')
127
+ self.price_per_extra_guest = attributes[:'price_per_extra_guest']
128
+ end
129
+
130
+ if attributes.key?(:'security_deposit')
131
+ self.security_deposit = attributes[:'security_deposit']
132
+ end
133
+
134
+ if attributes.key?(:'weekly_discount')
135
+ self.weekly_discount = attributes[:'weekly_discount']
136
+ end
137
+
138
+ if attributes.key?(:'monthly_discount')
139
+ self.monthly_discount = attributes[:'monthly_discount']
140
+ end
141
+
142
+ if attributes.key?(:'guests_included')
143
+ self.guests_included = attributes[:'guests_included']
144
+ end
145
+
146
+ if attributes.key?(:'currency')
147
+ self.currency = attributes[:'currency']
148
+ end
149
+ end
150
+
151
+ # Show invalid properties with the reasons. Usually used together with valid?
152
+ # @return Array for valid properties with the reasons
153
+ def list_invalid_properties
154
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
155
+ invalid_properties = Array.new
156
+ invalid_properties
157
+ end
158
+
159
+ # Check to see if the all the properties in the model are valid
160
+ # @return true if the model is valid
161
+ def valid?
162
+ warn '[DEPRECATED] the `valid?` method is obsolete'
163
+ true
164
+ end
165
+
166
+ # Checks equality by comparing each attribute.
167
+ # @param [Object] Object to be compared
168
+ def ==(o)
169
+ return true if self.equal?(o)
170
+ self.class == o.class &&
171
+ default_daily_price == o.default_daily_price &&
172
+ weekend_price == o.weekend_price &&
173
+ cleaning_fee == o.cleaning_fee &&
174
+ price_per_extra_guest == o.price_per_extra_guest &&
175
+ security_deposit == o.security_deposit &&
176
+ weekly_discount == o.weekly_discount &&
177
+ monthly_discount == o.monthly_discount &&
178
+ guests_included == o.guests_included &&
179
+ currency == o.currency
180
+ end
181
+
182
+ # @see the `==` method
183
+ # @param [Object] Object to be compared
184
+ def eql?(o)
185
+ self == o
186
+ end
187
+
188
+ # Calculates hash code according to all attributes.
189
+ # @return [Integer] Hash code
190
+ def hash
191
+ [default_daily_price, weekend_price, cleaning_fee, price_per_extra_guest, security_deposit, weekly_discount, monthly_discount, guests_included, currency].hash
192
+ end
193
+
194
+ # Builds the object from hash
195
+ # @param [Hash] attributes Model attributes in the form of hash
196
+ # @return [Object] Returns the model itself
197
+ def self.build_from_hash(attributes)
198
+ return nil unless attributes.is_a?(Hash)
199
+ attributes = attributes.transform_keys(&:to_sym)
200
+ transformed_hash = {}
201
+ openapi_types.each_pair do |key, type|
202
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
203
+ transformed_hash["#{key}"] = nil
204
+ elsif type =~ /\AArray<(.*)>/i
205
+ # check to ensure the input is an array given that the attribute
206
+ # is documented as an array but the input is not
207
+ if attributes[attribute_map[key]].is_a?(Array)
208
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
209
+ end
210
+ elsif !attributes[attribute_map[key]].nil?
211
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
212
+ end
213
+ end
214
+ new(transformed_hash)
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ self.class.attribute_map.each_pair do |attr, param|
222
+ value = self.send(attr)
223
+ if value.nil?
224
+ is_nullable = self.class.openapi_nullable.include?(attr)
225
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
226
+ end
227
+
228
+ hash[param] = _to_hash(value)
229
+ end
230
+ hash
231
+ end
232
+
233
+ end
234
+
235
+ end
@@ -18,7 +18,7 @@ module Repull
18
18
  # The listing id (serialized as a string to preserve precision).
19
19
  attr_accessor :id
20
20
 
21
- # Content slabs that were actually written, e.g. [\"title\",\"occupancy\",\"amenities\"]. A non-English write also reports `locale:<tag>` so you can see which row was written.
21
+ # Content slabs that were actually written, e.g. [\"title\",\"occupancy\",\"amenities\"]. A non-English write also reports `locale:<tag>` so you can see which row was written. A rate change reports `pricing`, and `calendar` as well when nights on the calendar moved to the new rate.
22
22
  attr_accessor :changed
23
23
 
24
24
  # Provided-but-not-applied fields — e.g. \"photos\" when a non-empty photos array carried no valid http(s) URL.
@@ -14,23 +14,41 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # Inputs for `POST /v1/listings`. Provide enough address detail (street + city + lat/lng) for downstream Airbnb publish to work.
17
+ # Inputs for `POST /v1/listings`. **Address requirements — read this before you build the payload.** Publishing to Airbnb runs a create preflight that refuses the listing outright if the address is incomplete, and the refusal only surfaces later, at publish time. Airbnb requires `street` and `city` for every country. For a **US** property it additionally requires `state` and `postalCode`. Crucially, **omitting `countryCode` makes the listing behave as US**, so a listing created without a country needs `state` and `postalCode` too. Send `countryCode` explicitly for a non-US property. `lat`/`lng` alone are not enough — Airbnb rejects coordinates that are not backed by a full postal address. Use `GET /v1/listings/{id}/publish-status` to see which parts are still missing before you attempt a publish.
18
18
  class ListingCreateRequest < ApiModelBase
19
19
  # Public guest-facing title
20
20
  attr_accessor :name
21
21
 
22
22
  attr_accessor :property_type
23
23
 
24
+ # What the guest actually gets. Airbnb refuses to activate a listing that has not stated one, answering \"Please specify a valid room type\" — which reads like a beds problem and is not. It is never defaulted: most listings are an entire home, but hundreds are a private or hotel room, and publishing one of those as an entire home is a false claim about someone's property. Settable later with `PUT /v1/listings/{id}/content` under `details`.
25
+ attr_accessor :room_type_category
26
+
27
+ # Airbnb's finer property-type category, when you know it. Optional.
28
+ attr_accessor :property_type_category
29
+
30
+ # Street address including the number. Required by Airbnb for every country — a publish is refused without it.
24
31
  attr_accessor :street
25
32
 
33
+ # City / town. Required by Airbnb for every country — a publish is refused without it.
26
34
  attr_accessor :city
27
35
 
36
+ # State, province or region. **Required for a US property**, and a listing with no `countryCode` counts as US. Optional elsewhere, but stored and used wherever the channel carries it.
28
37
  attr_accessor :state
29
38
 
39
+ # Postal code — ZIP in the US, postcode in the UK, and so on. **Required for a US property**, and a listing with no `countryCode` counts as US. Send the complete code: Booking.com rejects a partial postcode such as `SW6` where the full value is `SW6 1EP`. Alias: `zipcode`.
40
+ attr_accessor :postal_code
41
+
42
+ # Alias for `postalCode`, accepted because it is the field name on the Airbnb mirror. `postalCode` wins if you send both. Prefer `postalCode` — the field holds non-US postcodes too.
43
+ attr_accessor :zipcode
44
+
45
+ # ISO-3166 alpha-2 country code. **Send this for any non-US property.** Omitting it does not mean \"unknown\" — the publish path treats a listing with no country as US, which then requires `state` and `postalCode` and will refuse the listing when they are absent.
30
46
  attr_accessor :country_code
31
47
 
48
+ # Latitude. Useful for map search, but never a substitute for the postal address — Airbnb rejects coordinates it cannot reconcile with a full address.
32
49
  attr_accessor :lat
33
50
 
51
+ # Longitude. See `lat`.
34
52
  attr_accessor :lng
35
53
 
36
54
  attr_accessor :bedrooms
@@ -45,8 +63,15 @@ module Repull
45
63
 
46
64
  attr_accessor :description
47
65
 
66
+ # Nightly rate for every night that is not a weekend night. Stating it is what gives the new listing a calendar: 365 nights are written from it, and that calendar is what a publish sends to the channel. Without a price the listing has no availability to publish, which Booking.com refuses with \"No availability pushed\".
48
67
  attr_accessor :default_daily_price
49
68
 
69
+ # Nightly rate for Saturday and Sunday nights (UTC). Omit it and those nights take `defaultDailyPrice`. It is the same rate the direct-booking quoter charges for a weekend night, so the calendar and a quote cannot disagree.
70
+ attr_accessor :weekend_price
71
+
72
+ # Charged per guest above the number included in the nightly rate.
73
+ attr_accessor :price_per_extra_guest
74
+
50
75
  attr_accessor :cleaning_fee
51
76
 
52
77
  attr_accessor :cancellation_policy
@@ -68,9 +93,13 @@ module Repull
68
93
  {
69
94
  :'name' => :'name',
70
95
  :'property_type' => :'propertyType',
96
+ :'room_type_category' => :'roomTypeCategory',
97
+ :'property_type_category' => :'propertyTypeCategory',
71
98
  :'street' => :'street',
72
99
  :'city' => :'city',
73
100
  :'state' => :'state',
101
+ :'postal_code' => :'postalCode',
102
+ :'zipcode' => :'zipcode',
74
103
  :'country_code' => :'countryCode',
75
104
  :'lat' => :'lat',
76
105
  :'lng' => :'lng',
@@ -81,6 +110,8 @@ module Repull
81
110
  :'summary' => :'summary',
82
111
  :'description' => :'description',
83
112
  :'default_daily_price' => :'defaultDailyPrice',
113
+ :'weekend_price' => :'weekendPrice',
114
+ :'price_per_extra_guest' => :'pricePerExtraGuest',
84
115
  :'cleaning_fee' => :'cleaningFee',
85
116
  :'cancellation_policy' => :'cancellationPolicy',
86
117
  :'check_in_time_start' => :'checkInTimeStart',
@@ -107,9 +138,13 @@ module Repull
107
138
  {
108
139
  :'name' => :'String',
109
140
  :'property_type' => :'String',
141
+ :'room_type_category' => :'String',
142
+ :'property_type_category' => :'String',
110
143
  :'street' => :'String',
111
144
  :'city' => :'String',
112
145
  :'state' => :'String',
146
+ :'postal_code' => :'String',
147
+ :'zipcode' => :'String',
113
148
  :'country_code' => :'String',
114
149
  :'lat' => :'Float',
115
150
  :'lng' => :'Float',
@@ -120,6 +155,8 @@ module Repull
120
155
  :'summary' => :'String',
121
156
  :'description' => :'String',
122
157
  :'default_daily_price' => :'Float',
158
+ :'weekend_price' => :'Float',
159
+ :'price_per_extra_guest' => :'Float',
123
160
  :'cleaning_fee' => :'Float',
124
161
  :'cancellation_policy' => :'String',
125
162
  :'check_in_time_start' => :'String',
@@ -134,6 +171,8 @@ module Repull
134
171
  # List of attributes with nullable: true
135
172
  def self.openapi_nullable
136
173
  Set.new([
174
+ :'weekend_price',
175
+ :'price_per_extra_guest',
137
176
  ])
138
177
  end
139
178
 
@@ -163,6 +202,14 @@ module Repull
163
202
  self.property_type = attributes[:'property_type']
164
203
  end
165
204
 
205
+ if attributes.key?(:'room_type_category')
206
+ self.room_type_category = attributes[:'room_type_category']
207
+ end
208
+
209
+ if attributes.key?(:'property_type_category')
210
+ self.property_type_category = attributes[:'property_type_category']
211
+ end
212
+
166
213
  if attributes.key?(:'street')
167
214
  self.street = attributes[:'street']
168
215
  end
@@ -175,6 +222,14 @@ module Repull
175
222
  self.state = attributes[:'state']
176
223
  end
177
224
 
225
+ if attributes.key?(:'postal_code')
226
+ self.postal_code = attributes[:'postal_code']
227
+ end
228
+
229
+ if attributes.key?(:'zipcode')
230
+ self.zipcode = attributes[:'zipcode']
231
+ end
232
+
178
233
  if attributes.key?(:'country_code')
179
234
  self.country_code = attributes[:'country_code']
180
235
  end
@@ -215,6 +270,14 @@ module Repull
215
270
  self.default_daily_price = attributes[:'default_daily_price']
216
271
  end
217
272
 
273
+ if attributes.key?(:'weekend_price')
274
+ self.weekend_price = attributes[:'weekend_price']
275
+ end
276
+
277
+ if attributes.key?(:'price_per_extra_guest')
278
+ self.price_per_extra_guest = attributes[:'price_per_extra_guest']
279
+ end
280
+
218
281
  if attributes.key?(:'cleaning_fee')
219
282
  self.cleaning_fee = attributes[:'cleaning_fee']
220
283
  end
@@ -285,9 +348,13 @@ module Repull
285
348
  self.class == o.class &&
286
349
  name == o.name &&
287
350
  property_type == o.property_type &&
351
+ room_type_category == o.room_type_category &&
352
+ property_type_category == o.property_type_category &&
288
353
  street == o.street &&
289
354
  city == o.city &&
290
355
  state == o.state &&
356
+ postal_code == o.postal_code &&
357
+ zipcode == o.zipcode &&
291
358
  country_code == o.country_code &&
292
359
  lat == o.lat &&
293
360
  lng == o.lng &&
@@ -298,6 +365,8 @@ module Repull
298
365
  summary == o.summary &&
299
366
  description == o.description &&
300
367
  default_daily_price == o.default_daily_price &&
368
+ weekend_price == o.weekend_price &&
369
+ price_per_extra_guest == o.price_per_extra_guest &&
301
370
  cleaning_fee == o.cleaning_fee &&
302
371
  cancellation_policy == o.cancellation_policy &&
303
372
  check_in_time_start == o.check_in_time_start &&
@@ -317,7 +386,7 @@ module Repull
317
386
  # Calculates hash code according to all attributes.
318
387
  # @return [Integer] Hash code
319
388
  def hash
320
- [name, property_type, street, city, state, country_code, lat, lng, bedrooms, bathrooms, beds, person_capacity, summary, description, default_daily_price, cleaning_fee, cancellation_policy, check_in_time_start, check_out_time, allows_pets, allows_smoking, allows_children, allows_events].hash
389
+ [name, property_type, room_type_category, property_type_category, street, city, state, postal_code, zipcode, country_code, lat, lng, bedrooms, bathrooms, beds, person_capacity, summary, description, default_daily_price, weekend_price, price_per_extra_guest, cleaning_fee, cancellation_policy, check_in_time_start, check_out_time, allows_pets, allows_smoking, allows_children, allows_events].hash
321
390
  end
322
391
 
323
392
  # Builds the object from hash
@@ -18,10 +18,14 @@ module Repull
18
18
  # New listing ID — use for follow-up generate-content / publish calls
19
19
  attr_accessor :id
20
20
 
21
+ # Nights of calendar written from the price you stated. `0` means the listing has no calendar and a publish will send no availability — state `defaultDailyPrice` on the create, or set it later with `PUT /v1/listings/{id}/content` under `pricing`.
22
+ attr_accessor :calendar_days_seeded
23
+
21
24
  # Attribute mapping from ruby-style variable name to JSON key.
22
25
  def self.attribute_map
23
26
  {
24
- :'id' => :'id'
27
+ :'id' => :'id',
28
+ :'calendar_days_seeded' => :'calendarDaysSeeded'
25
29
  }
26
30
  end
27
31
 
@@ -38,7 +42,8 @@ module Repull
38
42
  # Attribute type mapping.
39
43
  def self.openapi_types
40
44
  {
41
- :'id' => :'String'
45
+ :'id' => :'String',
46
+ :'calendar_days_seeded' => :'Integer'
42
47
  }
43
48
  end
44
49
 
@@ -67,6 +72,10 @@ module Repull
67
72
  if attributes.key?(:'id')
68
73
  self.id = attributes[:'id']
69
74
  end
75
+
76
+ if attributes.key?(:'calendar_days_seeded')
77
+ self.calendar_days_seeded = attributes[:'calendar_days_seeded']
78
+ end
70
79
  end
71
80
 
72
81
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -89,7 +98,8 @@ module Repull
89
98
  def ==(o)
90
99
  return true if self.equal?(o)
91
100
  self.class == o.class &&
92
- id == o.id
101
+ id == o.id &&
102
+ calendar_days_seeded == o.calendar_days_seeded
93
103
  end
94
104
 
95
105
  # @see the `==` method
@@ -101,7 +111,7 @@ module Repull
101
111
  # Calculates hash code according to all attributes.
102
112
  # @return [Integer] Hash code
103
113
  def hash
104
- [id].hash
114
+ [id, calendar_days_seeded].hash
105
115
  end
106
116
 
107
117
  # Builds the object from hash
@@ -0,0 +1,149 @@
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
+ # Optional. Send no body at all unless this listing is mapped to more than one Booking.com property.
18
+ class ListingMarketStateRequest < ApiModelBase
19
+ # Booking.com property to act on, for a listing mapped to more than one. Without it the Booking.com item comes back refused with `ambiguous_booking_mapping` — closing the wrong property's availability takes real inventory off sale, so it is never guessed. The Airbnb items are unaffected and still run. `GET /v1/channels/booking/properties` lists every property in the workspace with the listings mapped under it. `?hotel_id=` in the query string means the same thing; the body wins if you send both.
20
+ attr_accessor :hotel_id
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'hotel_id' => :'hotelId'
26
+ }
27
+ end
28
+
29
+ # Returns attribute mapping this model knows about
30
+ def self.acceptable_attribute_map
31
+ attribute_map
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ acceptable_attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'hotel_id' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListingMarketStateRequest` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!acceptable_attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListingMarketStateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'hotel_id')
69
+ self.hotel_id = attributes[:'hotel_id']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ hotel_id == o.hotel_id
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [hotel_id].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
123
+ end
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
126
+ end
127
+ end
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Returns the object in the form of hash
132
+ # @return [Hash] Returns the object in the form of hash
133
+ def to_hash
134
+ hash = {}
135
+ self.class.attribute_map.each_pair do |attr, param|
136
+ value = self.send(attr)
137
+ if value.nil?
138
+ is_nullable = self.class.openapi_nullable.include?(attr)
139
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
140
+ end
141
+
142
+ hash[param] = _to_hash(value)
143
+ end
144
+ hash
145
+ end
146
+
147
+ end
148
+
149
+ end