repull 0.2.40 → 0.2.41
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/models/airbnb_access.rb +179 -0
- data/lib/repull/models/airbnb_access_accounts_inner.rb +268 -0
- data/lib/repull/models/conversation.rb +12 -1
- data/lib/repull/models/conversation_detail.rb +12 -1
- data/lib/repull/models/listing.rb +11 -1
- data/lib/repull/models/send_message_request.rb +32 -1
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +2 -0
- data/openapi/v1.json +86 -1
- data/scripts/regen.sh +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b161df1a676b2c2822685ae6e4ccc32ee62df5117dfefca311c6767a83ac14a
|
|
4
|
+
data.tar.gz: '0592ec0359f211a31f4545c336439ce3150d5cfe4df1f84f4e4a98c11f6ab858'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e655b78f70916ade2b2499135fd51974fed83bd4bfd5c8a6fe491be79dc5449182d7fd35c4559357ec2795146e0e6cc988744a5ccfab95449859e28ee2c2f288
|
|
7
|
+
data.tar.gz: e713c78ba5e30944635817330dff6ded69d27872f6e9f7bb1eb33669ce73c10c16f546731cef0e248d09e77df14ad48e106e12a23399b445d677aa9ccb33afc7
|
|
@@ -0,0 +1,179 @@
|
|
|
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
|
+
class AirbnbAccess < ApiModelBase
|
|
18
|
+
# The account that acts when none is named: the conversation's own account while connected, else the listing's owner, else a connected co-host. Null when none is connected.
|
|
19
|
+
attr_accessor :default_account
|
|
20
|
+
|
|
21
|
+
attr_accessor :accounts
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'default_account' => :'defaultAccount',
|
|
27
|
+
:'accounts' => :'accounts'
|
|
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
|
+
:'default_account' => :'String',
|
|
45
|
+
:'accounts' => :'Array<AirbnbAccessAccountsInner>'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
:'default_account',
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AirbnbAccess` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AirbnbAccess`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'default_account')
|
|
73
|
+
self.default_account = attributes[:'default_account']
|
|
74
|
+
else
|
|
75
|
+
self.default_account = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'accounts')
|
|
79
|
+
if (value = attributes[:'accounts']).is_a?(Array)
|
|
80
|
+
self.accounts = value
|
|
81
|
+
end
|
|
82
|
+
else
|
|
83
|
+
self.accounts = nil
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
88
|
+
# @return Array for valid properties with the reasons
|
|
89
|
+
def list_invalid_properties
|
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
91
|
+
invalid_properties = Array.new
|
|
92
|
+
if @accounts.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "accounts", accounts cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
return false if @accounts.nil?
|
|
104
|
+
true
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Custom attribute writer method with validation
|
|
108
|
+
# @param [Object] accounts Value to be assigned
|
|
109
|
+
def accounts=(accounts)
|
|
110
|
+
if accounts.nil?
|
|
111
|
+
fail ArgumentError, 'accounts cannot be nil'
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
@accounts = accounts
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Checks equality by comparing each attribute.
|
|
118
|
+
# @param [Object] Object to be compared
|
|
119
|
+
def ==(o)
|
|
120
|
+
return true if self.equal?(o)
|
|
121
|
+
self.class == o.class &&
|
|
122
|
+
default_account == o.default_account &&
|
|
123
|
+
accounts == o.accounts
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# @see the `==` method
|
|
127
|
+
# @param [Object] Object to be compared
|
|
128
|
+
def eql?(o)
|
|
129
|
+
self == o
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Calculates hash code according to all attributes.
|
|
133
|
+
# @return [Integer] Hash code
|
|
134
|
+
def hash
|
|
135
|
+
[default_account, accounts].hash
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Builds the object from hash
|
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
140
|
+
# @return [Object] Returns the model itself
|
|
141
|
+
def self.build_from_hash(attributes)
|
|
142
|
+
return nil unless attributes.is_a?(Hash)
|
|
143
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
144
|
+
transformed_hash = {}
|
|
145
|
+
openapi_types.each_pair do |key, type|
|
|
146
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
147
|
+
transformed_hash["#{key}"] = nil
|
|
148
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
149
|
+
# check to ensure the input is an array given that the attribute
|
|
150
|
+
# is documented as an array but the input is not
|
|
151
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
152
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
153
|
+
end
|
|
154
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
155
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
new(transformed_hash)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Returns the object in the form of hash
|
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
|
163
|
+
def to_hash
|
|
164
|
+
hash = {}
|
|
165
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
166
|
+
value = self.send(attr)
|
|
167
|
+
if value.nil?
|
|
168
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
169
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
hash[param] = _to_hash(value)
|
|
173
|
+
end
|
|
174
|
+
hash
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
end
|
|
@@ -0,0 +1,268 @@
|
|
|
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
|
+
class AirbnbAccessAccountsInner < ApiModelBase
|
|
18
|
+
# What `account` on a send takes.
|
|
19
|
+
attr_accessor :account
|
|
20
|
+
|
|
21
|
+
attr_accessor :name
|
|
22
|
+
|
|
23
|
+
attr_accessor :role
|
|
24
|
+
|
|
25
|
+
# `connected` can act now; `disconnected` was connected to this workspace; `never_connected` is on the listing but was never connected here.
|
|
26
|
+
attr_accessor :state
|
|
27
|
+
|
|
28
|
+
attr_accessor :disconnected_at
|
|
29
|
+
|
|
30
|
+
class EnumAttributeValidator
|
|
31
|
+
attr_reader :datatype
|
|
32
|
+
attr_reader :allowable_values
|
|
33
|
+
|
|
34
|
+
def initialize(datatype, allowable_values)
|
|
35
|
+
@allowable_values = allowable_values.map do |value|
|
|
36
|
+
case datatype.to_s
|
|
37
|
+
when /Integer/i
|
|
38
|
+
value.to_i
|
|
39
|
+
when /Float/i
|
|
40
|
+
value.to_f
|
|
41
|
+
else
|
|
42
|
+
value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def valid?(value)
|
|
48
|
+
!value || allowable_values.include?(value)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
|
+
def self.attribute_map
|
|
54
|
+
{
|
|
55
|
+
:'account' => :'account',
|
|
56
|
+
:'name' => :'name',
|
|
57
|
+
:'role' => :'role',
|
|
58
|
+
:'state' => :'state',
|
|
59
|
+
:'disconnected_at' => :'disconnectedAt'
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns attribute mapping this model knows about
|
|
64
|
+
def self.acceptable_attribute_map
|
|
65
|
+
attribute_map
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns all the JSON keys this model knows about
|
|
69
|
+
def self.acceptable_attributes
|
|
70
|
+
acceptable_attribute_map.values
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Attribute type mapping.
|
|
74
|
+
def self.openapi_types
|
|
75
|
+
{
|
|
76
|
+
:'account' => :'String',
|
|
77
|
+
:'name' => :'String',
|
|
78
|
+
:'role' => :'String',
|
|
79
|
+
:'state' => :'String',
|
|
80
|
+
:'disconnected_at' => :'Time'
|
|
81
|
+
}
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# List of attributes with nullable: true
|
|
85
|
+
def self.openapi_nullable
|
|
86
|
+
Set.new([
|
|
87
|
+
:'name',
|
|
88
|
+
:'disconnected_at'
|
|
89
|
+
])
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Initializes the object
|
|
93
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
94
|
+
def initialize(attributes = {})
|
|
95
|
+
if (!attributes.is_a?(Hash))
|
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AirbnbAccessAccountsInner` initialize method"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
100
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
101
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
102
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
103
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AirbnbAccessAccountsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
104
|
+
end
|
|
105
|
+
h[k.to_sym] = v
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'account')
|
|
109
|
+
self.account = attributes[:'account']
|
|
110
|
+
else
|
|
111
|
+
self.account = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'name')
|
|
115
|
+
self.name = attributes[:'name']
|
|
116
|
+
else
|
|
117
|
+
self.name = nil
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'role')
|
|
121
|
+
self.role = attributes[:'role']
|
|
122
|
+
else
|
|
123
|
+
self.role = nil
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'state')
|
|
127
|
+
self.state = attributes[:'state']
|
|
128
|
+
else
|
|
129
|
+
self.state = nil
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'disconnected_at')
|
|
133
|
+
self.disconnected_at = attributes[:'disconnected_at']
|
|
134
|
+
else
|
|
135
|
+
self.disconnected_at = nil
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
140
|
+
# @return Array for valid properties with the reasons
|
|
141
|
+
def list_invalid_properties
|
|
142
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
143
|
+
invalid_properties = Array.new
|
|
144
|
+
if @account.nil?
|
|
145
|
+
invalid_properties.push('invalid value for "account", account cannot be nil.')
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if @role.nil?
|
|
149
|
+
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if @state.nil?
|
|
153
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
invalid_properties
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Check to see if the all the properties in the model are valid
|
|
160
|
+
# @return true if the model is valid
|
|
161
|
+
def valid?
|
|
162
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
163
|
+
return false if @account.nil?
|
|
164
|
+
return false if @role.nil?
|
|
165
|
+
role_validator = EnumAttributeValidator.new('String', ["owner", "cohost", "unknown"])
|
|
166
|
+
return false unless role_validator.valid?(@role)
|
|
167
|
+
return false if @state.nil?
|
|
168
|
+
state_validator = EnumAttributeValidator.new('String', ["connected", "disconnected", "never_connected"])
|
|
169
|
+
return false unless state_validator.valid?(@state)
|
|
170
|
+
true
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] account Value to be assigned
|
|
175
|
+
def account=(account)
|
|
176
|
+
if account.nil?
|
|
177
|
+
fail ArgumentError, 'account cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
@account = account
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
184
|
+
# @param [Object] role Object to be assigned
|
|
185
|
+
def role=(role)
|
|
186
|
+
validator = EnumAttributeValidator.new('String', ["owner", "cohost", "unknown"])
|
|
187
|
+
unless validator.valid?(role)
|
|
188
|
+
fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
|
|
189
|
+
end
|
|
190
|
+
@role = role
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
194
|
+
# @param [Object] state Object to be assigned
|
|
195
|
+
def state=(state)
|
|
196
|
+
validator = EnumAttributeValidator.new('String', ["connected", "disconnected", "never_connected"])
|
|
197
|
+
unless validator.valid?(state)
|
|
198
|
+
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
199
|
+
end
|
|
200
|
+
@state = state
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Checks equality by comparing each attribute.
|
|
204
|
+
# @param [Object] Object to be compared
|
|
205
|
+
def ==(o)
|
|
206
|
+
return true if self.equal?(o)
|
|
207
|
+
self.class == o.class &&
|
|
208
|
+
account == o.account &&
|
|
209
|
+
name == o.name &&
|
|
210
|
+
role == o.role &&
|
|
211
|
+
state == o.state &&
|
|
212
|
+
disconnected_at == o.disconnected_at
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# @see the `==` method
|
|
216
|
+
# @param [Object] Object to be compared
|
|
217
|
+
def eql?(o)
|
|
218
|
+
self == o
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Calculates hash code according to all attributes.
|
|
222
|
+
# @return [Integer] Hash code
|
|
223
|
+
def hash
|
|
224
|
+
[account, name, role, state, disconnected_at].hash
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Builds the object from hash
|
|
228
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
229
|
+
# @return [Object] Returns the model itself
|
|
230
|
+
def self.build_from_hash(attributes)
|
|
231
|
+
return nil unless attributes.is_a?(Hash)
|
|
232
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
233
|
+
transformed_hash = {}
|
|
234
|
+
openapi_types.each_pair do |key, type|
|
|
235
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
236
|
+
transformed_hash["#{key}"] = nil
|
|
237
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
238
|
+
# check to ensure the input is an array given that the attribute
|
|
239
|
+
# is documented as an array but the input is not
|
|
240
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
241
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
242
|
+
end
|
|
243
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
244
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
new(transformed_hash)
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Returns the object in the form of hash
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_hash
|
|
253
|
+
hash = {}
|
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
255
|
+
value = self.send(attr)
|
|
256
|
+
if value.nil?
|
|
257
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
258
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
hash[param] = _to_hash(value)
|
|
262
|
+
end
|
|
263
|
+
hash
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
@@ -19,6 +19,9 @@ module Repull
|
|
|
19
19
|
# The connected account this conversation belongs to, the same block as the message webhooks. On the list and on `GET /v1/conversations/{id}`.
|
|
20
20
|
attr_accessor :account
|
|
21
21
|
|
|
22
|
+
# Airbnb conversations, on `GET /v1/conversations/{id}`: every account on the listing (owner and co-hosts) with its state, and `defaultAccount` — the one a send uses when `account` is not given. Pass any connected one as `account` on `POST /v1/conversations/{id}/messages` to send as it.
|
|
23
|
+
attr_accessor :airbnb_access
|
|
24
|
+
|
|
22
25
|
attr_accessor :id
|
|
23
26
|
|
|
24
27
|
attr_accessor :platform
|
|
@@ -53,6 +56,7 @@ module Repull
|
|
|
53
56
|
def self.attribute_map
|
|
54
57
|
{
|
|
55
58
|
:'account' => :'account',
|
|
59
|
+
:'airbnb_access' => :'airbnbAccess',
|
|
56
60
|
:'id' => :'id',
|
|
57
61
|
:'platform' => :'platform',
|
|
58
62
|
:'external_thread_id' => :'externalThreadId',
|
|
@@ -83,6 +87,7 @@ module Repull
|
|
|
83
87
|
def self.openapi_types
|
|
84
88
|
{
|
|
85
89
|
:'account' => :'RecordAccount',
|
|
90
|
+
:'airbnb_access' => :'AirbnbAccess',
|
|
86
91
|
:'id' => :'String',
|
|
87
92
|
:'platform' => :'String',
|
|
88
93
|
:'external_thread_id' => :'String',
|
|
@@ -103,6 +108,7 @@ module Repull
|
|
|
103
108
|
def self.openapi_nullable
|
|
104
109
|
Set.new([
|
|
105
110
|
:'account',
|
|
111
|
+
:'airbnb_access',
|
|
106
112
|
:'platform',
|
|
107
113
|
:'external_thread_id',
|
|
108
114
|
:'guest_id',
|
|
@@ -134,6 +140,10 @@ module Repull
|
|
|
134
140
|
self.account = attributes[:'account']
|
|
135
141
|
end
|
|
136
142
|
|
|
143
|
+
if attributes.key?(:'airbnb_access')
|
|
144
|
+
self.airbnb_access = attributes[:'airbnb_access']
|
|
145
|
+
end
|
|
146
|
+
|
|
137
147
|
if attributes.key?(:'id')
|
|
138
148
|
self.id = attributes[:'id']
|
|
139
149
|
end
|
|
@@ -208,6 +218,7 @@ module Repull
|
|
|
208
218
|
return true if self.equal?(o)
|
|
209
219
|
self.class == o.class &&
|
|
210
220
|
account == o.account &&
|
|
221
|
+
airbnb_access == o.airbnb_access &&
|
|
211
222
|
id == o.id &&
|
|
212
223
|
platform == o.platform &&
|
|
213
224
|
external_thread_id == o.external_thread_id &&
|
|
@@ -232,7 +243,7 @@ module Repull
|
|
|
232
243
|
# Calculates hash code according to all attributes.
|
|
233
244
|
# @return [Integer] Hash code
|
|
234
245
|
def hash
|
|
235
|
-
[account, id, platform, external_thread_id, guest_id, listing_id, reservation_id, subject, last_message_at, last_message_preview, unread_count, status, created_at, updated_at].hash
|
|
246
|
+
[account, airbnb_access, id, platform, external_thread_id, guest_id, listing_id, reservation_id, subject, last_message_at, last_message_preview, unread_count, status, created_at, updated_at].hash
|
|
236
247
|
end
|
|
237
248
|
|
|
238
249
|
# Builds the object from hash
|
|
@@ -19,6 +19,9 @@ module Repull
|
|
|
19
19
|
# The connected account this conversation belongs to, the same block as the message webhooks. On the list and on `GET /v1/conversations/{id}`.
|
|
20
20
|
attr_accessor :account
|
|
21
21
|
|
|
22
|
+
# Airbnb conversations, on `GET /v1/conversations/{id}`: every account on the listing (owner and co-hosts) with its state, and `defaultAccount` — the one a send uses when `account` is not given. Pass any connected one as `account` on `POST /v1/conversations/{id}/messages` to send as it.
|
|
23
|
+
attr_accessor :airbnb_access
|
|
24
|
+
|
|
22
25
|
attr_accessor :id
|
|
23
26
|
|
|
24
27
|
attr_accessor :platform
|
|
@@ -59,6 +62,7 @@ module Repull
|
|
|
59
62
|
def self.attribute_map
|
|
60
63
|
{
|
|
61
64
|
:'account' => :'account',
|
|
65
|
+
:'airbnb_access' => :'airbnbAccess',
|
|
62
66
|
:'id' => :'id',
|
|
63
67
|
:'platform' => :'platform',
|
|
64
68
|
:'external_thread_id' => :'externalThreadId',
|
|
@@ -92,6 +96,7 @@ module Repull
|
|
|
92
96
|
def self.openapi_types
|
|
93
97
|
{
|
|
94
98
|
:'account' => :'RecordAccount',
|
|
99
|
+
:'airbnb_access' => :'AirbnbAccess',
|
|
95
100
|
:'id' => :'String',
|
|
96
101
|
:'platform' => :'String',
|
|
97
102
|
:'external_thread_id' => :'String',
|
|
@@ -115,6 +120,7 @@ module Repull
|
|
|
115
120
|
def self.openapi_nullable
|
|
116
121
|
Set.new([
|
|
117
122
|
:'account',
|
|
123
|
+
:'airbnb_access',
|
|
118
124
|
:'platform',
|
|
119
125
|
:'external_thread_id',
|
|
120
126
|
:'guest_id',
|
|
@@ -155,6 +161,10 @@ module Repull
|
|
|
155
161
|
self.account = attributes[:'account']
|
|
156
162
|
end
|
|
157
163
|
|
|
164
|
+
if attributes.key?(:'airbnb_access')
|
|
165
|
+
self.airbnb_access = attributes[:'airbnb_access']
|
|
166
|
+
end
|
|
167
|
+
|
|
158
168
|
if attributes.key?(:'id')
|
|
159
169
|
self.id = attributes[:'id']
|
|
160
170
|
end
|
|
@@ -241,6 +251,7 @@ module Repull
|
|
|
241
251
|
return true if self.equal?(o)
|
|
242
252
|
self.class == o.class &&
|
|
243
253
|
account == o.account &&
|
|
254
|
+
airbnb_access == o.airbnb_access &&
|
|
244
255
|
id == o.id &&
|
|
245
256
|
platform == o.platform &&
|
|
246
257
|
external_thread_id == o.external_thread_id &&
|
|
@@ -268,7 +279,7 @@ module Repull
|
|
|
268
279
|
# Calculates hash code according to all attributes.
|
|
269
280
|
# @return [Integer] Hash code
|
|
270
281
|
def hash
|
|
271
|
-
[account, id, platform, external_thread_id, guest_id, listing_id, reservation_id, subject, last_message_at, last_message_preview, unread_count, status, created_at, updated_at, host, guest, capabilities].hash
|
|
282
|
+
[account, airbnb_access, id, platform, external_thread_id, guest_id, listing_id, reservation_id, subject, last_message_at, last_message_preview, unread_count, status, created_at, updated_at, host, guest, capabilities].hash
|
|
272
283
|
end
|
|
273
284
|
|
|
274
285
|
# Builds the object from hash
|
|
@@ -56,6 +56,9 @@ module Repull
|
|
|
56
56
|
# Channels (Airbnb, Booking, VRBO, etc.) the listing is connected to.
|
|
57
57
|
attr_accessor :channels
|
|
58
58
|
|
|
59
|
+
# Airbnb listings: every account on the listing (owner and co-hosts), whether each is connected, and which one acts by default. `defaultAccount: null` means no connected account can reach the listing — connect one of `accounts`.
|
|
60
|
+
attr_accessor :airbnb_access
|
|
61
|
+
|
|
59
62
|
# Amenity rows for the listing. **Only present when the caller passes `?include=amenities`.** Empty array (`[]`) when the listing has no amenity rows.
|
|
60
63
|
attr_accessor :amenities
|
|
61
64
|
|
|
@@ -108,6 +111,7 @@ module Repull
|
|
|
108
111
|
:'thumbnail_url' => :'thumbnailUrl',
|
|
109
112
|
:'status' => :'status',
|
|
110
113
|
:'channels' => :'channels',
|
|
114
|
+
:'airbnb_access' => :'airbnbAccess',
|
|
111
115
|
:'amenities' => :'amenities',
|
|
112
116
|
:'content' => :'content',
|
|
113
117
|
:'details' => :'details',
|
|
@@ -151,6 +155,7 @@ module Repull
|
|
|
151
155
|
:'thumbnail_url' => :'String',
|
|
152
156
|
:'status' => :'String',
|
|
153
157
|
:'channels' => :'Array<ListingChannel>',
|
|
158
|
+
:'airbnb_access' => :'AirbnbAccess',
|
|
154
159
|
:'amenities' => :'Array<ListingAmenity>',
|
|
155
160
|
:'content' => :'ListingContent',
|
|
156
161
|
:'details' => :'ListingDetails',
|
|
@@ -263,6 +268,10 @@ module Repull
|
|
|
263
268
|
end
|
|
264
269
|
end
|
|
265
270
|
|
|
271
|
+
if attributes.key?(:'airbnb_access')
|
|
272
|
+
self.airbnb_access = attributes[:'airbnb_access']
|
|
273
|
+
end
|
|
274
|
+
|
|
266
275
|
if attributes.key?(:'amenities')
|
|
267
276
|
if (value = attributes[:'amenities']).is_a?(Array)
|
|
268
277
|
self.amenities = value
|
|
@@ -376,6 +385,7 @@ module Repull
|
|
|
376
385
|
thumbnail_url == o.thumbnail_url &&
|
|
377
386
|
status == o.status &&
|
|
378
387
|
channels == o.channels &&
|
|
388
|
+
airbnb_access == o.airbnb_access &&
|
|
379
389
|
amenities == o.amenities &&
|
|
380
390
|
content == o.content &&
|
|
381
391
|
details == o.details &&
|
|
@@ -399,7 +409,7 @@ module Repull
|
|
|
399
409
|
# Calculates hash code according to all attributes.
|
|
400
410
|
# @return [Integer] Hash code
|
|
401
411
|
def hash
|
|
402
|
-
[capabilities, kind, parent, hotel, unit_count, units, id, name, public_name, address, latitude, longitude, thumbnail_url, status, channels, amenities, content, details, rooms, policies, rules, pricing, fees, taxes, photos, created_at, updated_at].hash
|
|
412
|
+
[capabilities, kind, parent, hotel, unit_count, units, id, name, public_name, address, latitude, longitude, thumbnail_url, status, channels, airbnb_access, amenities, content, details, rooms, policies, rules, pricing, fees, taxes, photos, created_at, updated_at].hash
|
|
403
413
|
end
|
|
404
414
|
|
|
405
415
|
# Builds the object from hash
|
|
@@ -22,6 +22,9 @@ module Repull
|
|
|
22
22
|
# Force a channel. Omit to send on whichever channel the conversation already uses, which is the right default. One of `airbnb`, `booking`, `vrbo`, `sms`, `email`, `website` — except on a conversation a connected PMS relays (Guesty, Hostaway, …), where the message is sent through the PMS and `channel` is passed to it: the PMS's own channel/module name (Guesty `airbnb2`, `bookingCom`, `email`, `sms`, …) or one of Repull's names, which the PMS maps. A PMS that cannot choose a channel returns `422 pms_write_unsupported`; `GET /v1/connect/{provider}` → `capabilities.pms.conversations.channelSelect` says so beforehand.
|
|
23
23
|
attr_accessor :channel
|
|
24
24
|
|
|
25
|
+
# Airbnb conversations: send as exactly this connected account — the listing's owner or one of its co-hosts — e.g. your team co-host. Never swapped for another account: if it is disconnected or not on the listing, nothing is sent and the error says why. Omit it and the conversation's own account sends while it is connected, otherwise the listing's owner, otherwise a connected co-host. Connected accounts are on `GET /v1/connect`.
|
|
26
|
+
attr_accessor :account
|
|
27
|
+
|
|
25
28
|
# Files to send. See the per-channel table above. On a conversation a connected PMS relays, files go through the PMS — `422 pms_write_unsupported` when its API cannot send them (`capabilities.pms.conversations.attachments` on `GET /v1/connect/{provider}`).
|
|
26
29
|
attr_accessor :attachments
|
|
27
30
|
|
|
@@ -30,6 +33,7 @@ module Repull
|
|
|
30
33
|
{
|
|
31
34
|
:'message' => :'message',
|
|
32
35
|
:'channel' => :'channel',
|
|
36
|
+
:'account' => :'account',
|
|
33
37
|
:'attachments' => :'attachments'
|
|
34
38
|
}
|
|
35
39
|
end
|
|
@@ -49,6 +53,7 @@ module Repull
|
|
|
49
53
|
{
|
|
50
54
|
:'message' => :'String',
|
|
51
55
|
:'channel' => :'String',
|
|
56
|
+
:'account' => :'String',
|
|
52
57
|
:'attachments' => :'Array<SendMessageAttachment>'
|
|
53
58
|
}
|
|
54
59
|
end
|
|
@@ -83,6 +88,10 @@ module Repull
|
|
|
83
88
|
self.channel = attributes[:'channel']
|
|
84
89
|
end
|
|
85
90
|
|
|
91
|
+
if attributes.key?(:'account')
|
|
92
|
+
self.account = attributes[:'account']
|
|
93
|
+
end
|
|
94
|
+
|
|
86
95
|
if attributes.key?(:'attachments')
|
|
87
96
|
if (value = attributes[:'attachments']).is_a?(Array)
|
|
88
97
|
self.attachments = value
|
|
@@ -99,6 +108,11 @@ module Repull
|
|
|
99
108
|
invalid_properties.push('invalid value for "message", the character length must be smaller than or equal to 4000.')
|
|
100
109
|
end
|
|
101
110
|
|
|
111
|
+
pattern = Regexp.new(/^airbnb:\d+$/)
|
|
112
|
+
if !@account.nil? && @account !~ pattern
|
|
113
|
+
invalid_properties.push("invalid value for \"account\", must conform to the pattern #{pattern}.")
|
|
114
|
+
end
|
|
115
|
+
|
|
102
116
|
if !@attachments.nil? && @attachments.length > 5
|
|
103
117
|
invalid_properties.push('invalid value for "attachments", number of items must be less than or equal to 5.')
|
|
104
118
|
end
|
|
@@ -115,6 +129,7 @@ module Repull
|
|
|
115
129
|
def valid?
|
|
116
130
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
117
131
|
return false if !@message.nil? && @message.to_s.length > 4000
|
|
132
|
+
return false if !@account.nil? && @account !~ Regexp.new(/^airbnb:\d+$/)
|
|
118
133
|
return false if !@attachments.nil? && @attachments.length > 5
|
|
119
134
|
return false if !@attachments.nil? && @attachments.length < 1
|
|
120
135
|
true
|
|
@@ -134,6 +149,21 @@ module Repull
|
|
|
134
149
|
@message = message
|
|
135
150
|
end
|
|
136
151
|
|
|
152
|
+
# Custom attribute writer method with validation
|
|
153
|
+
# @param [Object] account Value to be assigned
|
|
154
|
+
def account=(account)
|
|
155
|
+
if account.nil?
|
|
156
|
+
fail ArgumentError, 'account cannot be nil'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
pattern = Regexp.new(/^airbnb:\d+$/)
|
|
160
|
+
if account !~ pattern
|
|
161
|
+
fail ArgumentError, "invalid value for \"account\", must conform to the pattern #{pattern}."
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
@account = account
|
|
165
|
+
end
|
|
166
|
+
|
|
137
167
|
# Custom attribute writer method with validation
|
|
138
168
|
# @param [Object] attachments Value to be assigned
|
|
139
169
|
def attachments=(attachments)
|
|
@@ -159,6 +189,7 @@ module Repull
|
|
|
159
189
|
self.class == o.class &&
|
|
160
190
|
message == o.message &&
|
|
161
191
|
channel == o.channel &&
|
|
192
|
+
account == o.account &&
|
|
162
193
|
attachments == o.attachments
|
|
163
194
|
end
|
|
164
195
|
|
|
@@ -171,7 +202,7 @@ module Repull
|
|
|
171
202
|
# Calculates hash code according to all attributes.
|
|
172
203
|
# @return [Integer] Hash code
|
|
173
204
|
def hash
|
|
174
|
-
[message, channel, attachments].hash
|
|
205
|
+
[message, channel, account, attachments].hash
|
|
175
206
|
end
|
|
176
207
|
|
|
177
208
|
# Builds the object from hash
|
data/lib/repull/version.rb
CHANGED
data/lib/repull.rb
CHANGED
|
@@ -39,6 +39,8 @@ require 'repull/models/ai_operation_completed_payload'
|
|
|
39
39
|
require 'repull/models/ai_operation_failed_event'
|
|
40
40
|
require 'repull/models/ai_operation_failed_payload'
|
|
41
41
|
require 'repull/models/ai_operation_failed_payload_error'
|
|
42
|
+
require 'repull/models/airbnb_access'
|
|
43
|
+
require 'repull/models/airbnb_access_accounts_inner'
|
|
42
44
|
require 'repull/models/airbnb_account_freshness'
|
|
43
45
|
require 'repull/models/airbnb_alteration'
|
|
44
46
|
require 'repull/models/airbnb_alteration_create_request'
|
data/openapi/v1.json
CHANGED
|
@@ -1235,6 +1235,15 @@
|
|
|
1235
1235
|
],
|
|
1236
1236
|
"description": "The connected account this conversation belongs to, the same block as the message webhooks. On the list and on `GET /v1/conversations/{id}`."
|
|
1237
1237
|
},
|
|
1238
|
+
"airbnbAccess": {
|
|
1239
|
+
"allOf": [
|
|
1240
|
+
{
|
|
1241
|
+
"$ref": "#/components/schemas/AirbnbAccess"
|
|
1242
|
+
}
|
|
1243
|
+
],
|
|
1244
|
+
"nullable": true,
|
|
1245
|
+
"description": "Airbnb conversations, on `GET /v1/conversations/{id}`: every account on the listing (owner and co-hosts) with its state, and `defaultAccount` \u2014 the one a send uses when `account` is not given. Pass any connected one as `account` on `POST /v1/conversations/{id}/messages` to send as it."
|
|
1246
|
+
},
|
|
1238
1247
|
"id": {
|
|
1239
1248
|
"type": "string"
|
|
1240
1249
|
},
|
|
@@ -4391,6 +4400,68 @@
|
|
|
4391
4400
|
}
|
|
4392
4401
|
}
|
|
4393
4402
|
},
|
|
4403
|
+
"AirbnbAccess": {
|
|
4404
|
+
"type": "object",
|
|
4405
|
+
"required": [
|
|
4406
|
+
"defaultAccount",
|
|
4407
|
+
"accounts"
|
|
4408
|
+
],
|
|
4409
|
+
"properties": {
|
|
4410
|
+
"defaultAccount": {
|
|
4411
|
+
"type": "string",
|
|
4412
|
+
"nullable": true,
|
|
4413
|
+
"example": "airbnb:483175841",
|
|
4414
|
+
"description": "The account that acts when none is named: the conversation's own account while connected, else the listing's owner, else a connected co-host. Null when none is connected."
|
|
4415
|
+
},
|
|
4416
|
+
"accounts": {
|
|
4417
|
+
"type": "array",
|
|
4418
|
+
"items": {
|
|
4419
|
+
"type": "object",
|
|
4420
|
+
"required": [
|
|
4421
|
+
"account",
|
|
4422
|
+
"name",
|
|
4423
|
+
"role",
|
|
4424
|
+
"state",
|
|
4425
|
+
"disconnectedAt"
|
|
4426
|
+
],
|
|
4427
|
+
"properties": {
|
|
4428
|
+
"account": {
|
|
4429
|
+
"type": "string",
|
|
4430
|
+
"example": "airbnb:228981432",
|
|
4431
|
+
"description": "What `account` on a send takes."
|
|
4432
|
+
},
|
|
4433
|
+
"name": {
|
|
4434
|
+
"type": "string",
|
|
4435
|
+
"nullable": true,
|
|
4436
|
+
"example": "Team Co-Host"
|
|
4437
|
+
},
|
|
4438
|
+
"role": {
|
|
4439
|
+
"type": "string",
|
|
4440
|
+
"enum": [
|
|
4441
|
+
"owner",
|
|
4442
|
+
"cohost",
|
|
4443
|
+
"unknown"
|
|
4444
|
+
]
|
|
4445
|
+
},
|
|
4446
|
+
"state": {
|
|
4447
|
+
"type": "string",
|
|
4448
|
+
"enum": [
|
|
4449
|
+
"connected",
|
|
4450
|
+
"disconnected",
|
|
4451
|
+
"never_connected"
|
|
4452
|
+
],
|
|
4453
|
+
"description": "`connected` can act now; `disconnected` was connected to this workspace; `never_connected` is on the listing but was never connected here."
|
|
4454
|
+
},
|
|
4455
|
+
"disconnectedAt": {
|
|
4456
|
+
"type": "string",
|
|
4457
|
+
"format": "date-time",
|
|
4458
|
+
"nullable": true
|
|
4459
|
+
}
|
|
4460
|
+
}
|
|
4461
|
+
}
|
|
4462
|
+
}
|
|
4463
|
+
}
|
|
4464
|
+
},
|
|
4394
4465
|
"RecordAccount": {
|
|
4395
4466
|
"type": "object",
|
|
4396
4467
|
"nullable": true,
|
|
@@ -10510,6 +10581,14 @@
|
|
|
10510
10581
|
},
|
|
10511
10582
|
"description": "Channels (Airbnb, Booking, VRBO, etc.) the listing is connected to."
|
|
10512
10583
|
},
|
|
10584
|
+
"airbnbAccess": {
|
|
10585
|
+
"allOf": [
|
|
10586
|
+
{
|
|
10587
|
+
"$ref": "#/components/schemas/AirbnbAccess"
|
|
10588
|
+
}
|
|
10589
|
+
],
|
|
10590
|
+
"description": "Airbnb listings: every account on the listing (owner and co-hosts), whether each is connected, and which one acts by default. `defaultAccount: null` means no connected account can reach the listing \u2014 connect one of `accounts`."
|
|
10591
|
+
},
|
|
10513
10592
|
"amenities": {
|
|
10514
10593
|
"type": "array",
|
|
10515
10594
|
"items": {
|
|
@@ -14476,6 +14555,12 @@
|
|
|
14476
14555
|
"example": "email",
|
|
14477
14556
|
"description": "Force a channel. Omit to send on whichever channel the conversation already uses, which is the right default. One of `airbnb`, `booking`, `vrbo`, `sms`, `email`, `website` \u2014 except on a conversation a connected PMS relays (Guesty, Hostaway, \u2026), where the message is sent through the PMS and `channel` is passed to it: the PMS's own channel/module name (Guesty `airbnb2`, `bookingCom`, `email`, `sms`, \u2026) or one of Repull's names, which the PMS maps. A PMS that cannot choose a channel returns `422 pms_write_unsupported`; `GET /v1/connect/{provider}` \u2192 `capabilities.pms.conversations.channelSelect` says so beforehand."
|
|
14478
14557
|
},
|
|
14558
|
+
"account": {
|
|
14559
|
+
"type": "string",
|
|
14560
|
+
"pattern": "^airbnb:\\d+$",
|
|
14561
|
+
"example": "airbnb:483175841",
|
|
14562
|
+
"description": "Airbnb conversations: send as exactly this connected account \u2014 the listing's owner or one of its co-hosts \u2014 e.g. your team co-host. Never swapped for another account: if it is disconnected or not on the listing, nothing is sent and the error says why. Omit it and the conversation's own account sends while it is connected, otherwise the listing's owner, otherwise a connected co-host. Connected accounts are on `GET /v1/connect`."
|
|
14563
|
+
},
|
|
14479
14564
|
"attachments": {
|
|
14480
14565
|
"type": "array",
|
|
14481
14566
|
"minItems": 1,
|
|
@@ -18735,7 +18820,7 @@
|
|
|
18735
18820
|
"$ref": "#/components/responses/Unauthorized"
|
|
18736
18821
|
},
|
|
18737
18822
|
"403": {
|
|
18738
|
-
"description": "`listing_inactive` \u2014 the conversation belongs to an inactive listing, so nothing was sent. The error names the listing. `connection_reauth_required` \u2014
|
|
18823
|
+
"description": "`listing_inactive` \u2014 the conversation belongs to an inactive listing, so nothing was sent. The error names the listing. `connection_reauth_required` \u2014 no connected account can send on this conversation (`reconnectRequired: true`); nothing was sent and the text was not refused. On Airbnb the message names each account on the listing \u2014 owner and co-hosts \u2014 and its state (e.g. `Team Co-Host (228981432), co-host, was disconnected on 2026-09-30`). Connect one of them via `POST /v1/connect/{provider}`, or send as another connected account with `account`, then send again.",
|
|
18739
18824
|
"content": {
|
|
18740
18825
|
"application/json": {
|
|
18741
18826
|
"schema": {
|
data/scripts/regen.sh
CHANGED
|
@@ -73,7 +73,7 @@ npx --yes @openapitools/openapi-generator-cli@latest generate \
|
|
|
73
73
|
-i "$SPEC_PATH" \
|
|
74
74
|
-g ruby \
|
|
75
75
|
-o "$GEN_OUT" \
|
|
76
|
-
--additional-properties=gemName=repull,moduleName=Repull,gemVersion=0.2.
|
|
76
|
+
--additional-properties=gemName=repull,moduleName=Repull,gemVersion=0.2.41
|
|
77
77
|
|
|
78
78
|
echo "==> syncing lib/ + docs/"
|
|
79
79
|
rm -rf "$ROOT/lib/repull" "$ROOT/lib/repull.rb" "$ROOT/docs"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: repull
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.41
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Nikolov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -119,6 +119,8 @@ files:
|
|
|
119
119
|
- lib/repull/models/ai_operation_failed_event.rb
|
|
120
120
|
- lib/repull/models/ai_operation_failed_payload.rb
|
|
121
121
|
- lib/repull/models/ai_operation_failed_payload_error.rb
|
|
122
|
+
- lib/repull/models/airbnb_access.rb
|
|
123
|
+
- lib/repull/models/airbnb_access_accounts_inner.rb
|
|
122
124
|
- lib/repull/models/airbnb_account_freshness.rb
|
|
123
125
|
- lib/repull/models/airbnb_alteration.rb
|
|
124
126
|
- lib/repull/models/airbnb_alteration_create_request.rb
|