Class: Repull::AirbnbApi

Inherits:
Object
  • Object
show all
Defined in:
lib/repull/api/airbnb_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AirbnbApi

Returns a new instance of AirbnbApi.



19
20
21
# File 'lib/repull/api/airbnb_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/repull/api/airbnb_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#airbnb_listing_action(id, opts = {}) ⇒ nil

Listing action (delete/push/publish) Apply a state action to a listing by id. The path id is the canonical Repull listing id. delete is a deactivate of the Repull record only — it sets the listing inactive and KEEPS the row; it does NOT touch the upstream Airbnb listing (Repull never deletes or deactivates on Airbnb's side). Use it to exclude a listing / trim back under the plan-listings cap; reactivate via PATCH /v1/listings/{id} with { \"active\": true }. Idempotent. push / publish push the listing's content to Airbnb via the same host-side sync orchestrator as POST /v1/listings/{id}/publish/airbnb — pass airbnbConnectionId to update an already-mapped Airbnb listing, or hostId to create + publish a new one under that host. force re-pushes every field, ignoring dirty-field tracking. Any other action (e.g. pull, unlist) returns a structured 422 naming the supported actions.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


28
29
30
31
# File 'lib/repull/api/airbnb_api.rb', line 28

def airbnb_listing_action(id, opts = {})
  airbnb_listing_action_with_http_info(id, opts)
  nil
end

#airbnb_listing_action_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Listing action (delete/push/publish) Apply a state action to a listing by id. The path `id` is the canonical Repull listing id. `delete` is a deactivate of the Repull record only — it sets the listing inactive and KEEPS the row; it does NOT touch the upstream Airbnb listing (Repull never deletes or deactivates on Airbnb's side). Use it to exclude a listing / trim back under the plan-listings cap; reactivate via `PATCH /v1/listings/id` with `{ &quot;active&quot;: true }`. Idempotent. `push` / `publish` push the listing's content to Airbnb via the same host-side sync orchestrator as `POST /v1/listings/id/publish/airbnb` — pass `airbnbConnectionId` to update an already-mapped Airbnb listing, or `hostId` to create + publish a new one under that host. `force` re-pushes every field, ignoring dirty-field tracking. Any other action (e.g. `pull`, `unlist`) returns a structured 422 naming the supported actions.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/repull/api/airbnb_api.rb', line 39

def airbnb_listing_action_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.airbnb_listing_action ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.airbnb_listing_action"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'airbnb_listing_action_request'])

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.airbnb_listing_action",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#airbnb_listing_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#airbnb_reservation_action(code, opts = {}) ⇒ nil

Accept/decline/cancel Airbnb reservation Apply a state action to an Airbnb reservation — accept / decline (for inquiries and reservation requests), cancel (host cancellation, carries penalties), pre-approve (for inquiries).

Parameters:

  • code (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


97
98
99
100
# File 'lib/repull/api/airbnb_api.rb', line 97

def airbnb_reservation_action(code, opts = {})
  airbnb_reservation_action_with_http_info(code, opts)
  nil
end

#airbnb_reservation_action_with_http_info(code, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Accept/decline/cancel Airbnb reservation Apply a state action to an Airbnb reservation — `accept` / `decline` (for inquiries and reservation requests), `cancel` (host cancellation, carries penalties), `pre-approve` (for inquiries).

Parameters:

  • code (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/repull/api/airbnb_api.rb', line 107

def airbnb_reservation_action_with_http_info(code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.airbnb_reservation_action ...'
  end
  # verify the required parameter 'code' is set
  if @api_client.config.client_side_validation && code.nil?
    fail ArgumentError, "Missing the required parameter 'code' when calling AirbnbApi.airbnb_reservation_action"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.airbnb_reservation_action",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#airbnb_reservation_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_airbnb_alteration(create_airbnb_alteration_request, opts = {}) ⇒ nil

Create Airbnb alteration 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.

Parameters:

Returns:

  • (nil)


158
159
160
161
# File 'lib/repull/api/airbnb_api.rb', line 158

def create_airbnb_alteration(create_airbnb_alteration_request, opts = {})
  create_airbnb_alteration_with_http_info(create_airbnb_alteration_request, opts)
  nil
end

#create_airbnb_alteration_with_http_info(create_airbnb_alteration_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Create Airbnb alteration 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`.

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/repull/api/airbnb_api.rb', line 168

def create_airbnb_alteration_with_http_info(create_airbnb_alteration_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_alteration ...'
  end
  # verify the required parameter 'create_airbnb_alteration_request' is set
  if @api_client.config.client_side_validation && create_airbnb_alteration_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_airbnb_alteration_request' when calling AirbnbApi.create_airbnb_alteration"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/alterations'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_airbnb_alteration_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.create_airbnb_alteration",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_airbnb_listing_room(id, request_body, opts = {}) ⇒ nil

Create an Airbnb room 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


227
228
229
230
# File 'lib/repull/api/airbnb_api.rb', line 227

def create_airbnb_listing_room(id, request_body, opts = {})
  create_airbnb_listing_room_with_http_info(id, request_body, opts)
  nil
end

#create_airbnb_listing_room_with_http_info(id, request_body, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Create an Airbnb room 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`.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • request_body (Hash<String, Object>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/repull/api/airbnb_api.rb', line 238

def create_airbnb_listing_room_with_http_info(id, request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_listing_room ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.create_airbnb_listing_room"
  end
  # verify the required parameter 'request_body' is set
  if @api_client.config.client_side_validation && request_body.nil?
    fail ArgumentError, "Missing the required parameter 'request_body' when calling AirbnbApi.create_airbnb_listing_room"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.create_airbnb_listing_room",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_listing_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_airbnb_offer(create_airbnb_offer_request, opts = {}) ⇒ nil

Create Airbnb special offer or pre-approval 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.

Parameters:

Returns:

  • (nil)


300
301
302
303
# File 'lib/repull/api/airbnb_api.rb', line 300

def create_airbnb_offer(create_airbnb_offer_request, opts = {})
  create_airbnb_offer_with_http_info(create_airbnb_offer_request, opts)
  nil
end

#create_airbnb_offer_with_http_info(create_airbnb_offer_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Create Airbnb special offer or pre-approval 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`.

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/repull/api/airbnb_api.rb', line 310

def create_airbnb_offer_with_http_info(create_airbnb_offer_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_offer ...'
  end
  # verify the required parameter 'create_airbnb_offer_request' is set
  if @api_client.config.client_side_validation && create_airbnb_offer_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_airbnb_offer_request' when calling AirbnbApi.create_airbnb_offer"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/offers'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_airbnb_offer_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.create_airbnb_offer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_airbnb_listing_photo(id, photo_id, opts = {}) ⇒ DeleteAirbnbListingPhoto200Response

Delete an Airbnb photo Remove a single photo from an Airbnb listing. Pass the Airbnb-side photo id as ?photoId=. Write-side — calls Airbnb upstream; the local photo cache is reconciled by the sync worker afterwards.

Parameters:

  • id (String)
  • photo_id (String)

    Airbnb-side photo id to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



369
370
371
372
# File 'lib/repull/api/airbnb_api.rb', line 369

def delete_airbnb_listing_photo(id, photo_id, opts = {})
  data, _status_code, _headers = delete_airbnb_listing_photo_with_http_info(id, photo_id, opts)
  data
end

#delete_airbnb_listing_photo_with_http_info(id, photo_id, opts = {}) ⇒ Array<(DeleteAirbnbListingPhoto200Response, Integer, Hash)>

Delete an Airbnb photo Remove a single photo from an Airbnb listing. Pass the Airbnb-side photo id as `?photoId=`. Write-side — calls Airbnb upstream; the local photo cache is reconciled by the sync worker afterwards.

Parameters:

  • id (String)
  • photo_id (String)

    Airbnb-side photo id to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/repull/api/airbnb_api.rb', line 380

def delete_airbnb_listing_photo_with_http_info(id, photo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.delete_airbnb_listing_photo ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.delete_airbnb_listing_photo"
  end
  # verify the required parameter 'photo_id' is set
  if @api_client.config.client_side_validation && photo_id.nil?
    fail ArgumentError, "Missing the required parameter 'photo_id' when calling AirbnbApi.delete_airbnb_listing_photo"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/photos'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'photoId'] = photo_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteAirbnbListingPhoto200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.delete_airbnb_listing_photo",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#delete_airbnb_listing_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_airbnb_listing_room(id, room_id, opts = {}) ⇒ DeleteAirbnbListingPhoto200Response

Delete an Airbnb room 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • room_id (String)

    Airbnb-side room id to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



439
440
441
442
# File 'lib/repull/api/airbnb_api.rb', line 439

def delete_airbnb_listing_room(id, room_id, opts = {})
  data, _status_code, _headers = delete_airbnb_listing_room_with_http_info(id, room_id, opts)
  data
end

#delete_airbnb_listing_room_with_http_info(id, room_id, opts = {}) ⇒ Array<(DeleteAirbnbListingPhoto200Response, Integer, Hash)>

Delete an Airbnb room 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`.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • room_id (String)

    Airbnb-side room id to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/repull/api/airbnb_api.rb', line 450

def delete_airbnb_listing_room_with_http_info(id, room_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.delete_airbnb_listing_room ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.delete_airbnb_listing_room"
  end
  # verify the required parameter 'room_id' is set
  if @api_client.config.client_side_validation && room_id.nil?
    fail ArgumentError, "Missing the required parameter 'room_id' when calling AirbnbApi.delete_airbnb_listing_room"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'roomId'] = room_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DeleteAirbnbListingPhoto200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.delete_airbnb_listing_room",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#delete_airbnb_listing_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#edit_airbnb_review(id, airbnb_review, opts = {}) ⇒ AirbnbReview

Edit Airbnb host review 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).

Parameters:

  • id (String)

    Airbnb review id (`HRabc123` style).

  • airbnb_review (AirbnbReview)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



509
510
511
512
# File 'lib/repull/api/airbnb_api.rb', line 509

def edit_airbnb_review(id, airbnb_review, opts = {})
  data, _status_code, _headers = edit_airbnb_review_with_http_info(id, airbnb_review, opts)
  data
end

#edit_airbnb_review_with_http_info(id, airbnb_review, opts = {}) ⇒ Array<(AirbnbReview, Integer, Hash)>

Edit Airbnb host review 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).

Parameters:

  • id (String)

    Airbnb review id (`HRabc123` style).

  • airbnb_review (AirbnbReview)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AirbnbReview, Integer, Hash)>)

    AirbnbReview data, response status code and response headers



520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
# File 'lib/repull/api/airbnb_api.rb', line 520

def edit_airbnb_review_with_http_info(id, airbnb_review, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.edit_airbnb_review ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.edit_airbnb_review"
  end
  # verify the required parameter 'airbnb_review' is set
  if @api_client.config.client_side_validation && airbnb_review.nil?
    fail ArgumentError, "Missing the required parameter 'airbnb_review' when calling AirbnbApi.edit_airbnb_review"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/reviews/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_review)

  # return_type
  return_type = opts[:debug_return_type] || 'AirbnbReview'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.edit_airbnb_review",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#edit_airbnb_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_alteration(id, opts = {}) ⇒ GetAirbnbAlteration200Response

Get Airbnb alteration 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.

Parameters:

  • id (String)

    Airbnb alteration id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



582
583
584
585
# File 'lib/repull/api/airbnb_api.rb', line 582

def get_airbnb_alteration(id, opts = {})
  data, _status_code, _headers = get_airbnb_alteration_with_http_info(id, opts)
  data
end

#get_airbnb_alteration_with_http_info(id, opts = {}) ⇒ Array<(GetAirbnbAlteration200Response, Integer, Hash)>

Get Airbnb alteration 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.

Parameters:

  • id (String)

    Airbnb alteration id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
# File 'lib/repull/api/airbnb_api.rb', line 592

def get_airbnb_alteration_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_alteration ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_alteration"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/alterations/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAirbnbAlteration200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_alteration",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_checkin_guide(id, opts = {}) ⇒ ListAirbnbTransactions200Response

Get Airbnb check-in guide 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :locale (String)

    Filter to a single locale (prefix match, case-insensitive).

Returns:



646
647
648
649
# File 'lib/repull/api/airbnb_api.rb', line 646

def get_airbnb_checkin_guide(id, opts = {})
  data, _status_code, _headers = get_airbnb_checkin_guide_with_http_info(id, opts)
  data
end

#get_airbnb_checkin_guide_with_http_info(id, opts = {}) ⇒ Array<(ListAirbnbTransactions200Response, Integer, Hash)>

Get Airbnb check-in guide 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :locale (String)

    Filter to a single locale (prefix match, case-insensitive).

Returns:



657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
# File 'lib/repull/api/airbnb_api.rb', line 657

def get_airbnb_checkin_guide_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_checkin_guide ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_checkin_guide"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/checkin-guide'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_checkin_guide",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_checkin_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_checkout_guide(id, opts = {}) ⇒ ListAirbnbTransactions200Response

Get Airbnb checkout guide 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



711
712
713
714
# File 'lib/repull/api/airbnb_api.rb', line 711

def get_airbnb_checkout_guide(id, opts = {})
  data, _status_code, _headers = get_airbnb_checkout_guide_with_http_info(id, opts)
  data
end

#get_airbnb_checkout_guide_with_http_info(id, opts = {}) ⇒ Array<(ListAirbnbTransactions200Response, Integer, Hash)>

Get Airbnb checkout guide 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
# File 'lib/repull/api/airbnb_api.rb', line 721

def get_airbnb_checkout_guide_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_checkout_guide ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_checkout_guide"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/checkout-guide'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_checkout_guide",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_checkout_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_connection(opts = {}) ⇒ AirbnbConnectionResponse

Get Airbnb connection state 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).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



773
774
775
776
# File 'lib/repull/api/airbnb_api.rb', line 773

def get_airbnb_connection(opts = {})
  data, _status_code, _headers = get_airbnb_connection_with_http_info(opts)
  data
end

#get_airbnb_connection_with_http_info(opts = {}) ⇒ Array<(AirbnbConnectionResponse, Integer, Hash)>

Get Airbnb connection state 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).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AirbnbConnectionResponse, Integer, Hash)>)

    AirbnbConnectionResponse data, response status code and response headers



782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
# File 'lib/repull/api/airbnb_api.rb', line 782

def get_airbnb_connection_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_connection ...'
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/connection'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AirbnbConnectionResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_connection",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_listing(id, opts = {}) ⇒ AirbnbListing

Get Airbnb listing 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.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include (String)

    Comma-separated expansions. Currently supported: `amenities`.

Returns:



832
833
834
835
# File 'lib/repull/api/airbnb_api.rb', line 832

def get_airbnb_listing(id, opts = {})
  data, _status_code, _headers = get_airbnb_listing_with_http_info(id, opts)
  data
end

#get_airbnb_listing_availability(id, opts = {}) ⇒ nil

Get Airbnb availability Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


897
898
899
900
# File 'lib/repull/api/airbnb_api.rb', line 897

def get_airbnb_listing_availability(id, opts = {})
  get_airbnb_listing_availability_with_http_info(id, opts)
  nil
end

#get_airbnb_listing_availability_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Get Airbnb availability Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
# File 'lib/repull/api/airbnb_api.rb', line 907

def get_airbnb_listing_availability_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_availability ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_availability"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/availability'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_listing_availability",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_listing_pricing(id, opts = {}) ⇒ nil

Get Airbnb pricing Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


958
959
960
961
# File 'lib/repull/api/airbnb_api.rb', line 958

def get_airbnb_listing_pricing(id, opts = {})
  get_airbnb_listing_pricing_with_http_info(id, opts)
  nil
end

#get_airbnb_listing_pricing_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Get Airbnb pricing Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
# File 'lib/repull/api/airbnb_api.rb', line 968

def get_airbnb_listing_pricing_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_pricing ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_pricing"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_listing_pricing",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_listing_quality(id, opts = {}) ⇒ GetAirbnbListingQuality200Response

Get Airbnb listing quality 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :type (String)

    Which quality slice to return. `all` returns `{ standards, issues }`. (default to 'all')

Returns:



1020
1021
1022
1023
# File 'lib/repull/api/airbnb_api.rb', line 1020

def get_airbnb_listing_quality(id, opts = {})
  data, _status_code, _headers = get_airbnb_listing_quality_with_http_info(id, opts)
  data
end

#get_airbnb_listing_quality_with_http_info(id, opts = {}) ⇒ Array<(GetAirbnbListingQuality200Response, Integer, Hash)>

Get Airbnb listing quality 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :type (String)

    Which quality slice to return. `all` returns `{ standards, issues }`. (default to 'all')

Returns:



1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
# File 'lib/repull/api/airbnb_api.rb', line 1031

def get_airbnb_listing_quality_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_quality ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_quality"
  end
  allowable_values = ["all", "standards", "issues", "stats"]
  if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
    fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/quality'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAirbnbListingQuality200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_listing_quality",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_quality\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_listing_settings(id, opts = {}) ⇒ GetAirbnbListingSettings200Response

Get Airbnb listing settings 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :type (String)

    Which settings slice to return. `all` returns `{ hosts, locales }`. (default to 'all')

Returns:



1090
1091
1092
1093
# File 'lib/repull/api/airbnb_api.rb', line 1090

def get_airbnb_listing_settings(id, opts = {})
  data, _status_code, _headers = get_airbnb_listing_settings_with_http_info(id, opts)
  data
end

#get_airbnb_listing_settings_with_http_info(id, opts = {}) ⇒ Array<(GetAirbnbListingSettings200Response, Integer, Hash)>

Get Airbnb listing settings 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :type (String)

    Which settings slice to return. `all` returns `{ hosts, locales }`. (default to 'all')

Returns:



1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
# File 'lib/repull/api/airbnb_api.rb', line 1101

def get_airbnb_listing_settings_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_settings ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_settings"
  end
  allowable_values = ["all", "hosts", "permits", "locales"]
  if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
    fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/settings'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAirbnbListingSettings200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_listing_settings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_listing_with_http_info(id, opts = {}) ⇒ Array<(AirbnbListing, Integer, Hash)>

Get Airbnb listing 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.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include (String)

    Comma-separated expansions. Currently supported: `amenities`.

Returns:

  • (Array<(AirbnbListing, Integer, Hash)>)

    AirbnbListing data, response status code and response headers



843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
# File 'lib/repull/api/airbnb_api.rb', line 843

def get_airbnb_listing_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AirbnbListing'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_listing",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_reservation(code, opts = {}) ⇒ AirbnbReservation

Get Airbnb reservation Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. HMABCDEF12).

Parameters:

  • code (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1159
1160
1161
1162
# File 'lib/repull/api/airbnb_api.rb', line 1159

def get_airbnb_reservation(code, opts = {})
  data, _status_code, _headers = get_airbnb_reservation_with_http_info(code, opts)
  data
end

#get_airbnb_reservation_with_http_info(code, opts = {}) ⇒ Array<(AirbnbReservation, Integer, Hash)>

Get Airbnb reservation Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. `HMABCDEF12`).

Parameters:

  • code (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AirbnbReservation, Integer, Hash)>)

    AirbnbReservation data, response status code and response headers



1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/repull/api/airbnb_api.rb', line 1169

def get_airbnb_reservation_with_http_info(code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_reservation ...'
  end
  # verify the required parameter 'code' is set
  if @api_client.config.client_side_validation && code.nil?
    fail ArgumentError, "Missing the required parameter 'code' when calling AirbnbApi.get_airbnb_reservation"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AirbnbReservation'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_reservation",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_airbnb_thread(thread_id, opts = {}) ⇒ GetAirbnbThread200Response

Get Airbnb thread 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.

Parameters:

  • thread_id (String)

    Airbnb thread id (matches the external thread id).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1222
1223
1224
1225
# File 'lib/repull/api/airbnb_api.rb', line 1222

def get_airbnb_thread(thread_id, opts = {})
  data, _status_code, _headers = get_airbnb_thread_with_http_info(thread_id, opts)
  data
end

#get_airbnb_thread_with_http_info(thread_id, opts = {}) ⇒ Array<(GetAirbnbThread200Response, Integer, Hash)>

Get Airbnb thread 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`.

Parameters:

  • thread_id (String)

    Airbnb thread id (matches the external thread id).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetAirbnbThread200Response, Integer, Hash)>)

    GetAirbnbThread200Response data, response status code and response headers



1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
# File 'lib/repull/api/airbnb_api.rb', line 1232

def get_airbnb_thread_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_thread ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.get_airbnb_thread"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/messaging/{threadId}'.sub('{threadId}', CGI.escape(thread_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAirbnbThread200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.get_airbnb_thread",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_alterations(opts = {}) ⇒ ListAirbnbAlterations200Response

List Airbnb alterations 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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :type (String)

    Scope: `pending` (default) returns only alterations awaiting a decision; `all` returns every alteration. (default to 'pending')

  • :reservation_code (String)

    Airbnb confirmation code — restricts results to a single reservation. Returns an empty array when no reservation matches within your workspace.

Returns:



1286
1287
1288
1289
# File 'lib/repull/api/airbnb_api.rb', line 1286

def list_airbnb_alterations(opts = {})
  data, _status_code, _headers = list_airbnb_alterations_with_http_info(opts)
  data
end

#list_airbnb_alterations_with_http_info(opts = {}) ⇒ Array<(ListAirbnbAlterations200Response, Integer, Hash)>

List Airbnb alterations 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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :type (String)

    Scope: `pending` (default) returns only alterations awaiting a decision; `all` returns every alteration. (default to 'pending')

  • :reservation_code (String)

    Airbnb confirmation code — restricts results to a single reservation. Returns an empty array when no reservation matches within your workspace.

Returns:



1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
# File 'lib/repull/api/airbnb_api.rb', line 1297

def list_airbnb_alterations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_alterations ...'
  end
  allowable_values = ["pending", "all"]
  if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
    fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/alterations'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'reservation_code'] = opts[:'reservation_code'] if !opts[:'reservation_code'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAirbnbAlterations200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_alterations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_alterations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_listing_amenities(id, opts = {}) ⇒ ListAirbnbListingAmenities200Response

List Airbnb amenities 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1352
1353
1354
1355
# File 'lib/repull/api/airbnb_api.rb', line 1352

def list_airbnb_listing_amenities(id, opts = {})
  data, _status_code, _headers = list_airbnb_listing_amenities_with_http_info(id, opts)
  data
end

#list_airbnb_listing_amenities_with_http_info(id, opts = {}) ⇒ Array<(ListAirbnbListingAmenities200Response, Integer, Hash)>

List Airbnb amenities 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 &quot;never synced&quot; from &quot;fresh and genuinely empty&quot;. Returns `404` when the listing has no Airbnb connection in this workspace.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
# File 'lib/repull/api/airbnb_api.rb', line 1362

def list_airbnb_listing_amenities_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_amenities ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_amenities"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/amenities'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAirbnbListingAmenities200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_listing_amenities",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_amenities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_listing_descriptions(id, opts = {}) ⇒ ListAirbnbTransactions200Response

List Airbnb descriptions 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :locale (String)

    Filter to a single locale (prefix match, case-insensitive).

  • :country (String)

    Legacy alias for `locale`. Prefer `locale`.

Returns:



1417
1418
1419
1420
# File 'lib/repull/api/airbnb_api.rb', line 1417

def list_airbnb_listing_descriptions(id, opts = {})
  data, _status_code, _headers = list_airbnb_listing_descriptions_with_http_info(id, opts)
  data
end

#list_airbnb_listing_descriptions_with_http_info(id, opts = {}) ⇒ Array<(ListAirbnbTransactions200Response, Integer, Hash)>

List Airbnb descriptions 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :locale (String)

    Filter to a single locale (prefix match, case-insensitive).

  • :country (String)

    Legacy alias for `locale`. Prefer `locale`.

Returns:



1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
# File 'lib/repull/api/airbnb_api.rb', line 1429

def list_airbnb_listing_descriptions_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_descriptions ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_descriptions"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/descriptions'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
  query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_listing_descriptions",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_descriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_listing_photos(id, opts = {}) ⇒ nil

List Airbnb photos List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room).

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1484
1485
1486
1487
# File 'lib/repull/api/airbnb_api.rb', line 1484

def list_airbnb_listing_photos(id, opts = {})
  list_airbnb_listing_photos_with_http_info(id, opts)
  nil
end

#list_airbnb_listing_photos_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

List Airbnb photos List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room).

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
# File 'lib/repull/api/airbnb_api.rb', line 1494

def list_airbnb_listing_photos_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_photos ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_photos"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/photos'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_listing_photos",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_photos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_listing_rooms(id, opts = {}) ⇒ ListAirbnbTransactions200Response

List Airbnb rooms 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1545
1546
1547
1548
# File 'lib/repull/api/airbnb_api.rb', line 1545

def list_airbnb_listing_rooms(id, opts = {})
  data, _status_code, _headers = list_airbnb_listing_rooms_with_http_info(id, opts)
  data
end

#list_airbnb_listing_rooms_with_http_info(id, opts = {}) ⇒ Array<(ListAirbnbTransactions200Response, Integer, Hash)>

List Airbnb rooms 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
# File 'lib/repull/api/airbnb_api.rb', line 1555

def list_airbnb_listing_rooms_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_rooms ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_rooms"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_listing_rooms",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_rooms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_listings(opts = {}) ⇒ AirbnbListingListResponse

List Airbnb listings 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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include (String)

    Comma-separated expansions. Currently supported: `amenities` (adds `amenities` and `accessibility_amenities` arrays to each connection, sourced from the local `listings_airbnb_amenities` cache).

Returns:



1608
1609
1610
1611
# File 'lib/repull/api/airbnb_api.rb', line 1608

def list_airbnb_listings(opts = {})
  data, _status_code, _headers = list_airbnb_listings_with_http_info(opts)
  data
end

#list_airbnb_listings_with_http_info(opts = {}) ⇒ Array<(AirbnbListingListResponse, Integer, Hash)>

List Airbnb listings 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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include (String)

    Comma-separated expansions. Currently supported: `amenities` (adds `amenities` and `accessibility_amenities` arrays to each connection, sourced from the local `listings_airbnb_amenities` cache).

Returns:

  • (Array<(AirbnbListingListResponse, Integer, Hash)>)

    AirbnbListingListResponse data, response status code and response headers



1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
# File 'lib/repull/api/airbnb_api.rb', line 1618

def list_airbnb_listings_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listings ...'
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AirbnbListingListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_listings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_reservations(opts = {}) ⇒ AirbnbReservationListResponse

List Airbnb reservations Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified /v1/reservations endpoint flattens away. Walk pages with ?cursor=<pagination.next_cursor> until pagination.has_more is false. The cursor is opaque — never construct or parse it client-side. ?offset= is also accepted as a first-class alias for shallow paging (0..10000) — see the offset parameter below. Mutually exclusive with cursor. Internally this walks upstream Airbnb cursor pages to skip rows, so deep offsets cost N/limit upstream round-trips; cursor remains the better choice for deep pagination. When status is omitted, all statuses are returned (Airbnb defaults to accepted only on its own surface, but this endpoint normalises to "all"). Pass ?status=accepted to scope.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :cursor (String)

    Opaque cursor returned by the previous response's `pagination.next_cursor`. Omit to fetch the first page.

  • :offset (Integer)

    First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.next_cursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)

  • :limit (Integer)

    Max items per page. Hard cap is 100. (default to 50)

  • :listing_id (String)

    Filter to one Airbnb listing id (numeric string).

  • :status (String)

    Filter by reservation status. Omit to receive all statuses.

  • :start_date (Date)

    ISO 8601 (YYYY-MM-DD) lower bound on Airbnb's date range filter.

  • :end_date (Date)

    ISO 8601 (YYYY-MM-DD) upper bound on Airbnb's date range filter.

  • :include_total (Boolean)

    Whether to include `pagination.total`. Always populated when Airbnb returns a total count (effectively always); accepted for shape symmetry with the rest of the API. (default to true)

Returns:



1675
1676
1677
1678
# File 'lib/repull/api/airbnb_api.rb', line 1675

def list_airbnb_reservations(opts = {})
  data, _status_code, _headers = list_airbnb_reservations_with_http_info(opts)
  data
end

#list_airbnb_reservations_with_http_info(opts = {}) ⇒ Array<(AirbnbReservationListResponse, Integer, Hash)>

List Airbnb reservations Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified `/v1/reservations` endpoint flattens away. Walk pages with `?cursor=<pagination.next_cursor>` until `pagination.has_more` is `false`. The cursor is opaque — never construct or parse it client-side. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Internally this walks upstream Airbnb cursor pages to skip rows, so deep offsets cost N/limit upstream round-trips; cursor remains the better choice for deep pagination. When `status` is omitted, all statuses are returned (Airbnb defaults to `accepted` only on its own surface, but this endpoint normalises to &quot;all&quot;). Pass `?status=accepted` to scope.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :cursor (String)

    Opaque cursor returned by the previous response's `pagination.next_cursor`. Omit to fetch the first page.

  • :offset (Integer)

    First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.next_cursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)

  • :limit (Integer)

    Max items per page. Hard cap is 100. (default to 50)

  • :listing_id (String)

    Filter to one Airbnb listing id (numeric string).

  • :status (String)

    Filter by reservation status. Omit to receive all statuses.

  • :start_date (Date)

    ISO 8601 (YYYY-MM-DD) lower bound on Airbnb's date range filter.

  • :end_date (Date)

    ISO 8601 (YYYY-MM-DD) upper bound on Airbnb's date range filter.

  • :include_total (Boolean)

    Whether to include `pagination.total`. Always populated when Airbnb returns a total count (effectively always); accepted for shape symmetry with the rest of the API. (default to true)

Returns:



1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
# File 'lib/repull/api/airbnb_api.rb', line 1692

def list_airbnb_reservations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_reservations ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling AirbnbApi.list_airbnb_reservations, must be smaller than or equal to 10000.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling AirbnbApi.list_airbnb_reservations, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AirbnbApi.list_airbnb_reservations, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AirbnbApi.list_airbnb_reservations, must be greater than or equal to 1.'
  end

  allowable_values = ["pending", "accepted", "denied", "cancelled", "completed", "failed_verification", "request_voided"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/reservations'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'listing_id'] = opts[:'listing_id'] if !opts[:'listing_id'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'include_total'] = opts[:'include_total'] if !opts[:'include_total'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AirbnbReservationListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_reservations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_reservations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_reviews(opts = {}) ⇒ AirbnbReviewListResponse

List Airbnb reviews List reviews left by guests on Airbnb listings in this workspace. Includes both reviews of the host and reviews of the guest (where the host has not yet submitted theirs).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1768
1769
1770
1771
# File 'lib/repull/api/airbnb_api.rb', line 1768

def list_airbnb_reviews(opts = {})
  data, _status_code, _headers = list_airbnb_reviews_with_http_info(opts)
  data
end

#list_airbnb_reviews_with_http_info(opts = {}) ⇒ Array<(AirbnbReviewListResponse, Integer, Hash)>

List Airbnb reviews List reviews left by guests on Airbnb listings in this workspace. Includes both reviews of the host and reviews of the guest (where the host has not yet submitted theirs).

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AirbnbReviewListResponse, Integer, Hash)>)

    AirbnbReviewListResponse data, response status code and response headers



1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
# File 'lib/repull/api/airbnb_api.rb', line 1777

def list_airbnb_reviews_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_reviews ...'
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/reviews'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AirbnbReviewListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_reviews",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_reviews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_thread_messages(thread_id, opts = {}) ⇒ MessageListResponse

Get Airbnb messages Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with ?cursor= until pagination.hasMore is false.

Parameters:

  • thread_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1826
1827
1828
1829
# File 'lib/repull/api/airbnb_api.rb', line 1826

def list_airbnb_thread_messages(thread_id, opts = {})
  data, _status_code, _headers = list_airbnb_thread_messages_with_http_info(thread_id, opts)
  data
end

#list_airbnb_thread_messages_with_http_info(thread_id, opts = {}) ⇒ Array<(MessageListResponse, Integer, Hash)>

Get Airbnb messages Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with `?cursor=` until `pagination.hasMore` is `false`.

Parameters:

  • thread_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(MessageListResponse, Integer, Hash)>)

    MessageListResponse data, response status code and response headers



1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
# File 'lib/repull/api/airbnb_api.rb', line 1836

def list_airbnb_thread_messages_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_thread_messages ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.list_airbnb_thread_messages"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/messaging/{threadId}/messages'.sub('{threadId}', CGI.escape(thread_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'MessageListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_thread_messages",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_thread_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_threads(opts = {}) ⇒ AirbnbThreadListResponse

List Airbnb message threads List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1888
1889
1890
1891
# File 'lib/repull/api/airbnb_api.rb', line 1888

def list_airbnb_threads(opts = {})
  data, _status_code, _headers = list_airbnb_threads_with_http_info(opts)
  data
end

#list_airbnb_threads_with_http_info(opts = {}) ⇒ Array<(AirbnbThreadListResponse, Integer, Hash)>

List Airbnb message threads List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AirbnbThreadListResponse, Integer, Hash)>)

    AirbnbThreadListResponse data, response status code and response headers



1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
# File 'lib/repull/api/airbnb_api.rb', line 1897

def list_airbnb_threads_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_threads ...'
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/messaging'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AirbnbThreadListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_threads",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_airbnb_transactions(opts = {}) ⇒ ListAirbnbTransactions200Response

List Airbnb transactions 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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1945
1946
1947
1948
# File 'lib/repull/api/airbnb_api.rb', line 1945

def list_airbnb_transactions(opts = {})
  data, _status_code, _headers = list_airbnb_transactions_with_http_info(opts)
  data
end

#list_airbnb_transactions_with_http_info(opts = {}) ⇒ Array<(ListAirbnbTransactions200Response, Integer, Hash)>

List Airbnb transactions 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: &quot;never_synced&quot;`. Shape and contract are stable; the array populates once the sync worker lands.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
# File 'lib/repull/api/airbnb_api.rb', line 1954

def list_airbnb_transactions_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_transactions ...'
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/transactions'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.list_airbnb_transactions",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#map_airbnb_listing(map_airbnb_listing_request, opts = {}) ⇒ MapAirbnbListingResponse

Map an Airbnb listing to a Repull listing 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.

Parameters:

Returns:



2003
2004
2005
2006
# File 'lib/repull/api/airbnb_api.rb', line 2003

def map_airbnb_listing(map_airbnb_listing_request, opts = {})
  data, _status_code, _headers = map_airbnb_listing_with_http_info(map_airbnb_listing_request, opts)
  data
end

#map_airbnb_listing_with_http_info(map_airbnb_listing_request, opts = {}) ⇒ Array<(MapAirbnbListingResponse, Integer, Hash)>

Map an Airbnb listing to a Repull listing 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.

Parameters:

Returns:

  • (Array<(MapAirbnbListingResponse, Integer, Hash)>)

    MapAirbnbListingResponse data, response status code and response headers



2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
# File 'lib/repull/api/airbnb_api.rb', line 2013

def map_airbnb_listing_with_http_info(map_airbnb_listing_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.map_airbnb_listing ...'
  end
  # verify the required parameter 'map_airbnb_listing_request' is set
  if @api_client.config.client_side_validation && map_airbnb_listing_request.nil?
    fail ArgumentError, "Missing the required parameter 'map_airbnb_listing_request' when calling AirbnbApi.map_airbnb_listing"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/map'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(map_airbnb_listing_request)

  # return_type
  return_type = opts[:debug_return_type] || 'MapAirbnbListingResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.map_airbnb_listing",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#map_airbnb_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#respond_airbnb_review(id, respond_airbnb_review_request, opts = {}) ⇒ AirbnbReview

Respond to Airbnb review Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters.

Parameters:

  • id (String)

    Airbnb review id.

  • respond_airbnb_review_request (RespondAirbnbReviewRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2072
2073
2074
2075
# File 'lib/repull/api/airbnb_api.rb', line 2072

def respond_airbnb_review(id, respond_airbnb_review_request, opts = {})
  data, _status_code, _headers = respond_airbnb_review_with_http_info(id, respond_airbnb_review_request, opts)
  data
end

#respond_airbnb_review_legacy(opts = {}) ⇒ nil

Respond to / submit Airbnb review (legacy) Legacy action-based shape. Body { action: \"respond\"|\"submit\", reviewId, response?, review? }. Kept for backwards compatibility — prefer PUT /v1/channels/airbnb/reviews/{id} (edit) and POST /v1/channels/airbnb/reviews/{id}/respond (reply) for new integrations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


2144
2145
2146
2147
# File 'lib/repull/api/airbnb_api.rb', line 2144

def respond_airbnb_review_legacy(opts = {})
  respond_airbnb_review_legacy_with_http_info(opts)
  nil
end

#respond_airbnb_review_legacy_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Respond to / submit Airbnb review (legacy) Legacy action-based shape. Body `{ action: &quot;respond&quot;|&quot;submit&quot;, reviewId, response?, review? }`. Kept for backwards compatibility — prefer `PUT /v1/channels/airbnb/reviews/id` (edit) and `POST /v1/channels/airbnb/reviews/id/respond` (reply) for new integrations.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
# File 'lib/repull/api/airbnb_api.rb', line 2153

def respond_airbnb_review_legacy_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.respond_airbnb_review_legacy ...'
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/reviews'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.respond_airbnb_review_legacy",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#respond_airbnb_review_legacy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#respond_airbnb_review_with_http_info(id, respond_airbnb_review_request, opts = {}) ⇒ Array<(AirbnbReview, Integer, Hash)>

Respond to Airbnb review Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters.

Parameters:

  • id (String)

    Airbnb review id.

  • respond_airbnb_review_request (RespondAirbnbReviewRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AirbnbReview, Integer, Hash)>)

    AirbnbReview data, response status code and response headers



2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
# File 'lib/repull/api/airbnb_api.rb', line 2083

def respond_airbnb_review_with_http_info(id, respond_airbnb_review_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.respond_airbnb_review ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.respond_airbnb_review"
  end
  # verify the required parameter 'respond_airbnb_review_request' is set
  if @api_client.config.client_side_validation && respond_airbnb_review_request.nil?
    fail ArgumentError, "Missing the required parameter 'respond_airbnb_review_request' when calling AirbnbApi.respond_airbnb_review"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/reviews/{id}/respond'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(respond_airbnb_review_request)

  # return_type
  return_type = opts[:debug_return_type] || 'AirbnbReview'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.respond_airbnb_review",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#respond_airbnb_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_airbnb_message(thread_id, opts = {}) ⇒ nil

Send Airbnb message Send a message in an Airbnb thread as the host. Airbnb enforces content rules (no off-platform contact info, no external URLs) — violating messages are rejected upstream and surface as airbnb_error.

Parameters:

  • thread_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


2200
2201
2202
2203
# File 'lib/repull/api/airbnb_api.rb', line 2200

def send_airbnb_message(thread_id, opts = {})
  send_airbnb_message_with_http_info(thread_id, opts)
  nil
end

#send_airbnb_message_with_http_info(thread_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Send Airbnb message Send a message in an Airbnb thread as the host. Airbnb enforces content rules (no off-platform contact info, no external URLs) — violating messages are rejected upstream and surface as `airbnb_error`.

Parameters:

  • thread_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
# File 'lib/repull/api/airbnb_api.rb', line 2210

def send_airbnb_message_with_http_info(thread_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.send_airbnb_message ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.send_airbnb_message"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/messaging/{threadId}/messages'.sub('{threadId}', CGI.escape(thread_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.send_airbnb_message",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#send_airbnb_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_airbnb_checkin_guide(id, opts = {}) ⇒ nil

Upsert Airbnb check-in guide 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.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :locale (String)

    Locale to upsert. Defaults to `en`. (default to 'en')

Returns:

  • (nil)


2262
2263
2264
2265
# File 'lib/repull/api/airbnb_api.rb', line 2262

def update_airbnb_checkin_guide(id, opts = {})
  update_airbnb_checkin_guide_with_http_info(id, opts)
  nil
end

#update_airbnb_checkin_guide_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Upsert Airbnb check-in guide 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`.

Parameters:

  • id (String)

    Repull listing id (numeric string).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :locale (String)

    Locale to upsert. Defaults to `en`. (default to 'en')

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
# File 'lib/repull/api/airbnb_api.rb', line 2273

def update_airbnb_checkin_guide_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_checkin_guide ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_checkin_guide"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/checkin-guide'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.update_airbnb_checkin_guide",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_checkin_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_airbnb_listing_availability(id, airbnb_availability_write_request, opts = {}) ⇒ nil

Update Airbnb availability 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.

Parameters:

Returns:

  • (nil)


2328
2329
2330
2331
# File 'lib/repull/api/airbnb_api.rb', line 2328

def update_airbnb_listing_availability(id, airbnb_availability_write_request, opts = {})
  update_airbnb_listing_availability_with_http_info(id, airbnb_availability_write_request, opts)
  nil
end

#update_airbnb_listing_availability_with_http_info(id, airbnb_availability_write_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update Airbnb availability Push availability + restrictions to Airbnb. `type: &quot;calendar&quot;` writes per-date restrictions — min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: &quot;unavailable&quot;`) — via a batch of operations that each target either a date range or an explicit date list. `type: &quot;rules&quot;` 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.

Parameters:

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
# File 'lib/repull/api/airbnb_api.rb', line 2339

def update_airbnb_listing_availability_with_http_info(id, airbnb_availability_write_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_availability ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_availability"
  end
  # verify the required parameter 'airbnb_availability_write_request' is set
  if @api_client.config.client_side_validation && airbnb_availability_write_request.nil?
    fail ArgumentError, "Missing the required parameter 'airbnb_availability_write_request' when calling AirbnbApi.update_airbnb_listing_availability"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/availability'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_availability_write_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.update_airbnb_listing_availability",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_airbnb_listing_pricing(id, airbnb_pricing_write_request, opts = {}) ⇒ nil

Update Airbnb pricing Push pricing changes to Airbnb. The type discriminator selects the sub-resource (model, standard settings, LOS, rate-plan, fees, currency, rule, or per-date calendar). type: \"calendar\" carries the full per-date restriction set — nightly price, min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (availability: \"unavailable\"). For settings sub-resources the full object is replaced — GET first, mutate locally, then PUT the whole object.

Parameters:

  • id (String)
  • airbnb_pricing_write_request (AirbnbPricingWriteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


2400
2401
2402
2403
# File 'lib/repull/api/airbnb_api.rb', line 2400

def update_airbnb_listing_pricing(id, airbnb_pricing_write_request, opts = {})
  update_airbnb_listing_pricing_with_http_info(id, airbnb_pricing_write_request, opts)
  nil
end

#update_airbnb_listing_pricing_with_http_info(id, airbnb_pricing_write_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update Airbnb pricing Push pricing changes to Airbnb. The `type` discriminator selects the sub-resource (model, standard settings, LOS, rate-plan, fees, currency, rule, or per-date `calendar`). `type: &quot;calendar&quot;` carries the full per-date restriction set — nightly price, min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: &quot;unavailable&quot;`). For settings sub-resources the full object is replaced — GET first, mutate locally, then PUT the whole object.

Parameters:

  • id (String)
  • airbnb_pricing_write_request (AirbnbPricingWriteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
# File 'lib/repull/api/airbnb_api.rb', line 2411

def update_airbnb_listing_pricing_with_http_info(id, airbnb_pricing_write_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_pricing ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_pricing"
  end
  # verify the required parameter 'airbnb_pricing_write_request' is set
  if @api_client.config.client_side_validation && airbnb_pricing_write_request.nil?
    fail ArgumentError, "Missing the required parameter 'airbnb_pricing_write_request' when calling AirbnbApi.update_airbnb_listing_pricing"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_pricing_write_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.update_airbnb_listing_pricing",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_airbnb_message(thread_id, message_id, update_airbnb_message_request, opts = {}) ⇒ nil

Edit / react to / mark an Airbnb message 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.

Parameters:

  • thread_id (String)

    Airbnb thread id.

  • message_id (String)

    Airbnb message id within the thread.

  • update_airbnb_message_request (UpdateAirbnbMessageRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


2473
2474
2475
2476
# File 'lib/repull/api/airbnb_api.rb', line 2473

def update_airbnb_message(thread_id, message_id, update_airbnb_message_request, opts = {})
  update_airbnb_message_with_http_info(thread_id, message_id, update_airbnb_message_request, opts)
  nil
end

#update_airbnb_message_with_http_info(thread_id, message_id, update_airbnb_message_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Edit / react to / mark an Airbnb message 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`.

Parameters:

  • thread_id (String)

    Airbnb thread id.

  • message_id (String)

    Airbnb message id within the thread.

  • update_airbnb_message_request (UpdateAirbnbMessageRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
# File 'lib/repull/api/airbnb_api.rb', line 2485

def update_airbnb_message_with_http_info(thread_id, message_id, update_airbnb_message_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_message ...'
  end
  # verify the required parameter 'thread_id' is set
  if @api_client.config.client_side_validation && thread_id.nil?
    fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.update_airbnb_message"
  end
  # verify the required parameter 'message_id' is set
  if @api_client.config.client_side_validation && message_id.nil?
    fail ArgumentError, "Missing the required parameter 'message_id' when calling AirbnbApi.update_airbnb_message"
  end
  # verify the required parameter 'update_airbnb_message_request' is set
  if @api_client.config.client_side_validation && update_airbnb_message_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_airbnb_message_request' when calling AirbnbApi.update_airbnb_message"
  end
  # resource path
  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))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_airbnb_message_request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.update_airbnb_message",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_airbnb_listing_photos(id, opts = {}) ⇒ nil

Upload photos to Airbnb 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.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


2551
2552
2553
2554
# File 'lib/repull/api/airbnb_api.rb', line 2551

def upload_airbnb_listing_photos(id, opts = {})
  upload_airbnb_listing_photos_with_http_info(id, opts)
  nil
end

#upload_airbnb_listing_photos_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Upload photos to Airbnb 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.

Parameters:

  • id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
# File 'lib/repull/api/airbnb_api.rb', line 2561

def upload_airbnb_listing_photos_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.upload_airbnb_listing_photos ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.upload_airbnb_listing_photos"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/listings/{id}/photos'.sub('{id}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.upload_airbnb_listing_photos",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#upload_airbnb_listing_photos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#withdraw_airbnb_offer(offer_id, opts = {}) ⇒ nil

Withdraw Airbnb special offer 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.

Parameters:

  • offer_id (String)

    Airbnb special-offer id to withdraw.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


2612
2613
2614
2615
# File 'lib/repull/api/airbnb_api.rb', line 2612

def withdraw_airbnb_offer(offer_id, opts = {})
  withdraw_airbnb_offer_with_http_info(offer_id, opts)
  nil
end

#withdraw_airbnb_offer_with_http_info(offer_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Withdraw Airbnb special offer 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`.

Parameters:

  • offer_id (String)

    Airbnb special-offer id to withdraw.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
# File 'lib/repull/api/airbnb_api.rb', line 2622

def withdraw_airbnb_offer_with_http_info(offer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AirbnbApi.withdraw_airbnb_offer ...'
  end
  # verify the required parameter 'offer_id' is set
  if @api_client.config.client_side_validation && offer_id.nil?
    fail ArgumentError, "Missing the required parameter 'offer_id' when calling AirbnbApi.withdraw_airbnb_offer"
  end
  # resource path
  local_var_path = '/v1/channels/airbnb/offers'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'offerId'] = offer_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"AirbnbApi.withdraw_airbnb_offer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AirbnbApi#withdraw_airbnb_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end