repull 0.2.9 → 0.2.10

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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +1391 -117
  3. data/lib/repull/api/availability_api.rb +99 -0
  4. data/lib/repull/api/billing_api.rb +226 -0
  5. data/lib/repull/api/booking_com_api.rb +590 -0
  6. data/lib/repull/api/plumguide_api.rb +245 -0
  7. data/lib/repull/models/acknowledge_booking_reservations_request.rb +176 -0
  8. data/lib/repull/models/airbnb_alteration.rb +191 -0
  9. data/lib/repull/models/airbnb_amenity.rb +171 -0
  10. data/lib/repull/models/booking_setup_request.rb +220 -0
  11. data/lib/repull/models/create_airbnb_alteration_request.rb +195 -0
  12. data/lib/repull/models/create_airbnb_offer_request.rb +211 -0
  13. data/lib/repull/models/create_booking_webhook_request.rb +192 -0
  14. data/lib/repull/models/delete_airbnb_listing_photo200_response.rb +147 -0
  15. data/lib/repull/models/get_airbnb_alteration200_response.rb +190 -0
  16. data/lib/repull/models/get_airbnb_listing_quality200_response.rb +177 -0
  17. data/lib/repull/models/get_airbnb_listing_settings200_response.rb +177 -0
  18. data/lib/repull/models/get_airbnb_thread200_response.rb +190 -0
  19. data/lib/repull/models/get_usage_logs200_response.rb +167 -0
  20. data/lib/repull/models/get_usage_logs200_response_data_inner.rb +264 -0
  21. data/lib/repull/models/get_usage_logs200_response_pagination.rb +166 -0
  22. data/lib/repull/models/get_usage_summary200_response.rb +232 -0
  23. data/lib/repull/models/get_usage_summary200_response_breakdown_inner.rb +183 -0
  24. data/lib/repull/models/get_usage_summary200_response_limits.rb +158 -0
  25. data/lib/repull/models/get_usage_summary200_response_remaining.rb +158 -0
  26. data/lib/repull/models/get_usage_summary200_response_status_distribution.rb +174 -0
  27. data/lib/repull/models/get_usage_summary200_response_timeline_inner.rb +165 -0
  28. data/lib/repull/models/get_usage_summary200_response_totals.rb +165 -0
  29. data/lib/repull/models/get_usage_summary200_response_used.rb +156 -0
  30. data/lib/repull/models/get_usage_tier200_response.rb +183 -0
  31. data/lib/repull/models/get_usage_tier200_response_limits.rb +168 -0
  32. data/lib/repull/models/get_usage_tier200_response_remaining.rb +168 -0
  33. data/lib/repull/models/get_usage_tier200_response_used.rb +165 -0
  34. data/lib/repull/models/list_airbnb_alterations200_response.rb +192 -0
  35. data/lib/repull/models/list_airbnb_listing_amenities200_response.rb +190 -0
  36. data/lib/repull/models/list_airbnb_listing_amenities200_response_data.rb +160 -0
  37. data/lib/repull/models/list_airbnb_transactions200_response.rb +192 -0
  38. data/lib/repull/models/property_availability.rb +222 -0
  39. data/lib/repull/models/property_availability_day.rb +247 -0
  40. data/lib/repull/models/update_airbnb_message_request.rb +209 -0
  41. data/lib/repull/models/update_booking_charges_request.rb +194 -0
  42. data/lib/repull/version.rb +1 -1
  43. data/lib/repull.rb +36 -0
  44. data/openapi/v1.json +3297 -1000
  45. metadata +37 -1
@@ -150,37 +150,105 @@ module Repull
150
150
  return data, status_code, headers
151
151
  end
152
152
 
153
- # Edit Airbnb host review
154
- # Edit a host-side review for an Airbnb stay. Airbnb collapses POST + PUT into the same upstream call (`PUT /v2/listing_reviews/{id}`), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial `AirbnbReview` pass the fields you want to change (rating, public review, private feedback, category ratings).
155
- # @param id [String] Airbnb review id (`HRabc123` style).
156
- # @param airbnb_review [AirbnbReview]
153
+ # Create Airbnb alteration
154
+ # Create a reservation alteration request (change dates, guest count, or price) on Airbnb. **Write-side** calls Airbnb upstream. Requires a connected Airbnb host for the workspace, else `404 no_connection`.
155
+ # @param create_airbnb_alteration_request [CreateAirbnbAlterationRequest]
157
156
  # @param [Hash] opts the optional parameters
158
- # @return [AirbnbReview]
159
- def edit_airbnb_review(id, airbnb_review, opts = {})
160
- data, _status_code, _headers = edit_airbnb_review_with_http_info(id, airbnb_review, opts)
161
- data
157
+ # @return [nil]
158
+ def create_airbnb_alteration(create_airbnb_alteration_request, opts = {})
159
+ create_airbnb_alteration_with_http_info(create_airbnb_alteration_request, opts)
160
+ nil
162
161
  end
163
162
 
164
- # Edit Airbnb host review
165
- # Edit a host-side review for an Airbnb stay. Airbnb collapses POST + PUT into the same upstream call (`PUT /v2/listing_reviews/{id}`), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial `AirbnbReview` pass the fields you want to change (rating, public review, private feedback, category ratings).
166
- # @param id [String] Airbnb review id (`HRabc123` style).
167
- # @param airbnb_review [AirbnbReview]
163
+ # Create Airbnb alteration
164
+ # Create a reservation alteration request (change dates, guest count, or price) on Airbnb. **Write-side** calls Airbnb upstream. Requires a connected Airbnb host for the workspace, else `404 no_connection`.
165
+ # @param create_airbnb_alteration_request [CreateAirbnbAlterationRequest]
168
166
  # @param [Hash] opts the optional parameters
169
- # @return [Array<(AirbnbReview, Integer, Hash)>] AirbnbReview data, response status code and response headers
170
- def edit_airbnb_review_with_http_info(id, airbnb_review, opts = {})
167
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
168
+ def create_airbnb_alteration_with_http_info(create_airbnb_alteration_request, opts = {})
171
169
  if @api_client.config.debugging
172
- @api_client.config.logger.debug 'Calling API: AirbnbApi.edit_airbnb_review ...'
170
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_alteration ...'
171
+ end
172
+ # verify the required parameter 'create_airbnb_alteration_request' is set
173
+ if @api_client.config.client_side_validation && create_airbnb_alteration_request.nil?
174
+ fail ArgumentError, "Missing the required parameter 'create_airbnb_alteration_request' when calling AirbnbApi.create_airbnb_alteration"
175
+ end
176
+ # resource path
177
+ local_var_path = '/v1/channels/airbnb/alterations'
178
+
179
+ # query parameters
180
+ query_params = opts[:query_params] || {}
181
+
182
+ # header parameters
183
+ header_params = opts[:header_params] || {}
184
+ # HTTP header 'Accept' (if needed)
185
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
186
+ # HTTP header 'Content-Type'
187
+ content_type = @api_client.select_header_content_type(['application/json'])
188
+ if !content_type.nil?
189
+ header_params['Content-Type'] = content_type
190
+ end
191
+
192
+ # form parameters
193
+ form_params = opts[:form_params] || {}
194
+
195
+ # http body (model)
196
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_airbnb_alteration_request)
197
+
198
+ # return_type
199
+ return_type = opts[:debug_return_type]
200
+
201
+ # auth_names
202
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
203
+
204
+ new_options = opts.merge(
205
+ :operation => :"AirbnbApi.create_airbnb_alteration",
206
+ :header_params => header_params,
207
+ :query_params => query_params,
208
+ :form_params => form_params,
209
+ :body => post_body,
210
+ :auth_names => auth_names,
211
+ :return_type => return_type
212
+ )
213
+
214
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
217
+ end
218
+ return data, status_code, headers
219
+ end
220
+
221
+ # Create an Airbnb room
222
+ # Create a new room on an Airbnb listing. **Write-side** — calls Airbnb upstream. Body is the full room object minus `room_id`. Requires a connected Airbnb host, else `404 no_connection`.
223
+ # @param id [String] Repull listing id (numeric string).
224
+ # @param request_body [Hash<String, Object>]
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [nil]
227
+ def create_airbnb_listing_room(id, request_body, opts = {})
228
+ create_airbnb_listing_room_with_http_info(id, request_body, opts)
229
+ nil
230
+ end
231
+
232
+ # Create an Airbnb room
233
+ # Create a new room on an Airbnb listing. **Write-side** — calls Airbnb upstream. Body is the full room object minus &#x60;room_id&#x60;. Requires a connected Airbnb host, else &#x60;404 no_connection&#x60;.
234
+ # @param id [String] Repull listing id (numeric string).
235
+ # @param request_body [Hash<String, Object>]
236
+ # @param [Hash] opts the optional parameters
237
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
238
+ def create_airbnb_listing_room_with_http_info(id, request_body, opts = {})
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_listing_room ...'
173
241
  end
174
242
  # verify the required parameter 'id' is set
175
243
  if @api_client.config.client_side_validation && id.nil?
176
- fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.edit_airbnb_review"
244
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.create_airbnb_listing_room"
177
245
  end
178
- # verify the required parameter 'airbnb_review' is set
179
- if @api_client.config.client_side_validation && airbnb_review.nil?
180
- fail ArgumentError, "Missing the required parameter 'airbnb_review' when calling AirbnbApi.edit_airbnb_review"
246
+ # verify the required parameter 'request_body' is set
247
+ if @api_client.config.client_side_validation && request_body.nil?
248
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling AirbnbApi.create_airbnb_listing_room"
181
249
  end
182
250
  # resource path
183
- local_var_path = '/v1/channels/airbnb/reviews/{id}'.sub('{id}', CGI.escape(id.to_s))
251
+ local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))
184
252
 
185
253
  # query parameters
186
254
  query_params = opts[:query_params] || {}
@@ -199,16 +267,16 @@ module Repull
199
267
  form_params = opts[:form_params] || {}
200
268
 
201
269
  # http body (model)
202
- post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_review)
270
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
203
271
 
204
272
  # return_type
205
- return_type = opts[:debug_return_type] || 'AirbnbReview'
273
+ return_type = opts[:debug_return_type]
206
274
 
207
275
  # auth_names
208
276
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
209
277
 
210
278
  new_options = opts.merge(
211
- :operation => :"AirbnbApi.edit_airbnb_review",
279
+ :operation => :"AirbnbApi.create_airbnb_listing_room",
212
280
  :header_params => header_params,
213
281
  :query_params => query_params,
214
282
  :form_params => form_params,
@@ -217,32 +285,38 @@ module Repull
217
285
  :return_type => return_type
218
286
  )
219
287
 
220
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
288
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
221
289
  if @api_client.config.debugging
222
- @api_client.config.logger.debug "API called: AirbnbApi#edit_airbnb_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
290
+ @api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_listing_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
291
  end
224
292
  return data, status_code, headers
225
293
  end
226
294
 
227
- # Get Airbnb connection state
228
- # Returns the workspace's Airbnb host connection state in one envelope. Use this instead of inferring connection health from per-listing 401s on `GET /v1/channels/airbnb/listings` — that's noisy (every per-listing call has to fail before you know) and ambiguous (a single 5xx looks identical to a deauth). Pure DB readdoes NOT touch Airbnb's API, so it's cheap to poll from a status-page surface. The response includes one row per Airbnb host the workspace has linked. Each row carries `isConnected`, `lastSyncedAt`, `deactivatedAt`, and `lastDisconnectReason` (most recent non-backfill row in `airbnb_host_events`). A self-serve `fixUrl` is included whenever `status` is anything other than `connected` points at the dashboard where the host re-authorizes (or initiates the first OAuth flow for `never_connected` workspaces).
295
+ # Create Airbnb special offer or pre-approval
296
+ # Create a special offer or a pre-approval on Airbnb. **Write-side** calls Airbnb upstream. The `type` discriminator selects the flavour: - `offer` — a special offer with custom terms (the remaining body fields are the offer params). - `preapproval`pre-approve an inquiry thread (requires `threadId`; optional `blockInstantBooking`). Requires a connected Airbnb host, else `404 no_connection`.
297
+ # @param create_airbnb_offer_request [CreateAirbnbOfferRequest]
229
298
  # @param [Hash] opts the optional parameters
230
- # @return [AirbnbConnectionResponse]
231
- def get_airbnb_connection(opts = {})
232
- data, _status_code, _headers = get_airbnb_connection_with_http_info(opts)
233
- data
299
+ # @return [nil]
300
+ def create_airbnb_offer(create_airbnb_offer_request, opts = {})
301
+ create_airbnb_offer_with_http_info(create_airbnb_offer_request, opts)
302
+ nil
234
303
  end
235
304
 
236
- # Get Airbnb connection state
237
- # Returns the workspace&#39;s Airbnb host connection state in one envelope. Use this instead of inferring connection health from per-listing 401s on &#x60;GET /v1/channels/airbnb/listings&#x60; that&#39;s noisy (every per-listing call has to fail before you know) and ambiguous (a single 5xx looks identical to a deauth). Pure DB read — does NOT touch Airbnb&#39;s API, so it&#39;s cheap to poll from a status-page surface. The response includes one row per Airbnb host the workspace has linked. Each row carries &#x60;isConnected&#x60;, &#x60;lastSyncedAt&#x60;, &#x60;deactivatedAt&#x60;, and &#x60;lastDisconnectReason&#x60; (most recent non-backfill row in &#x60;airbnb_host_events&#x60;). A self-serve &#x60;fixUrl&#x60; is included whenever &#x60;status&#x60; is anything other than &#x60;connected&#x60; points at the dashboard where the host re-authorizes (or initiates the first OAuth flow for &#x60;never_connected&#x60; workspaces).
305
+ # Create Airbnb special offer or pre-approval
306
+ # Create a special offer or a pre-approval on Airbnb. **Write-side** calls Airbnb upstream. The &#x60;type&#x60; discriminator selects the flavour: - &#x60;offer&#x60; a special offer with custom terms (the remaining body fields are the offer params). - &#x60;preapproval&#x60; pre-approve an inquiry thread (requires &#x60;threadId&#x60;; optional &#x60;blockInstantBooking&#x60;). Requires a connected Airbnb host, else &#x60;404 no_connection&#x60;.
307
+ # @param create_airbnb_offer_request [CreateAirbnbOfferRequest]
238
308
  # @param [Hash] opts the optional parameters
239
- # @return [Array<(AirbnbConnectionResponse, Integer, Hash)>] AirbnbConnectionResponse data, response status code and response headers
240
- def get_airbnb_connection_with_http_info(opts = {})
309
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
310
+ def create_airbnb_offer_with_http_info(create_airbnb_offer_request, opts = {})
241
311
  if @api_client.config.debugging
242
- @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_connection ...'
312
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_offer ...'
313
+ end
314
+ # verify the required parameter 'create_airbnb_offer_request' is set
315
+ if @api_client.config.client_side_validation && create_airbnb_offer_request.nil?
316
+ fail ArgumentError, "Missing the required parameter 'create_airbnb_offer_request' when calling AirbnbApi.create_airbnb_offer"
243
317
  end
244
318
  # resource path
245
- local_var_path = '/v1/channels/airbnb/connection'
319
+ local_var_path = '/v1/channels/airbnb/offers'
246
320
 
247
321
  # query parameters
248
322
  query_params = opts[:query_params] || {}
@@ -251,21 +325,26 @@ module Repull
251
325
  header_params = opts[:header_params] || {}
252
326
  # HTTP header 'Accept' (if needed)
253
327
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
328
+ # HTTP header 'Content-Type'
329
+ content_type = @api_client.select_header_content_type(['application/json'])
330
+ if !content_type.nil?
331
+ header_params['Content-Type'] = content_type
332
+ end
254
333
 
255
334
  # form parameters
256
335
  form_params = opts[:form_params] || {}
257
336
 
258
337
  # http body (model)
259
- post_body = opts[:debug_body]
338
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_airbnb_offer_request)
260
339
 
261
340
  # return_type
262
- return_type = opts[:debug_return_type] || 'AirbnbConnectionResponse'
341
+ return_type = opts[:debug_return_type]
263
342
 
264
343
  # auth_names
265
344
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
266
345
 
267
346
  new_options = opts.merge(
268
- :operation => :"AirbnbApi.get_airbnb_connection",
347
+ :operation => :"AirbnbApi.create_airbnb_offer",
269
348
  :header_params => header_params,
270
349
  :query_params => query_params,
271
350
  :form_params => form_params,
@@ -274,44 +353,48 @@ module Repull
274
353
  :return_type => return_type
275
354
  )
276
355
 
277
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
356
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
278
357
  if @api_client.config.debugging
279
- @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
358
+ @api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
280
359
  end
281
360
  return data, status_code, headers
282
361
  end
283
362
 
284
- # Get Airbnb listing
285
- # Fetch all Airbnb connection rows for a single Vanio listing id. A property may be linked from multiple Airbnb hosts every match is returned. Pass `?include=amenities` to enrich each row with its current Airbnb amenities.
363
+ # Delete an Airbnb photo
364
+ # Remove a single photo from an Airbnb listing. Pass the Airbnb-side photo id as `?photoId=`. Write-sidecalls Airbnb upstream; the local photo cache is reconciled by the sync worker afterwards.
286
365
  # @param id [String]
366
+ # @param photo_id [String] Airbnb-side photo id to delete.
287
367
  # @param [Hash] opts the optional parameters
288
- # @option opts [String] :include Comma-separated expansions. Currently supported: &#x60;amenities&#x60;.
289
- # @return [AirbnbListing]
290
- def get_airbnb_listing(id, opts = {})
291
- data, _status_code, _headers = get_airbnb_listing_with_http_info(id, opts)
368
+ # @return [DeleteAirbnbListingPhoto200Response]
369
+ def delete_airbnb_listing_photo(id, photo_id, opts = {})
370
+ data, _status_code, _headers = delete_airbnb_listing_photo_with_http_info(id, photo_id, opts)
292
371
  data
293
372
  end
294
373
 
295
- # Get Airbnb listing
296
- # Fetch all Airbnb connection rows for a single Vanio listing id. A property may be linked from multiple Airbnb hosts every match is returned. Pass &#x60;?include&#x3D;amenities&#x60; to enrich each row with its current Airbnb amenities.
374
+ # Delete an Airbnb photo
375
+ # Remove a single photo from an Airbnb listing. Pass the Airbnb-side photo id as &#x60;?photoId&#x3D;&#x60;. Write-side — calls Airbnb upstream; the local photo cache is reconciled by the sync worker afterwards.
297
376
  # @param id [String]
377
+ # @param photo_id [String] Airbnb-side photo id to delete.
298
378
  # @param [Hash] opts the optional parameters
299
- # @option opts [String] :include Comma-separated expansions. Currently supported: &#x60;amenities&#x60;.
300
- # @return [Array<(AirbnbListing, Integer, Hash)>] AirbnbListing data, response status code and response headers
301
- def get_airbnb_listing_with_http_info(id, opts = {})
379
+ # @return [Array<(DeleteAirbnbListingPhoto200Response, Integer, Hash)>] DeleteAirbnbListingPhoto200Response data, response status code and response headers
380
+ def delete_airbnb_listing_photo_with_http_info(id, photo_id, opts = {})
302
381
  if @api_client.config.debugging
303
- @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing ...'
382
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.delete_airbnb_listing_photo ...'
304
383
  end
305
384
  # verify the required parameter 'id' is set
306
385
  if @api_client.config.client_side_validation && id.nil?
307
- fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing"
386
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.delete_airbnb_listing_photo"
387
+ end
388
+ # verify the required parameter 'photo_id' is set
389
+ if @api_client.config.client_side_validation && photo_id.nil?
390
+ fail ArgumentError, "Missing the required parameter 'photo_id' when calling AirbnbApi.delete_airbnb_listing_photo"
308
391
  end
309
392
  # resource path
310
- local_var_path = '/v1/channels/airbnb/listings/{id}'.sub('{id}', CGI.escape(id.to_s))
393
+ local_var_path = '/v1/channels/airbnb/listings/{id}/photos'.sub('{id}', CGI.escape(id.to_s))
311
394
 
312
395
  # query parameters
313
396
  query_params = opts[:query_params] || {}
314
- query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
397
+ query_params[:'photoId'] = photo_id
315
398
 
316
399
  # header parameters
317
400
  header_params = opts[:header_params] || {}
@@ -325,13 +408,13 @@ module Repull
325
408
  post_body = opts[:debug_body]
326
409
 
327
410
  # return_type
328
- return_type = opts[:debug_return_type] || 'AirbnbListing'
411
+ return_type = opts[:debug_return_type] || 'DeleteAirbnbListingPhoto200Response'
329
412
 
330
413
  # auth_names
331
414
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
332
415
 
333
416
  new_options = opts.merge(
334
- :operation => :"AirbnbApi.get_airbnb_listing",
417
+ :operation => :"AirbnbApi.delete_airbnb_listing_photo",
335
418
  :header_params => header_params,
336
419
  :query_params => query_params,
337
420
  :form_params => form_params,
@@ -340,44 +423,53 @@ module Repull
340
423
  :return_type => return_type
341
424
  )
342
425
 
343
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
426
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
344
427
  if @api_client.config.debugging
345
- @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
428
+ @api_client.config.logger.debug "API called: AirbnbApi#delete_airbnb_listing_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
346
429
  end
347
430
  return data, status_code, headers
348
431
  end
349
432
 
350
- # Get Airbnb availability
351
- # Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.
352
- # @param id [String]
433
+ # Delete an Airbnb room
434
+ # Delete a room from an Airbnb listing. **Write-side** calls Airbnb upstream. Pass the Airbnb-side room id as `?roomId=`. Requires a connected Airbnb host, else `404 no_connection`.
435
+ # @param id [String] Repull listing id (numeric string).
436
+ # @param room_id [String] Airbnb-side room id to delete.
353
437
  # @param [Hash] opts the optional parameters
354
- # @return [nil]
355
- def get_airbnb_listing_availability(id, opts = {})
356
- get_airbnb_listing_availability_with_http_info(id, opts)
357
- nil
438
+ # @return [DeleteAirbnbListingPhoto200Response]
439
+ def delete_airbnb_listing_room(id, room_id, opts = {})
440
+ data, _status_code, _headers = delete_airbnb_listing_room_with_http_info(id, room_id, opts)
441
+ data
358
442
  end
359
443
 
360
- # Get Airbnb availability
361
- # Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.
362
- # @param id [String]
444
+ # Delete an Airbnb room
445
+ # Delete a room from an Airbnb listing. **Write-side** calls Airbnb upstream. Pass the Airbnb-side room id as &#x60;?roomId&#x3D;&#x60;. Requires a connected Airbnb host, else &#x60;404 no_connection&#x60;.
446
+ # @param id [String] Repull listing id (numeric string).
447
+ # @param room_id [String] Airbnb-side room id to delete.
363
448
  # @param [Hash] opts the optional parameters
364
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
365
- def get_airbnb_listing_availability_with_http_info(id, opts = {})
449
+ # @return [Array<(DeleteAirbnbListingPhoto200Response, Integer, Hash)>] DeleteAirbnbListingPhoto200Response data, response status code and response headers
450
+ def delete_airbnb_listing_room_with_http_info(id, room_id, opts = {})
366
451
  if @api_client.config.debugging
367
- @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_availability ...'
452
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.delete_airbnb_listing_room ...'
368
453
  end
369
454
  # verify the required parameter 'id' is set
370
455
  if @api_client.config.client_side_validation && id.nil?
371
- fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_availability"
456
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.delete_airbnb_listing_room"
457
+ end
458
+ # verify the required parameter 'room_id' is set
459
+ if @api_client.config.client_side_validation && room_id.nil?
460
+ fail ArgumentError, "Missing the required parameter 'room_id' when calling AirbnbApi.delete_airbnb_listing_room"
372
461
  end
373
462
  # resource path
374
- local_var_path = '/v1/channels/airbnb/listings/{id}/availability'.sub('{id}', CGI.escape(id.to_s))
463
+ local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))
375
464
 
376
465
  # query parameters
377
466
  query_params = opts[:query_params] || {}
467
+ query_params[:'roomId'] = room_id
378
468
 
379
469
  # header parameters
380
470
  header_params = opts[:header_params] || {}
471
+ # HTTP header 'Accept' (if needed)
472
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
381
473
 
382
474
  # form parameters
383
475
  form_params = opts[:form_params] || {}
@@ -386,13 +478,13 @@ module Repull
386
478
  post_body = opts[:debug_body]
387
479
 
388
480
  # return_type
389
- return_type = opts[:debug_return_type]
481
+ return_type = opts[:debug_return_type] || 'DeleteAirbnbListingPhoto200Response'
390
482
 
391
483
  # auth_names
392
484
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
393
485
 
394
486
  new_options = opts.merge(
395
- :operation => :"AirbnbApi.get_airbnb_listing_availability",
487
+ :operation => :"AirbnbApi.delete_airbnb_listing_room",
396
488
  :header_params => header_params,
397
489
  :query_params => query_params,
398
490
  :form_params => form_params,
@@ -401,44 +493,120 @@ module Repull
401
493
  :return_type => return_type
402
494
  )
403
495
 
404
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
496
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
405
497
  if @api_client.config.debugging
406
- @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
498
+ @api_client.config.logger.debug "API called: AirbnbApi#delete_airbnb_listing_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
407
499
  end
408
500
  return data, status_code, headers
409
501
  end
410
502
 
411
- # Get Airbnb pricing
412
- # Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing.
413
- # @param id [String]
503
+ # Edit Airbnb host review
504
+ # Edit a host-side review for an Airbnb stay. Airbnb collapses POST + PUT into the same upstream call (`PUT /v2/listing_reviews/{id}`), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial `AirbnbReview` — pass the fields you want to change (rating, public review, private feedback, category ratings).
505
+ # @param id [String] Airbnb review id (&#x60;HRabc123&#x60; style).
506
+ # @param airbnb_review [AirbnbReview]
414
507
  # @param [Hash] opts the optional parameters
415
- # @return [nil]
416
- def get_airbnb_listing_pricing(id, opts = {})
417
- get_airbnb_listing_pricing_with_http_info(id, opts)
418
- nil
508
+ # @return [AirbnbReview]
509
+ def edit_airbnb_review(id, airbnb_review, opts = {})
510
+ data, _status_code, _headers = edit_airbnb_review_with_http_info(id, airbnb_review, opts)
511
+ data
419
512
  end
420
513
 
421
- # Get Airbnb pricing
422
- # Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing.
423
- # @param id [String]
514
+ # Edit Airbnb host review
515
+ # Edit a host-side review for an Airbnb stay. Airbnb collapses POST + PUT into the same upstream call (&#x60;PUT /v2/listing_reviews/{id}&#x60;), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial &#x60;AirbnbReview&#x60; — pass the fields you want to change (rating, public review, private feedback, category ratings).
516
+ # @param id [String] Airbnb review id (&#x60;HRabc123&#x60; style).
517
+ # @param airbnb_review [AirbnbReview]
424
518
  # @param [Hash] opts the optional parameters
425
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
426
- def get_airbnb_listing_pricing_with_http_info(id, opts = {})
519
+ # @return [Array<(AirbnbReview, Integer, Hash)>] AirbnbReview data, response status code and response headers
520
+ def edit_airbnb_review_with_http_info(id, airbnb_review, opts = {})
427
521
  if @api_client.config.debugging
428
- @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_pricing ...'
522
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.edit_airbnb_review ...'
429
523
  end
430
524
  # verify the required parameter 'id' is set
431
525
  if @api_client.config.client_side_validation && id.nil?
432
- fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_pricing"
526
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.edit_airbnb_review"
527
+ end
528
+ # verify the required parameter 'airbnb_review' is set
529
+ if @api_client.config.client_side_validation && airbnb_review.nil?
530
+ fail ArgumentError, "Missing the required parameter 'airbnb_review' when calling AirbnbApi.edit_airbnb_review"
433
531
  end
434
532
  # resource path
435
- local_var_path = '/v1/channels/airbnb/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))
533
+ local_var_path = '/v1/channels/airbnb/reviews/{id}'.sub('{id}', CGI.escape(id.to_s))
534
+
535
+ # query parameters
536
+ query_params = opts[:query_params] || {}
537
+
538
+ # header parameters
539
+ header_params = opts[:header_params] || {}
540
+ # HTTP header 'Accept' (if needed)
541
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
542
+ # HTTP header 'Content-Type'
543
+ content_type = @api_client.select_header_content_type(['application/json'])
544
+ if !content_type.nil?
545
+ header_params['Content-Type'] = content_type
546
+ end
547
+
548
+ # form parameters
549
+ form_params = opts[:form_params] || {}
550
+
551
+ # http body (model)
552
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_review)
553
+
554
+ # return_type
555
+ return_type = opts[:debug_return_type] || 'AirbnbReview'
556
+
557
+ # auth_names
558
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
559
+
560
+ new_options = opts.merge(
561
+ :operation => :"AirbnbApi.edit_airbnb_review",
562
+ :header_params => header_params,
563
+ :query_params => query_params,
564
+ :form_params => form_params,
565
+ :body => post_body,
566
+ :auth_names => auth_names,
567
+ :return_type => return_type
568
+ )
569
+
570
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
571
+ if @api_client.config.debugging
572
+ @api_client.config.logger.debug "API called: AirbnbApi#edit_airbnb_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
573
+ end
574
+ return data, status_code, headers
575
+ end
576
+
577
+ # Get Airbnb alteration
578
+ # Fetch a single Airbnb reservation alteration by its Airbnb alteration id. **Pure DB read**, workspace-scoped via the reservations join. Returns `404 not_found` when no alteration matches the id in your workspace.
579
+ # @param id [String] Airbnb alteration id.
580
+ # @param [Hash] opts the optional parameters
581
+ # @return [GetAirbnbAlteration200Response]
582
+ def get_airbnb_alteration(id, opts = {})
583
+ data, _status_code, _headers = get_airbnb_alteration_with_http_info(id, opts)
584
+ data
585
+ end
586
+
587
+ # Get Airbnb alteration
588
+ # Fetch a single Airbnb reservation alteration by its Airbnb alteration id. **Pure DB read**, workspace-scoped via the reservations join. Returns &#x60;404 not_found&#x60; when no alteration matches the id in your workspace.
589
+ # @param id [String] Airbnb alteration id.
590
+ # @param [Hash] opts the optional parameters
591
+ # @return [Array<(GetAirbnbAlteration200Response, Integer, Hash)>] GetAirbnbAlteration200Response data, response status code and response headers
592
+ def get_airbnb_alteration_with_http_info(id, opts = {})
593
+ if @api_client.config.debugging
594
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_alteration ...'
595
+ end
596
+ # verify the required parameter 'id' is set
597
+ if @api_client.config.client_side_validation && id.nil?
598
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_alteration"
599
+ end
600
+ # resource path
601
+ local_var_path = '/v1/channels/airbnb/alterations/{id}'.sub('{id}', CGI.escape(id.to_s))
436
602
 
437
603
  # query parameters
438
604
  query_params = opts[:query_params] || {}
439
605
 
440
606
  # header parameters
441
607
  header_params = opts[:header_params] || {}
608
+ # HTTP header 'Accept' (if needed)
609
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
442
610
 
443
611
  # form parameters
444
612
  form_params = opts[:form_params] || {}
@@ -447,13 +615,13 @@ module Repull
447
615
  post_body = opts[:debug_body]
448
616
 
449
617
  # return_type
450
- return_type = opts[:debug_return_type]
618
+ return_type = opts[:debug_return_type] || 'GetAirbnbAlteration200Response'
451
619
 
452
620
  # auth_names
453
621
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
454
622
 
455
623
  new_options = opts.merge(
456
- :operation => :"AirbnbApi.get_airbnb_listing_pricing",
624
+ :operation => :"AirbnbApi.get_airbnb_alteration",
457
625
  :header_params => header_params,
458
626
  :query_params => query_params,
459
627
  :form_params => form_params,
@@ -464,39 +632,815 @@ module Repull
464
632
 
465
633
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
466
634
  if @api_client.config.debugging
467
- @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
635
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
468
636
  end
469
637
  return data, status_code, headers
470
638
  end
471
639
 
472
- # Get Airbnb reservation
473
- # Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. `HMABCDEF12`).
474
- # @param code [String]
640
+ # Get Airbnb check-in guide
641
+ # Return every published locale variant of an Airbnb listing's check-in guide. **Pure DB read** from `listings_airbnb_check_in_guides`. Pass `?locale=en` to filter to one locale (prefix match). Returns `404` when the listing has no Airbnb connection in this workspace.
642
+ # @param id [String] Repull listing id (numeric string).
643
+ # @param [Hash] opts the optional parameters
644
+ # @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
645
+ # @return [ListAirbnbTransactions200Response]
646
+ def get_airbnb_checkin_guide(id, opts = {})
647
+ data, _status_code, _headers = get_airbnb_checkin_guide_with_http_info(id, opts)
648
+ data
649
+ end
650
+
651
+ # Get Airbnb check-in guide
652
+ # Return every published locale variant of an Airbnb listing&#39;s check-in guide. **Pure DB read** from &#x60;listings_airbnb_check_in_guides&#x60;. Pass &#x60;?locale&#x3D;en&#x60; to filter to one locale (prefix match). Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace.
653
+ # @param id [String] Repull listing id (numeric string).
654
+ # @param [Hash] opts the optional parameters
655
+ # @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
656
+ # @return [Array<(ListAirbnbTransactions200Response, Integer, Hash)>] ListAirbnbTransactions200Response data, response status code and response headers
657
+ def get_airbnb_checkin_guide_with_http_info(id, opts = {})
658
+ if @api_client.config.debugging
659
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_checkin_guide ...'
660
+ end
661
+ # verify the required parameter 'id' is set
662
+ if @api_client.config.client_side_validation && id.nil?
663
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_checkin_guide"
664
+ end
665
+ # resource path
666
+ local_var_path = '/v1/channels/airbnb/listings/{id}/checkin-guide'.sub('{id}', CGI.escape(id.to_s))
667
+
668
+ # query parameters
669
+ query_params = opts[:query_params] || {}
670
+ query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
671
+
672
+ # header parameters
673
+ header_params = opts[:header_params] || {}
674
+ # HTTP header 'Accept' (if needed)
675
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
676
+
677
+ # form parameters
678
+ form_params = opts[:form_params] || {}
679
+
680
+ # http body (model)
681
+ post_body = opts[:debug_body]
682
+
683
+ # return_type
684
+ return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'
685
+
686
+ # auth_names
687
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
688
+
689
+ new_options = opts.merge(
690
+ :operation => :"AirbnbApi.get_airbnb_checkin_guide",
691
+ :header_params => header_params,
692
+ :query_params => query_params,
693
+ :form_params => form_params,
694
+ :body => post_body,
695
+ :auth_names => auth_names,
696
+ :return_type => return_type
697
+ )
698
+
699
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
700
+ if @api_client.config.debugging
701
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_checkin_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
702
+ end
703
+ return data, status_code, headers
704
+ end
705
+
706
+ # Get Airbnb checkout guide
707
+ # Return the checkout tasks an Airbnb listing shows guests at departure. **Pure DB read** from `listings_airbnb_checkout_tasks`. Returns `404` when the listing has no Airbnb connection in this workspace.
708
+ # @param id [String] Repull listing id (numeric string).
709
+ # @param [Hash] opts the optional parameters
710
+ # @return [ListAirbnbTransactions200Response]
711
+ def get_airbnb_checkout_guide(id, opts = {})
712
+ data, _status_code, _headers = get_airbnb_checkout_guide_with_http_info(id, opts)
713
+ data
714
+ end
715
+
716
+ # Get Airbnb checkout guide
717
+ # Return the checkout tasks an Airbnb listing shows guests at departure. **Pure DB read** from &#x60;listings_airbnb_checkout_tasks&#x60;. Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace.
718
+ # @param id [String] Repull listing id (numeric string).
719
+ # @param [Hash] opts the optional parameters
720
+ # @return [Array<(ListAirbnbTransactions200Response, Integer, Hash)>] ListAirbnbTransactions200Response data, response status code and response headers
721
+ def get_airbnb_checkout_guide_with_http_info(id, opts = {})
722
+ if @api_client.config.debugging
723
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_checkout_guide ...'
724
+ end
725
+ # verify the required parameter 'id' is set
726
+ if @api_client.config.client_side_validation && id.nil?
727
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_checkout_guide"
728
+ end
729
+ # resource path
730
+ local_var_path = '/v1/channels/airbnb/listings/{id}/checkout-guide'.sub('{id}', CGI.escape(id.to_s))
731
+
732
+ # query parameters
733
+ query_params = opts[:query_params] || {}
734
+
735
+ # header parameters
736
+ header_params = opts[:header_params] || {}
737
+ # HTTP header 'Accept' (if needed)
738
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
739
+
740
+ # form parameters
741
+ form_params = opts[:form_params] || {}
742
+
743
+ # http body (model)
744
+ post_body = opts[:debug_body]
745
+
746
+ # return_type
747
+ return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'
748
+
749
+ # auth_names
750
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
751
+
752
+ new_options = opts.merge(
753
+ :operation => :"AirbnbApi.get_airbnb_checkout_guide",
754
+ :header_params => header_params,
755
+ :query_params => query_params,
756
+ :form_params => form_params,
757
+ :body => post_body,
758
+ :auth_names => auth_names,
759
+ :return_type => return_type
760
+ )
761
+
762
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
763
+ if @api_client.config.debugging
764
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_checkout_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
765
+ end
766
+ return data, status_code, headers
767
+ end
768
+
769
+ # Get Airbnb connection state
770
+ # Returns the workspace's Airbnb host connection state in one envelope. Use this instead of inferring connection health from per-listing 401s on `GET /v1/channels/airbnb/listings` — that's noisy (every per-listing call has to fail before you know) and ambiguous (a single 5xx looks identical to a deauth). Pure DB read — does NOT touch Airbnb's API, so it's cheap to poll from a status-page surface. The response includes one row per Airbnb host the workspace has linked. Each row carries `isConnected`, `lastSyncedAt`, `deactivatedAt`, and `lastDisconnectReason` (most recent non-backfill row in `airbnb_host_events`). A self-serve `fixUrl` is included whenever `status` is anything other than `connected` — points at the dashboard where the host re-authorizes (or initiates the first OAuth flow for `never_connected` workspaces).
771
+ # @param [Hash] opts the optional parameters
772
+ # @return [AirbnbConnectionResponse]
773
+ def get_airbnb_connection(opts = {})
774
+ data, _status_code, _headers = get_airbnb_connection_with_http_info(opts)
775
+ data
776
+ end
777
+
778
+ # Get Airbnb connection state
779
+ # Returns the workspace&#39;s Airbnb host connection state in one envelope. Use this instead of inferring connection health from per-listing 401s on &#x60;GET /v1/channels/airbnb/listings&#x60; — that&#39;s noisy (every per-listing call has to fail before you know) and ambiguous (a single 5xx looks identical to a deauth). Pure DB read — does NOT touch Airbnb&#39;s API, so it&#39;s cheap to poll from a status-page surface. The response includes one row per Airbnb host the workspace has linked. Each row carries &#x60;isConnected&#x60;, &#x60;lastSyncedAt&#x60;, &#x60;deactivatedAt&#x60;, and &#x60;lastDisconnectReason&#x60; (most recent non-backfill row in &#x60;airbnb_host_events&#x60;). A self-serve &#x60;fixUrl&#x60; is included whenever &#x60;status&#x60; is anything other than &#x60;connected&#x60; — points at the dashboard where the host re-authorizes (or initiates the first OAuth flow for &#x60;never_connected&#x60; workspaces).
780
+ # @param [Hash] opts the optional parameters
781
+ # @return [Array<(AirbnbConnectionResponse, Integer, Hash)>] AirbnbConnectionResponse data, response status code and response headers
782
+ def get_airbnb_connection_with_http_info(opts = {})
783
+ if @api_client.config.debugging
784
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_connection ...'
785
+ end
786
+ # resource path
787
+ local_var_path = '/v1/channels/airbnb/connection'
788
+
789
+ # query parameters
790
+ query_params = opts[:query_params] || {}
791
+
792
+ # header parameters
793
+ header_params = opts[:header_params] || {}
794
+ # HTTP header 'Accept' (if needed)
795
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
796
+
797
+ # form parameters
798
+ form_params = opts[:form_params] || {}
799
+
800
+ # http body (model)
801
+ post_body = opts[:debug_body]
802
+
803
+ # return_type
804
+ return_type = opts[:debug_return_type] || 'AirbnbConnectionResponse'
805
+
806
+ # auth_names
807
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
808
+
809
+ new_options = opts.merge(
810
+ :operation => :"AirbnbApi.get_airbnb_connection",
811
+ :header_params => header_params,
812
+ :query_params => query_params,
813
+ :form_params => form_params,
814
+ :body => post_body,
815
+ :auth_names => auth_names,
816
+ :return_type => return_type
817
+ )
818
+
819
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
820
+ if @api_client.config.debugging
821
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
822
+ end
823
+ return data, status_code, headers
824
+ end
825
+
826
+ # Get Airbnb listing
827
+ # Fetch all Airbnb connection rows for a single Vanio listing id. A property may be linked from multiple Airbnb hosts — every match is returned. Pass `?include=amenities` to enrich each row with its current Airbnb amenities.
828
+ # @param id [String]
829
+ # @param [Hash] opts the optional parameters
830
+ # @option opts [String] :include Comma-separated expansions. Currently supported: &#x60;amenities&#x60;.
831
+ # @return [AirbnbListing]
832
+ def get_airbnb_listing(id, opts = {})
833
+ data, _status_code, _headers = get_airbnb_listing_with_http_info(id, opts)
834
+ data
835
+ end
836
+
837
+ # Get Airbnb listing
838
+ # Fetch all Airbnb connection rows for a single Vanio listing id. A property may be linked from multiple Airbnb hosts — every match is returned. Pass &#x60;?include&#x3D;amenities&#x60; to enrich each row with its current Airbnb amenities.
839
+ # @param id [String]
840
+ # @param [Hash] opts the optional parameters
841
+ # @option opts [String] :include Comma-separated expansions. Currently supported: &#x60;amenities&#x60;.
842
+ # @return [Array<(AirbnbListing, Integer, Hash)>] AirbnbListing data, response status code and response headers
843
+ def get_airbnb_listing_with_http_info(id, opts = {})
844
+ if @api_client.config.debugging
845
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing ...'
846
+ end
847
+ # verify the required parameter 'id' is set
848
+ if @api_client.config.client_side_validation && id.nil?
849
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing"
850
+ end
851
+ # resource path
852
+ local_var_path = '/v1/channels/airbnb/listings/{id}'.sub('{id}', CGI.escape(id.to_s))
853
+
854
+ # query parameters
855
+ query_params = opts[:query_params] || {}
856
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
857
+
858
+ # header parameters
859
+ header_params = opts[:header_params] || {}
860
+ # HTTP header 'Accept' (if needed)
861
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
862
+
863
+ # form parameters
864
+ form_params = opts[:form_params] || {}
865
+
866
+ # http body (model)
867
+ post_body = opts[:debug_body]
868
+
869
+ # return_type
870
+ return_type = opts[:debug_return_type] || 'AirbnbListing'
871
+
872
+ # auth_names
873
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
874
+
875
+ new_options = opts.merge(
876
+ :operation => :"AirbnbApi.get_airbnb_listing",
877
+ :header_params => header_params,
878
+ :query_params => query_params,
879
+ :form_params => form_params,
880
+ :body => post_body,
881
+ :auth_names => auth_names,
882
+ :return_type => return_type
883
+ )
884
+
885
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
886
+ if @api_client.config.debugging
887
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
888
+ end
889
+ return data, status_code, headers
890
+ end
891
+
892
+ # Get Airbnb availability
893
+ # Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.
894
+ # @param id [String]
895
+ # @param [Hash] opts the optional parameters
896
+ # @return [nil]
897
+ def get_airbnb_listing_availability(id, opts = {})
898
+ get_airbnb_listing_availability_with_http_info(id, opts)
899
+ nil
900
+ end
901
+
902
+ # Get Airbnb availability
903
+ # Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.
904
+ # @param id [String]
905
+ # @param [Hash] opts the optional parameters
906
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
907
+ def get_airbnb_listing_availability_with_http_info(id, opts = {})
908
+ if @api_client.config.debugging
909
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_availability ...'
910
+ end
911
+ # verify the required parameter 'id' is set
912
+ if @api_client.config.client_side_validation && id.nil?
913
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_availability"
914
+ end
915
+ # resource path
916
+ local_var_path = '/v1/channels/airbnb/listings/{id}/availability'.sub('{id}', CGI.escape(id.to_s))
917
+
918
+ # query parameters
919
+ query_params = opts[:query_params] || {}
920
+
921
+ # header parameters
922
+ header_params = opts[:header_params] || {}
923
+
924
+ # form parameters
925
+ form_params = opts[:form_params] || {}
926
+
927
+ # http body (model)
928
+ post_body = opts[:debug_body]
929
+
930
+ # return_type
931
+ return_type = opts[:debug_return_type]
932
+
933
+ # auth_names
934
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
935
+
936
+ new_options = opts.merge(
937
+ :operation => :"AirbnbApi.get_airbnb_listing_availability",
938
+ :header_params => header_params,
939
+ :query_params => query_params,
940
+ :form_params => form_params,
941
+ :body => post_body,
942
+ :auth_names => auth_names,
943
+ :return_type => return_type
944
+ )
945
+
946
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
947
+ if @api_client.config.debugging
948
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
949
+ end
950
+ return data, status_code, headers
951
+ end
952
+
953
+ # Get Airbnb pricing
954
+ # Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing.
955
+ # @param id [String]
956
+ # @param [Hash] opts the optional parameters
957
+ # @return [nil]
958
+ def get_airbnb_listing_pricing(id, opts = {})
959
+ get_airbnb_listing_pricing_with_http_info(id, opts)
960
+ nil
961
+ end
962
+
963
+ # Get Airbnb pricing
964
+ # Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing.
965
+ # @param id [String]
966
+ # @param [Hash] opts the optional parameters
967
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
968
+ def get_airbnb_listing_pricing_with_http_info(id, opts = {})
969
+ if @api_client.config.debugging
970
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_pricing ...'
971
+ end
972
+ # verify the required parameter 'id' is set
973
+ if @api_client.config.client_side_validation && id.nil?
974
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_pricing"
975
+ end
976
+ # resource path
977
+ local_var_path = '/v1/channels/airbnb/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))
978
+
979
+ # query parameters
980
+ query_params = opts[:query_params] || {}
981
+
982
+ # header parameters
983
+ header_params = opts[:header_params] || {}
984
+
985
+ # form parameters
986
+ form_params = opts[:form_params] || {}
987
+
988
+ # http body (model)
989
+ post_body = opts[:debug_body]
990
+
991
+ # return_type
992
+ return_type = opts[:debug_return_type]
993
+
994
+ # auth_names
995
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
996
+
997
+ new_options = opts.merge(
998
+ :operation => :"AirbnbApi.get_airbnb_listing_pricing",
999
+ :header_params => header_params,
1000
+ :query_params => query_params,
1001
+ :form_params => form_params,
1002
+ :body => post_body,
1003
+ :auth_names => auth_names,
1004
+ :return_type => return_type
1005
+ )
1006
+
1007
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1008
+ if @api_client.config.debugging
1009
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1010
+ end
1011
+ return data, status_code, headers
1012
+ end
1013
+
1014
+ # Get Airbnb listing quality
1015
+ # Return an Airbnb listing's quality signals — standards, reservation issues, and monthly quality stats. **Pure DB read** from the local quality mirrors. Scope the response with `?type=all|standards|issues|stats` (default `all`, which returns `{ standards, issues }`). Returns `404` when the listing has no Airbnb connection in this workspace.
1016
+ # @param id [String] Repull listing id (numeric string).
1017
+ # @param [Hash] opts the optional parameters
1018
+ # @option opts [String] :type Which quality slice to return. &#x60;all&#x60; returns &#x60;{ standards, issues }&#x60;. (default to 'all')
1019
+ # @return [GetAirbnbListingQuality200Response]
1020
+ def get_airbnb_listing_quality(id, opts = {})
1021
+ data, _status_code, _headers = get_airbnb_listing_quality_with_http_info(id, opts)
1022
+ data
1023
+ end
1024
+
1025
+ # Get Airbnb listing quality
1026
+ # Return an Airbnb listing&#39;s quality signals — standards, reservation issues, and monthly quality stats. **Pure DB read** from the local quality mirrors. Scope the response with &#x60;?type&#x3D;all|standards|issues|stats&#x60; (default &#x60;all&#x60;, which returns &#x60;{ standards, issues }&#x60;). Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace.
1027
+ # @param id [String] Repull listing id (numeric string).
1028
+ # @param [Hash] opts the optional parameters
1029
+ # @option opts [String] :type Which quality slice to return. &#x60;all&#x60; returns &#x60;{ standards, issues }&#x60;. (default to 'all')
1030
+ # @return [Array<(GetAirbnbListingQuality200Response, Integer, Hash)>] GetAirbnbListingQuality200Response data, response status code and response headers
1031
+ def get_airbnb_listing_quality_with_http_info(id, opts = {})
1032
+ if @api_client.config.debugging
1033
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_quality ...'
1034
+ end
1035
+ # verify the required parameter 'id' is set
1036
+ if @api_client.config.client_side_validation && id.nil?
1037
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_quality"
1038
+ end
1039
+ allowable_values = ["all", "standards", "issues", "stats"]
1040
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
1041
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
1042
+ end
1043
+ # resource path
1044
+ local_var_path = '/v1/channels/airbnb/listings/{id}/quality'.sub('{id}', CGI.escape(id.to_s))
1045
+
1046
+ # query parameters
1047
+ query_params = opts[:query_params] || {}
1048
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
1049
+
1050
+ # header parameters
1051
+ header_params = opts[:header_params] || {}
1052
+ # HTTP header 'Accept' (if needed)
1053
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1054
+
1055
+ # form parameters
1056
+ form_params = opts[:form_params] || {}
1057
+
1058
+ # http body (model)
1059
+ post_body = opts[:debug_body]
1060
+
1061
+ # return_type
1062
+ return_type = opts[:debug_return_type] || 'GetAirbnbListingQuality200Response'
1063
+
1064
+ # auth_names
1065
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1066
+
1067
+ new_options = opts.merge(
1068
+ :operation => :"AirbnbApi.get_airbnb_listing_quality",
1069
+ :header_params => header_params,
1070
+ :query_params => query_params,
1071
+ :form_params => form_params,
1072
+ :body => post_body,
1073
+ :auth_names => auth_names,
1074
+ :return_type => return_type
1075
+ )
1076
+
1077
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1078
+ if @api_client.config.debugging
1079
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_quality\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1080
+ end
1081
+ return data, status_code, headers
1082
+ end
1083
+
1084
+ # Get Airbnb listing settings
1085
+ # Return an Airbnb listing's host roles, published locales, and regulatory permits. **Pure DB read** — host roles from `listings_airbnb_details.host_roles`, locales from distinct `listings_airbnb_descriptions.locale`, permits from `listings_airbnb_permits`. Scope with `?type=all|hosts|permits|locales` (default `all`, which returns `{ hosts, locales }`). Returns `404` when the listing has no Airbnb connection in this workspace.
1086
+ # @param id [String] Repull listing id (numeric string).
1087
+ # @param [Hash] opts the optional parameters
1088
+ # @option opts [String] :type Which settings slice to return. &#x60;all&#x60; returns &#x60;{ hosts, locales }&#x60;. (default to 'all')
1089
+ # @return [GetAirbnbListingSettings200Response]
1090
+ def get_airbnb_listing_settings(id, opts = {})
1091
+ data, _status_code, _headers = get_airbnb_listing_settings_with_http_info(id, opts)
1092
+ data
1093
+ end
1094
+
1095
+ # Get Airbnb listing settings
1096
+ # Return an Airbnb listing&#39;s host roles, published locales, and regulatory permits. **Pure DB read** — host roles from &#x60;listings_airbnb_details.host_roles&#x60;, locales from distinct &#x60;listings_airbnb_descriptions.locale&#x60;, permits from &#x60;listings_airbnb_permits&#x60;. Scope with &#x60;?type&#x3D;all|hosts|permits|locales&#x60; (default &#x60;all&#x60;, which returns &#x60;{ hosts, locales }&#x60;). Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace.
1097
+ # @param id [String] Repull listing id (numeric string).
1098
+ # @param [Hash] opts the optional parameters
1099
+ # @option opts [String] :type Which settings slice to return. &#x60;all&#x60; returns &#x60;{ hosts, locales }&#x60;. (default to 'all')
1100
+ # @return [Array<(GetAirbnbListingSettings200Response, Integer, Hash)>] GetAirbnbListingSettings200Response data, response status code and response headers
1101
+ def get_airbnb_listing_settings_with_http_info(id, opts = {})
1102
+ if @api_client.config.debugging
1103
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_settings ...'
1104
+ end
1105
+ # verify the required parameter 'id' is set
1106
+ if @api_client.config.client_side_validation && id.nil?
1107
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_settings"
1108
+ end
1109
+ allowable_values = ["all", "hosts", "permits", "locales"]
1110
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
1111
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
1112
+ end
1113
+ # resource path
1114
+ local_var_path = '/v1/channels/airbnb/listings/{id}/settings'.sub('{id}', CGI.escape(id.to_s))
1115
+
1116
+ # query parameters
1117
+ query_params = opts[:query_params] || {}
1118
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
1119
+
1120
+ # header parameters
1121
+ header_params = opts[:header_params] || {}
1122
+ # HTTP header 'Accept' (if needed)
1123
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1124
+
1125
+ # form parameters
1126
+ form_params = opts[:form_params] || {}
1127
+
1128
+ # http body (model)
1129
+ post_body = opts[:debug_body]
1130
+
1131
+ # return_type
1132
+ return_type = opts[:debug_return_type] || 'GetAirbnbListingSettings200Response'
1133
+
1134
+ # auth_names
1135
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1136
+
1137
+ new_options = opts.merge(
1138
+ :operation => :"AirbnbApi.get_airbnb_listing_settings",
1139
+ :header_params => header_params,
1140
+ :query_params => query_params,
1141
+ :form_params => form_params,
1142
+ :body => post_body,
1143
+ :auth_names => auth_names,
1144
+ :return_type => return_type
1145
+ )
1146
+
1147
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1148
+ if @api_client.config.debugging
1149
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1150
+ end
1151
+ return data, status_code, headers
1152
+ end
1153
+
1154
+ # Get Airbnb reservation
1155
+ # Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. `HMABCDEF12`).
1156
+ # @param code [String]
1157
+ # @param [Hash] opts the optional parameters
1158
+ # @return [AirbnbReservation]
1159
+ def get_airbnb_reservation(code, opts = {})
1160
+ data, _status_code, _headers = get_airbnb_reservation_with_http_info(code, opts)
1161
+ data
1162
+ end
1163
+
1164
+ # Get Airbnb reservation
1165
+ # Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. &#x60;HMABCDEF12&#x60;).
1166
+ # @param code [String]
1167
+ # @param [Hash] opts the optional parameters
1168
+ # @return [Array<(AirbnbReservation, Integer, Hash)>] AirbnbReservation data, response status code and response headers
1169
+ def get_airbnb_reservation_with_http_info(code, opts = {})
1170
+ if @api_client.config.debugging
1171
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_reservation ...'
1172
+ end
1173
+ # verify the required parameter 'code' is set
1174
+ if @api_client.config.client_side_validation && code.nil?
1175
+ fail ArgumentError, "Missing the required parameter 'code' when calling AirbnbApi.get_airbnb_reservation"
1176
+ end
1177
+ # resource path
1178
+ local_var_path = '/v1/channels/airbnb/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
1179
+
1180
+ # query parameters
1181
+ query_params = opts[:query_params] || {}
1182
+
1183
+ # header parameters
1184
+ header_params = opts[:header_params] || {}
1185
+ # HTTP header 'Accept' (if needed)
1186
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1187
+
1188
+ # form parameters
1189
+ form_params = opts[:form_params] || {}
1190
+
1191
+ # http body (model)
1192
+ post_body = opts[:debug_body]
1193
+
1194
+ # return_type
1195
+ return_type = opts[:debug_return_type] || 'AirbnbReservation'
1196
+
1197
+ # auth_names
1198
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1199
+
1200
+ new_options = opts.merge(
1201
+ :operation => :"AirbnbApi.get_airbnb_reservation",
1202
+ :header_params => header_params,
1203
+ :query_params => query_params,
1204
+ :form_params => form_params,
1205
+ :body => post_body,
1206
+ :auth_names => auth_names,
1207
+ :return_type => return_type
1208
+ )
1209
+
1210
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1211
+ if @api_client.config.debugging
1212
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1213
+ end
1214
+ return data, status_code, headers
1215
+ end
1216
+
1217
+ # Get Airbnb thread
1218
+ # Fetch a single Airbnb message thread by its Airbnb thread id. **Pure DB read** from the local `message_threads` mirror, workspace-scoped. Returns `404 not_found` when no thread matches. For the messages within a thread use `GET /v1/channels/airbnb/messaging/{threadId}/messages`.
1219
+ # @param thread_id [String] Airbnb thread id (matches the external thread id).
1220
+ # @param [Hash] opts the optional parameters
1221
+ # @return [GetAirbnbThread200Response]
1222
+ def get_airbnb_thread(thread_id, opts = {})
1223
+ data, _status_code, _headers = get_airbnb_thread_with_http_info(thread_id, opts)
1224
+ data
1225
+ end
1226
+
1227
+ # Get Airbnb thread
1228
+ # Fetch a single Airbnb message thread by its Airbnb thread id. **Pure DB read** from the local &#x60;message_threads&#x60; mirror, workspace-scoped. Returns &#x60;404 not_found&#x60; when no thread matches. For the messages within a thread use &#x60;GET /v1/channels/airbnb/messaging/{threadId}/messages&#x60;.
1229
+ # @param thread_id [String] Airbnb thread id (matches the external thread id).
1230
+ # @param [Hash] opts the optional parameters
1231
+ # @return [Array<(GetAirbnbThread200Response, Integer, Hash)>] GetAirbnbThread200Response data, response status code and response headers
1232
+ def get_airbnb_thread_with_http_info(thread_id, opts = {})
1233
+ if @api_client.config.debugging
1234
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_thread ...'
1235
+ end
1236
+ # verify the required parameter 'thread_id' is set
1237
+ if @api_client.config.client_side_validation && thread_id.nil?
1238
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.get_airbnb_thread"
1239
+ end
1240
+ # resource path
1241
+ local_var_path = '/v1/channels/airbnb/messaging/{threadId}'.sub('{threadId}', CGI.escape(thread_id.to_s))
1242
+
1243
+ # query parameters
1244
+ query_params = opts[:query_params] || {}
1245
+
1246
+ # header parameters
1247
+ header_params = opts[:header_params] || {}
1248
+ # HTTP header 'Accept' (if needed)
1249
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1250
+
1251
+ # form parameters
1252
+ form_params = opts[:form_params] || {}
1253
+
1254
+ # http body (model)
1255
+ post_body = opts[:debug_body]
1256
+
1257
+ # return_type
1258
+ return_type = opts[:debug_return_type] || 'GetAirbnbThread200Response'
1259
+
1260
+ # auth_names
1261
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1262
+
1263
+ new_options = opts.merge(
1264
+ :operation => :"AirbnbApi.get_airbnb_thread",
1265
+ :header_params => header_params,
1266
+ :query_params => query_params,
1267
+ :form_params => form_params,
1268
+ :body => post_body,
1269
+ :auth_names => auth_names,
1270
+ :return_type => return_type
1271
+ )
1272
+
1273
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1274
+ if @api_client.config.debugging
1275
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1276
+ end
1277
+ return data, status_code, headers
1278
+ end
1279
+
1280
+ # List Airbnb alterations
1281
+ # List reservation alteration requests for Airbnb reservations in this workspace. **Pure DB read** from the local `reservation_alterations` mirror — never calls Airbnb upstream — scoped to your workspace via the reservations join. Default returns only pending alterations; pass `?type=all` for the full history. Filter to a single reservation with `?reservation_code=<confirmation code>`. Every response carries the `data_freshness` envelope.
1282
+ # @param [Hash] opts the optional parameters
1283
+ # @option opts [String] :type Scope: &#x60;pending&#x60; (default) returns only alterations awaiting a decision; &#x60;all&#x60; returns every alteration. (default to 'pending')
1284
+ # @option opts [String] :reservation_code Airbnb confirmation code — restricts results to a single reservation. Returns an empty array when no reservation matches within your workspace.
1285
+ # @return [ListAirbnbAlterations200Response]
1286
+ def list_airbnb_alterations(opts = {})
1287
+ data, _status_code, _headers = list_airbnb_alterations_with_http_info(opts)
1288
+ data
1289
+ end
1290
+
1291
+ # List Airbnb alterations
1292
+ # List reservation alteration requests for Airbnb reservations in this workspace. **Pure DB read** from the local &#x60;reservation_alterations&#x60; mirror — never calls Airbnb upstream — scoped to your workspace via the reservations join. Default returns only pending alterations; pass &#x60;?type&#x3D;all&#x60; for the full history. Filter to a single reservation with &#x60;?reservation_code&#x3D;&lt;confirmation code&gt;&#x60;. Every response carries the &#x60;data_freshness&#x60; envelope.
1293
+ # @param [Hash] opts the optional parameters
1294
+ # @option opts [String] :type Scope: &#x60;pending&#x60; (default) returns only alterations awaiting a decision; &#x60;all&#x60; returns every alteration. (default to 'pending')
1295
+ # @option opts [String] :reservation_code Airbnb confirmation code — restricts results to a single reservation. Returns an empty array when no reservation matches within your workspace.
1296
+ # @return [Array<(ListAirbnbAlterations200Response, Integer, Hash)>] ListAirbnbAlterations200Response data, response status code and response headers
1297
+ def list_airbnb_alterations_with_http_info(opts = {})
1298
+ if @api_client.config.debugging
1299
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_alterations ...'
1300
+ end
1301
+ allowable_values = ["pending", "all"]
1302
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
1303
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
1304
+ end
1305
+ # resource path
1306
+ local_var_path = '/v1/channels/airbnb/alterations'
1307
+
1308
+ # query parameters
1309
+ query_params = opts[:query_params] || {}
1310
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
1311
+ query_params[:'reservation_code'] = opts[:'reservation_code'] if !opts[:'reservation_code'].nil?
1312
+
1313
+ # header parameters
1314
+ header_params = opts[:header_params] || {}
1315
+ # HTTP header 'Accept' (if needed)
1316
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1317
+
1318
+ # form parameters
1319
+ form_params = opts[:form_params] || {}
1320
+
1321
+ # http body (model)
1322
+ post_body = opts[:debug_body]
1323
+
1324
+ # return_type
1325
+ return_type = opts[:debug_return_type] || 'ListAirbnbAlterations200Response'
1326
+
1327
+ # auth_names
1328
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1329
+
1330
+ new_options = opts.merge(
1331
+ :operation => :"AirbnbApi.list_airbnb_alterations",
1332
+ :header_params => header_params,
1333
+ :query_params => query_params,
1334
+ :form_params => form_params,
1335
+ :body => post_body,
1336
+ :auth_names => auth_names,
1337
+ :return_type => return_type
1338
+ )
1339
+
1340
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1341
+ if @api_client.config.debugging
1342
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_alterations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1343
+ end
1344
+ return data, status_code, headers
1345
+ end
1346
+
1347
+ # List Airbnb amenities
1348
+ # List an Airbnb listing's amenities. **Pure DB read** from the local `listings_airbnb_amenities` cache — never calls Airbnb upstream. The response splits amenities into `amenities` (regular) and `accessibility_amenities` (step-free access, wide doorways, grab rails, disabled parking, wheelchair, accessible-height fixtures, hoists, etc). Both are arrays (`[]` when none). Consult `data_freshness` to disambiguate \"never synced\" from \"fresh and genuinely empty\". Returns `404` when the listing has no Airbnb connection in this workspace.
1349
+ # @param id [String] Repull listing id (numeric string).
1350
+ # @param [Hash] opts the optional parameters
1351
+ # @return [ListAirbnbListingAmenities200Response]
1352
+ def list_airbnb_listing_amenities(id, opts = {})
1353
+ data, _status_code, _headers = list_airbnb_listing_amenities_with_http_info(id, opts)
1354
+ data
1355
+ end
1356
+
1357
+ # List Airbnb amenities
1358
+ # List an Airbnb listing&#39;s amenities. **Pure DB read** from the local &#x60;listings_airbnb_amenities&#x60; cache — never calls Airbnb upstream. The response splits amenities into &#x60;amenities&#x60; (regular) and &#x60;accessibility_amenities&#x60; (step-free access, wide doorways, grab rails, disabled parking, wheelchair, accessible-height fixtures, hoists, etc). Both are arrays (&#x60;[]&#x60; when none). Consult &#x60;data_freshness&#x60; to disambiguate \&quot;never synced\&quot; from \&quot;fresh and genuinely empty\&quot;. Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace.
1359
+ # @param id [String] Repull listing id (numeric string).
1360
+ # @param [Hash] opts the optional parameters
1361
+ # @return [Array<(ListAirbnbListingAmenities200Response, Integer, Hash)>] ListAirbnbListingAmenities200Response data, response status code and response headers
1362
+ def list_airbnb_listing_amenities_with_http_info(id, opts = {})
1363
+ if @api_client.config.debugging
1364
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_amenities ...'
1365
+ end
1366
+ # verify the required parameter 'id' is set
1367
+ if @api_client.config.client_side_validation && id.nil?
1368
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_amenities"
1369
+ end
1370
+ # resource path
1371
+ local_var_path = '/v1/channels/airbnb/listings/{id}/amenities'.sub('{id}', CGI.escape(id.to_s))
1372
+
1373
+ # query parameters
1374
+ query_params = opts[:query_params] || {}
1375
+
1376
+ # header parameters
1377
+ header_params = opts[:header_params] || {}
1378
+ # HTTP header 'Accept' (if needed)
1379
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1380
+
1381
+ # form parameters
1382
+ form_params = opts[:form_params] || {}
1383
+
1384
+ # http body (model)
1385
+ post_body = opts[:debug_body]
1386
+
1387
+ # return_type
1388
+ return_type = opts[:debug_return_type] || 'ListAirbnbListingAmenities200Response'
1389
+
1390
+ # auth_names
1391
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1392
+
1393
+ new_options = opts.merge(
1394
+ :operation => :"AirbnbApi.list_airbnb_listing_amenities",
1395
+ :header_params => header_params,
1396
+ :query_params => query_params,
1397
+ :form_params => form_params,
1398
+ :body => post_body,
1399
+ :auth_names => auth_names,
1400
+ :return_type => return_type
1401
+ )
1402
+
1403
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1404
+ if @api_client.config.debugging
1405
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_amenities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1406
+ end
1407
+ return data, status_code, headers
1408
+ end
1409
+
1410
+ # List Airbnb descriptions
1411
+ # List an Airbnb listing's per-locale content (name, summary, house rules, etc). **Pure DB read** from `listings_airbnb_descriptions`. Filter to one locale with `?locale=en` (the legacy `?country=` param is accepted as a soft alias). Returns `404` when the listing has no Airbnb connection in this workspace.
1412
+ # @param id [String] Repull listing id (numeric string).
475
1413
  # @param [Hash] opts the optional parameters
476
- # @return [AirbnbReservation]
477
- def get_airbnb_reservation(code, opts = {})
478
- data, _status_code, _headers = get_airbnb_reservation_with_http_info(code, opts)
1414
+ # @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
1415
+ # @option opts [String] :country Legacy alias for &#x60;locale&#x60;. Prefer &#x60;locale&#x60;.
1416
+ # @return [ListAirbnbTransactions200Response]
1417
+ def list_airbnb_listing_descriptions(id, opts = {})
1418
+ data, _status_code, _headers = list_airbnb_listing_descriptions_with_http_info(id, opts)
479
1419
  data
480
1420
  end
481
1421
 
482
- # Get Airbnb reservation
483
- # Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. &#x60;HMABCDEF12&#x60;).
484
- # @param code [String]
1422
+ # List Airbnb descriptions
1423
+ # List an Airbnb listing&#39;s per-locale content (name, summary, house rules, etc). **Pure DB read** from &#x60;listings_airbnb_descriptions&#x60;. Filter to one locale with &#x60;?locale&#x3D;en&#x60; (the legacy &#x60;?country&#x3D;&#x60; param is accepted as a soft alias). Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace.
1424
+ # @param id [String] Repull listing id (numeric string).
485
1425
  # @param [Hash] opts the optional parameters
486
- # @return [Array<(AirbnbReservation, Integer, Hash)>] AirbnbReservation data, response status code and response headers
487
- def get_airbnb_reservation_with_http_info(code, opts = {})
1426
+ # @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
1427
+ # @option opts [String] :country Legacy alias for &#x60;locale&#x60;. Prefer &#x60;locale&#x60;.
1428
+ # @return [Array<(ListAirbnbTransactions200Response, Integer, Hash)>] ListAirbnbTransactions200Response data, response status code and response headers
1429
+ def list_airbnb_listing_descriptions_with_http_info(id, opts = {})
488
1430
  if @api_client.config.debugging
489
- @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_reservation ...'
1431
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_descriptions ...'
490
1432
  end
491
- # verify the required parameter 'code' is set
492
- if @api_client.config.client_side_validation && code.nil?
493
- fail ArgumentError, "Missing the required parameter 'code' when calling AirbnbApi.get_airbnb_reservation"
1433
+ # verify the required parameter 'id' is set
1434
+ if @api_client.config.client_side_validation && id.nil?
1435
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_descriptions"
494
1436
  end
495
1437
  # resource path
496
- local_var_path = '/v1/channels/airbnb/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
1438
+ local_var_path = '/v1/channels/airbnb/listings/{id}/descriptions'.sub('{id}', CGI.escape(id.to_s))
497
1439
 
498
1440
  # query parameters
499
1441
  query_params = opts[:query_params] || {}
1442
+ query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
1443
+ query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
500
1444
 
501
1445
  # header parameters
502
1446
  header_params = opts[:header_params] || {}
@@ -510,13 +1454,13 @@ module Repull
510
1454
  post_body = opts[:debug_body]
511
1455
 
512
1456
  # return_type
513
- return_type = opts[:debug_return_type] || 'AirbnbReservation'
1457
+ return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'
514
1458
 
515
1459
  # auth_names
516
1460
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
517
1461
 
518
1462
  new_options = opts.merge(
519
- :operation => :"AirbnbApi.get_airbnb_reservation",
1463
+ :operation => :"AirbnbApi.list_airbnb_listing_descriptions",
520
1464
  :header_params => header_params,
521
1465
  :query_params => query_params,
522
1466
  :form_params => form_params,
@@ -527,7 +1471,7 @@ module Repull
527
1471
 
528
1472
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
529
1473
  if @api_client.config.debugging
530
- @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1474
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_descriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
531
1475
  end
532
1476
  return data, status_code, headers
533
1477
  end
@@ -593,6 +1537,69 @@ module Repull
593
1537
  return data, status_code, headers
594
1538
  end
595
1539
 
1540
+ # List Airbnb rooms
1541
+ # List the rooms configured on an Airbnb listing, ordered by room number. **Pure DB read** from `listings_airbnb_rooms`. Returns `404` when the listing has no Airbnb connection in this workspace.
1542
+ # @param id [String] Repull listing id (numeric string).
1543
+ # @param [Hash] opts the optional parameters
1544
+ # @return [ListAirbnbTransactions200Response]
1545
+ def list_airbnb_listing_rooms(id, opts = {})
1546
+ data, _status_code, _headers = list_airbnb_listing_rooms_with_http_info(id, opts)
1547
+ data
1548
+ end
1549
+
1550
+ # List Airbnb rooms
1551
+ # List the rooms configured on an Airbnb listing, ordered by room number. **Pure DB read** from &#x60;listings_airbnb_rooms&#x60;. Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace.
1552
+ # @param id [String] Repull listing id (numeric string).
1553
+ # @param [Hash] opts the optional parameters
1554
+ # @return [Array<(ListAirbnbTransactions200Response, Integer, Hash)>] ListAirbnbTransactions200Response data, response status code and response headers
1555
+ def list_airbnb_listing_rooms_with_http_info(id, opts = {})
1556
+ if @api_client.config.debugging
1557
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_rooms ...'
1558
+ end
1559
+ # verify the required parameter 'id' is set
1560
+ if @api_client.config.client_side_validation && id.nil?
1561
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_rooms"
1562
+ end
1563
+ # resource path
1564
+ local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))
1565
+
1566
+ # query parameters
1567
+ query_params = opts[:query_params] || {}
1568
+
1569
+ # header parameters
1570
+ header_params = opts[:header_params] || {}
1571
+ # HTTP header 'Accept' (if needed)
1572
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1573
+
1574
+ # form parameters
1575
+ form_params = opts[:form_params] || {}
1576
+
1577
+ # http body (model)
1578
+ post_body = opts[:debug_body]
1579
+
1580
+ # return_type
1581
+ return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'
1582
+
1583
+ # auth_names
1584
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1585
+
1586
+ new_options = opts.merge(
1587
+ :operation => :"AirbnbApi.list_airbnb_listing_rooms",
1588
+ :header_params => header_params,
1589
+ :query_params => query_params,
1590
+ :form_params => form_params,
1591
+ :body => post_body,
1592
+ :auth_names => auth_names,
1593
+ :return_type => return_type
1594
+ )
1595
+
1596
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1597
+ if @api_client.config.debugging
1598
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_rooms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1599
+ end
1600
+ return data, status_code, headers
1601
+ end
1602
+
596
1603
  # List Airbnb listings
597
1604
  # List every Airbnb listing this workspace has access to via the connected Airbnb account. **Pure DB read — never calls Airbnb upstream.** The connect flow is what populates the local cache; the API serves what's already there. Customers with a disconnected host still see their last-synced data, with the top-level `data_freshness` envelope flagging the staleness and pointing at the reconnect URL. Pass `?include=amenities` to enrich each connection with its locally-cached amenity set. Returns `null` per connection when the cache is empty.
598
1605
  # @param [Hash] opts the optional parameters
@@ -931,6 +1938,63 @@ module Repull
931
1938
  return data, status_code, headers
932
1939
  end
933
1940
 
1941
+ # List Airbnb transactions
1942
+ # List Airbnb host transactions (payouts, adjustments, resolutions) for this workspace. **Pure DB read** — customer-facing reads never call Airbnb upstream. The transactions mirror is not yet synced into this surface, so today this endpoint returns an empty array with `data_freshness.stale = true` and `reason: \"never_synced\"`. Shape and contract are stable; the array populates once the sync worker lands.
1943
+ # @param [Hash] opts the optional parameters
1944
+ # @return [ListAirbnbTransactions200Response]
1945
+ def list_airbnb_transactions(opts = {})
1946
+ data, _status_code, _headers = list_airbnb_transactions_with_http_info(opts)
1947
+ data
1948
+ end
1949
+
1950
+ # List Airbnb transactions
1951
+ # List Airbnb host transactions (payouts, adjustments, resolutions) for this workspace. **Pure DB read** — customer-facing reads never call Airbnb upstream. The transactions mirror is not yet synced into this surface, so today this endpoint returns an empty array with &#x60;data_freshness.stale &#x3D; true&#x60; and &#x60;reason: \&quot;never_synced\&quot;&#x60;. Shape and contract are stable; the array populates once the sync worker lands.
1952
+ # @param [Hash] opts the optional parameters
1953
+ # @return [Array<(ListAirbnbTransactions200Response, Integer, Hash)>] ListAirbnbTransactions200Response data, response status code and response headers
1954
+ def list_airbnb_transactions_with_http_info(opts = {})
1955
+ if @api_client.config.debugging
1956
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_transactions ...'
1957
+ end
1958
+ # resource path
1959
+ local_var_path = '/v1/channels/airbnb/transactions'
1960
+
1961
+ # query parameters
1962
+ query_params = opts[:query_params] || {}
1963
+
1964
+ # header parameters
1965
+ header_params = opts[:header_params] || {}
1966
+ # HTTP header 'Accept' (if needed)
1967
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1968
+
1969
+ # form parameters
1970
+ form_params = opts[:form_params] || {}
1971
+
1972
+ # http body (model)
1973
+ post_body = opts[:debug_body]
1974
+
1975
+ # return_type
1976
+ return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'
1977
+
1978
+ # auth_names
1979
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1980
+
1981
+ new_options = opts.merge(
1982
+ :operation => :"AirbnbApi.list_airbnb_transactions",
1983
+ :header_params => header_params,
1984
+ :query_params => query_params,
1985
+ :form_params => form_params,
1986
+ :body => post_body,
1987
+ :auth_names => auth_names,
1988
+ :return_type => return_type
1989
+ )
1990
+
1991
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1992
+ if @api_client.config.debugging
1993
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1994
+ end
1995
+ return data, status_code, headers
1996
+ end
1997
+
934
1998
  # Map an Airbnb listing to a Repull listing
935
1999
  # Link an existing Airbnb listing to a canonical Repull listing/property. **API-key-scoped** (unlike the Booking room mapping, which is Connect-session-scoped). Discover the `airbnbId` (+ `hostId`) via `GET /v1/channels/airbnb/listings`, then re-point it at the `listingId` of your choice — the dedup / consolidation case where the Airbnb sync auto-created its own listing but you want the inventory under an existing property. Repoints both the Airbnb record and its platform link to the target listing in one transaction. Idempotent — re-mapping to the same listing is a 200 no-op (`alreadyMapped: true`). Scope is enforced against your workspace on both the target listing and the existing Airbnb record; a listing that already links a different Airbnb listing returns 409.
936
2000
  # @param map_airbnb_listing_request [MapAirbnbListingRequest]
@@ -1189,6 +2253,72 @@ module Repull
1189
2253
  return data, status_code, headers
1190
2254
  end
1191
2255
 
2256
+ # Upsert Airbnb check-in guide
2257
+ # Upsert the check-in guide for one locale on an Airbnb listing. **Write-side** — calls Airbnb upstream; the DB mirror is reconciled by the sync worker once the upstream call returns. Target the locale with `?locale=en` (defaults to `en`). Requires a connected Airbnb host, else `404 no_connection`.
2258
+ # @param id [String] Repull listing id (numeric string).
2259
+ # @param [Hash] opts the optional parameters
2260
+ # @option opts [String] :locale Locale to upsert. Defaults to &#x60;en&#x60;. (default to 'en')
2261
+ # @return [nil]
2262
+ def update_airbnb_checkin_guide(id, opts = {})
2263
+ update_airbnb_checkin_guide_with_http_info(id, opts)
2264
+ nil
2265
+ end
2266
+
2267
+ # Upsert Airbnb check-in guide
2268
+ # Upsert the check-in guide for one locale on an Airbnb listing. **Write-side** — calls Airbnb upstream; the DB mirror is reconciled by the sync worker once the upstream call returns. Target the locale with &#x60;?locale&#x3D;en&#x60; (defaults to &#x60;en&#x60;). Requires a connected Airbnb host, else &#x60;404 no_connection&#x60;.
2269
+ # @param id [String] Repull listing id (numeric string).
2270
+ # @param [Hash] opts the optional parameters
2271
+ # @option opts [String] :locale Locale to upsert. Defaults to &#x60;en&#x60;. (default to 'en')
2272
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2273
+ def update_airbnb_checkin_guide_with_http_info(id, opts = {})
2274
+ if @api_client.config.debugging
2275
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_checkin_guide ...'
2276
+ end
2277
+ # verify the required parameter 'id' is set
2278
+ if @api_client.config.client_side_validation && id.nil?
2279
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_checkin_guide"
2280
+ end
2281
+ # resource path
2282
+ local_var_path = '/v1/channels/airbnb/listings/{id}/checkin-guide'.sub('{id}', CGI.escape(id.to_s))
2283
+
2284
+ # query parameters
2285
+ query_params = opts[:query_params] || {}
2286
+ query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
2287
+
2288
+ # header parameters
2289
+ header_params = opts[:header_params] || {}
2290
+ # HTTP header 'Accept' (if needed)
2291
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2292
+
2293
+ # form parameters
2294
+ form_params = opts[:form_params] || {}
2295
+
2296
+ # http body (model)
2297
+ post_body = opts[:debug_body]
2298
+
2299
+ # return_type
2300
+ return_type = opts[:debug_return_type]
2301
+
2302
+ # auth_names
2303
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2304
+
2305
+ new_options = opts.merge(
2306
+ :operation => :"AirbnbApi.update_airbnb_checkin_guide",
2307
+ :header_params => header_params,
2308
+ :query_params => query_params,
2309
+ :form_params => form_params,
2310
+ :body => post_body,
2311
+ :auth_names => auth_names,
2312
+ :return_type => return_type
2313
+ )
2314
+
2315
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2316
+ if @api_client.config.debugging
2317
+ @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_checkin_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2318
+ end
2319
+ return data, status_code, headers
2320
+ end
2321
+
1192
2322
  # Update Airbnb availability
1193
2323
  # Push availability + restrictions to Airbnb. `type: \"calendar\"` writes per-date restrictions — min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`) — via a batch of operations that each target either a date range or an explicit date list. `type: \"rules\"` writes listing-level availability rules (default min/max nights, booking lead time, turnover days, seasonal/day-of-week min nights). Restrictions never leak across channels — this endpoint writes only to Airbnb.
1194
2324
  # @param id [String]
@@ -1333,6 +2463,86 @@ module Repull
1333
2463
  return data, status_code, headers
1334
2464
  end
1335
2465
 
2466
+ # Edit / react to / mark an Airbnb message
2467
+ # Act on a single message in an Airbnb thread. **Write-side** — calls Airbnb upstream. The `action` discriminator selects the operation: - `edit` — replace message text (requires `message`). - `unsend` — retract the message. - `read` — mark the message as read. - `react` — add a reaction (requires `reaction`). Requires a connected Airbnb host, else `404 no_connection`.
2468
+ # @param thread_id [String] Airbnb thread id.
2469
+ # @param message_id [String] Airbnb message id within the thread.
2470
+ # @param update_airbnb_message_request [UpdateAirbnbMessageRequest]
2471
+ # @param [Hash] opts the optional parameters
2472
+ # @return [nil]
2473
+ def update_airbnb_message(thread_id, message_id, update_airbnb_message_request, opts = {})
2474
+ update_airbnb_message_with_http_info(thread_id, message_id, update_airbnb_message_request, opts)
2475
+ nil
2476
+ end
2477
+
2478
+ # Edit / react to / mark an Airbnb message
2479
+ # Act on a single message in an Airbnb thread. **Write-side** — calls Airbnb upstream. The &#x60;action&#x60; discriminator selects the operation: - &#x60;edit&#x60; — replace message text (requires &#x60;message&#x60;). - &#x60;unsend&#x60; — retract the message. - &#x60;read&#x60; — mark the message as read. - &#x60;react&#x60; — add a reaction (requires &#x60;reaction&#x60;). Requires a connected Airbnb host, else &#x60;404 no_connection&#x60;.
2480
+ # @param thread_id [String] Airbnb thread id.
2481
+ # @param message_id [String] Airbnb message id within the thread.
2482
+ # @param update_airbnb_message_request [UpdateAirbnbMessageRequest]
2483
+ # @param [Hash] opts the optional parameters
2484
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2485
+ def update_airbnb_message_with_http_info(thread_id, message_id, update_airbnb_message_request, opts = {})
2486
+ if @api_client.config.debugging
2487
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_message ...'
2488
+ end
2489
+ # verify the required parameter 'thread_id' is set
2490
+ if @api_client.config.client_side_validation && thread_id.nil?
2491
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.update_airbnb_message"
2492
+ end
2493
+ # verify the required parameter 'message_id' is set
2494
+ if @api_client.config.client_side_validation && message_id.nil?
2495
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling AirbnbApi.update_airbnb_message"
2496
+ end
2497
+ # verify the required parameter 'update_airbnb_message_request' is set
2498
+ if @api_client.config.client_side_validation && update_airbnb_message_request.nil?
2499
+ fail ArgumentError, "Missing the required parameter 'update_airbnb_message_request' when calling AirbnbApi.update_airbnb_message"
2500
+ end
2501
+ # resource path
2502
+ local_var_path = '/v1/channels/airbnb/messaging/{threadId}/messages/{messageId}'.sub('{threadId}', CGI.escape(thread_id.to_s)).sub('{messageId}', CGI.escape(message_id.to_s))
2503
+
2504
+ # query parameters
2505
+ query_params = opts[:query_params] || {}
2506
+
2507
+ # header parameters
2508
+ header_params = opts[:header_params] || {}
2509
+ # HTTP header 'Accept' (if needed)
2510
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2511
+ # HTTP header 'Content-Type'
2512
+ content_type = @api_client.select_header_content_type(['application/json'])
2513
+ if !content_type.nil?
2514
+ header_params['Content-Type'] = content_type
2515
+ end
2516
+
2517
+ # form parameters
2518
+ form_params = opts[:form_params] || {}
2519
+
2520
+ # http body (model)
2521
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_airbnb_message_request)
2522
+
2523
+ # return_type
2524
+ return_type = opts[:debug_return_type]
2525
+
2526
+ # auth_names
2527
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2528
+
2529
+ new_options = opts.merge(
2530
+ :operation => :"AirbnbApi.update_airbnb_message",
2531
+ :header_params => header_params,
2532
+ :query_params => query_params,
2533
+ :form_params => form_params,
2534
+ :body => post_body,
2535
+ :auth_names => auth_names,
2536
+ :return_type => return_type
2537
+ )
2538
+
2539
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
2540
+ if @api_client.config.debugging
2541
+ @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2542
+ end
2543
+ return data, status_code, headers
2544
+ end
2545
+
1336
2546
  # Upload photos to Airbnb
1337
2547
  # Upload one or more photos to an Airbnb listing. Accepts public image URLs (Airbnb fetches them) — direct binary upload is not supported on this endpoint.
1338
2548
  # @param id [String]
@@ -1393,5 +2603,69 @@ module Repull
1393
2603
  end
1394
2604
  return data, status_code, headers
1395
2605
  end
2606
+
2607
+ # Withdraw Airbnb special offer
2608
+ # Withdraw a previously-created Airbnb special offer. **Write-side** — calls Airbnb upstream. Pass the offer id as `?offerId=`. Requires a connected Airbnb host, else `404 no_connection`.
2609
+ # @param offer_id [String] Airbnb special-offer id to withdraw.
2610
+ # @param [Hash] opts the optional parameters
2611
+ # @return [nil]
2612
+ def withdraw_airbnb_offer(offer_id, opts = {})
2613
+ withdraw_airbnb_offer_with_http_info(offer_id, opts)
2614
+ nil
2615
+ end
2616
+
2617
+ # Withdraw Airbnb special offer
2618
+ # Withdraw a previously-created Airbnb special offer. **Write-side** — calls Airbnb upstream. Pass the offer id as &#x60;?offerId&#x3D;&#x60;. Requires a connected Airbnb host, else &#x60;404 no_connection&#x60;.
2619
+ # @param offer_id [String] Airbnb special-offer id to withdraw.
2620
+ # @param [Hash] opts the optional parameters
2621
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2622
+ def withdraw_airbnb_offer_with_http_info(offer_id, opts = {})
2623
+ if @api_client.config.debugging
2624
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.withdraw_airbnb_offer ...'
2625
+ end
2626
+ # verify the required parameter 'offer_id' is set
2627
+ if @api_client.config.client_side_validation && offer_id.nil?
2628
+ fail ArgumentError, "Missing the required parameter 'offer_id' when calling AirbnbApi.withdraw_airbnb_offer"
2629
+ end
2630
+ # resource path
2631
+ local_var_path = '/v1/channels/airbnb/offers'
2632
+
2633
+ # query parameters
2634
+ query_params = opts[:query_params] || {}
2635
+ query_params[:'offerId'] = offer_id
2636
+
2637
+ # header parameters
2638
+ header_params = opts[:header_params] || {}
2639
+ # HTTP header 'Accept' (if needed)
2640
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2641
+
2642
+ # form parameters
2643
+ form_params = opts[:form_params] || {}
2644
+
2645
+ # http body (model)
2646
+ post_body = opts[:debug_body]
2647
+
2648
+ # return_type
2649
+ return_type = opts[:debug_return_type]
2650
+
2651
+ # auth_names
2652
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2653
+
2654
+ new_options = opts.merge(
2655
+ :operation => :"AirbnbApi.withdraw_airbnb_offer",
2656
+ :header_params => header_params,
2657
+ :query_params => query_params,
2658
+ :form_params => form_params,
2659
+ :body => post_body,
2660
+ :auth_names => auth_names,
2661
+ :return_type => return_type
2662
+ )
2663
+
2664
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2665
+ if @api_client.config.debugging
2666
+ @api_client.config.logger.debug "API called: AirbnbApi#withdraw_airbnb_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2667
+ end
2668
+ return data, status_code, headers
2669
+ end
1396
2670
  end
1397
2671
  end