repull 0.2.36 → 0.2.37

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.
@@ -0,0 +1,203 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | unlimited (10 included, then billed per listing) | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ # The CiiRUS API username and password.
18
+ class SubmitCiirusCredentialsRequestCredentials < ApiModelBase
19
+ # CiiRUS API username, from the CiiRUS API Explorer or CiiRUS support.
20
+ attr_accessor :api_username
21
+
22
+ # CiiRUS API password.
23
+ attr_accessor :api_password
24
+
25
+ # The CiiRUS supplier (management company) id, the MCUserID. Only needed when the credentials see several suppliers.
26
+ attr_accessor :management_company_user_id
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'api_username' => :'apiUsername',
32
+ :'api_password' => :'apiPassword',
33
+ :'management_company_user_id' => :'managementCompanyUserId'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'api_username' => :'String',
51
+ :'api_password' => :'String',
52
+ :'management_company_user_id' => :'Integer'
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::SubmitCiirusCredentialsRequestCredentials` 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::SubmitCiirusCredentialsRequestCredentials`. 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?(:'api_username')
79
+ self.api_username = attributes[:'api_username']
80
+ else
81
+ self.api_username = nil
82
+ end
83
+
84
+ if attributes.key?(:'api_password')
85
+ self.api_password = attributes[:'api_password']
86
+ else
87
+ self.api_password = nil
88
+ end
89
+
90
+ if attributes.key?(:'management_company_user_id')
91
+ self.management_company_user_id = attributes[:'management_company_user_id']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @api_username.nil?
101
+ invalid_properties.push('invalid value for "api_username", api_username cannot be nil.')
102
+ end
103
+
104
+ if @api_password.nil?
105
+ invalid_properties.push('invalid value for "api_password", api_password cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @api_username.nil?
116
+ return false if @api_password.nil?
117
+ true
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] api_username Value to be assigned
122
+ def api_username=(api_username)
123
+ if api_username.nil?
124
+ fail ArgumentError, 'api_username cannot be nil'
125
+ end
126
+
127
+ @api_username = api_username
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] api_password Value to be assigned
132
+ def api_password=(api_password)
133
+ if api_password.nil?
134
+ fail ArgumentError, 'api_password cannot be nil'
135
+ end
136
+
137
+ @api_password = api_password
138
+ end
139
+
140
+ # Checks equality by comparing each attribute.
141
+ # @param [Object] Object to be compared
142
+ def ==(o)
143
+ return true if self.equal?(o)
144
+ self.class == o.class &&
145
+ api_username == o.api_username &&
146
+ api_password == o.api_password &&
147
+ management_company_user_id == o.management_company_user_id
148
+ end
149
+
150
+ # @see the `==` method
151
+ # @param [Object] Object to be compared
152
+ def eql?(o)
153
+ self == o
154
+ end
155
+
156
+ # Calculates hash code according to all attributes.
157
+ # @return [Integer] Hash code
158
+ def hash
159
+ [api_username, api_password, management_company_user_id].hash
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def self.build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ attributes = attributes.transform_keys(&:to_sym)
168
+ transformed_hash = {}
169
+ openapi_types.each_pair do |key, type|
170
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{key}"] = nil
172
+ elsif type =~ /\AArray<(.*)>/i
173
+ # check to ensure the input is an array given that the attribute
174
+ # is documented as an array but the input is not
175
+ if attributes[attribute_map[key]].is_a?(Array)
176
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
177
+ end
178
+ elsif !attributes[attribute_map[key]].nil?
179
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
180
+ end
181
+ end
182
+ new(transformed_hash)
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ end
202
+
203
+ end
@@ -11,5 +11,5 @@ Generator version: 7.22.0
11
11
  =end
12
12
 
13
13
  module Repull
14
- VERSION = '0.2.36'
14
+ VERSION = '0.2.37'
15
15
  end
data/lib/repull.rb CHANGED
@@ -24,6 +24,7 @@ require 'repull/models/account_created_event'
24
24
  require 'repull/models/account_created_payload'
25
25
  require 'repull/models/account_disconnected_event'
26
26
  require 'repull/models/account_disconnected_payload'
27
+ require 'repull/models/account_disconnected_payload_listings_inner'
27
28
  require 'repull/models/account_import'
28
29
  require 'repull/models/account_import_completed_event'
29
30
  require 'repull/models/account_import_counts'
@@ -309,6 +310,7 @@ require 'repull/models/inquiry_updated_event'
309
310
  require 'repull/models/inquiry_updated_payload'
310
311
  require 'repull/models/inquiry_webhook_object'
311
312
  require 'repull/models/inquiry_webhook_object_expected_payout'
313
+ require 'repull/models/inquiry_webhook_object_guest'
312
314
  require 'repull/models/inquiry_webhook_object_guests'
313
315
  require 'repull/models/invite_booking_extranet_user200_response'
314
316
  require 'repull/models/invite_booking_extranet_user_request'
@@ -333,6 +335,7 @@ require 'repull/models/list_hotels200_response_data_inner'
333
335
  require 'repull/models/list_inquiries200_response'
334
336
  require 'repull/models/list_inquiries200_response_data_inner'
335
337
  require 'repull/models/list_inquiries200_response_data_inner_expected_payout'
338
+ require 'repull/models/list_inquiries200_response_data_inner_guest'
336
339
  require 'repull/models/list_inquiries200_response_data_inner_guests'
337
340
  require 'repull/models/list_kv200_response'
338
341
  require 'repull/models/list_kv200_response_data_inner'
@@ -567,6 +570,8 @@ require 'repull/models/reply_to_review_request'
567
570
  require 'repull/models/repull_ping_event'
568
571
  require 'repull/models/repull_ping_payload'
569
572
  require 'repull/models/reservation'
573
+ require 'repull/models/reservation_access_code'
574
+ require 'repull/models/reservation_access_code_locks_inner'
570
575
  require 'repull/models/reservation_alteration_created_event'
571
576
  require 'repull/models/reservation_alteration_created_payload'
572
577
  require 'repull/models/reservation_alteration_responded_event'
@@ -656,6 +661,10 @@ require 'repull/models/start_booking_extranet_login_request'
656
661
  require 'repull/models/submit_beds24_credentials200_response'
657
662
  require 'repull/models/submit_beds24_credentials_request'
658
663
  require 'repull/models/submit_bookingsync_credentials_request'
664
+ require 'repull/models/submit_ciirus_credentials200_response'
665
+ require 'repull/models/submit_ciirus_credentials200_response_account_info'
666
+ require 'repull/models/submit_ciirus_credentials_request'
667
+ require 'repull/models/submit_ciirus_credentials_request_credentials'
659
668
  require 'repull/models/submit_cloudbeds_credentials200_response'
660
669
  require 'repull/models/submit_cloudbeds_credentials200_response_account_info'
661
670
  require 'repull/models/submit_cloudbeds_credentials200_response_webhooks'