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 (push/publish/unlist/delete) Apply a state action to an Airbnb listing — ‘push` (sync local changes upstream), `publish` (make publicly bookable), `unlist` (hide), or `delete` (permanent). Each action has different reversibility — see docs.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


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

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 (push/publish/unlist/delete) Apply a state action to an Airbnb listing — &#x60;push&#x60; (sync local changes upstream), &#x60;publish&#x60; (make publicly bookable), &#x60;unlist&#x60; (hide), or &#x60;delete&#x60; (permanent). Each action has different reversibility — see docs.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



37
38
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
# File 'lib/repull/api/airbnb_api.rb', line 37

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] || {}

  # 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_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)


88
89
90
91
# File 'lib/repull/api/airbnb_api.rb', line 88

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 — &#x60;accept&#x60; / &#x60;decline&#x60; (for inquiries and reservation requests), &#x60;cancel&#x60; (host cancellation, carries penalties), &#x60;pre-approve&#x60; (for inquiries).

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



98
99
100
101
102
103
104
105
106
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
# File 'lib/repull/api/airbnb_api.rb', line 98

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_listing(opts = {}) ⇒ AirbnbListing

Create/push Airbnb listing Create a new Airbnb listing or push an existing Repull listing to Airbnb. Requires a connected Airbnb account. Returns the created listing id; publishing happens via the listing-action endpoint.

Parameters:

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

    the optional parameters

Returns:



148
149
150
151
# File 'lib/repull/api/airbnb_api.rb', line 148

def create_airbnb_listing(opts = {})
  data, _status_code, _headers = create_airbnb_listing_with_http_info(opts)
  data
end

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

Create/push Airbnb listing Create a new Airbnb listing or push an existing Repull listing to Airbnb. Requires a connected Airbnb account. Returns the created listing id; publishing happens via the listing-action endpoint.

Parameters:

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

    the optional parameters

Returns:

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

    AirbnbListing data, response status code and response headers



157
158
159
160
161
162
163
164
165
166
167
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
# File 'lib/repull/api/airbnb_api.rb', line 157

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

  # 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] || 'AirbnbListing'

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

  new_options = opts.merge(
    :operation => :"AirbnbApi.create_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#create_airbnb_listing\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 (&#x60;HRabc123&#x60; style).

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

    the optional parameters

Returns:



207
208
209
210
# File 'lib/repull/api/airbnb_api.rb', line 207

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 (&#x60;PUT /v2/listing_reviews/id&#x60;), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial &#x60;AirbnbReview&#x60; — pass the fields you want to change (rating, public review, private feedback, category ratings).

Parameters:

  • id (String)

    Airbnb review id (&#x60;HRabc123&#x60; style).

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

    the optional parameters

Returns:

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

    AirbnbReview data, response status code and response headers



218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
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
# File 'lib/repull/api/airbnb_api.rb', line 218

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_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:



279
280
281
282
# File 'lib/repull/api/airbnb_api.rb', line 279

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&#39;s Airbnb host connection state in one envelope. Use this instead of inferring connection health from per-listing 401s on &#x60;GET /v1/channels/airbnb/listings&#x60; — that&#39;s noisy (every per-listing call has to fail before you know) and ambiguous (a single 5xx looks identical to a deauth). Pure DB read — does NOT touch Airbnb&#39;s API, so it&#39;s cheap to poll from a status-page surface. The response includes one row per Airbnb host the workspace has linked. Each row carries &#x60;isConnected&#x60;, &#x60;lastSyncedAt&#x60;, &#x60;deactivatedAt&#x60;, and &#x60;lastDisconnectReason&#x60; (most recent non-backfill row in &#x60;airbnb_host_events&#x60;). A self-serve &#x60;fixUrl&#x60; is included whenever &#x60;status&#x60; is anything other than &#x60;connected&#x60; — points at the dashboard where the host re-authorizes (or initiates the first OAuth flow for &#x60;never_connected&#x60; workspaces).

Parameters:

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

    the optional parameters

Returns:

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

    AirbnbConnectionResponse data, response status code and response headers



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/repull/api/airbnb_api.rb', line 288

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: &#x60;amenities&#x60;.

Returns:



338
339
340
341
# File 'lib/repull/api/airbnb_api.rb', line 338

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)


403
404
405
406
# File 'lib/repull/api/airbnb_api.rb', line 403

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



413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/repull/api/airbnb_api.rb', line 413

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)


464
465
466
467
# File 'lib/repull/api/airbnb_api.rb', line 464

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



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
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
# File 'lib/repull/api/airbnb_api.rb', line 474

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_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 &#x60;?include&#x3D;amenities&#x60; 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: &#x60;amenities&#x60;.

Returns:

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

    AirbnbListing data, response status code and response headers



349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'lib/repull/api/airbnb_api.rb', line 349

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:



525
526
527
528
# File 'lib/repull/api/airbnb_api.rb', line 525

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. &#x60;HMABCDEF12&#x60;).

Parameters:

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

    the optional parameters

Returns:

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

    AirbnbReservation data, response status code and response headers



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
576
577
578
579
580
581
# File 'lib/repull/api/airbnb_api.rb', line 535

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

#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)


588
589
590
591
# File 'lib/repull/api/airbnb_api.rb', line 588

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



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
639
640
641
642
# File 'lib/repull/api/airbnb_api.rb', line 598

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_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: &#x60;amenities&#x60; (adds &#x60;amenities&#x60; and &#x60;accessibility_amenities&#x60; arrays to each connection, sourced from the local &#x60;listings_airbnb_amenities&#x60; cache).

Returns:



649
650
651
652
# File 'lib/repull/api/airbnb_api.rb', line 649

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&#39;s already there. Customers with a disconnected host still see their last-synced data, with the top-level &#x60;data_freshness&#x60; envelope flagging the staleness and pointing at the reconnect URL. Pass &#x60;?include&#x3D;amenities&#x60; to enrich each connection with its locally-cached amenity set. Returns &#x60;null&#x60; 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: &#x60;amenities&#x60; (adds &#x60;amenities&#x60; and &#x60;accessibility_amenities&#x60; arrays to each connection, sourced from the local &#x60;listings_airbnb_amenities&#x60; cache).

Returns:

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

    AirbnbListingListResponse data, response status code and response headers



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
# File 'lib/repull/api/airbnb_api.rb', line 659

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&#39;s &#x60;pagination.next_cursor&#x60;. Omit to fetch the first page.

  • :offset (Integer)

    First-class alias for cursor-based pagination. Mutually exclusive with &#x60;cursor&#x60; — passing both returns 422. Accepts integers in &#x60;[0, 10000]&#x60;; deeper walks must use &#x60;cursor&#x60; (constant per-page cost). The response always includes &#x60;pagination.next_cursor&#x60; 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&#39;s date range filter.

  • :end_date (Date)

    ISO 8601 (YYYY-MM-DD) upper bound on Airbnb&#39;s date range filter.

  • :include_total (Boolean)

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

Returns:



716
717
718
719
# File 'lib/repull/api/airbnb_api.rb', line 716

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 &#x60;/v1/reservations&#x60; endpoint flattens away. Walk pages with &#x60;?cursor&#x3D;&lt;pagination.next_cursor&gt;&#x60; until &#x60;pagination.has_more&#x60; is &#x60;false&#x60;. The cursor is opaque — never construct or parse it client-side. &#x60;?offset&#x3D;&#x60; is also accepted as a first-class alias for shallow paging (0..10000) — see the &#x60;offset&#x60; parameter below. Mutually exclusive with &#x60;cursor&#x60;. 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 &#x60;status&#x60; is omitted, all statuses are returned (Airbnb defaults to &#x60;accepted&#x60; only on its own surface, but this endpoint normalises to &quot;all&quot;). Pass &#x60;?status&#x3D;accepted&#x60; to scope.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cursor (String)

    Opaque cursor returned by the previous response&#39;s &#x60;pagination.next_cursor&#x60;. Omit to fetch the first page.

  • :offset (Integer)

    First-class alias for cursor-based pagination. Mutually exclusive with &#x60;cursor&#x60; — passing both returns 422. Accepts integers in &#x60;[0, 10000]&#x60;; deeper walks must use &#x60;cursor&#x60; (constant per-page cost). The response always includes &#x60;pagination.next_cursor&#x60; 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&#39;s date range filter.

  • :end_date (Date)

    ISO 8601 (YYYY-MM-DD) upper bound on Airbnb&#39;s date range filter.

  • :include_total (Boolean)

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

Returns:



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
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
# File 'lib/repull/api/airbnb_api.rb', line 733

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:



809
810
811
812
# File 'lib/repull/api/airbnb_api.rb', line 809

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



818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
# File 'lib/repull/api/airbnb_api.rb', line 818

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:



867
868
869
870
# File 'lib/repull/api/airbnb_api.rb', line 867

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 &#x60;?cursor&#x3D;&#x60; until &#x60;pagination.hasMore&#x60; is &#x60;false&#x60;.

Parameters:

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

    the optional parameters

Returns:

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

    MessageListResponse data, response status code and response headers



877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
# File 'lib/repull/api/airbnb_api.rb', line 877

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:



929
930
931
932
# File 'lib/repull/api/airbnb_api.rb', line 929

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



938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
# File 'lib/repull/api/airbnb_api.rb', line 938

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

#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:



988
989
990
991
# File 'lib/repull/api/airbnb_api.rb', line 988

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)


1060
1061
1062
1063
# File 'lib/repull/api/airbnb_api.rb', line 1060

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 &#x60;{ action: &quot;respond&quot;|&quot;submit&quot;, reviewId, response?, review? }&#x60;. Kept for backwards compatibility — prefer &#x60;PUT /v1/channels/airbnb/reviews/id&#x60; (edit) and &#x60;POST /v1/channels/airbnb/reviews/id/respond&#x60; (reply) for new integrations.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
# File 'lib/repull/api/airbnb_api.rb', line 1069

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



999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
# File 'lib/repull/api/airbnb_api.rb', line 999

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)


1116
1117
1118
1119
# File 'lib/repull/api/airbnb_api.rb', line 1116

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 &#x60;airbnb_error&#x60;.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
# File 'lib/repull/api/airbnb_api.rb', line 1126

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

#sync_airbnb(opts = {}) ⇒ nil

Bulk sync to Airbnb Push all property data to Airbnb in one call.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1176
1177
1178
1179
# File 'lib/repull/api/airbnb_api.rb', line 1176

def sync_airbnb(opts = {})
  sync_airbnb_with_http_info(opts)
  nil
end

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

Bulk sync to Airbnb Push all property data to Airbnb in one call.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
# File 'lib/repull/api/airbnb_api.rb', line 1185

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

  # 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.sync_airbnb",
    :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#sync_airbnb\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Update Airbnb availability Push per-day availability + pricing overrides to Airbnb. Accepts a sparse map (date → fields) — only included dates are updated.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1232
1233
1234
1235
# File 'lib/repull/api/airbnb_api.rb', line 1232

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

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

Update Airbnb availability Push per-day availability + pricing overrides to Airbnb. Accepts a sparse map (date → fields) — only included dates are updated.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
1279
1280
1281
1282
1283
1284
1285
1286
# File 'lib/repull/api/airbnb_api.rb', line 1242

def update_airbnb_listing_availability_with_http_info(id, 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
  # 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.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, opts = {}) ⇒ nil

Update Airbnb pricing Push pricing changes to Airbnb. The full pricing object is replaced — to patch a single field, GET first, mutate locally, then PUT the whole object.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1293
1294
1295
1296
# File 'lib/repull/api/airbnb_api.rb', line 1293

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

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

Update Airbnb pricing Push pricing changes to Airbnb. The full pricing object is replaced — to patch a single field, GET first, mutate locally, then PUT the whole object.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
1346
1347
# File 'lib/repull/api/airbnb_api.rb', line 1303

def update_airbnb_listing_pricing_with_http_info(id, 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
  # 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.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

#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)


1354
1355
1356
1357
# File 'lib/repull/api/airbnb_api.rb', line 1354

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



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 1364

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