repull 0.2.26 → 0.2.27
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 +4 -4
- data/lib/repull/api/airbnb_api.rb +38 -23
- data/lib/repull/api/booking_com_api.rb +9 -2
- data/lib/repull/api/connect_api.rb +4 -4
- data/lib/repull/api/listings_api.rb +2 -2
- data/lib/repull/api/properties_api.rb +2 -2
- data/lib/repull/api/reservations_api.rb +93 -6
- data/lib/repull/api/vrbo_api.rb +9 -2
- data/lib/repull/models/airbnb_listing.rb +13 -2
- data/lib/repull/models/airbnb_listing_details_write_request.rb +109 -5
- data/lib/repull/models/airbnb_listing_details_write_request_check_in_option.rb +1 -1
- data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +2 -2
- data/lib/repull/models/airbnb_pricing_write_request.rb +30 -2
- data/lib/repull/models/airbnb_pricing_write_request_fees_inner.rb +291 -0
- data/lib/repull/models/booking_property_listings_inner.rb +57 -1
- data/lib/repull/models/cancel_reservation200_response.rb +1 -1
- data/lib/repull/models/connect_status.rb +35 -4
- data/lib/repull/models/connect_status_capabilities.rb +148 -0
- data/lib/repull/models/connection.rb +28 -5
- data/lib/repull/models/connection_action.rb +188 -0
- data/lib/repull/models/create_connect_session_request.rb +39 -1
- data/lib/repull/models/create_connection_request.rb +39 -1
- data/lib/repull/models/error_error.rb +13 -1
- data/lib/repull/models/{cancel_reservation200_response_pms.rb → error_error_listings_inner.rb} +36 -30
- data/lib/repull/models/get_booking_extranet_login_status200_response.rb +2 -1
- data/lib/repull/models/list_listing_units200_response.rb +2 -1
- data/lib/repull/models/listing.rb +23 -2
- data/lib/repull/models/listing_capabilities.rb +148 -0
- data/lib/repull/models/property.rb +14 -3
- data/lib/repull/models/reservation_capabilities.rb +230 -0
- data/lib/repull/models/reservation_create_request.rb +172 -33
- data/lib/repull/models/reservation_create_response.rb +6 -6
- data/lib/repull/models/reservation_create_response_unit.rb +1 -1
- data/lib/repull/models/{reservation_create_response_pms.rb → reservation_pms_outcome.rb} +38 -8
- data/lib/repull/models/reservation_pms_outcome_quote.rb +168 -0
- data/lib/repull/models/{cancel_reservation200_response_pms_errors_inner.rb → reservation_pms_section_error.rb} +16 -16
- data/lib/repull/models/reservation_quote_request.rb +312 -0
- data/lib/repull/models/reservation_quote_response.rb +228 -0
- data/lib/repull/models/reservation_quote_response_breakdown.rb +175 -0
- data/lib/repull/models/reservation_update_response.rb +16 -6
- data/lib/repull/models/submit_smoobu_credentials_request.rb +2 -5
- data/lib/repull/models/submit_smoobu_credentials_request_credentials.rb +193 -0
- data/lib/repull/models/update_airbnb_checkin_guide200_response.rb +147 -0
- data/lib/repull/models/update_airbnb_checkin_guide200_response_data.rb +177 -0
- data/lib/repull/models/{airbnb_permits_write_request_permits_inner_answers_value.rb → update_airbnb_checkin_guide200_response_data_steps_inner.rb} +24 -43
- data/lib/repull/models/update_airbnb_checkin_guide_request.rb +186 -0
- data/lib/repull/models/update_airbnb_checkin_guide_request_steps_inner.rb +182 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +18 -4
- data/openapi/v1.json +2059 -335
- data/scripts/regen.sh +1 -1
- metadata +20 -6
|
@@ -54,6 +54,9 @@ module Repull
|
|
|
54
54
|
# Every inactive listing the request involved. Present on `code: \"listing_inactive\"` (HTTP 403) — activate these ids and retry.
|
|
55
55
|
attr_accessor :listing_ids
|
|
56
56
|
|
|
57
|
+
# The same inactive listings with their names, so you can show the user which ones to activate. Present on `code: \"listing_inactive\"` (HTTP 403). `name` is null only when the request did not resolve it.
|
|
58
|
+
attr_accessor :listings
|
|
59
|
+
|
|
57
60
|
# The single Repull listing the error is about. Present on `code: \"listing_not_api_connected\"` (HTTP 403).
|
|
58
61
|
attr_accessor :listing_id
|
|
59
62
|
|
|
@@ -84,6 +87,7 @@ module Repull
|
|
|
84
87
|
:'did_you_mean' => :'did_you_mean',
|
|
85
88
|
:'previous_code' => :'previous_code',
|
|
86
89
|
:'listing_ids' => :'listing_ids',
|
|
90
|
+
:'listings' => :'listings',
|
|
87
91
|
:'listing_id' => :'listing_id',
|
|
88
92
|
:'airbnb_listing_id' => :'airbnb_listing_id',
|
|
89
93
|
:'sync_category' => :'sync_category',
|
|
@@ -118,6 +122,7 @@ module Repull
|
|
|
118
122
|
:'did_you_mean' => :'String',
|
|
119
123
|
:'previous_code' => :'String',
|
|
120
124
|
:'listing_ids' => :'Array<String>',
|
|
125
|
+
:'listings' => :'Array<ErrorErrorListingsInner>',
|
|
121
126
|
:'listing_id' => :'String',
|
|
122
127
|
:'airbnb_listing_id' => :'String',
|
|
123
128
|
:'sync_category' => :'String',
|
|
@@ -217,6 +222,12 @@ module Repull
|
|
|
217
222
|
end
|
|
218
223
|
end
|
|
219
224
|
|
|
225
|
+
if attributes.key?(:'listings')
|
|
226
|
+
if (value = attributes[:'listings']).is_a?(Array)
|
|
227
|
+
self.listings = value
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
220
231
|
if attributes.key?(:'listing_id')
|
|
221
232
|
self.listing_id = attributes[:'listing_id']
|
|
222
233
|
end
|
|
@@ -346,6 +357,7 @@ module Repull
|
|
|
346
357
|
did_you_mean == o.did_you_mean &&
|
|
347
358
|
previous_code == o.previous_code &&
|
|
348
359
|
listing_ids == o.listing_ids &&
|
|
360
|
+
listings == o.listings &&
|
|
349
361
|
listing_id == o.listing_id &&
|
|
350
362
|
airbnb_listing_id == o.airbnb_listing_id &&
|
|
351
363
|
sync_category == o.sync_category &&
|
|
@@ -362,7 +374,7 @@ module Repull
|
|
|
362
374
|
# Calculates hash code according to all attributes.
|
|
363
375
|
# @return [Integer] Hash code
|
|
364
376
|
def hash
|
|
365
|
-
[code, message, fix, docs_url, request_id, field, value_received, valid_values, valid_params, endpoint, did_you_mean, previous_code, listing_ids, listing_id, airbnb_listing_id, sync_category, retry_after, support].hash
|
|
377
|
+
[code, message, fix, docs_url, request_id, field, value_received, valid_values, valid_params, endpoint, did_you_mean, previous_code, listing_ids, listings, listing_id, airbnb_listing_id, sync_category, retry_after, support].hash
|
|
366
378
|
end
|
|
367
379
|
|
|
368
380
|
# Builds the object from hash
|
data/lib/repull/models/{cancel_reservation200_response_pms.rb → error_error_listings_inner.rb}
RENAMED
|
@@ -14,20 +14,16 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
attr_accessor :provider
|
|
17
|
+
class ErrorErrorListingsInner < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
20
19
|
|
|
21
|
-
attr_accessor :
|
|
22
|
-
|
|
23
|
-
attr_accessor :errors
|
|
20
|
+
attr_accessor :name
|
|
24
21
|
|
|
25
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
23
|
def self.attribute_map
|
|
27
24
|
{
|
|
28
|
-
:'
|
|
29
|
-
:'
|
|
30
|
-
:'errors' => :'errors'
|
|
25
|
+
:'id' => :'id',
|
|
26
|
+
:'name' => :'name'
|
|
31
27
|
}
|
|
32
28
|
end
|
|
33
29
|
|
|
@@ -44,15 +40,15 @@ module Repull
|
|
|
44
40
|
# Attribute type mapping.
|
|
45
41
|
def self.openapi_types
|
|
46
42
|
{
|
|
47
|
-
:'
|
|
48
|
-
:'
|
|
49
|
-
:'errors' => :'Array<CancelReservation200ResponsePmsErrorsInner>'
|
|
43
|
+
:'id' => :'String',
|
|
44
|
+
:'name' => :'String'
|
|
50
45
|
}
|
|
51
46
|
end
|
|
52
47
|
|
|
53
48
|
# List of attributes with nullable: true
|
|
54
49
|
def self.openapi_nullable
|
|
55
50
|
Set.new([
|
|
51
|
+
:'name'
|
|
56
52
|
])
|
|
57
53
|
end
|
|
58
54
|
|
|
@@ -60,32 +56,28 @@ module Repull
|
|
|
60
56
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
57
|
def initialize(attributes = {})
|
|
62
58
|
if (!attributes.is_a?(Hash))
|
|
63
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ErrorErrorListingsInner` initialize method"
|
|
64
60
|
end
|
|
65
61
|
|
|
66
62
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
63
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
65
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ErrorErrorListingsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
67
|
end
|
|
72
68
|
h[k.to_sym] = v
|
|
73
69
|
}
|
|
74
70
|
|
|
75
|
-
if attributes.key?(:'
|
|
76
|
-
self.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if attributes.key?(:'applied')
|
|
80
|
-
if (value = attributes[:'applied']).is_a?(Array)
|
|
81
|
-
self.applied = value
|
|
82
|
-
end
|
|
71
|
+
if attributes.key?(:'id')
|
|
72
|
+
self.id = attributes[:'id']
|
|
73
|
+
else
|
|
74
|
+
self.id = nil
|
|
83
75
|
end
|
|
84
76
|
|
|
85
|
-
if attributes.key?(:'
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
if attributes.key?(:'name')
|
|
78
|
+
self.name = attributes[:'name']
|
|
79
|
+
else
|
|
80
|
+
self.name = nil
|
|
89
81
|
end
|
|
90
82
|
end
|
|
91
83
|
|
|
@@ -94,6 +86,10 @@ module Repull
|
|
|
94
86
|
def list_invalid_properties
|
|
95
87
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
96
88
|
invalid_properties = Array.new
|
|
89
|
+
if @id.nil?
|
|
90
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
91
|
+
end
|
|
92
|
+
|
|
97
93
|
invalid_properties
|
|
98
94
|
end
|
|
99
95
|
|
|
@@ -101,17 +97,27 @@ module Repull
|
|
|
101
97
|
# @return true if the model is valid
|
|
102
98
|
def valid?
|
|
103
99
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
100
|
+
return false if @id.nil?
|
|
104
101
|
true
|
|
105
102
|
end
|
|
106
103
|
|
|
104
|
+
# Custom attribute writer method with validation
|
|
105
|
+
# @param [Object] id Value to be assigned
|
|
106
|
+
def id=(id)
|
|
107
|
+
if id.nil?
|
|
108
|
+
fail ArgumentError, 'id cannot be nil'
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
@id = id
|
|
112
|
+
end
|
|
113
|
+
|
|
107
114
|
# Checks equality by comparing each attribute.
|
|
108
115
|
# @param [Object] Object to be compared
|
|
109
116
|
def ==(o)
|
|
110
117
|
return true if self.equal?(o)
|
|
111
118
|
self.class == o.class &&
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
errors == o.errors
|
|
119
|
+
id == o.id &&
|
|
120
|
+
name == o.name
|
|
115
121
|
end
|
|
116
122
|
|
|
117
123
|
# @see the `==` method
|
|
@@ -123,7 +129,7 @@ module Repull
|
|
|
123
129
|
# Calculates hash code according to all attributes.
|
|
124
130
|
# @return [Integer] Hash code
|
|
125
131
|
def hash
|
|
126
|
-
[
|
|
132
|
+
[id, name].hash
|
|
127
133
|
end
|
|
128
134
|
|
|
129
135
|
# Builds the object from hash
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
17
|
class GetBookingExtranetLoginStatus200Response < ApiModelBase
|
|
18
|
+
# The connection id (numeric string, like every `*Id` on the wire).
|
|
18
19
|
attr_accessor :account_id
|
|
19
20
|
|
|
20
21
|
attr_accessor :status
|
|
@@ -52,7 +53,7 @@ module Repull
|
|
|
52
53
|
# Attribute type mapping.
|
|
53
54
|
def self.openapi_types
|
|
54
55
|
{
|
|
55
|
-
:'account_id' => :'
|
|
56
|
+
:'account_id' => :'String',
|
|
56
57
|
:'status' => :'String',
|
|
57
58
|
:'error_message' => :'String',
|
|
58
59
|
:'friendly_error' => :'String',
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
17
|
class ListListingUnits200Response < ApiModelBase
|
|
18
|
+
# Repull listing id (numeric string, like every `*Id` on the wire).
|
|
18
19
|
attr_accessor :listing_id
|
|
19
20
|
|
|
20
21
|
attr_accessor :total
|
|
@@ -43,7 +44,7 @@ module Repull
|
|
|
43
44
|
# Attribute type mapping.
|
|
44
45
|
def self.openapi_types
|
|
45
46
|
{
|
|
46
|
-
:'listing_id' => :'
|
|
47
|
+
:'listing_id' => :'String',
|
|
47
48
|
:'total' => :'Integer',
|
|
48
49
|
:'data' => :'Array<ListListingUnits200ResponseDataInner>'
|
|
49
50
|
}
|
|
@@ -14,16 +14,22 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# A vacation rental listing in your Repull workspace. An **inactive** listing appears only in `GET /v1/listings`, and only when `?status=` asks for it. Such a row carries identity fields only — `id`, `name`, `status`, `channels` — so
|
|
17
|
+
# A vacation rental listing in your Repull workspace. An **inactive** listing appears only in `GET /v1/listings`, and only when `?status=` asks for it. Such a row carries identity fields only — `id`, `name`, `status`, `inactiveReason`, `address.city`, `channels` — so the street, `content`, `details`, `createdAt` and `updatedAt` are absent until the listing is activated. `inactiveReason` is `plan_limit` (held back by the plan; activating needs a free slot or an upgrade), `unlisted_on_airbnb`, or `deactivated` (switched off by you). `GET /v1/listings/{id}` and every other listing endpoint answer `403 listing_inactive` for it. The one field you can add back is `thumbnailUrl`, by passing `?include=thumbnail` — enough to render an activate/deactivate picker with pictures from a single request.
|
|
18
18
|
class Listing < ApiModelBase
|
|
19
|
+
attr_accessor :capabilities
|
|
20
|
+
|
|
19
21
|
# `GET /v1/listings/{id}` only. The physical rooms under a hotel-model listing (a Mews or Cloudbeds room type); empty for a single home. Same items as `GET /v1/listings/{id}/units`.
|
|
20
22
|
attr_accessor :units
|
|
21
23
|
|
|
22
24
|
# Repull listing id
|
|
23
25
|
attr_accessor :id
|
|
24
26
|
|
|
27
|
+
# The host's internal nickname for the listing.
|
|
25
28
|
attr_accessor :name
|
|
26
29
|
|
|
30
|
+
# The title guests see on the channel (e.g. the Airbnb listing title). `name` is the host's internal nickname for the listing; show `publicName` in anything a guest or end user reads. Present on inactive rows too.
|
|
31
|
+
attr_accessor :public_name
|
|
32
|
+
|
|
27
33
|
attr_accessor :address
|
|
28
34
|
|
|
29
35
|
# Cover photo URL. Always present on an active listing. On an **inactive** one it is present only when the caller passes `?include=thumbnail`; `null` means the listing has no cover photo stored, absent means the expansion was not requested.
|
|
@@ -50,9 +56,11 @@ module Repull
|
|
|
50
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
51
57
|
def self.attribute_map
|
|
52
58
|
{
|
|
59
|
+
:'capabilities' => :'capabilities',
|
|
53
60
|
:'units' => :'units',
|
|
54
61
|
:'id' => :'id',
|
|
55
62
|
:'name' => :'name',
|
|
63
|
+
:'public_name' => :'publicName',
|
|
56
64
|
:'address' => :'address',
|
|
57
65
|
:'thumbnail_url' => :'thumbnailUrl',
|
|
58
66
|
:'status' => :'status',
|
|
@@ -78,9 +86,11 @@ module Repull
|
|
|
78
86
|
# Attribute type mapping.
|
|
79
87
|
def self.openapi_types
|
|
80
88
|
{
|
|
89
|
+
:'capabilities' => :'ListingCapabilities',
|
|
81
90
|
:'units' => :'Array<ListingUnitsInner>',
|
|
82
91
|
:'id' => :'String',
|
|
83
92
|
:'name' => :'String',
|
|
93
|
+
:'public_name' => :'String',
|
|
84
94
|
:'address' => :'ListingAddress',
|
|
85
95
|
:'thumbnail_url' => :'String',
|
|
86
96
|
:'status' => :'String',
|
|
@@ -96,6 +106,7 @@ module Repull
|
|
|
96
106
|
# List of attributes with nullable: true
|
|
97
107
|
def self.openapi_nullable
|
|
98
108
|
Set.new([
|
|
109
|
+
:'public_name',
|
|
99
110
|
:'thumbnail_url',
|
|
100
111
|
:'content',
|
|
101
112
|
:'details',
|
|
@@ -118,6 +129,10 @@ module Repull
|
|
|
118
129
|
h[k.to_sym] = v
|
|
119
130
|
}
|
|
120
131
|
|
|
132
|
+
if attributes.key?(:'capabilities')
|
|
133
|
+
self.capabilities = attributes[:'capabilities']
|
|
134
|
+
end
|
|
135
|
+
|
|
121
136
|
if attributes.key?(:'units')
|
|
122
137
|
if (value = attributes[:'units']).is_a?(Array)
|
|
123
138
|
self.units = value
|
|
@@ -132,6 +147,10 @@ module Repull
|
|
|
132
147
|
self.name = attributes[:'name']
|
|
133
148
|
end
|
|
134
149
|
|
|
150
|
+
if attributes.key?(:'public_name')
|
|
151
|
+
self.public_name = attributes[:'public_name']
|
|
152
|
+
end
|
|
153
|
+
|
|
135
154
|
if attributes.key?(:'address')
|
|
136
155
|
self.address = attributes[:'address']
|
|
137
156
|
end
|
|
@@ -193,9 +212,11 @@ module Repull
|
|
|
193
212
|
def ==(o)
|
|
194
213
|
return true if self.equal?(o)
|
|
195
214
|
self.class == o.class &&
|
|
215
|
+
capabilities == o.capabilities &&
|
|
196
216
|
units == o.units &&
|
|
197
217
|
id == o.id &&
|
|
198
218
|
name == o.name &&
|
|
219
|
+
public_name == o.public_name &&
|
|
199
220
|
address == o.address &&
|
|
200
221
|
thumbnail_url == o.thumbnail_url &&
|
|
201
222
|
status == o.status &&
|
|
@@ -216,7 +237,7 @@ module Repull
|
|
|
216
237
|
# Calculates hash code according to all attributes.
|
|
217
238
|
# @return [Integer] Hash code
|
|
218
239
|
def hash
|
|
219
|
-
[units, id, name, address, thumbnail_url, status, channels, amenities, content, details, created_at, updated_at].hash
|
|
240
|
+
[capabilities, units, id, name, public_name, address, thumbnail_url, status, channels, amenities, content, details, created_at, updated_at].hash
|
|
220
241
|
end
|
|
221
242
|
|
|
222
243
|
# Builds the object from hash
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
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
|
+
# `GET /v1/listings/{id}` only. What the API can do with this listing.
|
|
18
|
+
class ListingCapabilities < ApiModelBase
|
|
19
|
+
attr_accessor :reservations
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'reservations' => :'reservations'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'reservations' => :'ReservationCapabilities'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListingCapabilities` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListingCapabilities`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'reservations')
|
|
68
|
+
self.reservations = attributes[:'reservations']
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
73
|
+
# @return Array for valid properties with the reasons
|
|
74
|
+
def list_invalid_properties
|
|
75
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
76
|
+
invalid_properties = Array.new
|
|
77
|
+
invalid_properties
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Check to see if the all the properties in the model are valid
|
|
81
|
+
# @return true if the model is valid
|
|
82
|
+
def valid?
|
|
83
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
84
|
+
true
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Checks equality by comparing each attribute.
|
|
88
|
+
# @param [Object] Object to be compared
|
|
89
|
+
def ==(o)
|
|
90
|
+
return true if self.equal?(o)
|
|
91
|
+
self.class == o.class &&
|
|
92
|
+
reservations == o.reservations
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# @see the `==` method
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def eql?(o)
|
|
98
|
+
self == o
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Calculates hash code according to all attributes.
|
|
102
|
+
# @return [Integer] Hash code
|
|
103
|
+
def hash
|
|
104
|
+
[reservations].hash
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Builds the object from hash
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
# @return [Object] Returns the model itself
|
|
110
|
+
def self.build_from_hash(attributes)
|
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
|
112
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
113
|
+
transformed_hash = {}
|
|
114
|
+
openapi_types.each_pair do |key, type|
|
|
115
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
116
|
+
transformed_hash["#{key}"] = nil
|
|
117
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
118
|
+
# check to ensure the input is an array given that the attribute
|
|
119
|
+
# is documented as an array but the input is not
|
|
120
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
121
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
122
|
+
end
|
|
123
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
new(transformed_hash)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Returns the object in the form of hash
|
|
131
|
+
# @return [Hash] Returns the object in the form of hash
|
|
132
|
+
def to_hash
|
|
133
|
+
hash = {}
|
|
134
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
135
|
+
value = self.send(attr)
|
|
136
|
+
if value.nil?
|
|
137
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
138
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
hash[param] = _to_hash(value)
|
|
142
|
+
end
|
|
143
|
+
hash
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# A vacation rental property in your Repull workspace. Backed by the core `listings` row — enriched per-PMS fields (bedrooms, property type, provider id, etc.) live in provider-specific detail tables and are NOT returned here. Field availability differs by endpoint: - `channels` is returned by the list endpoint (`GET /v1/properties`) only. - `latitude`, `longitude`, `createdAt`, and `amenities` are returned by the detail endpoint (`GET /v1/properties/{id}`) only. `amenities` requires `?include=amenities`. An **inactive** property (`status: inactive`) appears only in the list endpoint, and only when `?status=inactive|all` asks for it. Such a row carries identity fields only — `id`, `name`, `status`, `lifecycleStatus`, `channels`, `accounts`, `updatedAt` — so every other field is absent until the property is activated. Every other endpoint answers `403 listing_inactive` for it.
|
|
17
|
+
# A vacation rental property in your Repull workspace. Backed by the core `listings` row — enriched per-PMS fields (bedrooms, property type, provider id, etc.) live in provider-specific detail tables and are NOT returned here. Field availability differs by endpoint: - `channels` is returned by the list endpoint (`GET /v1/properties`) only. - `latitude`, `longitude`, `createdAt`, and `amenities` are returned by the detail endpoint (`GET /v1/properties/{id}`) only. `amenities` requires `?include=amenities`. An **inactive** property (`status: inactive`) appears only in the list endpoint, and only when `?status=inactive|all` asks for it. Such a row carries identity fields only — `id`, `name`, `city`, `status`, `inactiveReason`, `lifecycleStatus`, `channels`, `accounts`, `updatedAt` — so every other field is absent until the property is activated. `inactiveReason` is `plan_limit` (held back by the plan; activating needs a free slot or an upgrade), `unlisted_on_airbnb`, or `deactivated` (switched off by you). Every other endpoint answers `403 listing_inactive` for it.
|
|
18
18
|
class Property < ApiModelBase
|
|
19
19
|
# The connected account the property belongs to on each channel it is on. List endpoint.
|
|
20
20
|
attr_accessor :accounts
|
|
@@ -22,9 +22,12 @@ module Repull
|
|
|
22
22
|
# Internal Repull property ID. Equal to the listing id (`listings.id`); the same integer is used as `listingId` on reservations and `propertyId` on availability.
|
|
23
23
|
attr_accessor :id
|
|
24
24
|
|
|
25
|
-
# Property name
|
|
25
|
+
# Property name — the host's internal nickname.
|
|
26
26
|
attr_accessor :name
|
|
27
27
|
|
|
28
|
+
# The title guests see on the channel (e.g. the Airbnb listing title). `name` is the host's internal nickname for the listing; show `publicName` in anything a guest or end user reads. Present on inactive rows too.
|
|
29
|
+
attr_accessor :public_name
|
|
30
|
+
|
|
28
31
|
# Street address (from the listing's `street` field).
|
|
29
32
|
attr_accessor :address
|
|
30
33
|
|
|
@@ -63,6 +66,7 @@ module Repull
|
|
|
63
66
|
:'accounts' => :'accounts',
|
|
64
67
|
:'id' => :'id',
|
|
65
68
|
:'name' => :'name',
|
|
69
|
+
:'public_name' => :'publicName',
|
|
66
70
|
:'address' => :'address',
|
|
67
71
|
:'city' => :'city',
|
|
68
72
|
:'latitude' => :'latitude',
|
|
@@ -93,6 +97,7 @@ module Repull
|
|
|
93
97
|
:'accounts' => :'Array<RecordAccount>',
|
|
94
98
|
:'id' => :'String',
|
|
95
99
|
:'name' => :'String',
|
|
100
|
+
:'public_name' => :'String',
|
|
96
101
|
:'address' => :'String',
|
|
97
102
|
:'city' => :'String',
|
|
98
103
|
:'latitude' => :'String',
|
|
@@ -110,6 +115,7 @@ module Repull
|
|
|
110
115
|
# List of attributes with nullable: true
|
|
111
116
|
def self.openapi_nullable
|
|
112
117
|
Set.new([
|
|
118
|
+
:'public_name',
|
|
113
119
|
:'address',
|
|
114
120
|
:'city',
|
|
115
121
|
:'latitude',
|
|
@@ -149,6 +155,10 @@ module Repull
|
|
|
149
155
|
self.name = attributes[:'name']
|
|
150
156
|
end
|
|
151
157
|
|
|
158
|
+
if attributes.key?(:'public_name')
|
|
159
|
+
self.public_name = attributes[:'public_name']
|
|
160
|
+
end
|
|
161
|
+
|
|
152
162
|
if attributes.key?(:'address')
|
|
153
163
|
self.address = attributes[:'address']
|
|
154
164
|
end
|
|
@@ -221,6 +231,7 @@ module Repull
|
|
|
221
231
|
accounts == o.accounts &&
|
|
222
232
|
id == o.id &&
|
|
223
233
|
name == o.name &&
|
|
234
|
+
public_name == o.public_name &&
|
|
224
235
|
address == o.address &&
|
|
225
236
|
city == o.city &&
|
|
226
237
|
latitude == o.latitude &&
|
|
@@ -243,7 +254,7 @@ module Repull
|
|
|
243
254
|
# Calculates hash code according to all attributes.
|
|
244
255
|
# @return [Integer] Hash code
|
|
245
256
|
def hash
|
|
246
|
-
[accounts, id, name, address, city, latitude, longitude, currency, status, lifecycle_status, created_at, updated_at, channels, amenities].hash
|
|
257
|
+
[accounts, id, name, public_name, address, city, latitude, longitude, currency, status, lifecycle_status, created_at, updated_at, channels, amenities].hash
|
|
247
258
|
end
|
|
248
259
|
|
|
249
260
|
# Builds the object from hash
|