repull 0.2.24 → 0.2.25
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 +617 -0
- data/lib/repull/api/connections_api.rb +312 -0
- data/lib/repull/api/conversations_api.rb +151 -18
- data/lib/repull/api/health_api.rb +5 -5
- data/lib/repull/api/listings_api.rb +67 -4
- data/lib/repull/api/reviews_api.rb +2 -2
- data/lib/repull/models/apply_connection_mappings200_response.rb +167 -0
- data/lib/repull/models/apply_connection_mappings200_response_results_inner.rb +184 -0
- data/lib/repull/models/apply_connection_mappings_request.rb +175 -0
- data/lib/repull/models/apply_connection_mappings_request_mappings_inner.rb +193 -0
- data/lib/repull/models/auto_map_connection_units200_response.rb +176 -0
- data/lib/repull/models/auto_map_connection_units_request.rb +156 -0
- data/lib/repull/models/channel_market_state_item.rb +15 -4
- data/lib/repull/models/connect_status.rb +25 -5
- data/lib/repull/models/connect_status_accounts_inner.rb +71 -4
- data/lib/repull/models/conversation_capabilities.rb +260 -0
- data/lib/repull/models/conversation_detail.rb +14 -5
- data/lib/repull/models/create_connect_session_request.rb +23 -1
- data/lib/repull/models/create_conversation_special_offer201_response.rb +127 -4
- data/lib/repull/models/create_conversation_special_offer201_response_fees_inner.rb +166 -0
- data/lib/repull/models/create_conversation_special_offer201_response_lines_inner.rb +157 -0
- data/lib/repull/models/create_conversation_special_offer_request.rb +91 -52
- data/lib/repull/models/create_conversation_special_offer_request_fees_inner.rb +199 -0
- data/lib/repull/models/get_booking_extranet_login_config200_response.rb +147 -0
- data/lib/repull/models/get_booking_extranet_login_status200_response.rb +192 -0
- data/lib/repull/models/get_channel_health200_response.rb +190 -0
- data/lib/repull/models/get_channel_health200_response_vrbo.rb +197 -0
- data/lib/repull/models/get_connect_write_policy200_response.rb +166 -0
- data/lib/repull/models/get_listing_calendar_sync200_response.rb +192 -0
- data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner.rb +331 -0
- data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner_problems_inner.rb +157 -0
- data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner_queue.rb +212 -0
- data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner_queue_last_push.rb +268 -0
- data/lib/repull/models/invite_booking_extranet_user200_response.rb +174 -0
- data/lib/repull/models/invite_booking_extranet_user_request.rb +173 -0
- data/lib/repull/models/list_connection_units200_response.rb +242 -0
- data/lib/repull/models/list_connection_units200_response_listing_options_inner.rb +165 -0
- data/lib/repull/models/list_connection_units200_response_units_inner.rb +194 -0
- data/lib/repull/models/listing_publish_status_connection.rb +34 -1
- data/lib/repull/models/pms_write_policy.rb +191 -0
- data/lib/repull/models/pms_write_policy_calendar.rb +219 -0
- data/lib/repull/models/pms_write_policy_reservations.rb +219 -0
- data/lib/repull/models/preapprove_conversation201_response.rb +47 -6
- data/lib/repull/models/preapprove_conversation_request.rb +34 -5
- data/lib/repull/models/preview_conversation_special_offer_request.rb +231 -0
- data/lib/repull/models/preview_conversation_special_offer_request_fees_inner.rb +199 -0
- data/lib/repull/models/preview_conversation_special_offer_request_guests.rb +250 -0
- data/lib/repull/models/reply_to_review_request.rb +33 -4
- data/lib/repull/models/search_connect_session_listing_options200_response.rb +158 -0
- data/lib/repull/models/search_connect_session_listing_options200_response_data_inner.rb +166 -0
- data/lib/repull/models/search_connection_listing_options200_response.rb +159 -0
- data/lib/repull/models/send_message_request.rb +1 -1
- data/lib/repull/models/start_booking_extranet_login200_response.rb +174 -0
- data/lib/repull/models/start_booking_extranet_login_request.rb +225 -0
- data/lib/repull/models/submit_cloudbeds_credentials200_response.rb +10 -1
- data/lib/repull/models/submit_cloudbeds_credentials_request.rb +11 -1
- data/lib/repull/models/submit_mews_credentials200_response.rb +10 -1
- data/lib/repull/models/submit_mews_credentials_request.rb +11 -1
- data/lib/repull/models/update_connect_write_policy_request.rb +157 -0
- data/lib/repull/models/update_connect_write_policy_request_calendar.rb +165 -0
- data/lib/repull/models/update_connect_write_policy_request_reservations.rb +165 -0
- data/lib/repull/models/vrbo_import_status.rb +249 -0
- data/lib/repull/models/vrbo_login200_response.rb +235 -0
- data/lib/repull/models/vrbo_login_request.rb +271 -0
- data/lib/repull/models/withdraw_conversation_preapproval200_response.rb +226 -0
- data/lib/repull/models/withdraw_conversation_special_offer200_response.rb +29 -1
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +44 -0
- data/openapi/v1.json +4693 -2114
- data/scripts/regen.sh +1 -1
- metadata +46 -2
|
@@ -0,0 +1,156 @@
|
|
|
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
|
+
class AutoMapConnectionUnitsRequest < ApiModelBase
|
|
18
|
+
attr_accessor :session_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :apply
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'session_id' => :'sessionId',
|
|
26
|
+
:'apply' => :'apply'
|
|
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
|
+
:'session_id' => :'String',
|
|
44
|
+
:'apply' => :'Boolean'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AutoMapConnectionUnitsRequest` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AutoMapConnectionUnitsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'session_id')
|
|
71
|
+
self.session_id = attributes[:'session_id']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'apply')
|
|
75
|
+
self.apply = attributes[:'apply']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
session_id == o.session_id &&
|
|
100
|
+
apply == o.apply
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Integer] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[session_id, apply].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def self.build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
121
|
+
transformed_hash = {}
|
|
122
|
+
openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = nil
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
new(transformed_hash)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the object in the form of hash
|
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
|
140
|
+
def to_hash
|
|
141
|
+
hash = {}
|
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
143
|
+
value = self.send(attr)
|
|
144
|
+
if value.nil?
|
|
145
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
146
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
hash[param] = _to_hash(value)
|
|
150
|
+
end
|
|
151
|
+
hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# What happened on ONE channel item — one Airbnb connection,
|
|
17
|
+
# What happened on ONE channel item — one Airbnb connection, one Booking.com property, or one VRBO unit. A listing can carry several Airbnb connections (a re-list, or a move between host accounts) and each gets its own entry.
|
|
18
18
|
class ChannelMarketStateItem < ApiModelBase
|
|
19
19
|
attr_accessor :channel
|
|
20
20
|
|
|
@@ -30,7 +30,10 @@ module Repull
|
|
|
30
30
|
# The Booking.com property acted on. Present on Booking.com items; null when the property could not be resolved.
|
|
31
31
|
attr_accessor :hotel_id
|
|
32
32
|
|
|
33
|
-
#
|
|
33
|
+
# The VRBO listing number of the unit hidden or reactivated. Present on VRBO items.
|
|
34
|
+
attr_accessor :platform_id
|
|
35
|
+
|
|
36
|
+
# Error code when `ok` is false — the SAME code the channel-specific endpoint returns for this failure, so one vocabulary covers both surfaces. Absent when `ok` is true. The channel codes come in pairs, and the pair is the retryable split — the most useful bit in the whole item: - `airbnb_rejected` / `booking_rejected` — the channel refused the request AS SENT. `message` carries its own reason. Correct it and send again; resending the same thing is refused again. - `airbnb_error` / `booking_error` — the channel did not complete the request (outage, timeout, server error). Nothing about the request needs to change: retry with backoff. Plus `ambiguous_booking_mapping` (name the property with `hotelId`) and `payment_required` (a billing refusal, which keeps its own code rather than being buried under a channel one). VRBO items: `vrbo_rejected` (VRBO still shows the unit in the old state after the change), `vrbo_error` (VRBO did not complete it — retry), `vrbo_not_ready` (the unit's VRBO details have not synced yet — retry in a few minutes), `vrbo_session_expired` (reconnect the VRBO account).
|
|
34
37
|
attr_accessor :code
|
|
35
38
|
|
|
36
39
|
# The `code` this item used to carry, for callers still branching on the old string. A migration aid with a deprecation window — **`code` is canonical.** This fan-out reaches Airbnb through an internal hop that flattens a refusal into its own 500, so an unambiguous Airbnb 400 (\"Please specify a valid room type\") was reported as `airbnb_error` — whose published advice is to retry with backoff, forever, for something Airbnb will never accept. It now reads Airbnb's real status and answers `airbnb_rejected`, and the classification covers the whole 4xx range rather than only `400`. Items whose code changed carry `previousCode`. **Removed in v2.**
|
|
@@ -42,7 +45,7 @@ module Repull
|
|
|
42
45
|
# What to do about it, phrased for the direction you asked for — \"still live and taking bookings\" and \"still down\" call for different reactions. Absent when `ok` is true.
|
|
43
46
|
attr_accessor :fix
|
|
44
47
|
|
|
45
|
-
# Airbnb
|
|
48
|
+
# Airbnb and VRBO: the listing was READ BACK afterwards and is in the state asked for — down after `offline`, live after `online`. Airbnb can accept a deactivation and leave a listing live, or accept an activation and keep it offline; either is returned as a failure, never as success. `false` means the read-back could not run — an unknown, not a success.
|
|
46
49
|
attr_accessor :verified
|
|
47
50
|
|
|
48
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -53,6 +56,7 @@ module Repull
|
|
|
53
56
|
:'ok' => :'ok',
|
|
54
57
|
:'connection_id' => :'connectionId',
|
|
55
58
|
:'hotel_id' => :'hotelId',
|
|
59
|
+
:'platform_id' => :'platformId',
|
|
56
60
|
:'code' => :'code',
|
|
57
61
|
:'previous_code' => :'previousCode',
|
|
58
62
|
:'message' => :'message',
|
|
@@ -79,6 +83,7 @@ module Repull
|
|
|
79
83
|
:'ok' => :'Boolean',
|
|
80
84
|
:'connection_id' => :'String',
|
|
81
85
|
:'hotel_id' => :'String',
|
|
86
|
+
:'platform_id' => :'String',
|
|
82
87
|
:'code' => :'String',
|
|
83
88
|
:'previous_code' => :'String',
|
|
84
89
|
:'message' => :'String',
|
|
@@ -92,6 +97,7 @@ module Repull
|
|
|
92
97
|
Set.new([
|
|
93
98
|
:'connection_id',
|
|
94
99
|
:'hotel_id',
|
|
100
|
+
:'platform_id',
|
|
95
101
|
])
|
|
96
102
|
end
|
|
97
103
|
|
|
@@ -137,6 +143,10 @@ module Repull
|
|
|
137
143
|
self.hotel_id = attributes[:'hotel_id']
|
|
138
144
|
end
|
|
139
145
|
|
|
146
|
+
if attributes.key?(:'platform_id')
|
|
147
|
+
self.platform_id = attributes[:'platform_id']
|
|
148
|
+
end
|
|
149
|
+
|
|
140
150
|
if attributes.key?(:'code')
|
|
141
151
|
self.code = attributes[:'code']
|
|
142
152
|
end
|
|
@@ -228,6 +238,7 @@ module Repull
|
|
|
228
238
|
ok == o.ok &&
|
|
229
239
|
connection_id == o.connection_id &&
|
|
230
240
|
hotel_id == o.hotel_id &&
|
|
241
|
+
platform_id == o.platform_id &&
|
|
231
242
|
code == o.code &&
|
|
232
243
|
previous_code == o.previous_code &&
|
|
233
244
|
message == o.message &&
|
|
@@ -244,7 +255,7 @@ module Repull
|
|
|
244
255
|
# Calculates hash code according to all attributes.
|
|
245
256
|
# @return [Integer] Hash code
|
|
246
257
|
def hash
|
|
247
|
-
[channel, state, ok, connection_id, hotel_id, code, previous_code, message, fix, verified].hash
|
|
258
|
+
[channel, state, ok, connection_id, hotel_id, platform_id, code, previous_code, message, fix, verified].hash
|
|
248
259
|
end
|
|
249
260
|
|
|
250
261
|
# Builds the object from hash
|
|
@@ -33,9 +33,15 @@ module Repull
|
|
|
33
33
|
# Host metadata, populated for Airbnb when the host row exists. Null for other providers (per-provider enrichment is incremental).
|
|
34
34
|
attr_accessor :host
|
|
35
35
|
|
|
36
|
-
# Airbnb
|
|
36
|
+
# Airbnb: every Airbnb account this workspace has connected, including ones since disconnected. Pass `externalAccountId` as `accountId` to `DELETE /v1/connect/airbnb` to disconnect one account. Vrbo (`GET /v1/connect/vrbo-login`): every signed-in Vrbo account, each with `accessType` and `import` (a `VrboImportStatus`), plus a top-level `dataFreshness`.
|
|
37
37
|
attr_accessor :accounts
|
|
38
38
|
|
|
39
|
+
# PMS connections only: what the app may change in the PMS. Change it with `PATCH /v1/connect/{provider}/write-policy`.
|
|
40
|
+
attr_accessor :write_policy
|
|
41
|
+
|
|
42
|
+
# Vrbo only: the same freshness envelope the Airbnb read endpoints return, per account and in aggregate. Its reason is never_synced until a mapping is confirmed and importing while upcoming bookings come in.
|
|
43
|
+
attr_accessor :data_freshness
|
|
44
|
+
|
|
39
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
46
|
def self.attribute_map
|
|
41
47
|
{
|
|
@@ -46,7 +52,9 @@ module Repull
|
|
|
46
52
|
:'external_account_id' => :'externalAccountId',
|
|
47
53
|
:'created_at' => :'createdAt',
|
|
48
54
|
:'host' => :'host',
|
|
49
|
-
:'accounts' => :'accounts'
|
|
55
|
+
:'accounts' => :'accounts',
|
|
56
|
+
:'write_policy' => :'writePolicy',
|
|
57
|
+
:'data_freshness' => :'dataFreshness'
|
|
50
58
|
}
|
|
51
59
|
end
|
|
52
60
|
|
|
@@ -70,7 +78,9 @@ module Repull
|
|
|
70
78
|
:'external_account_id' => :'String',
|
|
71
79
|
:'created_at' => :'Time',
|
|
72
80
|
:'host' => :'ConnectHost',
|
|
73
|
-
:'accounts' => :'Array<ConnectStatusAccountsInner>'
|
|
81
|
+
:'accounts' => :'Array<ConnectStatusAccountsInner>',
|
|
82
|
+
:'write_policy' => :'PmsWritePolicy',
|
|
83
|
+
:'data_freshness' => :'Object'
|
|
74
84
|
}
|
|
75
85
|
end
|
|
76
86
|
|
|
@@ -131,6 +141,14 @@ module Repull
|
|
|
131
141
|
self.accounts = value
|
|
132
142
|
end
|
|
133
143
|
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'write_policy')
|
|
146
|
+
self.write_policy = attributes[:'write_policy']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'data_freshness')
|
|
150
|
+
self.data_freshness = attributes[:'data_freshness']
|
|
151
|
+
end
|
|
134
152
|
end
|
|
135
153
|
|
|
136
154
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -160,7 +178,9 @@ module Repull
|
|
|
160
178
|
external_account_id == o.external_account_id &&
|
|
161
179
|
created_at == o.created_at &&
|
|
162
180
|
host == o.host &&
|
|
163
|
-
accounts == o.accounts
|
|
181
|
+
accounts == o.accounts &&
|
|
182
|
+
write_policy == o.write_policy &&
|
|
183
|
+
data_freshness == o.data_freshness
|
|
164
184
|
end
|
|
165
185
|
|
|
166
186
|
# @see the `==` method
|
|
@@ -172,7 +192,7 @@ module Repull
|
|
|
172
192
|
# Calculates hash code according to all attributes.
|
|
173
193
|
# @return [Integer] Hash code
|
|
174
194
|
def hash
|
|
175
|
-
[connected, provider, id, status, external_account_id, created_at, host, accounts].hash
|
|
195
|
+
[connected, provider, id, status, external_account_id, created_at, host, accounts, write_policy, data_freshness].hash
|
|
176
196
|
end
|
|
177
197
|
|
|
178
198
|
# Builds the object from hash
|
|
@@ -27,6 +27,37 @@ module Repull
|
|
|
27
27
|
# True while the account is active and its authorization is usable.
|
|
28
28
|
attr_accessor :connected
|
|
29
29
|
|
|
30
|
+
# Vrbo only: the account email.
|
|
31
|
+
attr_accessor :email
|
|
32
|
+
|
|
33
|
+
# Vrbo only.
|
|
34
|
+
attr_accessor :access_type
|
|
35
|
+
|
|
36
|
+
# Vrbo only: where the account import stands.
|
|
37
|
+
attr_accessor :import
|
|
38
|
+
|
|
39
|
+
class EnumAttributeValidator
|
|
40
|
+
attr_reader :datatype
|
|
41
|
+
attr_reader :allowable_values
|
|
42
|
+
|
|
43
|
+
def initialize(datatype, allowable_values)
|
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
|
45
|
+
case datatype.to_s
|
|
46
|
+
when /Integer/i
|
|
47
|
+
value.to_i
|
|
48
|
+
when /Float/i
|
|
49
|
+
value.to_f
|
|
50
|
+
else
|
|
51
|
+
value
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def valid?(value)
|
|
57
|
+
!value || allowable_values.include?(value)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
30
61
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
62
|
def self.attribute_map
|
|
32
63
|
{
|
|
@@ -34,7 +65,10 @@ module Repull
|
|
|
34
65
|
:'name' => :'name',
|
|
35
66
|
:'picture_url' => :'pictureUrl',
|
|
36
67
|
:'status' => :'status',
|
|
37
|
-
:'connected' => :'connected'
|
|
68
|
+
:'connected' => :'connected',
|
|
69
|
+
:'email' => :'email',
|
|
70
|
+
:'access_type' => :'accessType',
|
|
71
|
+
:'import' => :'import'
|
|
38
72
|
}
|
|
39
73
|
end
|
|
40
74
|
|
|
@@ -55,7 +89,10 @@ module Repull
|
|
|
55
89
|
:'name' => :'String',
|
|
56
90
|
:'picture_url' => :'String',
|
|
57
91
|
:'status' => :'String',
|
|
58
|
-
:'connected' => :'Boolean'
|
|
92
|
+
:'connected' => :'Boolean',
|
|
93
|
+
:'email' => :'String',
|
|
94
|
+
:'access_type' => :'String',
|
|
95
|
+
:'import' => :'VrboImportStatus'
|
|
59
96
|
}
|
|
60
97
|
end
|
|
61
98
|
|
|
@@ -65,6 +102,9 @@ module Repull
|
|
|
65
102
|
:'name',
|
|
66
103
|
:'picture_url',
|
|
67
104
|
:'status',
|
|
105
|
+
:'email',
|
|
106
|
+
:'access_type',
|
|
107
|
+
:'import'
|
|
68
108
|
])
|
|
69
109
|
end
|
|
70
110
|
|
|
@@ -103,6 +143,18 @@ module Repull
|
|
|
103
143
|
if attributes.key?(:'connected')
|
|
104
144
|
self.connected = attributes[:'connected']
|
|
105
145
|
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'email')
|
|
148
|
+
self.email = attributes[:'email']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'access_type')
|
|
152
|
+
self.access_type = attributes[:'access_type']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'import')
|
|
156
|
+
self.import = attributes[:'import']
|
|
157
|
+
end
|
|
106
158
|
end
|
|
107
159
|
|
|
108
160
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -117,9 +169,21 @@ module Repull
|
|
|
117
169
|
# @return true if the model is valid
|
|
118
170
|
def valid?
|
|
119
171
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
172
|
+
access_type_validator = EnumAttributeValidator.new('String', ["messaging", "full_access"])
|
|
173
|
+
return false unless access_type_validator.valid?(@access_type)
|
|
120
174
|
true
|
|
121
175
|
end
|
|
122
176
|
|
|
177
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
178
|
+
# @param [Object] access_type Object to be assigned
|
|
179
|
+
def access_type=(access_type)
|
|
180
|
+
validator = EnumAttributeValidator.new('String', ["messaging", "full_access"])
|
|
181
|
+
unless validator.valid?(access_type)
|
|
182
|
+
fail ArgumentError, "invalid value for \"access_type\", must be one of #{validator.allowable_values}."
|
|
183
|
+
end
|
|
184
|
+
@access_type = access_type
|
|
185
|
+
end
|
|
186
|
+
|
|
123
187
|
# Checks equality by comparing each attribute.
|
|
124
188
|
# @param [Object] Object to be compared
|
|
125
189
|
def ==(o)
|
|
@@ -129,7 +193,10 @@ module Repull
|
|
|
129
193
|
name == o.name &&
|
|
130
194
|
picture_url == o.picture_url &&
|
|
131
195
|
status == o.status &&
|
|
132
|
-
connected == o.connected
|
|
196
|
+
connected == o.connected &&
|
|
197
|
+
email == o.email &&
|
|
198
|
+
access_type == o.access_type &&
|
|
199
|
+
import == o.import
|
|
133
200
|
end
|
|
134
201
|
|
|
135
202
|
# @see the `==` method
|
|
@@ -141,7 +208,7 @@ module Repull
|
|
|
141
208
|
# Calculates hash code according to all attributes.
|
|
142
209
|
# @return [Integer] Hash code
|
|
143
210
|
def hash
|
|
144
|
-
[external_account_id, name, picture_url, status, connected].hash
|
|
211
|
+
[external_account_id, name, picture_url, status, connected, email, access_type, import].hash
|
|
145
212
|
end
|
|
146
213
|
|
|
147
214
|
# Builds the object from hash
|