repull 0.2.17 → 0.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/repull/api/airbnb_api.rb +4 -4
- data/lib/repull/api/health_api.rb +0 -57
- data/lib/repull/api/migrate_api.rb +552 -0
- data/lib/repull/api/reservations_api.rb +2 -2
- data/lib/repull/models/airbnb_permits_response.rb +1 -1
- data/lib/repull/models/airbnb_permits_write_request.rb +1 -1
- data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +43 -4
- data/lib/repull/models/{airbnb_permits_write_request_permits_inner_answers_inner.rb → airbnb_permits_write_request_permits_inner_answers_value.rb} +22 -34
- data/lib/repull/models/check_migration_cutover200_response.rb +147 -0
- data/lib/repull/models/check_migration_cutover_request.rb +175 -0
- data/lib/repull/models/check_migration_cutover_request_reservations_inner.rb +216 -0
- data/lib/repull/models/connect_provider.rb +18 -5
- data/lib/repull/models/connect_session.rb +25 -5
- data/lib/repull/models/create_connect_session_request.rb +81 -5
- data/lib/repull/models/create_connect_session_request_copy.rb +251 -0
- data/lib/repull/models/create_connect_session_request_workspace.rb +196 -0
- data/lib/repull/models/delete_migration200_response.rb +147 -0
- data/lib/repull/models/delete_migration200_response_data.rb +165 -0
- data/lib/repull/models/get_migration200_response.rb +147 -0
- data/lib/repull/models/get_migration_channel_map200_response.rb +147 -0
- data/lib/repull/models/get_migration_report200_response.rb +147 -0
- data/lib/repull/models/list_migrations200_response.rb +158 -0
- data/lib/repull/models/listing_content_update_request.rb +10 -1
- data/lib/repull/models/listing_content_update_request_pricing.rb +235 -0
- data/lib/repull/models/listing_content_update_response.rb +1 -1
- data/lib/repull/models/listing_create_request.rb +24 -1
- data/lib/repull/models/listing_create_response.rb +14 -4
- data/lib/repull/models/migration.rb +303 -0
- data/lib/repull/models/migration_channel_map.rb +169 -0
- data/lib/repull/models/migration_channel_map_listings_inner.rb +208 -0
- data/lib/repull/models/migration_channel_map_listings_inner_airbnb.rb +156 -0
- data/lib/repull/models/migration_channel_map_listings_inner_booking.rb +156 -0
- data/lib/repull/models/migration_channel_map_sources_inner.rb +167 -0
- data/lib/repull/models/migration_completed_event.rb +309 -0
- data/lib/repull/models/migration_connections_inner.rb +195 -0
- data/lib/repull/models/migration_counts.rb +183 -0
- data/lib/repull/models/migration_cutover_check.rb +200 -0
- data/lib/repull/models/migration_cutover_check_mismatched_inner.rb +156 -0
- data/lib/repull/models/migration_failed_event.rb +309 -0
- data/lib/repull/models/migration_import_payload.rb +225 -0
- data/lib/repull/models/migration_import_payload_results_inner.rb +165 -0
- data/lib/repull/models/migration_import_run.rb +202 -0
- data/lib/repull/models/migration_import_run_results_inner.rb +165 -0
- data/lib/repull/models/migration_report.rb +179 -0
- data/lib/repull/models/migration_report_issues_inner.rb +229 -0
- data/lib/repull/models/migration_reservation_ref.rb +184 -0
- data/lib/repull/models/reservation.rb +12 -2
- data/lib/repull/models/run_migration_import202_response.rb +147 -0
- data/lib/repull/models/run_migration_import202_response_data.rb +158 -0
- data/lib/repull/models/run_migration_import202_response_data_queued_inner.rb +174 -0
- data/lib/repull/models/run_migration_import_request.rb +182 -0
- data/lib/repull/models/webhook_event.rb +4 -0
- data/lib/repull/models/webhook_event_type.rb +3 -1
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +37 -1
- data/openapi/v1.json +3426 -2244
- metadata +39 -3
|
@@ -0,0 +1,552 @@
|
|
|
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
|
+
Contact: ivan@vanio.ai
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Repull
|
|
16
|
+
class MigrateApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Check reservations before switching
|
|
23
|
+
# Send every upcoming reservation the destination holds; get back what is missing, extra, or on different dates compared with the source. Read-only — run it as often as you like before cutover.
|
|
24
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
25
|
+
# @param check_migration_cutover_request [CheckMigrationCutoverRequest]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [CheckMigrationCutover200Response]
|
|
28
|
+
def check_migration_cutover(workspace_id, check_migration_cutover_request, opts = {})
|
|
29
|
+
data, _status_code, _headers = check_migration_cutover_with_http_info(workspace_id, check_migration_cutover_request, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Check reservations before switching
|
|
34
|
+
# Send every upcoming reservation the destination holds; get back what is missing, extra, or on different dates compared with the source. Read-only — run it as often as you like before cutover.
|
|
35
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
36
|
+
# @param check_migration_cutover_request [CheckMigrationCutoverRequest]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(CheckMigrationCutover200Response, Integer, Hash)>] CheckMigrationCutover200Response data, response status code and response headers
|
|
39
|
+
def check_migration_cutover_with_http_info(workspace_id, check_migration_cutover_request, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: MigrateApi.check_migration_cutover ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'workspace_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling MigrateApi.check_migration_cutover"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'check_migration_cutover_request' is set
|
|
48
|
+
if @api_client.config.client_side_validation && check_migration_cutover_request.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'check_migration_cutover_request' when calling MigrateApi.check_migration_cutover"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/v1/migrations/{workspaceId}/cutover-check'.sub('{workspaceId}', CGI.escape(workspace_id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
|
+
# HTTP header 'Content-Type'
|
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
63
|
+
if !content_type.nil?
|
|
64
|
+
header_params['Content-Type'] = content_type
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(check_migration_cutover_request)
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'CheckMigrationCutover200Response'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"MigrateApi.check_migration_cutover",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: MigrateApi#check_migration_cutover\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Cut over
|
|
97
|
+
# The property manager has switched: disconnect the source so it stops syncing. The imported data stays readable. Idempotent.
|
|
98
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @return [GetMigration200Response]
|
|
101
|
+
def cutover_migration(workspace_id, opts = {})
|
|
102
|
+
data, _status_code, _headers = cutover_migration_with_http_info(workspace_id, opts)
|
|
103
|
+
data
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Cut over
|
|
107
|
+
# The property manager has switched: disconnect the source so it stops syncing. The imported data stays readable. Idempotent.
|
|
108
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
109
|
+
# @param [Hash] opts the optional parameters
|
|
110
|
+
# @return [Array<(GetMigration200Response, Integer, Hash)>] GetMigration200Response data, response status code and response headers
|
|
111
|
+
def cutover_migration_with_http_info(workspace_id, opts = {})
|
|
112
|
+
if @api_client.config.debugging
|
|
113
|
+
@api_client.config.logger.debug 'Calling API: MigrateApi.cutover_migration ...'
|
|
114
|
+
end
|
|
115
|
+
# verify the required parameter 'workspace_id' is set
|
|
116
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
117
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling MigrateApi.cutover_migration"
|
|
118
|
+
end
|
|
119
|
+
# resource path
|
|
120
|
+
local_var_path = '/v1/migrations/{workspaceId}/cutover'.sub('{workspaceId}', CGI.escape(workspace_id.to_s))
|
|
121
|
+
|
|
122
|
+
# query parameters
|
|
123
|
+
query_params = opts[:query_params] || {}
|
|
124
|
+
|
|
125
|
+
# header parameters
|
|
126
|
+
header_params = opts[:header_params] || {}
|
|
127
|
+
# HTTP header 'Accept' (if needed)
|
|
128
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
129
|
+
|
|
130
|
+
# form parameters
|
|
131
|
+
form_params = opts[:form_params] || {}
|
|
132
|
+
|
|
133
|
+
# http body (model)
|
|
134
|
+
post_body = opts[:debug_body]
|
|
135
|
+
|
|
136
|
+
# return_type
|
|
137
|
+
return_type = opts[:debug_return_type] || 'GetMigration200Response'
|
|
138
|
+
|
|
139
|
+
# auth_names
|
|
140
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
141
|
+
|
|
142
|
+
new_options = opts.merge(
|
|
143
|
+
:operation => :"MigrateApi.cutover_migration",
|
|
144
|
+
:header_params => header_params,
|
|
145
|
+
:query_params => query_params,
|
|
146
|
+
:form_params => form_params,
|
|
147
|
+
:body => post_body,
|
|
148
|
+
:auth_names => auth_names,
|
|
149
|
+
:return_type => return_type
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
153
|
+
if @api_client.config.debugging
|
|
154
|
+
@api_client.config.logger.debug "API called: MigrateApi#cutover_migration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
155
|
+
end
|
|
156
|
+
return data, status_code, headers
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# End a migration
|
|
160
|
+
# Disconnects the source (it stops syncing) and deactivates the migration's workspace. The imported data is kept and stays readable.
|
|
161
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
162
|
+
# @param [Hash] opts the optional parameters
|
|
163
|
+
# @return [DeleteMigration200Response]
|
|
164
|
+
def delete_migration(workspace_id, opts = {})
|
|
165
|
+
data, _status_code, _headers = delete_migration_with_http_info(workspace_id, opts)
|
|
166
|
+
data
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# End a migration
|
|
170
|
+
# Disconnects the source (it stops syncing) and deactivates the migration's workspace. The imported data is kept and stays readable.
|
|
171
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
172
|
+
# @param [Hash] opts the optional parameters
|
|
173
|
+
# @return [Array<(DeleteMigration200Response, Integer, Hash)>] DeleteMigration200Response data, response status code and response headers
|
|
174
|
+
def delete_migration_with_http_info(workspace_id, opts = {})
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug 'Calling API: MigrateApi.delete_migration ...'
|
|
177
|
+
end
|
|
178
|
+
# verify the required parameter 'workspace_id' is set
|
|
179
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling MigrateApi.delete_migration"
|
|
181
|
+
end
|
|
182
|
+
# resource path
|
|
183
|
+
local_var_path = '/v1/migrations/{workspaceId}'.sub('{workspaceId}', CGI.escape(workspace_id.to_s))
|
|
184
|
+
|
|
185
|
+
# query parameters
|
|
186
|
+
query_params = opts[:query_params] || {}
|
|
187
|
+
|
|
188
|
+
# header parameters
|
|
189
|
+
header_params = opts[:header_params] || {}
|
|
190
|
+
# HTTP header 'Accept' (if needed)
|
|
191
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
192
|
+
|
|
193
|
+
# form parameters
|
|
194
|
+
form_params = opts[:form_params] || {}
|
|
195
|
+
|
|
196
|
+
# http body (model)
|
|
197
|
+
post_body = opts[:debug_body]
|
|
198
|
+
|
|
199
|
+
# return_type
|
|
200
|
+
return_type = opts[:debug_return_type] || 'DeleteMigration200Response'
|
|
201
|
+
|
|
202
|
+
# auth_names
|
|
203
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
204
|
+
|
|
205
|
+
new_options = opts.merge(
|
|
206
|
+
:operation => :"MigrateApi.delete_migration",
|
|
207
|
+
:header_params => header_params,
|
|
208
|
+
:query_params => query_params,
|
|
209
|
+
:form_params => form_params,
|
|
210
|
+
:body => post_body,
|
|
211
|
+
:auth_names => auth_names,
|
|
212
|
+
:return_type => return_type
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
216
|
+
if @api_client.config.debugging
|
|
217
|
+
@api_client.config.logger.debug "API called: MigrateApi#delete_migration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
218
|
+
end
|
|
219
|
+
return data, status_code, headers
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Get a migration
|
|
223
|
+
# Where one migration stands: its state, the source connections with their last import run, and how much data has landed.
|
|
224
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
225
|
+
# @param [Hash] opts the optional parameters
|
|
226
|
+
# @return [GetMigration200Response]
|
|
227
|
+
def get_migration(workspace_id, opts = {})
|
|
228
|
+
data, _status_code, _headers = get_migration_with_http_info(workspace_id, opts)
|
|
229
|
+
data
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Get a migration
|
|
233
|
+
# Where one migration stands: its state, the source connections with their last import run, and how much data has landed.
|
|
234
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
235
|
+
# @param [Hash] opts the optional parameters
|
|
236
|
+
# @return [Array<(GetMigration200Response, Integer, Hash)>] GetMigration200Response data, response status code and response headers
|
|
237
|
+
def get_migration_with_http_info(workspace_id, opts = {})
|
|
238
|
+
if @api_client.config.debugging
|
|
239
|
+
@api_client.config.logger.debug 'Calling API: MigrateApi.get_migration ...'
|
|
240
|
+
end
|
|
241
|
+
# verify the required parameter 'workspace_id' is set
|
|
242
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
243
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling MigrateApi.get_migration"
|
|
244
|
+
end
|
|
245
|
+
# resource path
|
|
246
|
+
local_var_path = '/v1/migrations/{workspaceId}'.sub('{workspaceId}', CGI.escape(workspace_id.to_s))
|
|
247
|
+
|
|
248
|
+
# query parameters
|
|
249
|
+
query_params = opts[:query_params] || {}
|
|
250
|
+
|
|
251
|
+
# header parameters
|
|
252
|
+
header_params = opts[:header_params] || {}
|
|
253
|
+
# HTTP header 'Accept' (if needed)
|
|
254
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
255
|
+
|
|
256
|
+
# form parameters
|
|
257
|
+
form_params = opts[:form_params] || {}
|
|
258
|
+
|
|
259
|
+
# http body (model)
|
|
260
|
+
post_body = opts[:debug_body]
|
|
261
|
+
|
|
262
|
+
# return_type
|
|
263
|
+
return_type = opts[:debug_return_type] || 'GetMigration200Response'
|
|
264
|
+
|
|
265
|
+
# auth_names
|
|
266
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
267
|
+
|
|
268
|
+
new_options = opts.merge(
|
|
269
|
+
:operation => :"MigrateApi.get_migration",
|
|
270
|
+
:header_params => header_params,
|
|
271
|
+
:query_params => query_params,
|
|
272
|
+
:form_params => form_params,
|
|
273
|
+
:body => post_body,
|
|
274
|
+
:auth_names => auth_names,
|
|
275
|
+
:return_type => return_type
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
279
|
+
if @api_client.config.debugging
|
|
280
|
+
@api_client.config.logger.debug "API called: MigrateApi#get_migration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
281
|
+
end
|
|
282
|
+
return data, status_code, headers
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Get channel links
|
|
286
|
+
# The Airbnb, Booking.com and VRBO listing each migrated property is linked to in the source PMS, read live. Use it to link each listing to the right property when the channels are reconnected in the destination — channel connections themselves cannot be moved between PMSs.
|
|
287
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
288
|
+
# @param [Hash] opts the optional parameters
|
|
289
|
+
# @return [GetMigrationChannelMap200Response]
|
|
290
|
+
def get_migration_channel_map(workspace_id, opts = {})
|
|
291
|
+
data, _status_code, _headers = get_migration_channel_map_with_http_info(workspace_id, opts)
|
|
292
|
+
data
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Get channel links
|
|
296
|
+
# The Airbnb, Booking.com and VRBO listing each migrated property is linked to in the source PMS, read live. Use it to link each listing to the right property when the channels are reconnected in the destination — channel connections themselves cannot be moved between PMSs.
|
|
297
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
298
|
+
# @param [Hash] opts the optional parameters
|
|
299
|
+
# @return [Array<(GetMigrationChannelMap200Response, Integer, Hash)>] GetMigrationChannelMap200Response data, response status code and response headers
|
|
300
|
+
def get_migration_channel_map_with_http_info(workspace_id, opts = {})
|
|
301
|
+
if @api_client.config.debugging
|
|
302
|
+
@api_client.config.logger.debug 'Calling API: MigrateApi.get_migration_channel_map ...'
|
|
303
|
+
end
|
|
304
|
+
# verify the required parameter 'workspace_id' is set
|
|
305
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
306
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling MigrateApi.get_migration_channel_map"
|
|
307
|
+
end
|
|
308
|
+
# resource path
|
|
309
|
+
local_var_path = '/v1/migrations/{workspaceId}/channel-map'.sub('{workspaceId}', CGI.escape(workspace_id.to_s))
|
|
310
|
+
|
|
311
|
+
# query parameters
|
|
312
|
+
query_params = opts[:query_params] || {}
|
|
313
|
+
|
|
314
|
+
# header parameters
|
|
315
|
+
header_params = opts[:header_params] || {}
|
|
316
|
+
# HTTP header 'Accept' (if needed)
|
|
317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
318
|
+
|
|
319
|
+
# form parameters
|
|
320
|
+
form_params = opts[:form_params] || {}
|
|
321
|
+
|
|
322
|
+
# http body (model)
|
|
323
|
+
post_body = opts[:debug_body]
|
|
324
|
+
|
|
325
|
+
# return_type
|
|
326
|
+
return_type = opts[:debug_return_type] || 'GetMigrationChannelMap200Response'
|
|
327
|
+
|
|
328
|
+
# auth_names
|
|
329
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
330
|
+
|
|
331
|
+
new_options = opts.merge(
|
|
332
|
+
:operation => :"MigrateApi.get_migration_channel_map",
|
|
333
|
+
:header_params => header_params,
|
|
334
|
+
:query_params => query_params,
|
|
335
|
+
:form_params => form_params,
|
|
336
|
+
:body => post_body,
|
|
337
|
+
:auth_names => auth_names,
|
|
338
|
+
:return_type => return_type
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
342
|
+
if @api_client.config.debugging
|
|
343
|
+
@api_client.config.logger.debug "API called: MigrateApi#get_migration_channel_map\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
344
|
+
end
|
|
345
|
+
return data, status_code, headers
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Get a migration report
|
|
349
|
+
# What came across and what needs a decision in the destination: properties without an address, upcoming reservations with no guest contact, channel reservations that must not be re-created, and anything the source PMS cannot carry. Includes the source's capability matrix.
|
|
350
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
351
|
+
# @param [Hash] opts the optional parameters
|
|
352
|
+
# @return [GetMigrationReport200Response]
|
|
353
|
+
def get_migration_report(workspace_id, opts = {})
|
|
354
|
+
data, _status_code, _headers = get_migration_report_with_http_info(workspace_id, opts)
|
|
355
|
+
data
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Get a migration report
|
|
359
|
+
# What came across and what needs a decision in the destination: properties without an address, upcoming reservations with no guest contact, channel reservations that must not be re-created, and anything the source PMS cannot carry. Includes the source's capability matrix.
|
|
360
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
361
|
+
# @param [Hash] opts the optional parameters
|
|
362
|
+
# @return [Array<(GetMigrationReport200Response, Integer, Hash)>] GetMigrationReport200Response data, response status code and response headers
|
|
363
|
+
def get_migration_report_with_http_info(workspace_id, opts = {})
|
|
364
|
+
if @api_client.config.debugging
|
|
365
|
+
@api_client.config.logger.debug 'Calling API: MigrateApi.get_migration_report ...'
|
|
366
|
+
end
|
|
367
|
+
# verify the required parameter 'workspace_id' is set
|
|
368
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
369
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling MigrateApi.get_migration_report"
|
|
370
|
+
end
|
|
371
|
+
# resource path
|
|
372
|
+
local_var_path = '/v1/migrations/{workspaceId}/report'.sub('{workspaceId}', CGI.escape(workspace_id.to_s))
|
|
373
|
+
|
|
374
|
+
# query parameters
|
|
375
|
+
query_params = opts[:query_params] || {}
|
|
376
|
+
|
|
377
|
+
# header parameters
|
|
378
|
+
header_params = opts[:header_params] || {}
|
|
379
|
+
# HTTP header 'Accept' (if needed)
|
|
380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
381
|
+
|
|
382
|
+
# form parameters
|
|
383
|
+
form_params = opts[:form_params] || {}
|
|
384
|
+
|
|
385
|
+
# http body (model)
|
|
386
|
+
post_body = opts[:debug_body]
|
|
387
|
+
|
|
388
|
+
# return_type
|
|
389
|
+
return_type = opts[:debug_return_type] || 'GetMigrationReport200Response'
|
|
390
|
+
|
|
391
|
+
# auth_names
|
|
392
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
393
|
+
|
|
394
|
+
new_options = opts.merge(
|
|
395
|
+
:operation => :"MigrateApi.get_migration_report",
|
|
396
|
+
:header_params => header_params,
|
|
397
|
+
:query_params => query_params,
|
|
398
|
+
:form_params => form_params,
|
|
399
|
+
:body => post_body,
|
|
400
|
+
:auth_names => auth_names,
|
|
401
|
+
:return_type => return_type
|
|
402
|
+
)
|
|
403
|
+
|
|
404
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
405
|
+
if @api_client.config.debugging
|
|
406
|
+
@api_client.config.logger.debug "API called: MigrateApi#get_migration_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
407
|
+
end
|
|
408
|
+
return data, status_code, headers
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# List migrations
|
|
412
|
+
# Every property manager your workspace has moved through Repull Migrate, newest first, each with where it stands. Page with `pagination.nextCursor`.
|
|
413
|
+
# @param [Hash] opts the optional parameters
|
|
414
|
+
# @option opts [Integer] :limit (default to 25)
|
|
415
|
+
# @option opts [String] :cursor `pagination.nextCursor` from the previous page.
|
|
416
|
+
# @return [ListMigrations200Response]
|
|
417
|
+
def list_migrations(opts = {})
|
|
418
|
+
data, _status_code, _headers = list_migrations_with_http_info(opts)
|
|
419
|
+
data
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
# List migrations
|
|
423
|
+
# Every property manager your workspace has moved through Repull Migrate, newest first, each with where it stands. Page with `pagination.nextCursor`.
|
|
424
|
+
# @param [Hash] opts the optional parameters
|
|
425
|
+
# @option opts [Integer] :limit (default to 25)
|
|
426
|
+
# @option opts [String] :cursor `pagination.nextCursor` from the previous page.
|
|
427
|
+
# @return [Array<(ListMigrations200Response, Integer, Hash)>] ListMigrations200Response data, response status code and response headers
|
|
428
|
+
def list_migrations_with_http_info(opts = {})
|
|
429
|
+
if @api_client.config.debugging
|
|
430
|
+
@api_client.config.logger.debug 'Calling API: MigrateApi.list_migrations ...'
|
|
431
|
+
end
|
|
432
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
433
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MigrateApi.list_migrations, must be smaller than or equal to 100.'
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
437
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MigrateApi.list_migrations, must be greater than or equal to 1.'
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# resource path
|
|
441
|
+
local_var_path = '/v1/migrations'
|
|
442
|
+
|
|
443
|
+
# query parameters
|
|
444
|
+
query_params = opts[:query_params] || {}
|
|
445
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
446
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
447
|
+
|
|
448
|
+
# header parameters
|
|
449
|
+
header_params = opts[:header_params] || {}
|
|
450
|
+
# HTTP header 'Accept' (if needed)
|
|
451
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
452
|
+
|
|
453
|
+
# form parameters
|
|
454
|
+
form_params = opts[:form_params] || {}
|
|
455
|
+
|
|
456
|
+
# http body (model)
|
|
457
|
+
post_body = opts[:debug_body]
|
|
458
|
+
|
|
459
|
+
# return_type
|
|
460
|
+
return_type = opts[:debug_return_type] || 'ListMigrations200Response'
|
|
461
|
+
|
|
462
|
+
# auth_names
|
|
463
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
464
|
+
|
|
465
|
+
new_options = opts.merge(
|
|
466
|
+
:operation => :"MigrateApi.list_migrations",
|
|
467
|
+
:header_params => header_params,
|
|
468
|
+
:query_params => query_params,
|
|
469
|
+
:form_params => form_params,
|
|
470
|
+
:body => post_body,
|
|
471
|
+
:auth_names => auth_names,
|
|
472
|
+
:return_type => return_type
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
476
|
+
if @api_client.config.debugging
|
|
477
|
+
@api_client.config.logger.debug "API called: MigrateApi#list_migrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
478
|
+
end
|
|
479
|
+
return data, status_code, headers
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
# Run the import again
|
|
483
|
+
# Queue another import from the source PMS — for example messages after the first pass, or only reservations changed since a date. Progress shows on `GET /v1/migrations/{workspaceId}`.
|
|
484
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
485
|
+
# @param [Hash] opts the optional parameters
|
|
486
|
+
# @option opts [RunMigrationImportRequest] :run_migration_import_request
|
|
487
|
+
# @return [RunMigrationImport202Response]
|
|
488
|
+
def run_migration_import(workspace_id, opts = {})
|
|
489
|
+
data, _status_code, _headers = run_migration_import_with_http_info(workspace_id, opts)
|
|
490
|
+
data
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# Run the import again
|
|
494
|
+
# Queue another import from the source PMS — for example messages after the first pass, or only reservations changed since a date. Progress shows on `GET /v1/migrations/{workspaceId}`.
|
|
495
|
+
# @param workspace_id [Integer] The migration's workspace id (from `POST /v1/connect` with `purpose: \"migrate\"`, or `GET /v1/migrations`).
|
|
496
|
+
# @param [Hash] opts the optional parameters
|
|
497
|
+
# @option opts [RunMigrationImportRequest] :run_migration_import_request
|
|
498
|
+
# @return [Array<(RunMigrationImport202Response, Integer, Hash)>] RunMigrationImport202Response data, response status code and response headers
|
|
499
|
+
def run_migration_import_with_http_info(workspace_id, opts = {})
|
|
500
|
+
if @api_client.config.debugging
|
|
501
|
+
@api_client.config.logger.debug 'Calling API: MigrateApi.run_migration_import ...'
|
|
502
|
+
end
|
|
503
|
+
# verify the required parameter 'workspace_id' is set
|
|
504
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
505
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling MigrateApi.run_migration_import"
|
|
506
|
+
end
|
|
507
|
+
# resource path
|
|
508
|
+
local_var_path = '/v1/migrations/{workspaceId}/import'.sub('{workspaceId}', CGI.escape(workspace_id.to_s))
|
|
509
|
+
|
|
510
|
+
# query parameters
|
|
511
|
+
query_params = opts[:query_params] || {}
|
|
512
|
+
|
|
513
|
+
# header parameters
|
|
514
|
+
header_params = opts[:header_params] || {}
|
|
515
|
+
# HTTP header 'Accept' (if needed)
|
|
516
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
517
|
+
# HTTP header 'Content-Type'
|
|
518
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
519
|
+
if !content_type.nil?
|
|
520
|
+
header_params['Content-Type'] = content_type
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
# form parameters
|
|
524
|
+
form_params = opts[:form_params] || {}
|
|
525
|
+
|
|
526
|
+
# http body (model)
|
|
527
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'run_migration_import_request'])
|
|
528
|
+
|
|
529
|
+
# return_type
|
|
530
|
+
return_type = opts[:debug_return_type] || 'RunMigrationImport202Response'
|
|
531
|
+
|
|
532
|
+
# auth_names
|
|
533
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
534
|
+
|
|
535
|
+
new_options = opts.merge(
|
|
536
|
+
:operation => :"MigrateApi.run_migration_import",
|
|
537
|
+
:header_params => header_params,
|
|
538
|
+
:query_params => query_params,
|
|
539
|
+
:form_params => form_params,
|
|
540
|
+
:body => post_body,
|
|
541
|
+
:auth_names => auth_names,
|
|
542
|
+
:return_type => return_type
|
|
543
|
+
)
|
|
544
|
+
|
|
545
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
546
|
+
if @api_client.config.debugging
|
|
547
|
+
@api_client.config.logger.debug "API called: MigrateApi#run_migration_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
548
|
+
end
|
|
549
|
+
return data, status_code, headers
|
|
550
|
+
end
|
|
551
|
+
end
|
|
552
|
+
end
|
|
@@ -319,7 +319,7 @@ module Repull
|
|
|
319
319
|
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`. Omit to fetch the first page.
|
|
320
320
|
# @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.nextCursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
|
|
321
321
|
# @option opts [String] :platform Filter by booking platform
|
|
322
|
-
# @option opts [String] :status Filter by lifecycle status. **Case-insensitive** — `confirmed`, `Confirmed`, and `CONFIRMED` all match. Each public value expands to the full set of internal sub-states server-side: `confirmed` matches `accept`/`confirmed`/`modified`, `cancelled` matches every cancellation sub-state (`cancelled_by_host`, `declined`, `expired`, etc.), `pending`
|
|
322
|
+
# @option opts [String] :status Filter by lifecycle status. **Case-insensitive** — `confirmed`, `Confirmed`, and `CONFIRMED` all match. Each public value expands to the full set of internal sub-states server-side: `confirmed` matches `accept`/`confirmed`/`modified`, `cancelled` matches every cancellation sub-state (`cancelled_by_host`, `declined`, `expired`, etc.), `pending` covers three different situations, told apart by `pendingReason` on each reservation: a booking **request** awaiting the host (`host_approval` — answer it with `POST /v1/reservations/{id}/accept` or `/decline` before its `respondBy`), and a booking Airbnb is holding for the guest to pay (`guest_payment`) or to complete identity verification (`guest_verification`), which need no action from the host. `completed` is a derived state — combine `status=confirmed` with `check_out_before=<today>` to filter for past stays. `pending` lists only bookings that can still go ahead: a request the channel already let lapse (Airbnb expires a request 24 hours after the guest asks) and any pending booking whose check-in date has passed are left out and appear under `cancelled` with `statusDetail: \"request_expired\"` instead. The stored record is not changed — this is derived when you read it. Airbnb **inquiries** (questions before booking) are not reservations: list them with `GET /v1/inquiries`.
|
|
323
323
|
# @option opts [Integer] :listing_id Filter to a single listing
|
|
324
324
|
# @option opts [Date] :check_in_after Check-in date >= this value
|
|
325
325
|
# @option opts [Date] :check_in_before Check-in date <= this value
|
|
@@ -347,7 +347,7 @@ module Repull
|
|
|
347
347
|
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`. Omit to fetch the first page.
|
|
348
348
|
# @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.nextCursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
|
|
349
349
|
# @option opts [String] :platform Filter by booking platform
|
|
350
|
-
# @option opts [String] :status Filter by lifecycle status. **Case-insensitive** — `confirmed`, `Confirmed`, and `CONFIRMED` all match. Each public value expands to the full set of internal sub-states server-side: `confirmed` matches `accept`/`confirmed`/`modified`, `cancelled` matches every cancellation sub-state (`cancelled_by_host`, `declined`, `expired`, etc.), `pending`
|
|
350
|
+
# @option opts [String] :status Filter by lifecycle status. **Case-insensitive** — `confirmed`, `Confirmed`, and `CONFIRMED` all match. Each public value expands to the full set of internal sub-states server-side: `confirmed` matches `accept`/`confirmed`/`modified`, `cancelled` matches every cancellation sub-state (`cancelled_by_host`, `declined`, `expired`, etc.), `pending` covers three different situations, told apart by `pendingReason` on each reservation: a booking **request** awaiting the host (`host_approval` — answer it with `POST /v1/reservations/{id}/accept` or `/decline` before its `respondBy`), and a booking Airbnb is holding for the guest to pay (`guest_payment`) or to complete identity verification (`guest_verification`), which need no action from the host. `completed` is a derived state — combine `status=confirmed` with `check_out_before=<today>` to filter for past stays. `pending` lists only bookings that can still go ahead: a request the channel already let lapse (Airbnb expires a request 24 hours after the guest asks) and any pending booking whose check-in date has passed are left out and appear under `cancelled` with `statusDetail: \"request_expired\"` instead. The stored record is not changed — this is derived when you read it. Airbnb **inquiries** (questions before booking) are not reservations: list them with `GET /v1/inquiries`.
|
|
351
351
|
# @option opts [Integer] :listing_id Filter to a single listing
|
|
352
352
|
# @option opts [Date] :check_in_after Check-in date >= this value
|
|
353
353
|
# @option opts [Date] :check_in_before Check-in date <= this value
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
17
|
class AirbnbPermitsResponse < ApiModelBase
|
|
18
|
-
# The live permit flows from Airbnb — present only with `?source=live`, `null` otherwise. Each flow names its `regulatory_body`, `regulation_type`, `status`,
|
|
18
|
+
# The live permit flows from Airbnb — present only with `?source=live`, `null` otherwise. Each flow names its `regulatory_body`, `regulation_type`, `status`, its `flows[]` with the `answer_key` / `type` / `choices` of every question you have to answer, plus the answers already on file.
|
|
19
19
|
attr_accessor :permits
|
|
20
20
|
|
|
21
21
|
# Permits as last mirrored by the sync worker: body, type, status, number. The RESULT of a permit, not the questions.
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# Answer the regulatory permit questions Airbnb asks for this listing. Read them first with `?source=live` on the GET
|
|
17
|
+
# Answer the regulatory permit questions Airbnb asks for this listing, in Airbnb's Listing Permits shape. Read them first with `?source=live` on the GET: each permit lists its `flows[]`, and each flow its `questions[]` with an `answer_key` and a `type`.
|
|
18
18
|
class AirbnbPermitsWriteRequest < ApiModelBase
|
|
19
19
|
attr_accessor :permits
|
|
20
20
|
|