repull 0.2.55 → 0.2.57

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 (89) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +539 -2
  3. data/lib/repull/api/connect_api.rb +2 -2
  4. data/lib/repull/api/listings_api.rb +70 -0
  5. data/lib/repull/api/reservations_api.rb +4 -4
  6. data/lib/repull/api/reviews_api.rb +6 -6
  7. data/lib/repull/api/vrbo_api.rb +1174 -97
  8. data/lib/repull/models/create_vrbo_alteration200_response.rb +157 -0
  9. data/lib/repull/models/create_vrbo_alteration200_response_data.rb +202 -0
  10. data/lib/repull/models/create_vrbo_alteration200_response_data_before.rb +201 -0
  11. data/lib/repull/models/create_vrbo_alteration200_response_data_due_date.rb +168 -0
  12. data/lib/repull/models/create_vrbo_alteration200_response_data_payment.rb +168 -0
  13. data/lib/repull/models/create_vrbo_alteration200_response_data_payment_lines_inner.rb +157 -0
  14. data/lib/repull/models/create_vrbo_alteration200_response_data_payment_total.rb +159 -0
  15. data/lib/repull/models/create_vrbo_alteration201_response.rb +157 -0
  16. data/lib/repull/models/create_vrbo_alteration201_response_data.rb +193 -0
  17. data/lib/repull/models/create_vrbo_alteration_request.rb +305 -0
  18. data/lib/repull/models/create_vrbo_offer201_response.rb +104 -0
  19. data/lib/repull/models/create_vrbo_offer201_response_one_of.rb +175 -0
  20. data/lib/repull/models/create_vrbo_offer_request.rb +320 -0
  21. data/lib/repull/models/create_vrbo_offer_request_fees_inner.rb +199 -0
  22. data/lib/repull/models/create_vrbo_offer_request_guest_details.rb +278 -0
  23. data/lib/repull/models/get_airbnb_house_rules200_response.rb +190 -0
  24. data/lib/repull/models/get_airbnb_house_rules200_response_data.rb +247 -0
  25. data/lib/repull/models/get_airbnb_house_rules200_response_data_children.rb +148 -0
  26. data/lib/repull/models/get_airbnb_house_rules200_response_data_house_rules_inner.rb +168 -0
  27. data/lib/repull/models/get_airbnb_listing_cancellation200_response.rb +190 -0
  28. data/lib/repull/models/get_airbnb_listing_cancellation200_response_data.rb +203 -0
  29. data/lib/repull/models/get_airbnb_listing_cancellation200_response_data_non_refundable.rb +192 -0
  30. data/lib/repull/models/get_airbnb_listing_fees200_response.rb +192 -0
  31. data/lib/repull/models/get_airbnb_listing_fees200_response_data_inner.rb +251 -0
  32. data/lib/repull/models/get_airbnb_listing_taxes200_response.rb +192 -0
  33. data/lib/repull/models/get_airbnb_listing_taxes200_response_data_inner.rb +181 -0
  34. data/lib/repull/models/get_airbnb_location200_response.rb +190 -0
  35. data/lib/repull/models/get_airbnb_location200_response_data.rb +197 -0
  36. data/lib/repull/models/get_airbnb_location200_response_data_address.rb +198 -0
  37. data/lib/repull/models/get_vrbo_listing200_response_data_inner.rb +1 -1
  38. data/lib/repull/models/get_vrbo_listing_settings200_response.rb +217 -0
  39. data/lib/repull/models/get_vrbo_listing_settings200_response_data.rb +106 -0
  40. data/lib/repull/models/get_vrbo_listing_settings200_response_data_one_of.rb +149 -0
  41. data/lib/repull/models/get_vrbo_offer200_response.rb +290 -0
  42. data/lib/repull/models/get_vrbo_offer200_response_fees_inner.rb +166 -0
  43. data/lib/repull/models/get_vrbo_reservation200_response.rb +175 -0
  44. data/lib/repull/models/get_vrbo_reservation200_response_data.rb +310 -0
  45. data/lib/repull/models/get_vrbo_reservation200_response_data_available_actions_inner.rb +156 -0
  46. data/lib/repull/models/get_vrbo_reservation200_response_data_freshness.rb +219 -0
  47. data/lib/repull/models/get_vrbo_reservation200_response_data_freshness_accounts_inner.rb +174 -0
  48. data/lib/repull/models/get_vrbo_thread200_response.rb +159 -0
  49. data/lib/repull/models/list_vrbo_thread_messages200_response.rb +170 -0
  50. data/lib/repull/models/list_vrbo_thread_messages200_response_data_inner.rb +240 -0
  51. data/lib/repull/models/list_vrbo_threads200_response.rb +172 -0
  52. data/lib/repull/models/list_vrbo_threads200_response_data_inner.rb +219 -0
  53. data/lib/repull/models/list_vrbo_transactions200_response.rb +167 -0
  54. data/lib/repull/models/list_vrbo_transactions200_response_data_freshness.rb +220 -0
  55. data/lib/repull/models/list_vrbo_transactions200_response_data_inner.rb +362 -0
  56. data/lib/repull/models/list_vrbo_transactions200_response_data_inner_payout.rb +189 -0
  57. data/lib/repull/models/map_vrbo_listing_request.rb +1 -1
  58. data/lib/repull/models/pull_listing_from_vrbo200_response.rb +273 -0
  59. data/lib/repull/models/pull_listing_from_vrbo_request.rb +149 -0
  60. data/lib/repull/models/send_vrbo_message_request.rb +186 -0
  61. data/lib/repull/models/submit_guest_review200_response.rb +26 -4
  62. data/lib/repull/models/submit_vrbo_guest_review200_response.rb +176 -0
  63. data/lib/repull/models/submit_vrbo_guest_review_request.rb +195 -0
  64. data/lib/repull/models/submit_vrbo_guest_review_request_category_ratings_inner.rb +218 -0
  65. data/lib/repull/models/sync_vrbo_transactions200_response.rb +167 -0
  66. data/lib/repull/models/sync_vrbo_transactions200_response_accounts_inner.rb +183 -0
  67. data/lib/repull/models/sync_vrbo_transactions200_response_accounts_inner_error.rb +156 -0
  68. data/lib/repull/models/sync_vrbo_transactions_request.rb +156 -0
  69. data/lib/repull/models/update_airbnb_house_rules200_response.rb +187 -0
  70. data/lib/repull/models/update_airbnb_house_rules_request.rb +191 -0
  71. data/lib/repull/models/update_airbnb_listing_cancellation200_response.rb +147 -0
  72. data/lib/repull/models/update_airbnb_listing_cancellation200_response_data.rb +158 -0
  73. data/lib/repull/models/update_airbnb_listing_cancellation_request.rb +201 -0
  74. data/lib/repull/models/update_airbnb_listing_cancellation_request_non_refundable.rb +182 -0
  75. data/lib/repull/models/update_airbnb_listing_fees200_response.rb +150 -0
  76. data/lib/repull/models/update_airbnb_listing_fees_request.rb +175 -0
  77. data/lib/repull/models/vrbo_login200_response.rb +2 -2
  78. data/lib/repull/models/vrbo_login_request.rb +13 -3
  79. data/lib/repull/models/vrbo_reservation_action200_response.rb +166 -0
  80. data/lib/repull/models/vrbo_reservation_action200_response_data.rb +215 -0
  81. data/lib/repull/models/vrbo_reservation_action200_response_data_payment.rb +169 -0
  82. data/lib/repull/models/vrbo_reservation_action200_response_data_penalties.rb +168 -0
  83. data/lib/repull/models/vrbo_reservation_action200_response_data_terms_inner.rb +158 -0
  84. data/lib/repull/models/vrbo_reservation_action_request.rb +268 -0
  85. data/lib/repull/models/withdraw_vrbo_offer200_response.rb +165 -0
  86. data/lib/repull/version.rb +1 -1
  87. data/lib/repull.rb +73 -0
  88. data/openapi/v1.json +4689 -202
  89. metadata +75 -2
@@ -21,12 +21,20 @@ module Repull
21
21
 
22
22
  attr_accessor :submitted
23
23
 
24
+ # `vrbo` for a Vrbo rating.
25
+ attr_accessor :platform
26
+
27
+ # Vrbo: the rating as sent to Vrbo.
28
+ attr_accessor :rating
29
+
24
30
  # Attribute mapping from ruby-style variable name to JSON key.
25
31
  def self.attribute_map
26
32
  {
27
33
  :'id' => :'id',
28
34
  :'external_review_id' => :'externalReviewId',
29
- :'submitted' => :'submitted'
35
+ :'submitted' => :'submitted',
36
+ :'platform' => :'platform',
37
+ :'rating' => :'rating'
30
38
  }
31
39
  end
32
40
 
@@ -45,7 +53,9 @@ module Repull
45
53
  {
46
54
  :'id' => :'String',
47
55
  :'external_review_id' => :'String',
48
- :'submitted' => :'Boolean'
56
+ :'submitted' => :'Boolean',
57
+ :'platform' => :'String',
58
+ :'rating' => :'Hash<String, Object>'
49
59
  }
50
60
  end
51
61
 
@@ -82,6 +92,16 @@ module Repull
82
92
  if attributes.key?(:'submitted')
83
93
  self.submitted = attributes[:'submitted']
84
94
  end
95
+
96
+ if attributes.key?(:'platform')
97
+ self.platform = attributes[:'platform']
98
+ end
99
+
100
+ if attributes.key?(:'rating')
101
+ if (value = attributes[:'rating']).is_a?(Hash)
102
+ self.rating = value
103
+ end
104
+ end
85
105
  end
86
106
 
87
107
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -106,7 +126,9 @@ module Repull
106
126
  self.class == o.class &&
107
127
  id == o.id &&
108
128
  external_review_id == o.external_review_id &&
109
- submitted == o.submitted
129
+ submitted == o.submitted &&
130
+ platform == o.platform &&
131
+ rating == o.rating
110
132
  end
111
133
 
112
134
  # @see the `==` method
@@ -118,7 +140,7 @@ module Repull
118
140
  # Calculates hash code according to all attributes.
119
141
  # @return [Integer] Hash code
120
142
  def hash
121
- [id, external_review_id, submitted].hash
143
+ [id, external_review_id, submitted, platform, rating].hash
122
144
  end
123
145
 
124
146
  # Builds the object from hash
@@ -0,0 +1,176 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class SubmitVrboGuestReview200Response < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :submitted
21
+
22
+ attr_accessor :platform
23
+
24
+ attr_accessor :rating
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'id' => :'id',
30
+ :'submitted' => :'submitted',
31
+ :'platform' => :'platform',
32
+ :'rating' => :'rating'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'id' => :'String',
50
+ :'submitted' => :'Boolean',
51
+ :'platform' => :'String',
52
+ :'rating' => :'Hash<String, Object>'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::SubmitVrboGuestReview200Response` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::SubmitVrboGuestReview200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'id')
79
+ self.id = attributes[:'id']
80
+ end
81
+
82
+ if attributes.key?(:'submitted')
83
+ self.submitted = attributes[:'submitted']
84
+ end
85
+
86
+ if attributes.key?(:'platform')
87
+ self.platform = attributes[:'platform']
88
+ end
89
+
90
+ if attributes.key?(:'rating')
91
+ if (value = attributes[:'rating']).is_a?(Hash)
92
+ self.rating = value
93
+ end
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ id == o.id &&
118
+ submitted == o.submitted &&
119
+ platform == o.platform &&
120
+ rating == o.rating
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [id, submitted, platform, rating].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Returns the object in the form of hash
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_hash
161
+ hash = {}
162
+ self.class.attribute_map.each_pair do |attr, param|
163
+ value = self.send(attr)
164
+ if value.nil?
165
+ is_nullable = self.class.openapi_nullable.include?(attr)
166
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
167
+ end
168
+
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ end
175
+
176
+ end
@@ -0,0 +1,195 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class SubmitVrboGuestReviewRequest < ApiModelBase
18
+ attr_accessor :rating
19
+
20
+ attr_accessor :category_ratings
21
+
22
+ attr_accessor :is_reviewee_recommended
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'rating' => :'rating',
28
+ :'category_ratings' => :'categoryRatings',
29
+ :'is_reviewee_recommended' => :'isRevieweeRecommended'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'rating' => :'Integer',
47
+ :'category_ratings' => :'Array<SubmitVrboGuestReviewRequestCategoryRatingsInner>',
48
+ :'is_reviewee_recommended' => :'Boolean'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::SubmitVrboGuestReviewRequest` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::SubmitVrboGuestReviewRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'rating')
75
+ self.rating = attributes[:'rating']
76
+ end
77
+
78
+ if attributes.key?(:'category_ratings')
79
+ if (value = attributes[:'category_ratings']).is_a?(Array)
80
+ self.category_ratings = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'is_reviewee_recommended')
85
+ self.is_reviewee_recommended = attributes[:'is_reviewee_recommended']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ if !@rating.nil? && @rating > 5
95
+ invalid_properties.push('invalid value for "rating", must be smaller than or equal to 5.')
96
+ end
97
+
98
+ if !@rating.nil? && @rating < 1
99
+ invalid_properties.push('invalid value for "rating", must be greater than or equal to 1.')
100
+ end
101
+
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ return false if !@rating.nil? && @rating > 5
110
+ return false if !@rating.nil? && @rating < 1
111
+ true
112
+ end
113
+
114
+ # Custom attribute writer method with validation
115
+ # @param [Object] rating Value to be assigned
116
+ def rating=(rating)
117
+ if rating.nil?
118
+ fail ArgumentError, 'rating cannot be nil'
119
+ end
120
+
121
+ if rating > 5
122
+ fail ArgumentError, 'invalid value for "rating", must be smaller than or equal to 5.'
123
+ end
124
+
125
+ if rating < 1
126
+ fail ArgumentError, 'invalid value for "rating", must be greater than or equal to 1.'
127
+ end
128
+
129
+ @rating = rating
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
+ rating == o.rating &&
138
+ category_ratings == o.category_ratings &&
139
+ is_reviewee_recommended == o.is_reviewee_recommended
140
+ end
141
+
142
+ # @see the `==` method
143
+ # @param [Object] Object to be compared
144
+ def eql?(o)
145
+ self == o
146
+ end
147
+
148
+ # Calculates hash code according to all attributes.
149
+ # @return [Integer] Hash code
150
+ def hash
151
+ [rating, category_ratings, is_reviewee_recommended].hash
152
+ end
153
+
154
+ # Builds the object from hash
155
+ # @param [Hash] attributes Model attributes in the form of hash
156
+ # @return [Object] Returns the model itself
157
+ def self.build_from_hash(attributes)
158
+ return nil unless attributes.is_a?(Hash)
159
+ attributes = attributes.transform_keys(&:to_sym)
160
+ transformed_hash = {}
161
+ openapi_types.each_pair do |key, type|
162
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
163
+ transformed_hash["#{key}"] = nil
164
+ elsif type =~ /\AArray<(.*)>/i
165
+ # check to ensure the input is an array given that the attribute
166
+ # is documented as an array but the input is not
167
+ if attributes[attribute_map[key]].is_a?(Array)
168
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
169
+ end
170
+ elsif !attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
172
+ end
173
+ end
174
+ new(transformed_hash)
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ if value.nil?
184
+ is_nullable = self.class.openapi_nullable.include?(attr)
185
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
186
+ end
187
+
188
+ hash[param] = _to_hash(value)
189
+ end
190
+ hash
191
+ end
192
+
193
+ end
194
+
195
+ end
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class SubmitVrboGuestReviewRequestCategoryRatingsInner < ApiModelBase
18
+ attr_accessor :category
19
+
20
+ attr_accessor :rating
21
+
22
+ class EnumAttributeValidator
23
+ attr_reader :datatype
24
+ attr_reader :allowable_values
25
+
26
+ def initialize(datatype, allowable_values)
27
+ @allowable_values = allowable_values.map do |value|
28
+ case datatype.to_s
29
+ when /Integer/i
30
+ value.to_i
31
+ when /Float/i
32
+ value.to_f
33
+ else
34
+ value
35
+ end
36
+ end
37
+ end
38
+
39
+ def valid?(value)
40
+ !value || allowable_values.include?(value)
41
+ end
42
+ end
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'category' => :'category',
48
+ :'rating' => :'rating'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'category' => :'String',
66
+ :'rating' => :'Integer'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::SubmitVrboGuestReviewRequestCategoryRatingsInner` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::SubmitVrboGuestReviewRequestCategoryRatingsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'category')
93
+ self.category = attributes[:'category']
94
+ end
95
+
96
+ if attributes.key?(:'rating')
97
+ self.rating = attributes[:'rating']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
+ invalid_properties = Array.new
106
+ if !@rating.nil? && @rating > 5
107
+ invalid_properties.push('invalid value for "rating", must be smaller than or equal to 5.')
108
+ end
109
+
110
+ if !@rating.nil? && @rating < 1
111
+ invalid_properties.push('invalid value for "rating", must be greater than or equal to 1.')
112
+ end
113
+
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ category_validator = EnumAttributeValidator.new('String', ["cleanliness", "communication", "respect_house_rules"])
122
+ return false unless category_validator.valid?(@category)
123
+ return false if !@rating.nil? && @rating > 5
124
+ return false if !@rating.nil? && @rating < 1
125
+ true
126
+ end
127
+
128
+ # Custom attribute writer method checking allowed values (enum).
129
+ # @param [Object] category Object to be assigned
130
+ def category=(category)
131
+ validator = EnumAttributeValidator.new('String', ["cleanliness", "communication", "respect_house_rules"])
132
+ unless validator.valid?(category)
133
+ fail ArgumentError, "invalid value for \"category\", must be one of #{validator.allowable_values}."
134
+ end
135
+ @category = category
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] rating Value to be assigned
140
+ def rating=(rating)
141
+ if rating.nil?
142
+ fail ArgumentError, 'rating cannot be nil'
143
+ end
144
+
145
+ if rating > 5
146
+ fail ArgumentError, 'invalid value for "rating", must be smaller than or equal to 5.'
147
+ end
148
+
149
+ if rating < 1
150
+ fail ArgumentError, 'invalid value for "rating", must be greater than or equal to 1.'
151
+ end
152
+
153
+ @rating = rating
154
+ end
155
+
156
+ # Checks equality by comparing each attribute.
157
+ # @param [Object] Object to be compared
158
+ def ==(o)
159
+ return true if self.equal?(o)
160
+ self.class == o.class &&
161
+ category == o.category &&
162
+ rating == o.rating
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [category, rating].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ return nil unless attributes.is_a?(Hash)
182
+ attributes = attributes.transform_keys(&:to_sym)
183
+ transformed_hash = {}
184
+ openapi_types.each_pair do |key, type|
185
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = nil
187
+ elsif type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[attribute_map[key]].is_a?(Array)
191
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
192
+ end
193
+ elsif !attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
195
+ end
196
+ end
197
+ new(transformed_hash)
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ end
217
+
218
+ end