repull 0.2.57 → 0.2.58
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 +137 -6
- data/lib/repull/models/app_connection_health.rb +301 -0
- data/lib/repull/models/app_connection_health_recent_errors_inner.rb +184 -0
- data/lib/repull/models/app_connection_health_writes_per_day_inner.rb +156 -0
- data/lib/repull/models/connect_provider.rb +2 -2
- data/lib/repull/models/connect_status.rb +1 -1
- data/lib/repull/models/connection.rb +81 -5
- data/lib/repull/models/create_connection_request.rb +10 -1
- data/lib/repull/models/create_connection_request_workspace.rb +203 -0
- data/lib/repull/models/create_price_labs_key201_response.rb +399 -0
- data/lib/repull/models/create_price_labs_key201_response_all_of_instructions.rb +159 -0
- data/lib/repull/models/create_price_labs_key_request.rb +207 -0
- data/lib/repull/models/get_price_labs_session_status200_response.rb +192 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +8 -0
- data/openapi/v1.json +354 -6
- metadata +10 -2
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Repull
|
|
17
|
+
class AppConnectionHealthRecentErrorsInner < ApiModelBase
|
|
18
|
+
attr_accessor :at
|
|
19
|
+
|
|
20
|
+
attr_accessor :method
|
|
21
|
+
|
|
22
|
+
attr_accessor :endpoint
|
|
23
|
+
|
|
24
|
+
attr_accessor :status_code
|
|
25
|
+
|
|
26
|
+
attr_accessor :message
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'at' => :'at',
|
|
32
|
+
:'method' => :'method',
|
|
33
|
+
:'endpoint' => :'endpoint',
|
|
34
|
+
:'status_code' => :'statusCode',
|
|
35
|
+
:'message' => :'message'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'at' => :'Time',
|
|
53
|
+
:'method' => :'String',
|
|
54
|
+
:'endpoint' => :'String',
|
|
55
|
+
:'status_code' => :'Integer',
|
|
56
|
+
:'message' => :'String'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
:'message'
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AppConnectionHealthRecentErrorsInner` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AppConnectionHealthRecentErrorsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
79
|
+
end
|
|
80
|
+
h[k.to_sym] = v
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'at')
|
|
84
|
+
self.at = attributes[:'at']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'method')
|
|
88
|
+
self.method = attributes[:'method']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'endpoint')
|
|
92
|
+
self.endpoint = attributes[:'endpoint']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'status_code')
|
|
96
|
+
self.status_code = attributes[:'status_code']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'message')
|
|
100
|
+
self.message = attributes[:'message']
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
105
|
+
# @return Array for valid properties with the reasons
|
|
106
|
+
def list_invalid_properties
|
|
107
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
108
|
+
invalid_properties = Array.new
|
|
109
|
+
invalid_properties
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Check to see if the all the properties in the model are valid
|
|
113
|
+
# @return true if the model is valid
|
|
114
|
+
def valid?
|
|
115
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
116
|
+
true
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Checks equality by comparing each attribute.
|
|
120
|
+
# @param [Object] Object to be compared
|
|
121
|
+
def ==(o)
|
|
122
|
+
return true if self.equal?(o)
|
|
123
|
+
self.class == o.class &&
|
|
124
|
+
at == o.at &&
|
|
125
|
+
method == o.method &&
|
|
126
|
+
endpoint == o.endpoint &&
|
|
127
|
+
status_code == o.status_code &&
|
|
128
|
+
message == o.message
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# @see the `==` method
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def eql?(o)
|
|
134
|
+
self == o
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Calculates hash code according to all attributes.
|
|
138
|
+
# @return [Integer] Hash code
|
|
139
|
+
def hash
|
|
140
|
+
[at, method, endpoint, status_code, message].hash
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Builds the object from hash
|
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
+
# @return [Object] Returns the model itself
|
|
146
|
+
def self.build_from_hash(attributes)
|
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
149
|
+
transformed_hash = {}
|
|
150
|
+
openapi_types.each_pair do |key, type|
|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = nil
|
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
154
|
+
# check to ensure the input is an array given that the attribute
|
|
155
|
+
# is documented as an array but the input is not
|
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
158
|
+
end
|
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
new(transformed_hash)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Returns the object in the form of hash
|
|
167
|
+
# @return [Hash] Returns the object in the form of hash
|
|
168
|
+
def to_hash
|
|
169
|
+
hash = {}
|
|
170
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
171
|
+
value = self.send(attr)
|
|
172
|
+
if value.nil?
|
|
173
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
174
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
hash[param] = _to_hash(value)
|
|
178
|
+
end
|
|
179
|
+
hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Repull
|
|
17
|
+
class AppConnectionHealthWritesPerDayInner < ApiModelBase
|
|
18
|
+
attr_accessor :date
|
|
19
|
+
|
|
20
|
+
attr_accessor :writes
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'date' => :'date',
|
|
26
|
+
:'writes' => :'writes'
|
|
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
|
+
:'date' => :'Date',
|
|
44
|
+
:'writes' => :'Integer'
|
|
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::AppConnectionHealthWritesPerDayInner` 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::AppConnectionHealthWritesPerDayInner`. 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?(:'date')
|
|
71
|
+
self.date = attributes[:'date']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'writes')
|
|
75
|
+
self.writes = attributes[:'writes']
|
|
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
|
+
date == o.date &&
|
|
100
|
+
writes == o.writes
|
|
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
|
+
[date, writes].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
|
|
@@ -21,10 +21,10 @@ module Repull
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :display_name
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# Category — OTAs are listing marketplaces; PMSes are property management systems; apps are tools that work on the workspace's data (PriceLabs).
|
|
25
25
|
attr_accessor :category
|
|
26
26
|
|
|
27
|
-
# How the host is connected. `oauth`: provider-side consent screen. `credentials`: hosted form collects API keys. `activation`: push-only handshake. `claim`: connectivity-provider designation in the channel's Extranet (Booking.com). `extranet`: the host signs in with their Booking.com Extranet user.
|
|
27
|
+
# How the host is connected. `oauth`: provider-side consent screen. `credentials`: hosted form collects API keys. `activation`: push-only handshake. `claim`: connectivity-provider designation in the channel's Extranet (Booking.com). `extranet`: the host signs in with their Booking.com Extranet user. `key`: an app — the hosted page shows a key the host pastes into the app, and the session completes on the app's first call.
|
|
28
28
|
attr_accessor :connect_pattern
|
|
29
29
|
|
|
30
30
|
# Pickers should hide / disable `coming-soon` cards. `beta` cards are clickable but show a Beta pill. `request-only` is a PMS Repull doesn't connect yet, listed only with `includeRequestOnly`: picking it collects the host's access details for the Repull team, and the session ends as `requested` instead of connecting.
|
|
@@ -39,7 +39,7 @@ module Repull
|
|
|
39
39
|
# Host metadata, populated for Airbnb when the host row exists. Null for other providers (per-provider enrichment is incremental).
|
|
40
40
|
attr_accessor :host
|
|
41
41
|
|
|
42
|
-
# One entry per connected account, for every provider: Airbnb, every host account connected (including ones since disconnected), each with its own `accessType`; Booking.com, every hotel (`externalAccountId` is the hotel id); Vrbo, every sign-in; Booking.com Extranet, every hotel login; a PMS, its one account. Pass `externalAccountId` as `accountId` to `DELETE /v1/connect/{provider}` to disconnect one. The top-level fields describe one record and stay for existing integrations; show `accounts[]` to list what is connected. Vrbo sign-ins also carry `accessType` and `import` (a `VrboImportStatus`), with a top-level `dataFreshness` on `GET /v1/connect/vrbo-login`.
|
|
42
|
+
# One entry per connected account, for every provider: Airbnb, every host account connected (including ones since disconnected), each with its own `accessType`; Booking.com, every hotel (`externalAccountId` is the hotel id); Vrbo, every sign-in; Booking.com Extranet, every hotel login; a PMS, its one account; PriceLabs (an app), every key, each a connection with its `health` (see `Connection`). Pass `externalAccountId` as `accountId` to `DELETE /v1/connect/{provider}` to disconnect one. The top-level fields describe one record and stay for existing integrations; show `accounts[]` to list what is connected. Vrbo sign-ins also carry `accessType` and `import` (a `VrboImportStatus`), with a top-level `dataFreshness` on `GET /v1/connect/vrbo-login`.
|
|
43
43
|
attr_accessor :accounts
|
|
44
44
|
|
|
45
45
|
# PMS connections only: what the app may change in the PMS. Change it with `PATCH /v1/connect/{provider}/write-policy`.
|
|
@@ -42,6 +42,27 @@ module Repull
|
|
|
42
42
|
# The account's latest import — `status: running` while the first sync (or a later one) is going, then `completed` or `failed`. `null` when no import has been recorded. The same run is announced by the `account.import.*` webhooks; the history is on `GET /v1/connections/{id}/imports`.
|
|
43
43
|
attr_accessor :import
|
|
44
44
|
|
|
45
|
+
# Apps (`pricelabs`) only. `workspace`: every listing of the workspace, including listings added later. `listings`: only `listingIds`.
|
|
46
|
+
attr_accessor :scope
|
|
47
|
+
|
|
48
|
+
# Apps only: the listings a `listings`-scoped connection covers; `null` for `workspace`.
|
|
49
|
+
attr_accessor :listing_ids
|
|
50
|
+
|
|
51
|
+
# Apps only: listings the connection covers now.
|
|
52
|
+
attr_accessor :listing_count
|
|
53
|
+
|
|
54
|
+
# Apps only: the key the app uses, masked. The key itself is shown once, when created.
|
|
55
|
+
attr_accessor :key_masked
|
|
56
|
+
|
|
57
|
+
# Apps only: the name given to the key.
|
|
58
|
+
attr_accessor :label
|
|
59
|
+
|
|
60
|
+
# Apps only: when the connection was revoked.
|
|
61
|
+
attr_accessor :disconnected_at
|
|
62
|
+
|
|
63
|
+
# Apps only: how the app is doing on this connection. `null` once disconnected.
|
|
64
|
+
attr_accessor :health
|
|
65
|
+
|
|
45
66
|
class EnumAttributeValidator
|
|
46
67
|
attr_reader :datatype
|
|
47
68
|
attr_reader :allowable_values
|
|
@@ -76,7 +97,14 @@ module Repull
|
|
|
76
97
|
:'host' => :'host',
|
|
77
98
|
:'action' => :'action',
|
|
78
99
|
:'fix_url' => :'fixUrl',
|
|
79
|
-
:'import' => :'import'
|
|
100
|
+
:'import' => :'import',
|
|
101
|
+
:'scope' => :'scope',
|
|
102
|
+
:'listing_ids' => :'listingIds',
|
|
103
|
+
:'listing_count' => :'listingCount',
|
|
104
|
+
:'key_masked' => :'keyMasked',
|
|
105
|
+
:'label' => :'label',
|
|
106
|
+
:'disconnected_at' => :'disconnectedAt',
|
|
107
|
+
:'health' => :'health'
|
|
80
108
|
}
|
|
81
109
|
end
|
|
82
110
|
|
|
@@ -102,7 +130,14 @@ module Repull
|
|
|
102
130
|
:'host' => :'ConnectHost',
|
|
103
131
|
:'action' => :'ConnectionAction',
|
|
104
132
|
:'fix_url' => :'String',
|
|
105
|
-
:'import' => :'AccountImport'
|
|
133
|
+
:'import' => :'AccountImport',
|
|
134
|
+
:'scope' => :'String',
|
|
135
|
+
:'listing_ids' => :'Array<String>',
|
|
136
|
+
:'listing_count' => :'Integer',
|
|
137
|
+
:'key_masked' => :'String',
|
|
138
|
+
:'label' => :'String',
|
|
139
|
+
:'disconnected_at' => :'Time',
|
|
140
|
+
:'health' => :'AppConnectionHealth'
|
|
106
141
|
}
|
|
107
142
|
end
|
|
108
143
|
|
|
@@ -114,7 +149,11 @@ module Repull
|
|
|
114
149
|
:'host',
|
|
115
150
|
:'action',
|
|
116
151
|
:'fix_url',
|
|
117
|
-
:'import'
|
|
152
|
+
:'import',
|
|
153
|
+
:'listing_ids',
|
|
154
|
+
:'label',
|
|
155
|
+
:'disconnected_at',
|
|
156
|
+
:'health'
|
|
118
157
|
])
|
|
119
158
|
end
|
|
120
159
|
|
|
@@ -173,6 +212,36 @@ module Repull
|
|
|
173
212
|
if attributes.key?(:'import')
|
|
174
213
|
self.import = attributes[:'import']
|
|
175
214
|
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'scope')
|
|
217
|
+
self.scope = attributes[:'scope']
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if attributes.key?(:'listing_ids')
|
|
221
|
+
if (value = attributes[:'listing_ids']).is_a?(Array)
|
|
222
|
+
self.listing_ids = value
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if attributes.key?(:'listing_count')
|
|
227
|
+
self.listing_count = attributes[:'listing_count']
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'key_masked')
|
|
231
|
+
self.key_masked = attributes[:'key_masked']
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if attributes.key?(:'label')
|
|
235
|
+
self.label = attributes[:'label']
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attributes.key?(:'disconnected_at')
|
|
239
|
+
self.disconnected_at = attributes[:'disconnected_at']
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'health')
|
|
243
|
+
self.health = attributes[:'health']
|
|
244
|
+
end
|
|
176
245
|
end
|
|
177
246
|
|
|
178
247
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -204,7 +273,14 @@ module Repull
|
|
|
204
273
|
host == o.host &&
|
|
205
274
|
action == o.action &&
|
|
206
275
|
fix_url == o.fix_url &&
|
|
207
|
-
import == o.import
|
|
276
|
+
import == o.import &&
|
|
277
|
+
scope == o.scope &&
|
|
278
|
+
listing_ids == o.listing_ids &&
|
|
279
|
+
listing_count == o.listing_count &&
|
|
280
|
+
key_masked == o.key_masked &&
|
|
281
|
+
label == o.label &&
|
|
282
|
+
disconnected_at == o.disconnected_at &&
|
|
283
|
+
health == o.health
|
|
208
284
|
end
|
|
209
285
|
|
|
210
286
|
# @see the `==` method
|
|
@@ -216,7 +292,7 @@ module Repull
|
|
|
216
292
|
# Calculates hash code according to all attributes.
|
|
217
293
|
# @return [Integer] Hash code
|
|
218
294
|
def hash
|
|
219
|
-
[id, provider, status, external_account_id, access_type, created_at, host, action, fix_url, import].hash
|
|
295
|
+
[id, provider, status, external_account_id, access_type, created_at, host, action, fix_url, import, scope, listing_ids, listing_count, key_masked, label, disconnected_at, health].hash
|
|
220
296
|
end
|
|
221
297
|
|
|
222
298
|
# Builds the object from hash
|
|
@@ -28,6 +28,8 @@ module Repull
|
|
|
28
28
|
# Airbnb + Booking.com — your own correlation token, e.g. your user id (at most 500 characters). Echoed on the redirect back (`&state=`) and in the `connect.session.completed` webhook.
|
|
29
29
|
attr_accessor :state
|
|
30
30
|
|
|
31
|
+
attr_accessor :workspace
|
|
32
|
+
|
|
31
33
|
# Airbnb and Booking.com — optional UI language for the hosted Connect pages. Accepts any supported locale code (currently `en`, `fr`, `de`, `es`, `it`, `nl`); unknown codes are ignored and resolution falls back to the workspace `default_language`, then `Accept-Language`, then `en`.
|
|
32
34
|
attr_accessor :locale
|
|
33
35
|
|
|
@@ -60,6 +62,7 @@ module Repull
|
|
|
60
62
|
:'access_type' => :'accessType',
|
|
61
63
|
:'reservation_history_months' => :'reservationHistoryMonths',
|
|
62
64
|
:'state' => :'state',
|
|
65
|
+
:'workspace' => :'workspace',
|
|
63
66
|
:'locale' => :'locale'
|
|
64
67
|
}
|
|
65
68
|
end
|
|
@@ -81,6 +84,7 @@ module Repull
|
|
|
81
84
|
:'access_type' => :'String',
|
|
82
85
|
:'reservation_history_months' => :'Integer',
|
|
83
86
|
:'state' => :'String',
|
|
87
|
+
:'workspace' => :'CreateConnectionRequestWorkspace',
|
|
84
88
|
:'locale' => :'String'
|
|
85
89
|
}
|
|
86
90
|
end
|
|
@@ -126,6 +130,10 @@ module Repull
|
|
|
126
130
|
self.state = attributes[:'state']
|
|
127
131
|
end
|
|
128
132
|
|
|
133
|
+
if attributes.key?(:'workspace')
|
|
134
|
+
self.workspace = attributes[:'workspace']
|
|
135
|
+
end
|
|
136
|
+
|
|
129
137
|
if attributes.key?(:'locale')
|
|
130
138
|
self.locale = attributes[:'locale']
|
|
131
139
|
end
|
|
@@ -195,6 +203,7 @@ module Repull
|
|
|
195
203
|
access_type == o.access_type &&
|
|
196
204
|
reservation_history_months == o.reservation_history_months &&
|
|
197
205
|
state == o.state &&
|
|
206
|
+
workspace == o.workspace &&
|
|
198
207
|
locale == o.locale
|
|
199
208
|
end
|
|
200
209
|
|
|
@@ -207,7 +216,7 @@ module Repull
|
|
|
207
216
|
# Calculates hash code according to all attributes.
|
|
208
217
|
# @return [Integer] Hash code
|
|
209
218
|
def hash
|
|
210
|
-
[redirect_url, access_type, reservation_history_months, state, locale].hash
|
|
219
|
+
[redirect_url, access_type, reservation_history_months, state, workspace, locale].hash
|
|
211
220
|
end
|
|
212
221
|
|
|
213
222
|
# Builds the object from hash
|