repull 0.2.8 → 0.2.10

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