repull 0.2.36 → 0.2.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/repull/api/connect_api.rb +70 -2
- data/lib/repull/api/conversations_api.rb +2 -2
- data/lib/repull/api/reservations_api.rb +4 -4
- data/lib/repull/models/account_disconnected_payload.rb +16 -4
- data/lib/repull/models/account_disconnected_payload_listings_inner.rb +157 -0
- data/lib/repull/models/airbnb_calendar_operation.rb +12 -12
- data/lib/repull/models/inquiry_webhook_object.rb +10 -1
- data/lib/repull/models/inquiry_webhook_object_guest.rb +159 -0
- data/lib/repull/models/list_inquiries200_response_data_inner.rb +27 -1
- data/lib/repull/models/list_inquiries200_response_data_inner_guest.rb +160 -0
- data/lib/repull/models/listing_channel.rb +15 -4
- data/lib/repull/models/listing_webhook_object_channels_inner.rb +16 -5
- data/lib/repull/models/reservation.rb +25 -1
- data/lib/repull/models/reservation_access_code.rb +301 -0
- data/lib/repull/models/reservation_access_code_locks_inner.rb +190 -0
- data/lib/repull/models/submit_ciirus_credentials200_response.rb +213 -0
- data/lib/repull/models/submit_ciirus_credentials200_response_account_info.rb +159 -0
- data/lib/repull/models/submit_ciirus_credentials_request.rb +184 -0
- data/lib/repull/models/submit_ciirus_credentials_request_credentials.rb +203 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +9 -0
- data/openapi/v1.json +330 -8
- data/scripts/regen.sh +1 -1
- metadata +11 -2
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | unlimited (10 included, then billed per listing) | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Repull
|
|
17
|
+
# Who asked. Airbnb shares only the first name before the guest books.
|
|
18
|
+
class InquiryWebhookObjectGuest < ApiModelBase
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
attr_accessor :first_name
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'id' => :'id',
|
|
27
|
+
:'first_name' => :'firstName'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'id' => :'String',
|
|
45
|
+
:'first_name' => :'String'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
:'id',
|
|
53
|
+
:'first_name'
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::InquiryWebhookObjectGuest` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::InquiryWebhookObjectGuest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'id')
|
|
74
|
+
self.id = attributes[:'id']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'first_name')
|
|
78
|
+
self.first_name = attributes[:'first_name']
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
86
|
+
invalid_properties = Array.new
|
|
87
|
+
invalid_properties
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Check to see if the all the properties in the model are valid
|
|
91
|
+
# @return true if the model is valid
|
|
92
|
+
def valid?
|
|
93
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
id == o.id &&
|
|
103
|
+
first_name == o.first_name
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @see the `==` method
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def eql?(o)
|
|
109
|
+
self == o
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Calculates hash code according to all attributes.
|
|
113
|
+
# @return [Integer] Hash code
|
|
114
|
+
def hash
|
|
115
|
+
[id, first_name].hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def self.build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
124
|
+
transformed_hash = {}
|
|
125
|
+
openapi_types.each_pair do |key, type|
|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
127
|
+
transformed_hash["#{key}"] = nil
|
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
129
|
+
# check to ensure the input is an array given that the attribute
|
|
130
|
+
# is documented as an array but the input is not
|
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
133
|
+
end
|
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
new(transformed_hash)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Returns the object in the form of hash
|
|
142
|
+
# @return [Hash] Returns the object in the form of hash
|
|
143
|
+
def to_hash
|
|
144
|
+
hash = {}
|
|
145
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
146
|
+
value = self.send(attr)
|
|
147
|
+
if value.nil?
|
|
148
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
149
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
hash[param] = _to_hash(value)
|
|
153
|
+
end
|
|
154
|
+
hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
end
|
|
@@ -32,6 +32,8 @@ module Repull
|
|
|
32
32
|
|
|
33
33
|
attr_accessor :check_out
|
|
34
34
|
|
|
35
|
+
attr_accessor :guest
|
|
36
|
+
|
|
35
37
|
attr_accessor :guests
|
|
36
38
|
|
|
37
39
|
attr_accessor :expected_payout
|
|
@@ -83,6 +85,7 @@ module Repull
|
|
|
83
85
|
:'status' => :'status',
|
|
84
86
|
:'check_in' => :'checkIn',
|
|
85
87
|
:'check_out' => :'checkOut',
|
|
88
|
+
:'guest' => :'guest',
|
|
86
89
|
:'guests' => :'guests',
|
|
87
90
|
:'expected_payout' => :'expectedPayout',
|
|
88
91
|
:'reservation_id' => :'reservationId',
|
|
@@ -114,6 +117,7 @@ module Repull
|
|
|
114
117
|
:'status' => :'String',
|
|
115
118
|
:'check_in' => :'Date',
|
|
116
119
|
:'check_out' => :'Date',
|
|
120
|
+
:'guest' => :'ListInquiries200ResponseDataInnerGuest',
|
|
117
121
|
:'guests' => :'ListInquiries200ResponseDataInnerGuests',
|
|
118
122
|
:'expected_payout' => :'ListInquiries200ResponseDataInnerExpectedPayout',
|
|
119
123
|
:'reservation_id' => :'String',
|
|
@@ -199,6 +203,12 @@ module Repull
|
|
|
199
203
|
self.check_out = nil
|
|
200
204
|
end
|
|
201
205
|
|
|
206
|
+
if attributes.key?(:'guest')
|
|
207
|
+
self.guest = attributes[:'guest']
|
|
208
|
+
else
|
|
209
|
+
self.guest = nil
|
|
210
|
+
end
|
|
211
|
+
|
|
202
212
|
if attributes.key?(:'guests')
|
|
203
213
|
self.guests = attributes[:'guests']
|
|
204
214
|
else
|
|
@@ -265,6 +275,10 @@ module Repull
|
|
|
265
275
|
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
266
276
|
end
|
|
267
277
|
|
|
278
|
+
if @guest.nil?
|
|
279
|
+
invalid_properties.push('invalid value for "guest", guest cannot be nil.')
|
|
280
|
+
end
|
|
281
|
+
|
|
268
282
|
if @guests.nil?
|
|
269
283
|
invalid_properties.push('invalid value for "guests", guests cannot be nil.')
|
|
270
284
|
end
|
|
@@ -285,6 +299,7 @@ module Repull
|
|
|
285
299
|
return false if @status.nil?
|
|
286
300
|
status_validator = EnumAttributeValidator.new('String', ["open", "pre_approved", "special_offer_sent", "booked", "expired", "declined", "not_possible"])
|
|
287
301
|
return false unless status_validator.valid?(@status)
|
|
302
|
+
return false if @guest.nil?
|
|
288
303
|
return false if @guests.nil?
|
|
289
304
|
return false if @expected_payout.nil?
|
|
290
305
|
true
|
|
@@ -320,6 +335,16 @@ module Repull
|
|
|
320
335
|
@status = status
|
|
321
336
|
end
|
|
322
337
|
|
|
338
|
+
# Custom attribute writer method with validation
|
|
339
|
+
# @param [Object] guest Value to be assigned
|
|
340
|
+
def guest=(guest)
|
|
341
|
+
if guest.nil?
|
|
342
|
+
fail ArgumentError, 'guest cannot be nil'
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
@guest = guest
|
|
346
|
+
end
|
|
347
|
+
|
|
323
348
|
# Custom attribute writer method with validation
|
|
324
349
|
# @param [Object] guests Value to be assigned
|
|
325
350
|
def guests=(guests)
|
|
@@ -352,6 +377,7 @@ module Repull
|
|
|
352
377
|
status == o.status &&
|
|
353
378
|
check_in == o.check_in &&
|
|
354
379
|
check_out == o.check_out &&
|
|
380
|
+
guest == o.guest &&
|
|
355
381
|
guests == o.guests &&
|
|
356
382
|
expected_payout == o.expected_payout &&
|
|
357
383
|
reservation_id == o.reservation_id &&
|
|
@@ -371,7 +397,7 @@ module Repull
|
|
|
371
397
|
# Calculates hash code according to all attributes.
|
|
372
398
|
# @return [Integer] Hash code
|
|
373
399
|
def hash
|
|
374
|
-
[id, conversation_id, listing_id, channel, status, check_in, check_out, guests, expected_payout, reservation_id, relayed_by, respond_by, responded_at, created_at, updated_at].hash
|
|
400
|
+
[id, conversation_id, listing_id, channel, status, check_in, check_out, guest, guests, expected_payout, reservation_id, relayed_by, respond_by, responded_at, created_at, updated_at].hash
|
|
375
401
|
end
|
|
376
402
|
|
|
377
403
|
# Builds the object from hash
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | unlimited (10 included, then billed per listing) | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Repull
|
|
17
|
+
# Who asked. Airbnb shares only the guest’s first name before they book; the last name and phone number arrive on the reservation (`GET /v1/reservations/{id}`) once they do.
|
|
18
|
+
class ListInquiries200ResponseDataInnerGuest < ApiModelBase
|
|
19
|
+
# Repull guest id.
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
attr_accessor :first_name
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'id' => :'id',
|
|
28
|
+
:'first_name' => :'firstName'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'id' => :'String',
|
|
46
|
+
:'first_name' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
:'id',
|
|
54
|
+
:'first_name'
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
+
def initialize(attributes = {})
|
|
61
|
+
if (!attributes.is_a?(Hash))
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListInquiries200ResponseDataInnerGuest` initialize method"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListInquiries200ResponseDataInnerGuest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
|
+
end
|
|
71
|
+
h[k.to_sym] = v
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'id')
|
|
75
|
+
self.id = attributes[:'id']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'first_name')
|
|
79
|
+
self.first_name = attributes[:'first_name']
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
invalid_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Check to see if the all the properties in the model are valid
|
|
92
|
+
# @return true if the model is valid
|
|
93
|
+
def valid?
|
|
94
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
95
|
+
true
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Checks equality by comparing each attribute.
|
|
99
|
+
# @param [Object] Object to be compared
|
|
100
|
+
def ==(o)
|
|
101
|
+
return true if self.equal?(o)
|
|
102
|
+
self.class == o.class &&
|
|
103
|
+
id == o.id &&
|
|
104
|
+
first_name == o.first_name
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @see the `==` method
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def eql?(o)
|
|
110
|
+
self == o
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Calculates hash code according to all attributes.
|
|
114
|
+
# @return [Integer] Hash code
|
|
115
|
+
def hash
|
|
116
|
+
[id, first_name].hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Builds the object from hash
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
# @return [Object] Returns the model itself
|
|
122
|
+
def self.build_from_hash(attributes)
|
|
123
|
+
return nil unless attributes.is_a?(Hash)
|
|
124
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
125
|
+
transformed_hash = {}
|
|
126
|
+
openapi_types.each_pair do |key, type|
|
|
127
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
128
|
+
transformed_hash["#{key}"] = nil
|
|
129
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
130
|
+
# check to ensure the input is an array given that the attribute
|
|
131
|
+
# is documented as an array but the input is not
|
|
132
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
133
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
134
|
+
end
|
|
135
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
new(transformed_hash)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Returns the object in the form of hash
|
|
143
|
+
# @return [Hash] Returns the object in the form of hash
|
|
144
|
+
def to_hash
|
|
145
|
+
hash = {}
|
|
146
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
147
|
+
value = self.send(attr)
|
|
148
|
+
if value.nil?
|
|
149
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
150
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
hash[param] = _to_hash(value)
|
|
154
|
+
end
|
|
155
|
+
hash
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
end
|
|
@@ -25,13 +25,17 @@ module Repull
|
|
|
25
25
|
|
|
26
26
|
attr_accessor :sync_enabled
|
|
27
27
|
|
|
28
|
+
# The connected account this listing belongs to on this channel — for Airbnb the host account (`externalAccountId` is the Airbnb host id). The same account `account.disconnected` names, so a disconnect can be matched to its listings. Null when it cannot be resolved.
|
|
29
|
+
attr_accessor :account
|
|
30
|
+
|
|
28
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
32
|
def self.attribute_map
|
|
30
33
|
{
|
|
31
34
|
:'platform' => :'platform',
|
|
32
35
|
:'external_id' => :'externalId',
|
|
33
36
|
:'active' => :'active',
|
|
34
|
-
:'sync_enabled' => :'syncEnabled'
|
|
37
|
+
:'sync_enabled' => :'syncEnabled',
|
|
38
|
+
:'account' => :'account'
|
|
35
39
|
}
|
|
36
40
|
end
|
|
37
41
|
|
|
@@ -51,13 +55,15 @@ module Repull
|
|
|
51
55
|
:'platform' => :'String',
|
|
52
56
|
:'external_id' => :'String',
|
|
53
57
|
:'active' => :'Boolean',
|
|
54
|
-
:'sync_enabled' => :'Boolean'
|
|
58
|
+
:'sync_enabled' => :'Boolean',
|
|
59
|
+
:'account' => :'RecordAccount'
|
|
55
60
|
}
|
|
56
61
|
end
|
|
57
62
|
|
|
58
63
|
# List of attributes with nullable: true
|
|
59
64
|
def self.openapi_nullable
|
|
60
65
|
Set.new([
|
|
66
|
+
:'account'
|
|
61
67
|
])
|
|
62
68
|
end
|
|
63
69
|
|
|
@@ -92,6 +98,10 @@ module Repull
|
|
|
92
98
|
if attributes.key?(:'sync_enabled')
|
|
93
99
|
self.sync_enabled = attributes[:'sync_enabled']
|
|
94
100
|
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'account')
|
|
103
|
+
self.account = attributes[:'account']
|
|
104
|
+
end
|
|
95
105
|
end
|
|
96
106
|
|
|
97
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -117,7 +127,8 @@ module Repull
|
|
|
117
127
|
platform == o.platform &&
|
|
118
128
|
external_id == o.external_id &&
|
|
119
129
|
active == o.active &&
|
|
120
|
-
sync_enabled == o.sync_enabled
|
|
130
|
+
sync_enabled == o.sync_enabled &&
|
|
131
|
+
account == o.account
|
|
121
132
|
end
|
|
122
133
|
|
|
123
134
|
# @see the `==` method
|
|
@@ -129,7 +140,7 @@ module Repull
|
|
|
129
140
|
# Calculates hash code according to all attributes.
|
|
130
141
|
# @return [Integer] Hash code
|
|
131
142
|
def hash
|
|
132
|
-
[platform, external_id, active, sync_enabled].hash
|
|
143
|
+
[platform, external_id, active, sync_enabled, account].hash
|
|
133
144
|
end
|
|
134
145
|
|
|
135
146
|
# Builds the object from hash
|
|
@@ -25,6 +25,9 @@ module Repull
|
|
|
25
25
|
|
|
26
26
|
attr_accessor :sync_category
|
|
27
27
|
|
|
28
|
+
# The connected account this listing belongs to on this channel — for Airbnb the host account (`externalAccountId` is the Airbnb host id). The same account `account.disconnected` names, so a disconnect can be matched to its listings. Null when it cannot be resolved.
|
|
29
|
+
attr_accessor :account
|
|
30
|
+
|
|
28
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
32
|
def self.attribute_map
|
|
30
33
|
{
|
|
@@ -32,7 +35,8 @@ module Repull
|
|
|
32
35
|
:'external_id' => :'externalId',
|
|
33
36
|
:'active' => :'active',
|
|
34
37
|
:'sync_enabled' => :'syncEnabled',
|
|
35
|
-
:'sync_category' => :'syncCategory'
|
|
38
|
+
:'sync_category' => :'syncCategory',
|
|
39
|
+
:'account' => :'account'
|
|
36
40
|
}
|
|
37
41
|
end
|
|
38
42
|
|
|
@@ -53,14 +57,16 @@ module Repull
|
|
|
53
57
|
:'external_id' => :'String',
|
|
54
58
|
:'active' => :'Boolean',
|
|
55
59
|
:'sync_enabled' => :'Boolean',
|
|
56
|
-
:'sync_category' => :'String'
|
|
60
|
+
:'sync_category' => :'String',
|
|
61
|
+
:'account' => :'RecordAccount'
|
|
57
62
|
}
|
|
58
63
|
end
|
|
59
64
|
|
|
60
65
|
# List of attributes with nullable: true
|
|
61
66
|
def self.openapi_nullable
|
|
62
67
|
Set.new([
|
|
63
|
-
:'sync_category'
|
|
68
|
+
:'sync_category',
|
|
69
|
+
:'account'
|
|
64
70
|
])
|
|
65
71
|
end
|
|
66
72
|
|
|
@@ -99,6 +105,10 @@ module Repull
|
|
|
99
105
|
if attributes.key?(:'sync_category')
|
|
100
106
|
self.sync_category = attributes[:'sync_category']
|
|
101
107
|
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'account')
|
|
110
|
+
self.account = attributes[:'account']
|
|
111
|
+
end
|
|
102
112
|
end
|
|
103
113
|
|
|
104
114
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -125,7 +135,8 @@ module Repull
|
|
|
125
135
|
external_id == o.external_id &&
|
|
126
136
|
active == o.active &&
|
|
127
137
|
sync_enabled == o.sync_enabled &&
|
|
128
|
-
sync_category == o.sync_category
|
|
138
|
+
sync_category == o.sync_category &&
|
|
139
|
+
account == o.account
|
|
129
140
|
end
|
|
130
141
|
|
|
131
142
|
# @see the `==` method
|
|
@@ -137,7 +148,7 @@ module Repull
|
|
|
137
148
|
# Calculates hash code according to all attributes.
|
|
138
149
|
# @return [Integer] Hash code
|
|
139
150
|
def hash
|
|
140
|
-
[platform, external_id, active, sync_enabled, sync_category].hash
|
|
151
|
+
[platform, external_id, active, sync_enabled, sync_category, account].hash
|
|
141
152
|
end
|
|
142
153
|
|
|
143
154
|
# Builds the object from hash
|
|
@@ -73,6 +73,12 @@ module Repull
|
|
|
73
73
|
|
|
74
74
|
attr_accessor :unit
|
|
75
75
|
|
|
76
|
+
# The PMS's own id for this reservation (for example Guesty's reservation `_id`), so you can look it up in the PMS. `null` when the reservation did not come from a PMS.
|
|
77
|
+
attr_accessor :pms_reservation_id
|
|
78
|
+
|
|
79
|
+
# Door codes for the stay from the PMS's lock manager (today: Guesty Locks Manager), refreshed about every 30 minutes for stays checking in within 14 days that have not checked out. `null` when the reservation's codes are not read from a PMS. `[]` when they are and there is none yet, and for a cancelled stay.
|
|
80
|
+
attr_accessor :access_codes
|
|
81
|
+
|
|
76
82
|
# Inline guest summary. May be undefined for owner-blocks / pre-arrival rows.
|
|
77
83
|
attr_accessor :primary_guest
|
|
78
84
|
|
|
@@ -126,6 +132,8 @@ module Repull
|
|
|
126
132
|
:'platform' => :'platform',
|
|
127
133
|
:'confirmation_code' => :'confirmationCode',
|
|
128
134
|
:'unit' => :'unit',
|
|
135
|
+
:'pms_reservation_id' => :'pmsReservationId',
|
|
136
|
+
:'access_codes' => :'accessCodes',
|
|
129
137
|
:'primary_guest' => :'primaryGuest',
|
|
130
138
|
:'occupancy' => :'occupancy',
|
|
131
139
|
:'financials' => :'financials',
|
|
@@ -172,6 +180,8 @@ module Repull
|
|
|
172
180
|
:'platform' => :'String',
|
|
173
181
|
:'confirmation_code' => :'String',
|
|
174
182
|
:'unit' => :'ReservationUnit',
|
|
183
|
+
:'pms_reservation_id' => :'String',
|
|
184
|
+
:'access_codes' => :'Array<ReservationAccessCode>',
|
|
175
185
|
:'primary_guest' => :'ReservationPrimaryGuest',
|
|
176
186
|
:'occupancy' => :'ReservationOccupancy',
|
|
177
187
|
:'financials' => :'ReservationFinancials',
|
|
@@ -198,6 +208,8 @@ module Repull
|
|
|
198
208
|
:'source',
|
|
199
209
|
:'platform',
|
|
200
210
|
:'unit',
|
|
211
|
+
:'pms_reservation_id',
|
|
212
|
+
:'access_codes',
|
|
201
213
|
:'booked_at',
|
|
202
214
|
:'guest_name'
|
|
203
215
|
])
|
|
@@ -311,6 +323,16 @@ module Repull
|
|
|
311
323
|
self.unit = attributes[:'unit']
|
|
312
324
|
end
|
|
313
325
|
|
|
326
|
+
if attributes.key?(:'pms_reservation_id')
|
|
327
|
+
self.pms_reservation_id = attributes[:'pms_reservation_id']
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
if attributes.key?(:'access_codes')
|
|
331
|
+
if (value = attributes[:'access_codes']).is_a?(Array)
|
|
332
|
+
self.access_codes = value
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
|
|
314
336
|
if attributes.key?(:'primary_guest')
|
|
315
337
|
self.primary_guest = attributes[:'primary_guest']
|
|
316
338
|
end
|
|
@@ -518,6 +540,8 @@ module Repull
|
|
|
518
540
|
platform == o.platform &&
|
|
519
541
|
confirmation_code == o.confirmation_code &&
|
|
520
542
|
unit == o.unit &&
|
|
543
|
+
pms_reservation_id == o.pms_reservation_id &&
|
|
544
|
+
access_codes == o.access_codes &&
|
|
521
545
|
primary_guest == o.primary_guest &&
|
|
522
546
|
occupancy == o.occupancy &&
|
|
523
547
|
financials == o.financials &&
|
|
@@ -539,7 +563,7 @@ module Repull
|
|
|
539
563
|
# Calculates hash code according to all attributes.
|
|
540
564
|
# @return [Integer] Hash code
|
|
541
565
|
def hash
|
|
542
|
-
[account, id, listing_id, guest_id, check_in, check_out, check_in_time, check_out_time, guest_notes, conversation_id, external_thread_id, inquiry_id, status, status_detail, pending_reason, respond_by, source, platform, confirmation_code, unit, primary_guest, occupancy, financials, total_price, currency, guest_details, created_at, updated_at, booked_at, guest_name].hash
|
|
566
|
+
[account, id, listing_id, guest_id, check_in, check_out, check_in_time, check_out_time, guest_notes, conversation_id, external_thread_id, inquiry_id, status, status_detail, pending_reason, respond_by, source, platform, confirmation_code, unit, pms_reservation_id, access_codes, primary_guest, occupancy, financials, total_price, currency, guest_details, created_at, updated_at, booked_at, guest_name].hash
|
|
543
567
|
end
|
|
544
568
|
|
|
545
569
|
# Builds the object from hash
|