repull 0.2.63 → 0.2.64

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2d1f655c9a667ded13d0627c1f95b86f94aece348a9722820f1581ae3e87645
4
- data.tar.gz: 4ea93dcb6c1efd24048aad8b71a943c745fc6e4ca593c2de4dfaa21086b094d2
3
+ metadata.gz: 70e3dd39e5b976385b6d3afc0f265fa7c877236189ba7d2cdf4933797440722b
4
+ data.tar.gz: 1b117029289555efacdd5874243443c32f70948663ef77e7cc012dff09389893
5
5
  SHA512:
6
- metadata.gz: 8cb5837c60f3a53d937d21eee17d577f7a72c0414b02e140517cd985e394e676ecbacc8e61a9ff64b8642a5cb41b3dc9bf864ce38b9c2a5312a492ee1ff20ed3
7
- data.tar.gz: 13e4824dab1954175ef3f2eb792774f7c95cb046da78e4595f0b700574baac9663fa4bfa7e587578d5537d035f872cac10cf1580ef28b95f6a8e116181cba8b9
6
+ metadata.gz: '0836b99003a4a65906ccc5a79314e958ace92a18f4db8002008850452474e03ee48c41deae6e03383e711c1a6c2529d4bc4f4510bf76ebf7ba8fe45d9f562bb1'
7
+ data.tar.gz: e85a37de54928d1d9e54bd6012a195261f7f14eee85498b4edf54dfa33abdbf40f5b7e8de29ee647be4194759b269784f2de1e0dcc5ff228426efe78f09f9e2e
@@ -54,6 +54,8 @@ module Repull
54
54
 
55
55
  attr_accessor :synced_at
56
56
 
57
+ attr_accessor :booking_payments_api
58
+
57
59
  # Attribute mapping from ruby-style variable name to JSON key.
58
60
  def self.attribute_map
59
61
  {
@@ -71,7 +73,8 @@ module Repull
71
73
  :'confirmation_code' => :'confirmationCode',
72
74
  :'reservation_id' => :'reservationId',
73
75
  :'listing_id' => :'listingId',
74
- :'synced_at' => :'syncedAt'
76
+ :'synced_at' => :'syncedAt',
77
+ :'booking_payments_api' => :'bookingPaymentsApi'
75
78
  }
76
79
  end
77
80
 
@@ -102,7 +105,8 @@ module Repull
102
105
  :'confirmation_code' => :'String',
103
106
  :'reservation_id' => :'Integer',
104
107
  :'listing_id' => :'Integer',
105
- :'synced_at' => :'Time'
108
+ :'synced_at' => :'Time',
109
+ :'booking_payments_api' => :'TransactionBookingPaymentsApi'
106
110
  }
107
111
  end
108
112
 
@@ -120,7 +124,8 @@ module Repull
120
124
  :'confirmation_code',
121
125
  :'reservation_id',
122
126
  :'listing_id',
123
- :'synced_at'
127
+ :'synced_at',
128
+ :'booking_payments_api'
124
129
  ])
125
130
  end
126
131
 
@@ -209,6 +214,10 @@ module Repull
209
214
  if attributes.key?(:'synced_at')
210
215
  self.synced_at = attributes[:'synced_at']
211
216
  end
217
+
218
+ if attributes.key?(:'booking_payments_api')
219
+ self.booking_payments_api = attributes[:'booking_payments_api']
220
+ end
212
221
  end
213
222
 
214
223
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -290,7 +299,8 @@ module Repull
290
299
  confirmation_code == o.confirmation_code &&
291
300
  reservation_id == o.reservation_id &&
292
301
  listing_id == o.listing_id &&
293
- synced_at == o.synced_at
302
+ synced_at == o.synced_at &&
303
+ booking_payments_api == o.booking_payments_api
294
304
  end
295
305
 
296
306
  # @see the `==` method
@@ -302,7 +312,7 @@ module Repull
302
312
  # Calculates hash code according to all attributes.
303
313
  # @return [Integer] Hash code
304
314
  def hash
305
- [transaction_id, platform, type, is_payout, status, date, currency, amount, gross_amount, fees, payout, confirmation_code, reservation_id, listing_id, synced_at].hash
315
+ [transaction_id, platform, type, is_payout, status, date, currency, amount, gross_amount, fees, payout, confirmation_code, reservation_id, listing_id, synced_at, booking_payments_api].hash
306
316
  end
307
317
 
308
318
  # Builds the object from hash
@@ -0,0 +1,344 @@
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
+ # Booking.com only: the booking's payout and price breakdown as Booking.com's Payments API reports it (read when Booking.com notifies a payout change). Null on other channels and for bookings not read yet. Money is in `currency`.
18
+ class TransactionBookingPaymentsApi < ApiModelBase
19
+ attr_accessor :source
20
+
21
+ # `PAYMENTS_BY_BOOKING`, `PAYMENT_AT_PROPERTY` or `SMART_PAYMENT_AT_PROPERTY`.
22
+ attr_accessor :payment_tags
23
+
24
+ # `GROSS`, `NET` or `UNKNOWN`; null when the property collects the payment.
25
+ attr_accessor :payout_type
26
+
27
+ # `PENDING`, `PAID`, `CANCELLED` or `UNKNOWN`.
28
+ attr_accessor :payout_status
29
+
30
+ attr_accessor :currency
31
+
32
+ # What the guest paid Booking.com.
33
+ attr_accessor :gross_amount
34
+
35
+ attr_accessor :commission
36
+
37
+ # Payments service charge.
38
+ attr_accessor :payment_charge
39
+
40
+ attr_accessor :vat
41
+
42
+ # VAT on commission and on the payment charge.
43
+ attr_accessor :vat_on_fees
44
+
45
+ # City tax, withheld and other taxes.
46
+ attr_accessor :taxes
47
+
48
+ # Estimated payout to the property.
49
+ attr_accessor :net_amount
50
+
51
+ # Estimated amount the property collects itself (e.g. city tax, or the whole stay when the property collects the payment).
52
+ attr_accessor :amount_to_collect_at_property
53
+
54
+ attr_accessor :bank_transfer
55
+
56
+ # Per-room price lines as Booking.com reports them.
57
+ attr_accessor :charges
58
+
59
+ attr_accessor :fetched_at
60
+
61
+ class EnumAttributeValidator
62
+ attr_reader :datatype
63
+ attr_reader :allowable_values
64
+
65
+ def initialize(datatype, allowable_values)
66
+ @allowable_values = allowable_values.map do |value|
67
+ case datatype.to_s
68
+ when /Integer/i
69
+ value.to_i
70
+ when /Float/i
71
+ value.to_f
72
+ else
73
+ value
74
+ end
75
+ end
76
+ end
77
+
78
+ def valid?(value)
79
+ !value || allowable_values.include?(value)
80
+ end
81
+ end
82
+
83
+ # Attribute mapping from ruby-style variable name to JSON key.
84
+ def self.attribute_map
85
+ {
86
+ :'source' => :'source',
87
+ :'payment_tags' => :'paymentTags',
88
+ :'payout_type' => :'payoutType',
89
+ :'payout_status' => :'payoutStatus',
90
+ :'currency' => :'currency',
91
+ :'gross_amount' => :'grossAmount',
92
+ :'commission' => :'commission',
93
+ :'payment_charge' => :'paymentCharge',
94
+ :'vat' => :'vat',
95
+ :'vat_on_fees' => :'vatOnFees',
96
+ :'taxes' => :'taxes',
97
+ :'net_amount' => :'netAmount',
98
+ :'amount_to_collect_at_property' => :'amountToCollectAtProperty',
99
+ :'bank_transfer' => :'bankTransfer',
100
+ :'charges' => :'charges',
101
+ :'fetched_at' => :'fetchedAt'
102
+ }
103
+ end
104
+
105
+ # Returns attribute mapping this model knows about
106
+ def self.acceptable_attribute_map
107
+ attribute_map
108
+ end
109
+
110
+ # Returns all the JSON keys this model knows about
111
+ def self.acceptable_attributes
112
+ acceptable_attribute_map.values
113
+ end
114
+
115
+ # Attribute type mapping.
116
+ def self.openapi_types
117
+ {
118
+ :'source' => :'String',
119
+ :'payment_tags' => :'Array<String>',
120
+ :'payout_type' => :'String',
121
+ :'payout_status' => :'String',
122
+ :'currency' => :'String',
123
+ :'gross_amount' => :'Float',
124
+ :'commission' => :'Float',
125
+ :'payment_charge' => :'Float',
126
+ :'vat' => :'Float',
127
+ :'vat_on_fees' => :'Float',
128
+ :'taxes' => :'Float',
129
+ :'net_amount' => :'Float',
130
+ :'amount_to_collect_at_property' => :'Float',
131
+ :'bank_transfer' => :'TransactionBookingPaymentsApiBankTransfer',
132
+ :'charges' => :'Array<TransactionBookingPaymentsApiChargesInner>',
133
+ :'fetched_at' => :'Time'
134
+ }
135
+ end
136
+
137
+ # List of attributes with nullable: true
138
+ def self.openapi_nullable
139
+ Set.new([
140
+ :'payout_type',
141
+ :'payout_status',
142
+ :'currency',
143
+ :'gross_amount',
144
+ :'commission',
145
+ :'payment_charge',
146
+ :'vat',
147
+ :'vat_on_fees',
148
+ :'taxes',
149
+ :'net_amount',
150
+ :'amount_to_collect_at_property',
151
+ :'bank_transfer',
152
+ :'fetched_at'
153
+ ])
154
+ end
155
+
156
+ # Initializes the object
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ def initialize(attributes = {})
159
+ if (!attributes.is_a?(Hash))
160
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::TransactionBookingPaymentsApi` initialize method"
161
+ end
162
+
163
+ # check to see if the attribute exists and convert string to symbol for hash key
164
+ acceptable_attribute_map = self.class.acceptable_attribute_map
165
+ attributes = attributes.each_with_object({}) { |(k, v), h|
166
+ if (!acceptable_attribute_map.key?(k.to_sym))
167
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::TransactionBookingPaymentsApi`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
168
+ end
169
+ h[k.to_sym] = v
170
+ }
171
+
172
+ if attributes.key?(:'source')
173
+ self.source = attributes[:'source']
174
+ end
175
+
176
+ if attributes.key?(:'payment_tags')
177
+ if (value = attributes[:'payment_tags']).is_a?(Array)
178
+ self.payment_tags = value
179
+ end
180
+ end
181
+
182
+ if attributes.key?(:'payout_type')
183
+ self.payout_type = attributes[:'payout_type']
184
+ end
185
+
186
+ if attributes.key?(:'payout_status')
187
+ self.payout_status = attributes[:'payout_status']
188
+ end
189
+
190
+ if attributes.key?(:'currency')
191
+ self.currency = attributes[:'currency']
192
+ end
193
+
194
+ if attributes.key?(:'gross_amount')
195
+ self.gross_amount = attributes[:'gross_amount']
196
+ end
197
+
198
+ if attributes.key?(:'commission')
199
+ self.commission = attributes[:'commission']
200
+ end
201
+
202
+ if attributes.key?(:'payment_charge')
203
+ self.payment_charge = attributes[:'payment_charge']
204
+ end
205
+
206
+ if attributes.key?(:'vat')
207
+ self.vat = attributes[:'vat']
208
+ end
209
+
210
+ if attributes.key?(:'vat_on_fees')
211
+ self.vat_on_fees = attributes[:'vat_on_fees']
212
+ end
213
+
214
+ if attributes.key?(:'taxes')
215
+ self.taxes = attributes[:'taxes']
216
+ end
217
+
218
+ if attributes.key?(:'net_amount')
219
+ self.net_amount = attributes[:'net_amount']
220
+ end
221
+
222
+ if attributes.key?(:'amount_to_collect_at_property')
223
+ self.amount_to_collect_at_property = attributes[:'amount_to_collect_at_property']
224
+ end
225
+
226
+ if attributes.key?(:'bank_transfer')
227
+ self.bank_transfer = attributes[:'bank_transfer']
228
+ end
229
+
230
+ if attributes.key?(:'charges')
231
+ if (value = attributes[:'charges']).is_a?(Array)
232
+ self.charges = value
233
+ end
234
+ end
235
+
236
+ if attributes.key?(:'fetched_at')
237
+ self.fetched_at = attributes[:'fetched_at']
238
+ end
239
+ end
240
+
241
+ # Show invalid properties with the reasons. Usually used together with valid?
242
+ # @return Array for valid properties with the reasons
243
+ def list_invalid_properties
244
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
245
+ invalid_properties = Array.new
246
+ invalid_properties
247
+ end
248
+
249
+ # Check to see if the all the properties in the model are valid
250
+ # @return true if the model is valid
251
+ def valid?
252
+ warn '[DEPRECATED] the `valid?` method is obsolete'
253
+ source_validator = EnumAttributeValidator.new('String', ["payments_api"])
254
+ return false unless source_validator.valid?(@source)
255
+ true
256
+ end
257
+
258
+ # Custom attribute writer method checking allowed values (enum).
259
+ # @param [Object] source Object to be assigned
260
+ def source=(source)
261
+ validator = EnumAttributeValidator.new('String', ["payments_api"])
262
+ unless validator.valid?(source)
263
+ fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}."
264
+ end
265
+ @source = source
266
+ end
267
+
268
+ # Checks equality by comparing each attribute.
269
+ # @param [Object] Object to be compared
270
+ def ==(o)
271
+ return true if self.equal?(o)
272
+ self.class == o.class &&
273
+ source == o.source &&
274
+ payment_tags == o.payment_tags &&
275
+ payout_type == o.payout_type &&
276
+ payout_status == o.payout_status &&
277
+ currency == o.currency &&
278
+ gross_amount == o.gross_amount &&
279
+ commission == o.commission &&
280
+ payment_charge == o.payment_charge &&
281
+ vat == o.vat &&
282
+ vat_on_fees == o.vat_on_fees &&
283
+ taxes == o.taxes &&
284
+ net_amount == o.net_amount &&
285
+ amount_to_collect_at_property == o.amount_to_collect_at_property &&
286
+ bank_transfer == o.bank_transfer &&
287
+ charges == o.charges &&
288
+ fetched_at == o.fetched_at
289
+ end
290
+
291
+ # @see the `==` method
292
+ # @param [Object] Object to be compared
293
+ def eql?(o)
294
+ self == o
295
+ end
296
+
297
+ # Calculates hash code according to all attributes.
298
+ # @return [Integer] Hash code
299
+ def hash
300
+ [source, payment_tags, payout_type, payout_status, currency, gross_amount, commission, payment_charge, vat, vat_on_fees, taxes, net_amount, amount_to_collect_at_property, bank_transfer, charges, fetched_at].hash
301
+ end
302
+
303
+ # Builds the object from hash
304
+ # @param [Hash] attributes Model attributes in the form of hash
305
+ # @return [Object] Returns the model itself
306
+ def self.build_from_hash(attributes)
307
+ return nil unless attributes.is_a?(Hash)
308
+ attributes = attributes.transform_keys(&:to_sym)
309
+ transformed_hash = {}
310
+ openapi_types.each_pair do |key, type|
311
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
312
+ transformed_hash["#{key}"] = nil
313
+ elsif type =~ /\AArray<(.*)>/i
314
+ # check to ensure the input is an array given that the attribute
315
+ # is documented as an array but the input is not
316
+ if attributes[attribute_map[key]].is_a?(Array)
317
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
318
+ end
319
+ elsif !attributes[attribute_map[key]].nil?
320
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
321
+ end
322
+ end
323
+ new(transformed_hash)
324
+ end
325
+
326
+ # Returns the object in the form of hash
327
+ # @return [Hash] Returns the object in the form of hash
328
+ def to_hash
329
+ hash = {}
330
+ self.class.attribute_map.each_pair do |attr, param|
331
+ value = self.send(attr)
332
+ if value.nil?
333
+ is_nullable = self.class.openapi_nullable.include?(attr)
334
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
335
+ end
336
+
337
+ hash[param] = _to_hash(value)
338
+ end
339
+ hash
340
+ end
341
+
342
+ end
343
+
344
+ end
@@ -0,0 +1,169 @@
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 TransactionBookingPaymentsApiBankTransfer < ApiModelBase
18
+ # Booking.com bank-transfer reference; matches the payout on your bank statement.
19
+ attr_accessor :reference
20
+
21
+ attr_accessor :status
22
+
23
+ attr_accessor :date
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'reference' => :'reference',
29
+ :'status' => :'status',
30
+ :'date' => :'date'
31
+ }
32
+ end
33
+
34
+ # Returns attribute mapping this model knows about
35
+ def self.acceptable_attribute_map
36
+ attribute_map
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ acceptable_attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'reference' => :'String',
48
+ :'status' => :'String',
49
+ :'date' => :'String'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ :'reference',
57
+ :'status',
58
+ :'date'
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::TransactionBookingPaymentsApiBankTransfer` 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::TransactionBookingPaymentsApiBankTransfer`. 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?(:'reference')
79
+ self.reference = attributes[:'reference']
80
+ end
81
+
82
+ if attributes.key?(:'status')
83
+ self.status = attributes[:'status']
84
+ end
85
+
86
+ if attributes.key?(:'date')
87
+ self.date = attributes[:'date']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ reference == o.reference &&
112
+ status == o.status &&
113
+ date == o.date
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [reference, status, date].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ attributes = attributes.transform_keys(&:to_sym)
134
+ transformed_hash = {}
135
+ openapi_types.each_pair do |key, type|
136
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = nil
138
+ elsif type =~ /\AArray<(.*)>/i
139
+ # check to ensure the input is an array given that the attribute
140
+ # is documented as an array but the input is not
141
+ if attributes[attribute_map[key]].is_a?(Array)
142
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
143
+ end
144
+ elsif !attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
146
+ end
147
+ end
148
+ new(transformed_hash)
149
+ end
150
+
151
+ # Returns the object in the form of hash
152
+ # @return [Hash] Returns the object in the form of hash
153
+ def to_hash
154
+ hash = {}
155
+ self.class.attribute_map.each_pair do |attr, param|
156
+ value = self.send(attr)
157
+ if value.nil?
158
+ is_nullable = self.class.openapi_nullable.include?(attr)
159
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
160
+ end
161
+
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ end
168
+
169
+ end
@@ -0,0 +1,252 @@
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 TransactionBookingPaymentsApiChargesInner < ApiModelBase
18
+ # Booking.com's label, e.g. `VAT`, `City tax`, `COMMISSION`, `PAYMENT CHARGE`.
19
+ attr_accessor :type
20
+
21
+ attr_accessor :category
22
+
23
+ attr_accessor :amount
24
+
25
+ attr_accessor :currency
26
+
27
+ attr_accessor :rate
28
+
29
+ # e.g. `PER_PERSON`, `PER_NIGHT`.
30
+ attr_accessor :applicable_type
31
+
32
+ attr_accessor :already_collected_from_guest
33
+
34
+ attr_accessor :included_in_payout
35
+
36
+ class EnumAttributeValidator
37
+ attr_reader :datatype
38
+ attr_reader :allowable_values
39
+
40
+ def initialize(datatype, allowable_values)
41
+ @allowable_values = allowable_values.map do |value|
42
+ case datatype.to_s
43
+ when /Integer/i
44
+ value.to_i
45
+ when /Float/i
46
+ value.to_f
47
+ else
48
+ value
49
+ end
50
+ end
51
+ end
52
+
53
+ def valid?(value)
54
+ !value || allowable_values.include?(value)
55
+ end
56
+ end
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'type' => :'type',
62
+ :'category' => :'category',
63
+ :'amount' => :'amount',
64
+ :'currency' => :'currency',
65
+ :'rate' => :'rate',
66
+ :'applicable_type' => :'applicableType',
67
+ :'already_collected_from_guest' => :'alreadyCollectedFromGuest',
68
+ :'included_in_payout' => :'includedInPayout'
69
+ }
70
+ end
71
+
72
+ # Returns attribute mapping this model knows about
73
+ def self.acceptable_attribute_map
74
+ attribute_map
75
+ end
76
+
77
+ # Returns all the JSON keys this model knows about
78
+ def self.acceptable_attributes
79
+ acceptable_attribute_map.values
80
+ end
81
+
82
+ # Attribute type mapping.
83
+ def self.openapi_types
84
+ {
85
+ :'type' => :'String',
86
+ :'category' => :'String',
87
+ :'amount' => :'Float',
88
+ :'currency' => :'String',
89
+ :'rate' => :'TransactionBookingPaymentsApiChargesInnerRate',
90
+ :'applicable_type' => :'String',
91
+ :'already_collected_from_guest' => :'Boolean',
92
+ :'included_in_payout' => :'Boolean'
93
+ }
94
+ end
95
+
96
+ # List of attributes with nullable: true
97
+ def self.openapi_nullable
98
+ Set.new([
99
+ :'amount',
100
+ :'currency',
101
+ :'rate',
102
+ :'applicable_type',
103
+ :'already_collected_from_guest',
104
+ :'included_in_payout'
105
+ ])
106
+ end
107
+
108
+ # Initializes the object
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ def initialize(attributes = {})
111
+ if (!attributes.is_a?(Hash))
112
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::TransactionBookingPaymentsApiChargesInner` initialize method"
113
+ end
114
+
115
+ # check to see if the attribute exists and convert string to symbol for hash key
116
+ acceptable_attribute_map = self.class.acceptable_attribute_map
117
+ attributes = attributes.each_with_object({}) { |(k, v), h|
118
+ if (!acceptable_attribute_map.key?(k.to_sym))
119
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::TransactionBookingPaymentsApiChargesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
120
+ end
121
+ h[k.to_sym] = v
122
+ }
123
+
124
+ if attributes.key?(:'type')
125
+ self.type = attributes[:'type']
126
+ end
127
+
128
+ if attributes.key?(:'category')
129
+ self.category = attributes[:'category']
130
+ end
131
+
132
+ if attributes.key?(:'amount')
133
+ self.amount = attributes[:'amount']
134
+ end
135
+
136
+ if attributes.key?(:'currency')
137
+ self.currency = attributes[:'currency']
138
+ end
139
+
140
+ if attributes.key?(:'rate')
141
+ self.rate = attributes[:'rate']
142
+ end
143
+
144
+ if attributes.key?(:'applicable_type')
145
+ self.applicable_type = attributes[:'applicable_type']
146
+ end
147
+
148
+ if attributes.key?(:'already_collected_from_guest')
149
+ self.already_collected_from_guest = attributes[:'already_collected_from_guest']
150
+ end
151
+
152
+ if attributes.key?(:'included_in_payout')
153
+ self.included_in_payout = attributes[:'included_in_payout']
154
+ end
155
+ end
156
+
157
+ # Show invalid properties with the reasons. Usually used together with valid?
158
+ # @return Array for valid properties with the reasons
159
+ def list_invalid_properties
160
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
161
+ invalid_properties = Array.new
162
+ invalid_properties
163
+ end
164
+
165
+ # Check to see if the all the properties in the model are valid
166
+ # @return true if the model is valid
167
+ def valid?
168
+ warn '[DEPRECATED] the `valid?` method is obsolete'
169
+ category_validator = EnumAttributeValidator.new('String', ["commission", "payment_charge", "vat_on_fees", "vat", "tax", "fee", "other"])
170
+ return false unless category_validator.valid?(@category)
171
+ true
172
+ end
173
+
174
+ # Custom attribute writer method checking allowed values (enum).
175
+ # @param [Object] category Object to be assigned
176
+ def category=(category)
177
+ validator = EnumAttributeValidator.new('String', ["commission", "payment_charge", "vat_on_fees", "vat", "tax", "fee", "other"])
178
+ unless validator.valid?(category)
179
+ fail ArgumentError, "invalid value for \"category\", must be one of #{validator.allowable_values}."
180
+ end
181
+ @category = category
182
+ end
183
+
184
+ # Checks equality by comparing each attribute.
185
+ # @param [Object] Object to be compared
186
+ def ==(o)
187
+ return true if self.equal?(o)
188
+ self.class == o.class &&
189
+ type == o.type &&
190
+ category == o.category &&
191
+ amount == o.amount &&
192
+ currency == o.currency &&
193
+ rate == o.rate &&
194
+ applicable_type == o.applicable_type &&
195
+ already_collected_from_guest == o.already_collected_from_guest &&
196
+ included_in_payout == o.included_in_payout
197
+ end
198
+
199
+ # @see the `==` method
200
+ # @param [Object] Object to be compared
201
+ def eql?(o)
202
+ self == o
203
+ end
204
+
205
+ # Calculates hash code according to all attributes.
206
+ # @return [Integer] Hash code
207
+ def hash
208
+ [type, category, amount, currency, rate, applicable_type, already_collected_from_guest, included_in_payout].hash
209
+ end
210
+
211
+ # Builds the object from hash
212
+ # @param [Hash] attributes Model attributes in the form of hash
213
+ # @return [Object] Returns the model itself
214
+ def self.build_from_hash(attributes)
215
+ return nil unless attributes.is_a?(Hash)
216
+ attributes = attributes.transform_keys(&:to_sym)
217
+ transformed_hash = {}
218
+ openapi_types.each_pair do |key, type|
219
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
220
+ transformed_hash["#{key}"] = nil
221
+ elsif type =~ /\AArray<(.*)>/i
222
+ # check to ensure the input is an array given that the attribute
223
+ # is documented as an array but the input is not
224
+ if attributes[attribute_map[key]].is_a?(Array)
225
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
226
+ end
227
+ elsif !attributes[attribute_map[key]].nil?
228
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
229
+ end
230
+ end
231
+ new(transformed_hash)
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ if value.nil?
241
+ is_nullable = self.class.openapi_nullable.include?(attr)
242
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
243
+ end
244
+
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -0,0 +1,158 @@
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 TransactionBookingPaymentsApiChargesInnerRate < ApiModelBase
18
+ attr_accessor :type
19
+
20
+ attr_accessor :value
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'type' => :'type',
26
+ :'value' => :'value'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'type' => :'String',
44
+ :'value' => :'Float'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ :'type',
52
+ :'value'
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::TransactionBookingPaymentsApiChargesInnerRate` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::TransactionBookingPaymentsApiChargesInnerRate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'type')
73
+ self.type = attributes[:'type']
74
+ end
75
+
76
+ if attributes.key?(:'value')
77
+ self.value = attributes[:'value']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ type == o.type &&
102
+ value == o.value
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [type, value].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -11,5 +11,5 @@ Generator version: 7.22.0
11
11
  =end
12
12
 
13
13
  module Repull
14
- VERSION = '0.2.63'
14
+ VERSION = '0.2.64'
15
15
  end
data/lib/repull.rb CHANGED
@@ -1001,6 +1001,10 @@ require 'repull/models/tiket_setup_response'
1001
1001
  require 'repull/models/tiket_sync_response'
1002
1002
  require 'repull/models/tiket_sync_response_results_inner'
1003
1003
  require 'repull/models/transaction'
1004
+ require 'repull/models/transaction_booking_payments_api'
1005
+ require 'repull/models/transaction_booking_payments_api_bank_transfer'
1006
+ require 'repull/models/transaction_booking_payments_api_charges_inner'
1007
+ require 'repull/models/transaction_booking_payments_api_charges_inner_rate'
1004
1008
  require 'repull/models/transaction_fees'
1005
1009
  require 'repull/models/transaction_payout'
1006
1010
  require 'repull/models/update_airbnb_booking_settings200_response'
data/openapi/v1.json CHANGED
@@ -10590,6 +10590,183 @@
10590
10590
  "type": "string",
10591
10591
  "format": "date-time",
10592
10592
  "nullable": true
10593
+ },
10594
+ "bookingPaymentsApi": {
10595
+ "type": "object",
10596
+ "nullable": true,
10597
+ "description": "Booking.com only: the booking's payout and price breakdown as Booking.com's Payments API reports it (read when Booking.com notifies a payout change). Null on other channels and for bookings not read yet. Money is in `currency`.",
10598
+ "properties": {
10599
+ "source": {
10600
+ "type": "string",
10601
+ "enum": [
10602
+ "payments_api"
10603
+ ]
10604
+ },
10605
+ "paymentTags": {
10606
+ "type": "array",
10607
+ "items": {
10608
+ "type": "string"
10609
+ },
10610
+ "description": "`PAYMENTS_BY_BOOKING`, `PAYMENT_AT_PROPERTY` or `SMART_PAYMENT_AT_PROPERTY`.",
10611
+ "example": [
10612
+ "PAYMENTS_BY_BOOKING"
10613
+ ]
10614
+ },
10615
+ "payoutType": {
10616
+ "type": "string",
10617
+ "nullable": true,
10618
+ "description": "`GROSS`, `NET` or `UNKNOWN`; null when the property collects the payment.",
10619
+ "example": "NET"
10620
+ },
10621
+ "payoutStatus": {
10622
+ "type": "string",
10623
+ "nullable": true,
10624
+ "description": "`PENDING`, `PAID`, `CANCELLED` or `UNKNOWN`.",
10625
+ "example": "PAID"
10626
+ },
10627
+ "currency": {
10628
+ "type": "string",
10629
+ "nullable": true,
10630
+ "example": "EUR"
10631
+ },
10632
+ "grossAmount": {
10633
+ "type": "number",
10634
+ "nullable": true,
10635
+ "description": "What the guest paid Booking.com.",
10636
+ "example": 120
10637
+ },
10638
+ "commission": {
10639
+ "type": "number",
10640
+ "nullable": true,
10641
+ "example": 18
10642
+ },
10643
+ "paymentCharge": {
10644
+ "type": "number",
10645
+ "nullable": true,
10646
+ "description": "Payments service charge.",
10647
+ "example": 2
10648
+ },
10649
+ "vat": {
10650
+ "type": "number",
10651
+ "nullable": true,
10652
+ "example": 10
10653
+ },
10654
+ "vatOnFees": {
10655
+ "type": "number",
10656
+ "nullable": true,
10657
+ "description": "VAT on commission and on the payment charge.",
10658
+ "example": 2
10659
+ },
10660
+ "taxes": {
10661
+ "type": "number",
10662
+ "nullable": true,
10663
+ "description": "City tax, withheld and other taxes.",
10664
+ "example": 6.26
10665
+ },
10666
+ "netAmount": {
10667
+ "type": "number",
10668
+ "nullable": true,
10669
+ "description": "Estimated payout to the property.",
10670
+ "example": 96.74
10671
+ },
10672
+ "amountToCollectAtProperty": {
10673
+ "type": "number",
10674
+ "nullable": true,
10675
+ "description": "Estimated amount the property collects itself (e.g. city tax, or the whole stay when the property collects the payment).",
10676
+ "example": 5
10677
+ },
10678
+ "bankTransfer": {
10679
+ "type": "object",
10680
+ "nullable": true,
10681
+ "properties": {
10682
+ "reference": {
10683
+ "type": "string",
10684
+ "nullable": true,
10685
+ "description": "Booking.com bank-transfer reference; matches the payout on your bank statement.",
10686
+ "example": "ST-D0L8H1W4W9I5"
10687
+ },
10688
+ "status": {
10689
+ "type": "string",
10690
+ "nullable": true,
10691
+ "example": "PAID"
10692
+ },
10693
+ "date": {
10694
+ "type": "string",
10695
+ "nullable": true,
10696
+ "example": "2026-05-04"
10697
+ }
10698
+ }
10699
+ },
10700
+ "charges": {
10701
+ "type": "array",
10702
+ "description": "Per-room price lines as Booking.com reports them.",
10703
+ "items": {
10704
+ "type": "object",
10705
+ "properties": {
10706
+ "type": {
10707
+ "type": "string",
10708
+ "description": "Booking.com's label, e.g. `VAT`, `City tax`, `COMMISSION`, `PAYMENT CHARGE`.",
10709
+ "example": "VAT"
10710
+ },
10711
+ "category": {
10712
+ "type": "string",
10713
+ "enum": [
10714
+ "commission",
10715
+ "payment_charge",
10716
+ "vat_on_fees",
10717
+ "vat",
10718
+ "tax",
10719
+ "fee",
10720
+ "other"
10721
+ ]
10722
+ },
10723
+ "amount": {
10724
+ "type": "number",
10725
+ "nullable": true,
10726
+ "example": 10
10727
+ },
10728
+ "currency": {
10729
+ "type": "string",
10730
+ "nullable": true
10731
+ },
10732
+ "rate": {
10733
+ "type": "object",
10734
+ "nullable": true,
10735
+ "properties": {
10736
+ "type": {
10737
+ "type": "string",
10738
+ "nullable": true,
10739
+ "example": "PERCENTAGE"
10740
+ },
10741
+ "value": {
10742
+ "type": "number",
10743
+ "nullable": true,
10744
+ "example": 10
10745
+ }
10746
+ }
10747
+ },
10748
+ "applicableType": {
10749
+ "type": "string",
10750
+ "nullable": true,
10751
+ "description": "e.g. `PER_PERSON`, `PER_NIGHT`."
10752
+ },
10753
+ "alreadyCollectedFromGuest": {
10754
+ "type": "boolean",
10755
+ "nullable": true
10756
+ },
10757
+ "includedInPayout": {
10758
+ "type": "boolean",
10759
+ "nullable": true
10760
+ }
10761
+ }
10762
+ }
10763
+ },
10764
+ "fetchedAt": {
10765
+ "type": "string",
10766
+ "format": "date-time",
10767
+ "nullable": true
10768
+ }
10769
+ }
10593
10770
  }
10594
10771
  }
10595
10772
  },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repull
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.63
4
+ version: 0.2.64
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nikolov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-26 00:00:00.000000000 Z
11
+ date: 2026-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -1082,6 +1082,10 @@ files:
1082
1082
  - lib/repull/models/tiket_sync_response.rb
1083
1083
  - lib/repull/models/tiket_sync_response_results_inner.rb
1084
1084
  - lib/repull/models/transaction.rb
1085
+ - lib/repull/models/transaction_booking_payments_api.rb
1086
+ - lib/repull/models/transaction_booking_payments_api_bank_transfer.rb
1087
+ - lib/repull/models/transaction_booking_payments_api_charges_inner.rb
1088
+ - lib/repull/models/transaction_booking_payments_api_charges_inner_rate.rb
1085
1089
  - lib/repull/models/transaction_fees.rb
1086
1090
  - lib/repull/models/transaction_payout.rb
1087
1091
  - lib/repull/models/update_airbnb_booking_settings200_response.rb