repull 0.2.9 → 0.2.14

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 (376) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/repull/api/airbnb_api.rb +1703 -196
  4. data/lib/repull/api/atlas_api.rb +5 -5
  5. data/lib/repull/api/availability_api.rb +241 -0
  6. data/lib/repull/api/billing_api.rb +227 -1
  7. data/lib/repull/api/booking_com_api.rb +777 -31
  8. data/lib/repull/api/connect_api.rb +761 -8
  9. data/lib/repull/api/conversations_api.rb +92 -11
  10. data/lib/repull/api/guests_api.rb +82 -7
  11. data/lib/repull/api/health_api.rb +318 -0
  12. data/lib/repull/api/kv_api.rb +1 -1
  13. data/lib/repull/api/listings_api.rb +303 -24
  14. data/lib/repull/api/markets_api.rb +3 -3
  15. data/lib/repull/api/plumguide_api.rb +262 -9
  16. data/lib/repull/api/pricing_api.rb +15 -15
  17. data/lib/repull/api/properties_api.rb +12 -9
  18. data/lib/repull/api/quotes_api.rb +109 -0
  19. data/lib/repull/api/reservations_api.rb +166 -7
  20. data/lib/repull/api/reviews_api.rb +81 -7
  21. data/lib/repull/api/schema_api.rb +1 -1
  22. data/lib/repull/api/system_api.rb +1 -1
  23. data/lib/repull/api/vrbo_api.rb +10 -10
  24. data/lib/repull/api/webhooks_api.rb +11 -9
  25. data/lib/repull/api_client.rb +1 -1
  26. data/lib/repull/api_error.rb +1 -1
  27. data/lib/repull/api_model_base.rb +1 -1
  28. data/lib/repull/configuration.rb +1 -1
  29. data/lib/repull/models/account_created_event.rb +1 -1
  30. data/lib/repull/models/account_created_payload.rb +1 -1
  31. data/lib/repull/models/account_disconnected_event.rb +1 -1
  32. data/lib/repull/models/account_disconnected_payload.rb +1 -1
  33. data/lib/repull/models/acknowledge_booking_reservations_request.rb +176 -0
  34. data/lib/repull/models/ai_operation.rb +1 -1
  35. data/lib/repull/models/ai_operation_completed_event.rb +1 -1
  36. data/lib/repull/models/ai_operation_completed_payload.rb +1 -1
  37. data/lib/repull/models/ai_operation_failed_event.rb +1 -1
  38. data/lib/repull/models/ai_operation_failed_payload.rb +1 -1
  39. data/lib/repull/models/ai_operation_failed_payload_error.rb +1 -1
  40. data/lib/repull/models/airbnb_alteration.rb +335 -0
  41. data/lib/repull/models/airbnb_amenity.rb +171 -0
  42. data/lib/repull/models/airbnb_availability_write_request.rb +20 -1
  43. data/lib/repull/models/airbnb_calendar_operation.rb +97 -8
  44. data/lib/repull/models/airbnb_connection.rb +4 -4
  45. data/lib/repull/models/airbnb_connection_accessibility_amenities_inner.rb +1 -1
  46. data/lib/repull/models/airbnb_connection_amenities_inner.rb +1 -1
  47. data/lib/repull/models/airbnb_connection_host.rb +1 -1
  48. data/lib/repull/models/airbnb_connection_response.rb +1 -1
  49. data/lib/repull/models/airbnb_connection_summary.rb +1 -1
  50. data/lib/repull/models/airbnb_data_freshness.rb +3 -3
  51. data/lib/repull/models/airbnb_listing.rb +2 -2
  52. data/lib/repull/models/airbnb_listing_action_request.rb +1 -1
  53. data/lib/repull/models/airbnb_listing_list_response.rb +2 -2
  54. data/lib/repull/models/airbnb_pricing_write_request.rb +54 -3
  55. data/lib/repull/models/airbnb_pricing_write_request_records_inner.rb +236 -0
  56. data/lib/repull/models/airbnb_reservation.rb +1 -1
  57. data/lib/repull/models/airbnb_reservation_list_response.rb +2 -2
  58. data/lib/repull/models/airbnb_review.rb +1 -1
  59. data/lib/repull/models/airbnb_review_list_response.rb +1 -1
  60. data/lib/repull/models/airbnb_thread.rb +1 -1
  61. data/lib/repull/models/airbnb_thread_list_response.rb +1 -1
  62. data/lib/repull/models/airbnb_transaction.rb +502 -0
  63. data/lib/repull/models/airbnb_transaction_guest_breakdown.rb +171 -0
  64. data/lib/repull/models/airbnb_transaction_host_breakdown.rb +246 -0
  65. data/lib/repull/models/airbnb_transaction_payout.rb +175 -0
  66. data/lib/repull/models/alteration_change.rb +161 -0
  67. data/lib/repull/models/alteration_webhook_object.rb +296 -0
  68. data/lib/repull/models/availability_batch_write_request.rb +296 -0
  69. data/lib/repull/models/availability_write_request.rb +259 -0
  70. data/lib/repull/models/availability_write_result.rb +178 -0
  71. data/lib/repull/models/availability_write_result_synced.rb +176 -0
  72. data/lib/repull/models/availability_write_settings.rb +215 -0
  73. data/lib/repull/models/booking_availability_state_response.rb +149 -0
  74. data/lib/repull/models/booking_availability_update.rb +1 -1
  75. data/lib/repull/models/booking_availability_update_request.rb +1 -1
  76. data/lib/repull/models/booking_availability_update_request_property_id.rb +1 -1
  77. data/lib/repull/models/booking_availability_update_request_updates_inner.rb +1 -1
  78. data/lib/repull/models/booking_connect_listing_option.rb +1 -1
  79. data/lib/repull/models/booking_connect_room.rb +1 -1
  80. data/lib/repull/models/booking_connect_rooms_response.rb +39 -5
  81. data/lib/repull/models/booking_conversation.rb +1 -1
  82. data/lib/repull/models/booking_pricing_rate_update.rb +1 -1
  83. data/lib/repull/models/booking_pricing_rate_update_date_range.rb +1 -1
  84. data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +1 -1
  85. data/lib/repull/models/booking_pricing_response.rb +1 -1
  86. data/lib/repull/models/booking_pricing_update_request.rb +1 -1
  87. data/lib/repull/models/booking_pricing_update_response.rb +1 -1
  88. data/lib/repull/models/booking_property.rb +1 -1
  89. data/lib/repull/models/booking_reservation.rb +277 -0
  90. data/lib/repull/models/booking_reservation_room.rb +271 -0
  91. data/lib/repull/models/booking_room_mapping.rb +18 -8
  92. data/lib/repull/models/booking_rooms_rates_response.rb +170 -0
  93. data/lib/repull/models/booking_rooms_rates_response_rooms_inner.rb +170 -0
  94. data/lib/repull/models/booking_rooms_rates_response_rooms_inner_rates_inner.rb +212 -0
  95. data/lib/repull/models/booking_setup_request.rb +220 -0
  96. data/lib/repull/models/booking_verify_hotel_request.rb +1 -1
  97. data/lib/repull/models/booking_verify_hotel_response.rb +40 -6
  98. data/lib/repull/models/bulk_pricing_failure.rb +1 -1
  99. data/lib/repull/models/bulk_pricing_item.rb +1 -1
  100. data/lib/repull/models/bulk_pricing_request.rb +1 -1
  101. data/lib/repull/models/bulk_pricing_response.rb +1 -1
  102. data/lib/repull/models/calendar_day.rb +1 -1
  103. data/lib/repull/models/calendar_response.rb +1 -1
  104. data/lib/repull/models/calendar_updated_event.rb +1 -1
  105. data/lib/repull/models/calendar_updated_payload.rb +1 -1
  106. data/lib/repull/models/calendar_updated_payload_range.rb +1 -1
  107. data/lib/repull/models/clear_kv200_response.rb +1 -1
  108. data/lib/repull/models/connect_host.rb +1 -1
  109. data/lib/repull/models/connect_provider.rb +1 -1
  110. data/lib/repull/models/connect_provider_list_response.rb +1 -1
  111. data/lib/repull/models/connect_session.rb +1 -1
  112. data/lib/repull/models/connect_status.rb +18 -6
  113. data/lib/repull/models/connect_status_accounts_inner.rb +188 -0
  114. data/lib/repull/models/connection.rb +1 -1
  115. data/lib/repull/models/connection_list_response.rb +1 -1
  116. data/lib/repull/models/conversation.rb +13 -2
  117. data/lib/repull/models/conversation_detail.rb +13 -2
  118. data/lib/repull/models/conversation_guest.rb +1 -1
  119. data/lib/repull/models/conversation_guest_contact.rb +1 -1
  120. data/lib/repull/models/conversation_host.rb +1 -1
  121. data/lib/repull/models/conversation_list_response.rb +1 -1
  122. data/lib/repull/models/conversation_message_attachment.rb +1 -1
  123. data/lib/repull/models/create_airbnb_alteration_request.rb +195 -0
  124. data/lib/repull/models/create_airbnb_offer_request.rb +211 -0
  125. data/lib/repull/models/create_billing_checkout_request.rb +1 -1
  126. data/lib/repull/models/create_booking_webhook_request.rb +192 -0
  127. data/lib/repull/models/create_connect_session_request.rb +1 -1
  128. data/lib/repull/models/create_connection_request.rb +2 -2
  129. data/lib/repull/models/create_webhook_request.rb +1 -1
  130. data/lib/repull/models/custom_schema.rb +1 -1
  131. data/lib/repull/models/custom_schema_create.rb +1 -1
  132. data/lib/repull/models/custom_schema_create_response.rb +1 -1
  133. data/lib/repull/models/custom_schema_delete_response.rb +1 -1
  134. data/lib/repull/models/custom_schema_list_response.rb +1 -1
  135. data/lib/repull/models/custom_schema_summary.rb +1 -1
  136. data/lib/repull/models/custom_schema_update.rb +1 -1
  137. data/lib/repull/models/{studio_error.rb → delete_airbnb_listing_photo200_response.rb} +11 -12
  138. data/lib/repull/models/delete_connection200_response.rb +234 -0
  139. data/lib/repull/models/delete_kv200_response.rb +1 -1
  140. data/lib/repull/models/error.rb +1 -1
  141. data/lib/repull/models/error_error.rb +14 -2
  142. data/lib/repull/models/error_error_support.rb +1 -1
  143. data/lib/repull/models/get_airbnb_alteration200_response.rb +190 -0
  144. data/lib/repull/models/get_airbnb_checkin_guide200_response.rb +192 -0
  145. data/lib/repull/models/get_airbnb_listing_quality200_response.rb +177 -0
  146. data/lib/repull/models/get_airbnb_listing_settings200_response.rb +177 -0
  147. data/lib/repull/models/{sandbox_fixture_ref.rb → get_airbnb_thread200_response.rb} +35 -38
  148. data/lib/repull/models/get_health200_response.rb +1 -1
  149. data/lib/repull/models/{vrbo_listing_list_response.rb → get_usage_logs200_response.rb} +18 -9
  150. data/lib/repull/models/get_usage_logs200_response_data_inner.rb +264 -0
  151. data/lib/repull/models/get_usage_logs200_response_pagination.rb +166 -0
  152. data/lib/repull/models/get_usage_summary200_response.rb +232 -0
  153. data/lib/repull/models/get_usage_summary200_response_breakdown_inner.rb +183 -0
  154. data/lib/repull/models/get_usage_summary200_response_limits.rb +158 -0
  155. data/lib/repull/models/get_usage_summary200_response_remaining.rb +158 -0
  156. data/lib/repull/models/get_usage_summary200_response_status_distribution.rb +174 -0
  157. data/lib/repull/models/get_usage_summary200_response_timeline_inner.rb +165 -0
  158. data/lib/repull/models/get_usage_summary200_response_totals.rb +165 -0
  159. data/lib/repull/models/get_usage_summary200_response_used.rb +156 -0
  160. data/lib/repull/models/get_usage_tier200_response.rb +183 -0
  161. data/lib/repull/models/get_usage_tier200_response_limits.rb +168 -0
  162. data/lib/repull/models/get_usage_tier200_response_remaining.rb +168 -0
  163. data/lib/repull/models/get_usage_tier200_response_used.rb +165 -0
  164. data/lib/repull/models/guest.rb +1 -1
  165. data/lib/repull/models/guest_contact.rb +1 -1
  166. data/lib/repull/models/guest_create_request.rb +250 -0
  167. data/lib/repull/models/guest_create_response.rb +227 -0
  168. data/lib/repull/models/guest_create_response_contacts_inner.rb +199 -0
  169. data/lib/repull/models/guest_flag.rb +1 -1
  170. data/lib/repull/models/guest_list_response.rb +1 -1
  171. data/lib/repull/models/guest_note.rb +1 -1
  172. data/lib/repull/models/guest_profile.rb +1 -1
  173. data/lib/repull/models/guest_reservations_summary.rb +1 -1
  174. data/lib/repull/models/list_airbnb_alterations200_response.rb +192 -0
  175. data/lib/repull/models/list_airbnb_listing_amenities200_response.rb +190 -0
  176. data/lib/repull/models/list_airbnb_listing_amenities200_response_data.rb +160 -0
  177. data/lib/repull/models/list_airbnb_transactions200_response.rb +192 -0
  178. data/lib/repull/models/list_booking_reservations200_response.rb +104 -0
  179. data/lib/repull/models/list_kv200_response.rb +1 -1
  180. data/lib/repull/models/list_kv200_response_data_inner.rb +1 -1
  181. data/lib/repull/models/list_kv200_response_pagination.rb +2 -2
  182. data/lib/repull/models/listing.rb +2 -2
  183. data/lib/repull/models/listing_active_request.rb +2 -2
  184. data/lib/repull/models/listing_active_response.rb +1 -1
  185. data/lib/repull/models/listing_address.rb +1 -1
  186. data/lib/repull/models/listing_amenity.rb +1 -1
  187. data/lib/repull/models/listing_channel.rb +1 -1
  188. data/lib/repull/models/listing_comp.rb +1 -1
  189. data/lib/repull/models/listing_comp_nightly.rb +1 -1
  190. data/lib/repull/models/listing_comp_ratings.rb +1 -1
  191. data/lib/repull/models/listing_comps_response.rb +1 -1
  192. data/lib/repull/models/listing_content.rb +1 -1
  193. data/lib/repull/models/listing_content_update_request.rb +1 -1
  194. data/lib/repull/models/listing_content_update_request_address.rb +1 -1
  195. data/lib/repull/models/listing_content_update_request_amenities.rb +1 -1
  196. data/lib/repull/models/listing_content_update_request_amenities_one_of_inner.rb +1 -1
  197. data/lib/repull/models/listing_content_update_request_occupancy.rb +1 -1
  198. data/lib/repull/models/listing_content_update_request_photos_inner.rb +1 -1
  199. data/lib/repull/models/listing_content_update_request_photos_inner_one_of.rb +1 -1
  200. data/lib/repull/models/listing_content_update_request_policies.rb +1 -1
  201. data/lib/repull/models/listing_content_update_response.rb +1 -1
  202. data/lib/repull/models/listing_create_request.rb +1 -1
  203. data/lib/repull/models/listing_create_response.rb +1 -1
  204. data/lib/repull/models/listing_created_event.rb +1 -1
  205. data/lib/repull/models/listing_created_payload.rb +1 -1
  206. data/lib/repull/models/listing_created_payload_address.rb +1 -1
  207. data/lib/repull/models/listing_deleted_event.rb +1 -1
  208. data/lib/repull/models/listing_deleted_payload.rb +1 -1
  209. data/lib/repull/models/listing_details.rb +1 -1
  210. data/lib/repull/models/listing_generate_content_request.rb +1 -1
  211. data/lib/repull/models/listing_generate_content_response.rb +1 -1
  212. data/lib/repull/models/listing_list_response.rb +1 -1
  213. data/lib/repull/models/{studio_file.rb → listing_photo.rb} +23 -34
  214. data/lib/repull/models/listing_photo_delete_request.rb +165 -0
  215. data/lib/repull/models/listing_photo_delete_response.rb +156 -0
  216. data/lib/repull/models/listing_photo_upload_url_request.rb +203 -0
  217. data/lib/repull/models/listing_photo_upload_url_response.rb +198 -0
  218. data/lib/repull/models/{booking_property_list_response.rb → listing_photos_response.rb} +19 -19
  219. data/lib/repull/models/listing_pricing_apply_request.rb +1 -1
  220. data/lib/repull/models/listing_pricing_apply_response.rb +1 -1
  221. data/lib/repull/models/listing_pricing_history_entry.rb +2 -2
  222. data/lib/repull/models/listing_pricing_history_response.rb +1 -1
  223. data/lib/repull/models/listing_pricing_recommendation.rb +1 -1
  224. data/lib/repull/models/listing_pricing_response.rb +1 -1
  225. data/lib/repull/models/listing_pricing_response_comp_summary.rb +1 -1
  226. data/lib/repull/models/listing_pricing_response_date_range.rb +1 -1
  227. data/lib/repull/models/listing_pricing_response_listing.rb +1 -1
  228. data/lib/repull/models/listing_pricing_strategy.rb +1 -1
  229. data/lib/repull/models/listing_pricing_strategy_input.rb +1 -1
  230. data/lib/repull/models/listing_publish_airbnb_request.rb +1 -1
  231. data/lib/repull/models/listing_publish_response.rb +1 -1
  232. data/lib/repull/models/listing_publish_status_channel.rb +1 -1
  233. data/lib/repull/models/listing_publish_status_connection.rb +1 -1
  234. data/lib/repull/models/listing_publish_status_response.rb +1 -1
  235. data/lib/repull/models/listing_quality_tier.rb +1 -1
  236. data/lib/repull/models/listing_segment.rb +1 -1
  237. data/lib/repull/models/listing_segment_recommendation.rb +1 -1
  238. data/lib/repull/models/listing_segments_response.rb +1 -1
  239. data/lib/repull/models/listing_segments_response_scope.rb +1 -1
  240. data/lib/repull/models/listing_status_batch_request.rb +212 -0
  241. data/lib/repull/models/listing_status_batch_response.rb +223 -0
  242. data/lib/repull/models/listing_updated_event.rb +1 -1
  243. data/lib/repull/models/listing_updated_payload.rb +1 -1
  244. data/lib/repull/models/map_airbnb_listing_request.rb +1 -1
  245. data/lib/repull/models/map_airbnb_listing_response.rb +1 -1
  246. data/lib/repull/models/map_connect_booking_rooms_request.rb +1 -1
  247. data/lib/repull/models/map_connect_booking_rooms_response.rb +16 -5
  248. data/lib/repull/models/market_browse_category.rb +1 -1
  249. data/lib/repull/models/market_browse_entry.rb +1 -1
  250. data/lib/repull/models/market_browse_featured.rb +1 -1
  251. data/lib/repull/models/market_browse_response.rb +1 -1
  252. data/lib/repull/models/market_calendar_day.rb +1 -1
  253. data/lib/repull/models/market_calendar_day_events_inner.rb +1 -1
  254. data/lib/repull/models/market_calendar_response.rb +1 -1
  255. data/lib/repull/models/market_detail_response.rb +1 -1
  256. data/lib/repull/models/market_detail_response_price_distribution_inner.rb +1 -1
  257. data/lib/repull/models/market_detail_response_property_type_mix_inner.rb +1 -1
  258. data/lib/repull/models/market_detail_response_supply_trend_inner.rb +1 -1
  259. data/lib/repull/models/market_detail_response_top_comps.rb +1 -1
  260. data/lib/repull/models/market_event.rb +1 -1
  261. data/lib/repull/models/market_my_listing.rb +1 -1
  262. data/lib/repull/models/market_summary.rb +1 -1
  263. data/lib/repull/models/market_top_comp.rb +1 -1
  264. data/lib/repull/models/markets_overview_response.rb +1 -1
  265. data/lib/repull/models/markets_overview_response_browse.rb +1 -1
  266. data/lib/repull/models/markets_overview_response_subscriptions.rb +1 -1
  267. data/lib/repull/models/markets_overview_response_totals.rb +1 -1
  268. data/lib/repull/models/message.rb +1 -1
  269. data/lib/repull/models/message_list_response.rb +1 -1
  270. data/lib/repull/models/pagination.rb +1 -1
  271. data/lib/repull/models/payment_completed_event.rb +1 -1
  272. data/lib/repull/models/payment_completed_payload.rb +1 -1
  273. data/lib/repull/models/payment_refunded_event.rb +1 -1
  274. data/lib/repull/models/payment_refunded_payload.rb +1 -1
  275. data/lib/repull/models/plumguide_listing.rb +1 -1
  276. data/lib/repull/models/plumguide_listing_list_response.rb +1 -1
  277. data/lib/repull/models/property.rb +17 -7
  278. data/lib/repull/models/property_availability.rb +248 -0
  279. data/lib/repull/models/property_availability_coverage.rb +222 -0
  280. data/lib/repull/models/property_availability_day.rb +247 -0
  281. data/lib/repull/models/property_list_response.rb +1 -1
  282. data/lib/repull/models/quote.rb +240 -0
  283. data/lib/repull/models/quote_pricing.rb +218 -0
  284. data/lib/repull/models/reply_booking_review200_response.rb +1 -1
  285. data/lib/repull/models/reply_booking_review_request.rb +1 -1
  286. data/lib/repull/models/reply_to_review201_response.rb +165 -0
  287. data/lib/repull/models/reply_to_review_request.rb +165 -0
  288. data/lib/repull/models/repull_ping_event.rb +1 -1
  289. data/lib/repull/models/repull_ping_payload.rb +1 -1
  290. data/lib/repull/models/reservation.rb +1 -1
  291. data/lib/repull/models/{studio_deployment.rb → reservation_alteration_created_event.rb} +67 -57
  292. data/lib/repull/models/reservation_alteration_created_payload.rb +177 -0
  293. data/lib/repull/models/reservation_alteration_responded_event.rb +217 -0
  294. data/lib/repull/models/reservation_alteration_responded_payload.rb +175 -0
  295. data/lib/repull/models/reservation_cancelled_event.rb +1 -1
  296. data/lib/repull/models/reservation_cancelled_payload.rb +1 -1
  297. data/lib/repull/models/reservation_create_request.rb +403 -0
  298. data/lib/repull/models/reservation_create_response.rb +233 -0
  299. data/lib/repull/models/reservation_created_event.rb +1 -1
  300. data/lib/repull/models/reservation_created_payload.rb +1 -1
  301. data/lib/repull/models/reservation_financials.rb +36 -8
  302. data/lib/repull/models/reservation_guest_financials.rb +173 -0
  303. data/lib/repull/models/reservation_guest_input.rb +193 -0
  304. data/lib/repull/models/reservation_host_financials.rb +207 -0
  305. data/lib/repull/models/reservation_list_response.rb +1 -1
  306. data/lib/repull/models/reservation_message_received_event.rb +1 -1
  307. data/lib/repull/models/reservation_message_received_payload.rb +1 -1
  308. data/lib/repull/models/reservation_message_received_payload_from.rb +1 -1
  309. data/lib/repull/models/reservation_money_line.rb +216 -0
  310. data/lib/repull/models/reservation_occupancy.rb +1 -1
  311. data/lib/repull/models/reservation_primary_guest.rb +1 -1
  312. data/lib/repull/models/reservation_update_request.rb +255 -0
  313. data/lib/repull/models/reservation_update_response.rb +240 -0
  314. data/lib/repull/models/reservation_updated_event.rb +1 -1
  315. data/lib/repull/models/reservation_updated_payload.rb +1 -1
  316. data/lib/repull/models/reservation_webhook_object.rb +1 -1
  317. data/lib/repull/models/respond_airbnb_review_request.rb +1 -1
  318. data/lib/repull/models/review.rb +14 -3
  319. data/lib/repull/models/review_category.rb +1 -1
  320. data/lib/repull/models/{sandbox_reset_result.rb → review_created_event.rb} +59 -59
  321. data/lib/repull/models/review_created_payload.rb +165 -0
  322. data/lib/repull/models/review_list_response.rb +1 -1
  323. data/lib/repull/models/review_responded_event.rb +217 -0
  324. data/lib/repull/models/review_responded_payload.rb +175 -0
  325. data/lib/repull/models/review_response.rb +1 -1
  326. data/lib/repull/models/review_webhook_object.rb +277 -0
  327. data/lib/repull/models/rotate_webhook_secret200_response.rb +1 -1
  328. data/lib/repull/models/select_connect_provider_request.rb +1 -1
  329. data/lib/repull/models/select_provider_response.rb +1 -1
  330. data/lib/repull/models/send_airbnb_message_request.rb +187 -0
  331. data/lib/repull/models/{sandbox_reset_result_deleted.rb → send_booking_message_request.rb} +53 -50
  332. data/lib/repull/models/{studio_error_error.rb → send_message_request.rb} +31 -50
  333. data/lib/repull/models/send_message_response.rb +241 -0
  334. data/lib/repull/models/set_kv_request.rb +1 -1
  335. data/lib/repull/models/{booking_conversation_list_response.rb → submit_beds24_credentials200_response.rb} +19 -19
  336. data/lib/repull/models/submit_beds24_credentials_request.rb +177 -0
  337. data/lib/repull/models/submit_bookingsync_credentials_request.rb +177 -0
  338. data/lib/repull/models/submit_guesty_credentials_request.rb +177 -0
  339. data/lib/repull/models/submit_hospitable_credentials_request.rb +177 -0
  340. data/lib/repull/models/submit_hostaway_credentials_request.rb +177 -0
  341. data/lib/repull/models/submit_igms_credentials_request.rb +177 -0
  342. data/lib/repull/models/submit_lodgify_credentials_request.rb +177 -0
  343. data/lib/repull/models/submit_ownerrez_credentials_request.rb +177 -0
  344. data/lib/repull/models/submit_smoobu_credentials_request.rb +177 -0
  345. data/lib/repull/models/submit_vrbo_credentials_request.rb +177 -0
  346. data/lib/repull/models/sync_airbnb_transactions200_response.rb +191 -0
  347. data/lib/repull/models/sync_airbnb_transactions_request.rb +201 -0
  348. data/lib/repull/models/test_webhook_request.rb +1 -1
  349. data/lib/repull/models/update_airbnb_message_request.rb +209 -0
  350. data/lib/repull/models/update_booking_charges_request.rb +194 -0
  351. data/lib/repull/models/update_listing_pricing_strategy200_response.rb +1 -1
  352. data/lib/repull/models/update_webhook_request.rb +1 -1
  353. data/lib/repull/models/vrbo_listing.rb +1 -1
  354. data/lib/repull/models/vrbo_reservation.rb +1 -1
  355. data/lib/repull/models/vrbo_reservation_list_response.rb +1 -1
  356. data/lib/repull/models/webhook_delivery.rb +1 -1
  357. data/lib/repull/models/webhook_delivery_detail.rb +1 -1
  358. data/lib/repull/models/webhook_delivery_list_response.rb +1 -1
  359. data/lib/repull/models/webhook_event.rb +12 -4
  360. data/lib/repull/models/webhook_event_catalog.rb +1 -1
  361. data/lib/repull/models/webhook_event_catalog_domains_inner.rb +1 -1
  362. data/lib/repull/models/webhook_event_catalog_entry.rb +1 -1
  363. data/lib/repull/models/webhook_event_type.rb +6 -2
  364. data/lib/repull/models/webhook_list_response.rb +1 -1
  365. data/lib/repull/models/webhook_subscription.rb +1 -1
  366. data/lib/repull/version.rb +2 -2
  367. data/lib/repull.rb +111 -15
  368. data/openapi/v1.json +9877 -3482
  369. data/scripts/check-spec-freshness.py +399 -0
  370. data/scripts/regen.sh +32 -3
  371. metadata +113 -18
  372. data/lib/repull/api/sandbox_api.rb +0 -136
  373. data/lib/repull/models/sandbox_seed_result.rb +0 -278
  374. data/lib/repull/models/studio_generation.rb +0 -215
  375. data/lib/repull/models/studio_project.rb +0 -241
  376. data/spec/api/ai_api_spec.rb +0 -47
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Repull API
3
3
 
4
- #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
5
 
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: ivan@vanio.ai
@@ -19,8 +19,78 @@ module Repull
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Accept Airbnb alteration
23
+ # Accept a pending Airbnb reservation alteration. **Write-side** — calls Airbnb upstream (`respondToAlteration`) to approve the proposed date / guest-count / price change. Requires a connected Airbnb host for the workspace (else `404 no_connection`) and that the alteration id belongs to a reservation in your workspace (else `404 not_found`). No request body is required. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
24
+ # @param id [String] Airbnb alteration id (the `alterationId` from a `GET /v1/channels/airbnb/alterations` row).
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Object] :body
27
+ # @return [nil]
28
+ def accept_airbnb_alteration(id, opts = {})
29
+ accept_airbnb_alteration_with_http_info(id, opts)
30
+ nil
31
+ end
32
+
33
+ # Accept Airbnb alteration
34
+ # Accept a pending Airbnb reservation alteration. **Write-side** — calls Airbnb upstream (`respondToAlteration`) to approve the proposed date / guest-count / price change. Requires a connected Airbnb host for the workspace (else `404 no_connection`) and that the alteration id belongs to a reservation in your workspace (else `404 not_found`). No request body is required. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
35
+ # @param id [String] Airbnb alteration id (the `alterationId` from a `GET /v1/channels/airbnb/alterations` row).
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [Object] :body
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def accept_airbnb_alteration_with_http_info(id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.accept_airbnb_alteration ...'
42
+ end
43
+ # verify the required parameter 'id' is set
44
+ if @api_client.config.client_side_validation && id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.accept_airbnb_alteration"
46
+ end
47
+ # resource path
48
+ local_var_path = '/v1/channels/airbnb/alterations/{id}/accept'.sub('{id}', CGI.escape(id.to_s))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
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
62
+
63
+ # form parameters
64
+ form_params = opts[:form_params] || {}
65
+
66
+ # http body (model)
67
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
68
+
69
+ # return_type
70
+ return_type = opts[:debug_return_type]
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
74
+
75
+ new_options = opts.merge(
76
+ :operation => :"AirbnbApi.accept_airbnb_alteration",
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: AirbnbApi#accept_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
22
92
  # 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.
93
+ # 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. Returns `403 listing_inactive` for `push`/`publish` when the listing is inactive. `delete` (deactivation) is always accepted.
24
94
  # @param id [String]
25
95
  # @param [Hash] opts the optional parameters
26
96
  # @option opts [AirbnbListingActionRequest] :airbnb_listing_action_request
@@ -31,7 +101,7 @@ module Repull
31
101
  end
32
102
 
33
103
  # Listing action (delete/push/publish)
34
- # Apply a state action to a listing by id. The path &#x60;id&#x60; is the canonical Repull listing id. &#x60;delete&#x60; 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&#39;s side). Use it to exclude a listing / trim back under the plan-listings cap; reactivate via &#x60;PATCH /v1/listings/{id}&#x60; with &#x60;{ \&quot;active\&quot;: true }&#x60;. Idempotent. &#x60;push&#x60; / &#x60;publish&#x60; push the listing&#39;s content to Airbnb via the same host-side sync orchestrator as &#x60;POST /v1/listings/{id}/publish/airbnb&#x60; — pass &#x60;airbnbConnectionId&#x60; to update an already-mapped Airbnb listing, or &#x60;hostId&#x60; to create + publish a new one under that host. &#x60;force&#x60; re-pushes every field, ignoring dirty-field tracking. Any other action (e.g. &#x60;pull&#x60;, &#x60;unlist&#x60;) returns a structured 422 naming the supported actions.
104
+ # Apply a state action to a listing by id. The path &#x60;id&#x60; is the canonical Repull listing id. &#x60;delete&#x60; 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&#39;s side). Use it to exclude a listing / trim back under the plan-listings cap; reactivate via &#x60;PATCH /v1/listings/{id}&#x60; with &#x60;{ \&quot;active\&quot;: true }&#x60;. Idempotent. &#x60;push&#x60; / &#x60;publish&#x60; push the listing&#39;s content to Airbnb via the same host-side sync orchestrator as &#x60;POST /v1/listings/{id}/publish/airbnb&#x60; — pass &#x60;airbnbConnectionId&#x60; to update an already-mapped Airbnb listing, or &#x60;hostId&#x60; to create + publish a new one under that host. &#x60;force&#x60; re-pushes every field, ignoring dirty-field tracking. Any other action (e.g. &#x60;pull&#x60;, &#x60;unlist&#x60;) returns a structured 422 naming the supported actions. Returns &#x60;403 listing_inactive&#x60; for &#x60;push&#x60;/&#x60;publish&#x60; when the listing is inactive. &#x60;delete&#x60; (deactivation) is always accepted.
35
105
  # @param id [String]
36
106
  # @param [Hash] opts the optional parameters
37
107
  # @option opts [AirbnbListingActionRequest] :airbnb_listing_action_request
@@ -90,7 +160,7 @@ module Repull
90
160
  end
91
161
 
92
162
  # Accept/decline/cancel Airbnb reservation
93
- # Apply a state action to an Airbnb reservation — `accept` / `decline` (for inquiries and reservation requests), `cancel` (host cancellation, carries penalties), `pre-approve` (for inquiries).
163
+ # Apply a state action to an Airbnb reservation — `accept` / `decline` (for inquiries and reservation requests), `cancel` (host cancellation, carries penalties), `pre-approve` (for inquiries). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
94
164
  # @param code [String]
95
165
  # @param [Hash] opts the optional parameters
96
166
  # @return [nil]
@@ -100,7 +170,7 @@ module Repull
100
170
  end
101
171
 
102
172
  # Accept/decline/cancel Airbnb reservation
103
- # Apply a state action to an Airbnb reservation — &#x60;accept&#x60; / &#x60;decline&#x60; (for inquiries and reservation requests), &#x60;cancel&#x60; (host cancellation, carries penalties), &#x60;pre-approve&#x60; (for inquiries).
173
+ # Apply a state action to an Airbnb reservation — &#x60;accept&#x60; / &#x60;decline&#x60; (for inquiries and reservation requests), &#x60;cancel&#x60; (host cancellation, carries penalties), &#x60;pre-approve&#x60; (for inquiries). Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
104
174
  # @param code [String]
105
175
  # @param [Hash] opts the optional parameters
106
176
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -113,13 +183,1020 @@ module Repull
113
183
  fail ArgumentError, "Missing the required parameter 'code' when calling AirbnbApi.airbnb_reservation_action"
114
184
  end
115
185
  # resource path
116
- local_var_path = '/v1/channels/airbnb/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
186
+ local_var_path = '/v1/channels/airbnb/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
187
+
188
+ # query parameters
189
+ query_params = opts[:query_params] || {}
190
+
191
+ # header parameters
192
+ header_params = opts[:header_params] || {}
193
+ # HTTP header 'Accept' (if needed)
194
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
195
+
196
+ # form parameters
197
+ form_params = opts[:form_params] || {}
198
+
199
+ # http body (model)
200
+ post_body = opts[:debug_body]
201
+
202
+ # return_type
203
+ return_type = opts[:debug_return_type]
204
+
205
+ # auth_names
206
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
207
+
208
+ new_options = opts.merge(
209
+ :operation => :"AirbnbApi.airbnb_reservation_action",
210
+ :header_params => header_params,
211
+ :query_params => query_params,
212
+ :form_params => form_params,
213
+ :body => post_body,
214
+ :auth_names => auth_names,
215
+ :return_type => return_type
216
+ )
217
+
218
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: AirbnbApi#airbnb_reservation_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ return data, status_code, headers
223
+ end
224
+
225
+ # Create Airbnb alteration
226
+ # 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`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
227
+ # @param create_airbnb_alteration_request [CreateAirbnbAlterationRequest]
228
+ # @param [Hash] opts the optional parameters
229
+ # @return [nil]
230
+ def create_airbnb_alteration(create_airbnb_alteration_request, opts = {})
231
+ create_airbnb_alteration_with_http_info(create_airbnb_alteration_request, opts)
232
+ nil
233
+ end
234
+
235
+ # Create Airbnb alteration
236
+ # 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;. Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
237
+ # @param create_airbnb_alteration_request [CreateAirbnbAlterationRequest]
238
+ # @param [Hash] opts the optional parameters
239
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
240
+ def create_airbnb_alteration_with_http_info(create_airbnb_alteration_request, opts = {})
241
+ if @api_client.config.debugging
242
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_alteration ...'
243
+ end
244
+ # verify the required parameter 'create_airbnb_alteration_request' is set
245
+ if @api_client.config.client_side_validation && create_airbnb_alteration_request.nil?
246
+ fail ArgumentError, "Missing the required parameter 'create_airbnb_alteration_request' when calling AirbnbApi.create_airbnb_alteration"
247
+ end
248
+ # resource path
249
+ local_var_path = '/v1/channels/airbnb/alterations'
250
+
251
+ # query parameters
252
+ query_params = opts[:query_params] || {}
253
+
254
+ # header parameters
255
+ header_params = opts[:header_params] || {}
256
+ # HTTP header 'Accept' (if needed)
257
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
258
+ # HTTP header 'Content-Type'
259
+ content_type = @api_client.select_header_content_type(['application/json'])
260
+ if !content_type.nil?
261
+ header_params['Content-Type'] = content_type
262
+ end
263
+
264
+ # form parameters
265
+ form_params = opts[:form_params] || {}
266
+
267
+ # http body (model)
268
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_airbnb_alteration_request)
269
+
270
+ # return_type
271
+ return_type = opts[:debug_return_type]
272
+
273
+ # auth_names
274
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
275
+
276
+ new_options = opts.merge(
277
+ :operation => :"AirbnbApi.create_airbnb_alteration",
278
+ :header_params => header_params,
279
+ :query_params => query_params,
280
+ :form_params => form_params,
281
+ :body => post_body,
282
+ :auth_names => auth_names,
283
+ :return_type => return_type
284
+ )
285
+
286
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
289
+ end
290
+ return data, status_code, headers
291
+ end
292
+
293
+ # Create an Airbnb room
294
+ # 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`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
295
+ # @param id [String] Repull listing id (numeric string).
296
+ # @param request_body [Hash<String, Object>]
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [nil]
299
+ def create_airbnb_listing_room(id, request_body, opts = {})
300
+ create_airbnb_listing_room_with_http_info(id, request_body, opts)
301
+ nil
302
+ end
303
+
304
+ # Create an Airbnb room
305
+ # 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;. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
306
+ # @param id [String] Repull listing id (numeric string).
307
+ # @param request_body [Hash<String, Object>]
308
+ # @param [Hash] opts the optional parameters
309
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
310
+ def create_airbnb_listing_room_with_http_info(id, request_body, opts = {})
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_listing_room ...'
313
+ end
314
+ # verify the required parameter 'id' is set
315
+ if @api_client.config.client_side_validation && id.nil?
316
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.create_airbnb_listing_room"
317
+ end
318
+ # verify the required parameter 'request_body' is set
319
+ if @api_client.config.client_side_validation && request_body.nil?
320
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling AirbnbApi.create_airbnb_listing_room"
321
+ end
322
+ # resource path
323
+ local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))
324
+
325
+ # query parameters
326
+ query_params = opts[:query_params] || {}
327
+
328
+ # header parameters
329
+ header_params = opts[:header_params] || {}
330
+ # HTTP header 'Accept' (if needed)
331
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
332
+ # HTTP header 'Content-Type'
333
+ content_type = @api_client.select_header_content_type(['application/json'])
334
+ if !content_type.nil?
335
+ header_params['Content-Type'] = content_type
336
+ end
337
+
338
+ # form parameters
339
+ form_params = opts[:form_params] || {}
340
+
341
+ # http body (model)
342
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
343
+
344
+ # return_type
345
+ return_type = opts[:debug_return_type]
346
+
347
+ # auth_names
348
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
349
+
350
+ new_options = opts.merge(
351
+ :operation => :"AirbnbApi.create_airbnb_listing_room",
352
+ :header_params => header_params,
353
+ :query_params => query_params,
354
+ :form_params => form_params,
355
+ :body => post_body,
356
+ :auth_names => auth_names,
357
+ :return_type => return_type
358
+ )
359
+
360
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
361
+ if @api_client.config.debugging
362
+ @api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_listing_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
363
+ end
364
+ return data, status_code, headers
365
+ end
366
+
367
+ # Create Airbnb special offer or pre-approval
368
+ # 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`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
369
+ # @param create_airbnb_offer_request [CreateAirbnbOfferRequest]
370
+ # @param [Hash] opts the optional parameters
371
+ # @return [nil]
372
+ def create_airbnb_offer(create_airbnb_offer_request, opts = {})
373
+ create_airbnb_offer_with_http_info(create_airbnb_offer_request, opts)
374
+ nil
375
+ end
376
+
377
+ # Create Airbnb special offer or pre-approval
378
+ # 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;. Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
379
+ # @param create_airbnb_offer_request [CreateAirbnbOfferRequest]
380
+ # @param [Hash] opts the optional parameters
381
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
382
+ def create_airbnb_offer_with_http_info(create_airbnb_offer_request, opts = {})
383
+ if @api_client.config.debugging
384
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_offer ...'
385
+ end
386
+ # verify the required parameter 'create_airbnb_offer_request' is set
387
+ if @api_client.config.client_side_validation && create_airbnb_offer_request.nil?
388
+ fail ArgumentError, "Missing the required parameter 'create_airbnb_offer_request' when calling AirbnbApi.create_airbnb_offer"
389
+ end
390
+ # resource path
391
+ local_var_path = '/v1/channels/airbnb/offers'
392
+
393
+ # query parameters
394
+ query_params = opts[:query_params] || {}
395
+
396
+ # header parameters
397
+ header_params = opts[:header_params] || {}
398
+ # HTTP header 'Accept' (if needed)
399
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
400
+ # HTTP header 'Content-Type'
401
+ content_type = @api_client.select_header_content_type(['application/json'])
402
+ if !content_type.nil?
403
+ header_params['Content-Type'] = content_type
404
+ end
405
+
406
+ # form parameters
407
+ form_params = opts[:form_params] || {}
408
+
409
+ # http body (model)
410
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_airbnb_offer_request)
411
+
412
+ # return_type
413
+ return_type = opts[:debug_return_type]
414
+
415
+ # auth_names
416
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
417
+
418
+ new_options = opts.merge(
419
+ :operation => :"AirbnbApi.create_airbnb_offer",
420
+ :header_params => header_params,
421
+ :query_params => query_params,
422
+ :form_params => form_params,
423
+ :body => post_body,
424
+ :auth_names => auth_names,
425
+ :return_type => return_type
426
+ )
427
+
428
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
429
+ if @api_client.config.debugging
430
+ @api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
431
+ end
432
+ return data, status_code, headers
433
+ end
434
+
435
+ # Decline Airbnb alteration
436
+ # Decline a pending Airbnb reservation alteration. **Write-side** — calls Airbnb upstream (`respondToAlteration`) to reject the proposed change. Requires a connected Airbnb host for the workspace (else `404 no_connection`) and that the alteration id belongs to a reservation in your workspace (else `404 not_found`). No request body is required. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
437
+ # @param id [String] Airbnb alteration id (the &#x60;alterationId&#x60; from a &#x60;GET /v1/channels/airbnb/alterations&#x60; row).
438
+ # @param [Hash] opts the optional parameters
439
+ # @option opts [Object] :body
440
+ # @return [nil]
441
+ def decline_airbnb_alteration(id, opts = {})
442
+ decline_airbnb_alteration_with_http_info(id, opts)
443
+ nil
444
+ end
445
+
446
+ # Decline Airbnb alteration
447
+ # Decline a pending Airbnb reservation alteration. **Write-side** — calls Airbnb upstream (&#x60;respondToAlteration&#x60;) to reject the proposed change. Requires a connected Airbnb host for the workspace (else &#x60;404 no_connection&#x60;) and that the alteration id belongs to a reservation in your workspace (else &#x60;404 not_found&#x60;). No request body is required. Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
448
+ # @param id [String] Airbnb alteration id (the &#x60;alterationId&#x60; from a &#x60;GET /v1/channels/airbnb/alterations&#x60; row).
449
+ # @param [Hash] opts the optional parameters
450
+ # @option opts [Object] :body
451
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
452
+ def decline_airbnb_alteration_with_http_info(id, opts = {})
453
+ if @api_client.config.debugging
454
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.decline_airbnb_alteration ...'
455
+ end
456
+ # verify the required parameter 'id' is set
457
+ if @api_client.config.client_side_validation && id.nil?
458
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.decline_airbnb_alteration"
459
+ end
460
+ # resource path
461
+ local_var_path = '/v1/channels/airbnb/alterations/{id}/decline'.sub('{id}', CGI.escape(id.to_s))
462
+
463
+ # query parameters
464
+ query_params = opts[:query_params] || {}
465
+
466
+ # header parameters
467
+ header_params = opts[:header_params] || {}
468
+ # HTTP header 'Accept' (if needed)
469
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
470
+ # HTTP header 'Content-Type'
471
+ content_type = @api_client.select_header_content_type(['application/json'])
472
+ if !content_type.nil?
473
+ header_params['Content-Type'] = content_type
474
+ end
475
+
476
+ # form parameters
477
+ form_params = opts[:form_params] || {}
478
+
479
+ # http body (model)
480
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
481
+
482
+ # return_type
483
+ return_type = opts[:debug_return_type]
484
+
485
+ # auth_names
486
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
487
+
488
+ new_options = opts.merge(
489
+ :operation => :"AirbnbApi.decline_airbnb_alteration",
490
+ :header_params => header_params,
491
+ :query_params => query_params,
492
+ :form_params => form_params,
493
+ :body => post_body,
494
+ :auth_names => auth_names,
495
+ :return_type => return_type
496
+ )
497
+
498
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
499
+ if @api_client.config.debugging
500
+ @api_client.config.logger.debug "API called: AirbnbApi#decline_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
501
+ end
502
+ return data, status_code, headers
503
+ end
504
+
505
+ # Delete an Airbnb photo
506
+ # Remove a single photo from an Airbnb listing. Pass the Airbnb-side photo id as `?photoId=`. Write-side — calls Airbnb upstream; the local photo cache is reconciled by the sync worker afterwards. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
507
+ # @param id [String]
508
+ # @param photo_id [String] Airbnb-side photo id to delete.
509
+ # @param [Hash] opts the optional parameters
510
+ # @return [DeleteAirbnbListingPhoto200Response]
511
+ def delete_airbnb_listing_photo(id, photo_id, opts = {})
512
+ data, _status_code, _headers = delete_airbnb_listing_photo_with_http_info(id, photo_id, opts)
513
+ data
514
+ end
515
+
516
+ # Delete an Airbnb photo
517
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
518
+ # @param id [String]
519
+ # @param photo_id [String] Airbnb-side photo id to delete.
520
+ # @param [Hash] opts the optional parameters
521
+ # @return [Array<(DeleteAirbnbListingPhoto200Response, Integer, Hash)>] DeleteAirbnbListingPhoto200Response data, response status code and response headers
522
+ def delete_airbnb_listing_photo_with_http_info(id, photo_id, opts = {})
523
+ if @api_client.config.debugging
524
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.delete_airbnb_listing_photo ...'
525
+ end
526
+ # verify the required parameter 'id' is set
527
+ if @api_client.config.client_side_validation && id.nil?
528
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.delete_airbnb_listing_photo"
529
+ end
530
+ # verify the required parameter 'photo_id' is set
531
+ if @api_client.config.client_side_validation && photo_id.nil?
532
+ fail ArgumentError, "Missing the required parameter 'photo_id' when calling AirbnbApi.delete_airbnb_listing_photo"
533
+ end
534
+ # resource path
535
+ local_var_path = '/v1/channels/airbnb/listings/{id}/photos'.sub('{id}', CGI.escape(id.to_s))
536
+
537
+ # query parameters
538
+ query_params = opts[:query_params] || {}
539
+ query_params[:'photoId'] = photo_id
540
+
541
+ # header parameters
542
+ header_params = opts[:header_params] || {}
543
+ # HTTP header 'Accept' (if needed)
544
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
545
+
546
+ # form parameters
547
+ form_params = opts[:form_params] || {}
548
+
549
+ # http body (model)
550
+ post_body = opts[:debug_body]
551
+
552
+ # return_type
553
+ return_type = opts[:debug_return_type] || 'DeleteAirbnbListingPhoto200Response'
554
+
555
+ # auth_names
556
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
557
+
558
+ new_options = opts.merge(
559
+ :operation => :"AirbnbApi.delete_airbnb_listing_photo",
560
+ :header_params => header_params,
561
+ :query_params => query_params,
562
+ :form_params => form_params,
563
+ :body => post_body,
564
+ :auth_names => auth_names,
565
+ :return_type => return_type
566
+ )
567
+
568
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug "API called: AirbnbApi#delete_airbnb_listing_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
571
+ end
572
+ return data, status_code, headers
573
+ end
574
+
575
+ # Delete an Airbnb room
576
+ # 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`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
577
+ # @param id [String] Repull listing id (numeric string).
578
+ # @param room_id [String] Airbnb-side room id to delete.
579
+ # @param [Hash] opts the optional parameters
580
+ # @return [DeleteAirbnbListingPhoto200Response]
581
+ def delete_airbnb_listing_room(id, room_id, opts = {})
582
+ data, _status_code, _headers = delete_airbnb_listing_room_with_http_info(id, room_id, opts)
583
+ data
584
+ end
585
+
586
+ # Delete an Airbnb room
587
+ # 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;. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
588
+ # @param id [String] Repull listing id (numeric string).
589
+ # @param room_id [String] Airbnb-side room id to delete.
590
+ # @param [Hash] opts the optional parameters
591
+ # @return [Array<(DeleteAirbnbListingPhoto200Response, Integer, Hash)>] DeleteAirbnbListingPhoto200Response data, response status code and response headers
592
+ def delete_airbnb_listing_room_with_http_info(id, room_id, opts = {})
593
+ if @api_client.config.debugging
594
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.delete_airbnb_listing_room ...'
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.delete_airbnb_listing_room"
599
+ end
600
+ # verify the required parameter 'room_id' is set
601
+ if @api_client.config.client_side_validation && room_id.nil?
602
+ fail ArgumentError, "Missing the required parameter 'room_id' when calling AirbnbApi.delete_airbnb_listing_room"
603
+ end
604
+ # resource path
605
+ local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))
606
+
607
+ # query parameters
608
+ query_params = opts[:query_params] || {}
609
+ query_params[:'roomId'] = room_id
610
+
611
+ # header parameters
612
+ header_params = opts[:header_params] || {}
613
+ # HTTP header 'Accept' (if needed)
614
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
615
+
616
+ # form parameters
617
+ form_params = opts[:form_params] || {}
618
+
619
+ # http body (model)
620
+ post_body = opts[:debug_body]
621
+
622
+ # return_type
623
+ return_type = opts[:debug_return_type] || 'DeleteAirbnbListingPhoto200Response'
624
+
625
+ # auth_names
626
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
627
+
628
+ new_options = opts.merge(
629
+ :operation => :"AirbnbApi.delete_airbnb_listing_room",
630
+ :header_params => header_params,
631
+ :query_params => query_params,
632
+ :form_params => form_params,
633
+ :body => post_body,
634
+ :auth_names => auth_names,
635
+ :return_type => return_type
636
+ )
637
+
638
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
639
+ if @api_client.config.debugging
640
+ @api_client.config.logger.debug "API called: AirbnbApi#delete_airbnb_listing_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
641
+ end
642
+ return data, status_code, headers
643
+ end
644
+
645
+ # Edit Airbnb host review
646
+ # 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). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
647
+ # @param id [String] Airbnb review id (&#x60;HRabc123&#x60; style).
648
+ # @param airbnb_review [AirbnbReview]
649
+ # @param [Hash] opts the optional parameters
650
+ # @return [AirbnbReview]
651
+ def edit_airbnb_review(id, airbnb_review, opts = {})
652
+ data, _status_code, _headers = edit_airbnb_review_with_http_info(id, airbnb_review, opts)
653
+ data
654
+ end
655
+
656
+ # Edit Airbnb host review
657
+ # 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). Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
658
+ # @param id [String] Airbnb review id (&#x60;HRabc123&#x60; style).
659
+ # @param airbnb_review [AirbnbReview]
660
+ # @param [Hash] opts the optional parameters
661
+ # @return [Array<(AirbnbReview, Integer, Hash)>] AirbnbReview data, response status code and response headers
662
+ def edit_airbnb_review_with_http_info(id, airbnb_review, opts = {})
663
+ if @api_client.config.debugging
664
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.edit_airbnb_review ...'
665
+ end
666
+ # verify the required parameter 'id' is set
667
+ if @api_client.config.client_side_validation && id.nil?
668
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.edit_airbnb_review"
669
+ end
670
+ # verify the required parameter 'airbnb_review' is set
671
+ if @api_client.config.client_side_validation && airbnb_review.nil?
672
+ fail ArgumentError, "Missing the required parameter 'airbnb_review' when calling AirbnbApi.edit_airbnb_review"
673
+ end
674
+ # resource path
675
+ local_var_path = '/v1/channels/airbnb/reviews/{id}'.sub('{id}', CGI.escape(id.to_s))
676
+
677
+ # query parameters
678
+ query_params = opts[:query_params] || {}
679
+
680
+ # header parameters
681
+ header_params = opts[:header_params] || {}
682
+ # HTTP header 'Accept' (if needed)
683
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
684
+ # HTTP header 'Content-Type'
685
+ content_type = @api_client.select_header_content_type(['application/json'])
686
+ if !content_type.nil?
687
+ header_params['Content-Type'] = content_type
688
+ end
689
+
690
+ # form parameters
691
+ form_params = opts[:form_params] || {}
692
+
693
+ # http body (model)
694
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_review)
695
+
696
+ # return_type
697
+ return_type = opts[:debug_return_type] || 'AirbnbReview'
698
+
699
+ # auth_names
700
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
701
+
702
+ new_options = opts.merge(
703
+ :operation => :"AirbnbApi.edit_airbnb_review",
704
+ :header_params => header_params,
705
+ :query_params => query_params,
706
+ :form_params => form_params,
707
+ :body => post_body,
708
+ :auth_names => auth_names,
709
+ :return_type => return_type
710
+ )
711
+
712
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
713
+ if @api_client.config.debugging
714
+ @api_client.config.logger.debug "API called: AirbnbApi#edit_airbnb_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
715
+ end
716
+ return data, status_code, headers
717
+ end
718
+
719
+ # Get Airbnb alteration
720
+ # 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. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
721
+ # @param id [String] Airbnb alteration id.
722
+ # @param [Hash] opts the optional parameters
723
+ # @return [GetAirbnbAlteration200Response]
724
+ def get_airbnb_alteration(id, opts = {})
725
+ data, _status_code, _headers = get_airbnb_alteration_with_http_info(id, opts)
726
+ data
727
+ end
728
+
729
+ # Get Airbnb alteration
730
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
731
+ # @param id [String] Airbnb alteration id.
732
+ # @param [Hash] opts the optional parameters
733
+ # @return [Array<(GetAirbnbAlteration200Response, Integer, Hash)>] GetAirbnbAlteration200Response data, response status code and response headers
734
+ def get_airbnb_alteration_with_http_info(id, opts = {})
735
+ if @api_client.config.debugging
736
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_alteration ...'
737
+ end
738
+ # verify the required parameter 'id' is set
739
+ if @api_client.config.client_side_validation && id.nil?
740
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_alteration"
741
+ end
742
+ # resource path
743
+ local_var_path = '/v1/channels/airbnb/alterations/{id}'.sub('{id}', CGI.escape(id.to_s))
744
+
745
+ # query parameters
746
+ query_params = opts[:query_params] || {}
747
+
748
+ # header parameters
749
+ header_params = opts[:header_params] || {}
750
+ # HTTP header 'Accept' (if needed)
751
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
752
+
753
+ # form parameters
754
+ form_params = opts[:form_params] || {}
755
+
756
+ # http body (model)
757
+ post_body = opts[:debug_body]
758
+
759
+ # return_type
760
+ return_type = opts[:debug_return_type] || 'GetAirbnbAlteration200Response'
761
+
762
+ # auth_names
763
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
764
+
765
+ new_options = opts.merge(
766
+ :operation => :"AirbnbApi.get_airbnb_alteration",
767
+ :header_params => header_params,
768
+ :query_params => query_params,
769
+ :form_params => form_params,
770
+ :body => post_body,
771
+ :auth_names => auth_names,
772
+ :return_type => return_type
773
+ )
774
+
775
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
776
+ if @api_client.config.debugging
777
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
778
+ end
779
+ return data, status_code, headers
780
+ end
781
+
782
+ # Get Airbnb check-in guide
783
+ # 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. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
784
+ # @param id [String] Repull listing id (numeric string).
785
+ # @param [Hash] opts the optional parameters
786
+ # @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
787
+ # @return [GetAirbnbCheckinGuide200Response]
788
+ def get_airbnb_checkin_guide(id, opts = {})
789
+ data, _status_code, _headers = get_airbnb_checkin_guide_with_http_info(id, opts)
790
+ data
791
+ end
792
+
793
+ # Get Airbnb check-in guide
794
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
795
+ # @param id [String] Repull listing id (numeric string).
796
+ # @param [Hash] opts the optional parameters
797
+ # @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
798
+ # @return [Array<(GetAirbnbCheckinGuide200Response, Integer, Hash)>] GetAirbnbCheckinGuide200Response data, response status code and response headers
799
+ def get_airbnb_checkin_guide_with_http_info(id, opts = {})
800
+ if @api_client.config.debugging
801
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_checkin_guide ...'
802
+ end
803
+ # verify the required parameter 'id' is set
804
+ if @api_client.config.client_side_validation && id.nil?
805
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_checkin_guide"
806
+ end
807
+ # resource path
808
+ local_var_path = '/v1/channels/airbnb/listings/{id}/checkin-guide'.sub('{id}', CGI.escape(id.to_s))
809
+
810
+ # query parameters
811
+ query_params = opts[:query_params] || {}
812
+ query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
813
+
814
+ # header parameters
815
+ header_params = opts[:header_params] || {}
816
+ # HTTP header 'Accept' (if needed)
817
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
818
+
819
+ # form parameters
820
+ form_params = opts[:form_params] || {}
821
+
822
+ # http body (model)
823
+ post_body = opts[:debug_body]
824
+
825
+ # return_type
826
+ return_type = opts[:debug_return_type] || 'GetAirbnbCheckinGuide200Response'
827
+
828
+ # auth_names
829
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
830
+
831
+ new_options = opts.merge(
832
+ :operation => :"AirbnbApi.get_airbnb_checkin_guide",
833
+ :header_params => header_params,
834
+ :query_params => query_params,
835
+ :form_params => form_params,
836
+ :body => post_body,
837
+ :auth_names => auth_names,
838
+ :return_type => return_type
839
+ )
840
+
841
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
842
+ if @api_client.config.debugging
843
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_checkin_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
844
+ end
845
+ return data, status_code, headers
846
+ end
847
+
848
+ # Get Airbnb checkout guide
849
+ # 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. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
850
+ # @param id [String] Repull listing id (numeric string).
851
+ # @param [Hash] opts the optional parameters
852
+ # @return [GetAirbnbCheckinGuide200Response]
853
+ def get_airbnb_checkout_guide(id, opts = {})
854
+ data, _status_code, _headers = get_airbnb_checkout_guide_with_http_info(id, opts)
855
+ data
856
+ end
857
+
858
+ # Get Airbnb checkout guide
859
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
860
+ # @param id [String] Repull listing id (numeric string).
861
+ # @param [Hash] opts the optional parameters
862
+ # @return [Array<(GetAirbnbCheckinGuide200Response, Integer, Hash)>] GetAirbnbCheckinGuide200Response data, response status code and response headers
863
+ def get_airbnb_checkout_guide_with_http_info(id, opts = {})
864
+ if @api_client.config.debugging
865
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_checkout_guide ...'
866
+ end
867
+ # verify the required parameter 'id' is set
868
+ if @api_client.config.client_side_validation && id.nil?
869
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_checkout_guide"
870
+ end
871
+ # resource path
872
+ local_var_path = '/v1/channels/airbnb/listings/{id}/checkout-guide'.sub('{id}', CGI.escape(id.to_s))
873
+
874
+ # query parameters
875
+ query_params = opts[:query_params] || {}
876
+
877
+ # header parameters
878
+ header_params = opts[:header_params] || {}
879
+ # HTTP header 'Accept' (if needed)
880
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
881
+
882
+ # form parameters
883
+ form_params = opts[:form_params] || {}
884
+
885
+ # http body (model)
886
+ post_body = opts[:debug_body]
887
+
888
+ # return_type
889
+ return_type = opts[:debug_return_type] || 'GetAirbnbCheckinGuide200Response'
890
+
891
+ # auth_names
892
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
893
+
894
+ new_options = opts.merge(
895
+ :operation => :"AirbnbApi.get_airbnb_checkout_guide",
896
+ :header_params => header_params,
897
+ :query_params => query_params,
898
+ :form_params => form_params,
899
+ :body => post_body,
900
+ :auth_names => auth_names,
901
+ :return_type => return_type
902
+ )
903
+
904
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
905
+ if @api_client.config.debugging
906
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_checkout_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
907
+ end
908
+ return data, status_code, headers
909
+ end
910
+
911
+ # Get Airbnb connection state
912
+ # 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).
913
+ # @param [Hash] opts the optional parameters
914
+ # @return [AirbnbConnectionResponse]
915
+ def get_airbnb_connection(opts = {})
916
+ data, _status_code, _headers = get_airbnb_connection_with_http_info(opts)
917
+ data
918
+ end
919
+
920
+ # Get Airbnb connection state
921
+ # 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).
922
+ # @param [Hash] opts the optional parameters
923
+ # @return [Array<(AirbnbConnectionResponse, Integer, Hash)>] AirbnbConnectionResponse data, response status code and response headers
924
+ def get_airbnb_connection_with_http_info(opts = {})
925
+ if @api_client.config.debugging
926
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_connection ...'
927
+ end
928
+ # resource path
929
+ local_var_path = '/v1/channels/airbnb/connection'
930
+
931
+ # query parameters
932
+ query_params = opts[:query_params] || {}
933
+
934
+ # header parameters
935
+ header_params = opts[:header_params] || {}
936
+ # HTTP header 'Accept' (if needed)
937
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
938
+
939
+ # form parameters
940
+ form_params = opts[:form_params] || {}
941
+
942
+ # http body (model)
943
+ post_body = opts[:debug_body]
944
+
945
+ # return_type
946
+ return_type = opts[:debug_return_type] || 'AirbnbConnectionResponse'
947
+
948
+ # auth_names
949
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
950
+
951
+ new_options = opts.merge(
952
+ :operation => :"AirbnbApi.get_airbnb_connection",
953
+ :header_params => header_params,
954
+ :query_params => query_params,
955
+ :form_params => form_params,
956
+ :body => post_body,
957
+ :auth_names => auth_names,
958
+ :return_type => return_type
959
+ )
960
+
961
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
962
+ if @api_client.config.debugging
963
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
964
+ end
965
+ return data, status_code, headers
966
+ end
967
+
968
+ # Get Airbnb listing
969
+ # 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. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
970
+ # @param id [String]
971
+ # @param [Hash] opts the optional parameters
972
+ # @option opts [String] :include Comma-separated expansions. Currently supported: &#x60;amenities&#x60;.
973
+ # @return [AirbnbListing]
974
+ def get_airbnb_listing(id, opts = {})
975
+ data, _status_code, _headers = get_airbnb_listing_with_http_info(id, opts)
976
+ data
977
+ end
978
+
979
+ # Get Airbnb listing
980
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
981
+ # @param id [String]
982
+ # @param [Hash] opts the optional parameters
983
+ # @option opts [String] :include Comma-separated expansions. Currently supported: &#x60;amenities&#x60;.
984
+ # @return [Array<(AirbnbListing, Integer, Hash)>] AirbnbListing data, response status code and response headers
985
+ def get_airbnb_listing_with_http_info(id, opts = {})
986
+ if @api_client.config.debugging
987
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing ...'
988
+ end
989
+ # verify the required parameter 'id' is set
990
+ if @api_client.config.client_side_validation && id.nil?
991
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing"
992
+ end
993
+ # resource path
994
+ local_var_path = '/v1/channels/airbnb/listings/{id}'.sub('{id}', CGI.escape(id.to_s))
995
+
996
+ # query parameters
997
+ query_params = opts[:query_params] || {}
998
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
999
+
1000
+ # header parameters
1001
+ header_params = opts[:header_params] || {}
1002
+ # HTTP header 'Accept' (if needed)
1003
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1004
+
1005
+ # form parameters
1006
+ form_params = opts[:form_params] || {}
1007
+
1008
+ # http body (model)
1009
+ post_body = opts[:debug_body]
1010
+
1011
+ # return_type
1012
+ return_type = opts[:debug_return_type] || 'AirbnbListing'
1013
+
1014
+ # auth_names
1015
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1016
+
1017
+ new_options = opts.merge(
1018
+ :operation => :"AirbnbApi.get_airbnb_listing",
1019
+ :header_params => header_params,
1020
+ :query_params => query_params,
1021
+ :form_params => form_params,
1022
+ :body => post_body,
1023
+ :auth_names => auth_names,
1024
+ :return_type => return_type
1025
+ )
1026
+
1027
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1028
+ if @api_client.config.debugging
1029
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1030
+ end
1031
+ return data, status_code, headers
1032
+ end
1033
+
1034
+ # Get Airbnb availability
1035
+ # Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1036
+ # @param id [String]
1037
+ # @param [Hash] opts the optional parameters
1038
+ # @return [nil]
1039
+ def get_airbnb_listing_availability(id, opts = {})
1040
+ get_airbnb_listing_availability_with_http_info(id, opts)
1041
+ nil
1042
+ end
1043
+
1044
+ # Get Airbnb availability
1045
+ # Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1046
+ # @param id [String]
1047
+ # @param [Hash] opts the optional parameters
1048
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1049
+ def get_airbnb_listing_availability_with_http_info(id, opts = {})
1050
+ if @api_client.config.debugging
1051
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_availability ...'
1052
+ end
1053
+ # verify the required parameter 'id' is set
1054
+ if @api_client.config.client_side_validation && id.nil?
1055
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_availability"
1056
+ end
1057
+ # resource path
1058
+ local_var_path = '/v1/channels/airbnb/listings/{id}/availability'.sub('{id}', CGI.escape(id.to_s))
1059
+
1060
+ # query parameters
1061
+ query_params = opts[:query_params] || {}
1062
+
1063
+ # header parameters
1064
+ header_params = opts[:header_params] || {}
1065
+ # HTTP header 'Accept' (if needed)
1066
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1067
+
1068
+ # form parameters
1069
+ form_params = opts[:form_params] || {}
1070
+
1071
+ # http body (model)
1072
+ post_body = opts[:debug_body]
1073
+
1074
+ # return_type
1075
+ return_type = opts[:debug_return_type]
1076
+
1077
+ # auth_names
1078
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1079
+
1080
+ new_options = opts.merge(
1081
+ :operation => :"AirbnbApi.get_airbnb_listing_availability",
1082
+ :header_params => header_params,
1083
+ :query_params => query_params,
1084
+ :form_params => form_params,
1085
+ :body => post_body,
1086
+ :auth_names => auth_names,
1087
+ :return_type => return_type
1088
+ )
1089
+
1090
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1091
+ if @api_client.config.debugging
1092
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1093
+ end
1094
+ return data, status_code, headers
1095
+ end
1096
+
1097
+ # Get Airbnb pricing
1098
+ # Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1099
+ # @param id [String]
1100
+ # @param [Hash] opts the optional parameters
1101
+ # @return [nil]
1102
+ def get_airbnb_listing_pricing(id, opts = {})
1103
+ get_airbnb_listing_pricing_with_http_info(id, opts)
1104
+ nil
1105
+ end
1106
+
1107
+ # Get Airbnb pricing
1108
+ # Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1109
+ # @param id [String]
1110
+ # @param [Hash] opts the optional parameters
1111
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1112
+ def get_airbnb_listing_pricing_with_http_info(id, opts = {})
1113
+ if @api_client.config.debugging
1114
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_pricing ...'
1115
+ end
1116
+ # verify the required parameter 'id' is set
1117
+ if @api_client.config.client_side_validation && id.nil?
1118
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_pricing"
1119
+ end
1120
+ # resource path
1121
+ local_var_path = '/v1/channels/airbnb/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))
1122
+
1123
+ # query parameters
1124
+ query_params = opts[:query_params] || {}
1125
+
1126
+ # header parameters
1127
+ header_params = opts[:header_params] || {}
1128
+ # HTTP header 'Accept' (if needed)
1129
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1130
+
1131
+ # form parameters
1132
+ form_params = opts[:form_params] || {}
1133
+
1134
+ # http body (model)
1135
+ post_body = opts[:debug_body]
1136
+
1137
+ # return_type
1138
+ return_type = opts[:debug_return_type]
1139
+
1140
+ # auth_names
1141
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1142
+
1143
+ new_options = opts.merge(
1144
+ :operation => :"AirbnbApi.get_airbnb_listing_pricing",
1145
+ :header_params => header_params,
1146
+ :query_params => query_params,
1147
+ :form_params => form_params,
1148
+ :body => post_body,
1149
+ :auth_names => auth_names,
1150
+ :return_type => return_type
1151
+ )
1152
+
1153
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1154
+ if @api_client.config.debugging
1155
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1156
+ end
1157
+ return data, status_code, headers
1158
+ end
1159
+
1160
+ # Get Airbnb listing quality
1161
+ # 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. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1162
+ # @param id [String] Repull listing id (numeric string).
1163
+ # @param [Hash] opts the optional parameters
1164
+ # @option opts [String] :type Which quality slice to return. &#x60;all&#x60; returns &#x60;{ standards, issues }&#x60;. (default to 'all')
1165
+ # @return [GetAirbnbListingQuality200Response]
1166
+ def get_airbnb_listing_quality(id, opts = {})
1167
+ data, _status_code, _headers = get_airbnb_listing_quality_with_http_info(id, opts)
1168
+ data
1169
+ end
1170
+
1171
+ # Get Airbnb listing quality
1172
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1173
+ # @param id [String] Repull listing id (numeric string).
1174
+ # @param [Hash] opts the optional parameters
1175
+ # @option opts [String] :type Which quality slice to return. &#x60;all&#x60; returns &#x60;{ standards, issues }&#x60;. (default to 'all')
1176
+ # @return [Array<(GetAirbnbListingQuality200Response, Integer, Hash)>] GetAirbnbListingQuality200Response data, response status code and response headers
1177
+ def get_airbnb_listing_quality_with_http_info(id, opts = {})
1178
+ if @api_client.config.debugging
1179
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_quality ...'
1180
+ end
1181
+ # verify the required parameter 'id' is set
1182
+ if @api_client.config.client_side_validation && id.nil?
1183
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_quality"
1184
+ end
1185
+ allowable_values = ["all", "standards", "issues", "stats"]
1186
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
1187
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
1188
+ end
1189
+ # resource path
1190
+ local_var_path = '/v1/channels/airbnb/listings/{id}/quality'.sub('{id}', CGI.escape(id.to_s))
117
1191
 
118
1192
  # query parameters
119
1193
  query_params = opts[:query_params] || {}
1194
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
120
1195
 
121
1196
  # header parameters
122
1197
  header_params = opts[:header_params] || {}
1198
+ # HTTP header 'Accept' (if needed)
1199
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
1200
 
124
1201
  # form parameters
125
1202
  form_params = opts[:form_params] || {}
@@ -128,13 +1205,13 @@ module Repull
128
1205
  post_body = opts[:debug_body]
129
1206
 
130
1207
  # return_type
131
- return_type = opts[:debug_return_type]
1208
+ return_type = opts[:debug_return_type] || 'GetAirbnbListingQuality200Response'
132
1209
 
133
1210
  # auth_names
134
1211
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
135
1212
 
136
1213
  new_options = opts.merge(
137
- :operation => :"AirbnbApi.airbnb_reservation_action",
1214
+ :operation => :"AirbnbApi.get_airbnb_listing_quality",
138
1215
  :header_params => header_params,
139
1216
  :query_params => query_params,
140
1217
  :form_params => form_params,
@@ -143,72 +1220,68 @@ module Repull
143
1220
  :return_type => return_type
144
1221
  )
145
1222
 
146
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1223
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
147
1224
  if @api_client.config.debugging
148
- @api_client.config.logger.debug "API called: AirbnbApi#airbnb_reservation_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1225
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_quality\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
1226
  end
150
1227
  return data, status_code, headers
151
1228
  end
152
1229
 
153
- # Edit Airbnb host review
154
- # Edit a host-side review for an Airbnb stay. Airbnb collapses POST + PUT into the same upstream call (`PUT /v2/listing_reviews/{id}`), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial `AirbnbReview` pass the fields you want to change (rating, public review, private feedback, category ratings).
155
- # @param id [String] Airbnb review id (&#x60;HRabc123&#x60; style).
156
- # @param airbnb_review [AirbnbReview]
1230
+ # Get Airbnb listing settings
1231
+ # 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. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1232
+ # @param id [String] Repull listing id (numeric string).
157
1233
  # @param [Hash] opts the optional parameters
158
- # @return [AirbnbReview]
159
- def edit_airbnb_review(id, airbnb_review, opts = {})
160
- data, _status_code, _headers = edit_airbnb_review_with_http_info(id, airbnb_review, opts)
1234
+ # @option opts [String] :type Which settings slice to return. &#x60;all&#x60; returns &#x60;{ hosts, locales }&#x60;. (default to 'all')
1235
+ # @return [GetAirbnbListingSettings200Response]
1236
+ def get_airbnb_listing_settings(id, opts = {})
1237
+ data, _status_code, _headers = get_airbnb_listing_settings_with_http_info(id, opts)
161
1238
  data
162
1239
  end
163
1240
 
164
- # Edit Airbnb host review
165
- # 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).
166
- # @param id [String] Airbnb review id (&#x60;HRabc123&#x60; style).
167
- # @param airbnb_review [AirbnbReview]
1241
+ # Get Airbnb listing settings
1242
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1243
+ # @param id [String] Repull listing id (numeric string).
168
1244
  # @param [Hash] opts the optional parameters
169
- # @return [Array<(AirbnbReview, Integer, Hash)>] AirbnbReview data, response status code and response headers
170
- def edit_airbnb_review_with_http_info(id, airbnb_review, opts = {})
1245
+ # @option opts [String] :type Which settings slice to return. &#x60;all&#x60; returns &#x60;{ hosts, locales }&#x60;. (default to 'all')
1246
+ # @return [Array<(GetAirbnbListingSettings200Response, Integer, Hash)>] GetAirbnbListingSettings200Response data, response status code and response headers
1247
+ def get_airbnb_listing_settings_with_http_info(id, opts = {})
171
1248
  if @api_client.config.debugging
172
- @api_client.config.logger.debug 'Calling API: AirbnbApi.edit_airbnb_review ...'
1249
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_settings ...'
173
1250
  end
174
1251
  # verify the required parameter 'id' is set
175
1252
  if @api_client.config.client_side_validation && id.nil?
176
- fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.edit_airbnb_review"
1253
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_settings"
177
1254
  end
178
- # verify the required parameter 'airbnb_review' is set
179
- if @api_client.config.client_side_validation && airbnb_review.nil?
180
- fail ArgumentError, "Missing the required parameter 'airbnb_review' when calling AirbnbApi.edit_airbnb_review"
1255
+ allowable_values = ["all", "hosts", "permits", "locales"]
1256
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
1257
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
181
1258
  end
182
1259
  # resource path
183
- local_var_path = '/v1/channels/airbnb/reviews/{id}'.sub('{id}', CGI.escape(id.to_s))
1260
+ local_var_path = '/v1/channels/airbnb/listings/{id}/settings'.sub('{id}', CGI.escape(id.to_s))
184
1261
 
185
1262
  # query parameters
186
1263
  query_params = opts[:query_params] || {}
1264
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
187
1265
 
188
1266
  # header parameters
189
1267
  header_params = opts[:header_params] || {}
190
1268
  # HTTP header 'Accept' (if needed)
191
1269
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
192
- # HTTP header 'Content-Type'
193
- content_type = @api_client.select_header_content_type(['application/json'])
194
- if !content_type.nil?
195
- header_params['Content-Type'] = content_type
196
- end
197
1270
 
198
1271
  # form parameters
199
1272
  form_params = opts[:form_params] || {}
200
1273
 
201
1274
  # http body (model)
202
- post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_review)
1275
+ post_body = opts[:debug_body]
203
1276
 
204
1277
  # return_type
205
- return_type = opts[:debug_return_type] || 'AirbnbReview'
1278
+ return_type = opts[:debug_return_type] || 'GetAirbnbListingSettings200Response'
206
1279
 
207
1280
  # auth_names
208
1281
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
209
1282
 
210
1283
  new_options = opts.merge(
211
- :operation => :"AirbnbApi.edit_airbnb_review",
1284
+ :operation => :"AirbnbApi.get_airbnb_listing_settings",
212
1285
  :header_params => header_params,
213
1286
  :query_params => query_params,
214
1287
  :form_params => form_params,
@@ -217,32 +1290,38 @@ module Repull
217
1290
  :return_type => return_type
218
1291
  )
219
1292
 
220
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1293
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
221
1294
  if @api_client.config.debugging
222
- @api_client.config.logger.debug "API called: AirbnbApi#edit_airbnb_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1295
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
1296
  end
224
1297
  return data, status_code, headers
225
1298
  end
226
1299
 
227
- # Get Airbnb connection state
228
- # Returns the workspace's Airbnb host connection state in one envelope. Use this instead of inferring connection health from per-listing 401s on `GET /v1/channels/airbnb/listings` — that's noisy (every per-listing call has to fail before you know) and ambiguous (a single 5xx looks identical to a deauth). Pure DB 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).
1300
+ # Get Airbnb reservation
1301
+ # Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. `HMABCDEF12`). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1302
+ # @param code [String]
229
1303
  # @param [Hash] opts the optional parameters
230
- # @return [AirbnbConnectionResponse]
231
- def get_airbnb_connection(opts = {})
232
- data, _status_code, _headers = get_airbnb_connection_with_http_info(opts)
1304
+ # @return [AirbnbReservation]
1305
+ def get_airbnb_reservation(code, opts = {})
1306
+ data, _status_code, _headers = get_airbnb_reservation_with_http_info(code, opts)
233
1307
  data
234
1308
  end
235
1309
 
236
- # Get Airbnb connection state
237
- # Returns the workspace&#39;s Airbnb host connection state in one envelope. Use this instead of inferring connection health from per-listing 401s on &#x60;GET /v1/channels/airbnb/listings&#x60; — that&#39;s noisy (every per-listing call has to fail before you know) and ambiguous (a single 5xx looks identical to a deauth). Pure DB read — does NOT touch Airbnb&#39;s API, so it&#39;s cheap to poll from a status-page surface. The response includes one row per Airbnb host the workspace has linked. Each row carries &#x60;isConnected&#x60;, &#x60;lastSyncedAt&#x60;, &#x60;deactivatedAt&#x60;, and &#x60;lastDisconnectReason&#x60; (most recent non-backfill row in &#x60;airbnb_host_events&#x60;). A self-serve &#x60;fixUrl&#x60; is included whenever &#x60;status&#x60; is anything other than &#x60;connected&#x60; points at the dashboard where the host re-authorizes (or initiates the first OAuth flow for &#x60;never_connected&#x60; workspaces).
1310
+ # Get Airbnb reservation
1311
+ # Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. &#x60;HMABCDEF12&#x60;). Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1312
+ # @param code [String]
238
1313
  # @param [Hash] opts the optional parameters
239
- # @return [Array<(AirbnbConnectionResponse, Integer, Hash)>] AirbnbConnectionResponse data, response status code and response headers
240
- def get_airbnb_connection_with_http_info(opts = {})
1314
+ # @return [Array<(AirbnbReservation, Integer, Hash)>] AirbnbReservation data, response status code and response headers
1315
+ def get_airbnb_reservation_with_http_info(code, opts = {})
241
1316
  if @api_client.config.debugging
242
- @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_connection ...'
1317
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_reservation ...'
1318
+ end
1319
+ # verify the required parameter 'code' is set
1320
+ if @api_client.config.client_side_validation && code.nil?
1321
+ fail ArgumentError, "Missing the required parameter 'code' when calling AirbnbApi.get_airbnb_reservation"
243
1322
  end
244
1323
  # resource path
245
- local_var_path = '/v1/channels/airbnb/connection'
1324
+ local_var_path = '/v1/channels/airbnb/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
246
1325
 
247
1326
  # query parameters
248
1327
  query_params = opts[:query_params] || {}
@@ -259,13 +1338,13 @@ module Repull
259
1338
  post_body = opts[:debug_body]
260
1339
 
261
1340
  # return_type
262
- return_type = opts[:debug_return_type] || 'AirbnbConnectionResponse'
1341
+ return_type = opts[:debug_return_type] || 'AirbnbReservation'
263
1342
 
264
1343
  # auth_names
265
1344
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
266
1345
 
267
1346
  new_options = opts.merge(
268
- :operation => :"AirbnbApi.get_airbnb_connection",
1347
+ :operation => :"AirbnbApi.get_airbnb_reservation",
269
1348
  :header_params => header_params,
270
1349
  :query_params => query_params,
271
1350
  :form_params => form_params,
@@ -276,42 +1355,39 @@ module Repull
276
1355
 
277
1356
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
278
1357
  if @api_client.config.debugging
279
- @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1358
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
280
1359
  end
281
1360
  return data, status_code, headers
282
1361
  end
283
1362
 
284
- # Get Airbnb listing
285
- # Fetch all Airbnb connection rows for a single Vanio listing id. A property may be linked from multiple Airbnb hosts every match is returned. Pass `?include=amenities` to enrich each row with its current Airbnb amenities.
286
- # @param id [String]
1363
+ # Get Airbnb thread
1364
+ # 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`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1365
+ # @param thread_id [String] Airbnb thread id (matches the external thread id).
287
1366
  # @param [Hash] opts the optional parameters
288
- # @option opts [String] :include Comma-separated expansions. Currently supported: &#x60;amenities&#x60;.
289
- # @return [AirbnbListing]
290
- def get_airbnb_listing(id, opts = {})
291
- data, _status_code, _headers = get_airbnb_listing_with_http_info(id, opts)
1367
+ # @return [GetAirbnbThread200Response]
1368
+ def get_airbnb_thread(thread_id, opts = {})
1369
+ data, _status_code, _headers = get_airbnb_thread_with_http_info(thread_id, opts)
292
1370
  data
293
1371
  end
294
1372
 
295
- # Get Airbnb listing
296
- # Fetch all Airbnb connection rows for a single Vanio listing id. A property may be linked from multiple Airbnb hosts every match is returned. Pass &#x60;?include&#x3D;amenities&#x60; to enrich each row with its current Airbnb amenities.
297
- # @param id [String]
1373
+ # Get Airbnb thread
1374
+ # 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;. Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1375
+ # @param thread_id [String] Airbnb thread id (matches the external thread id).
298
1376
  # @param [Hash] opts the optional parameters
299
- # @option opts [String] :include Comma-separated expansions. Currently supported: &#x60;amenities&#x60;.
300
- # @return [Array<(AirbnbListing, Integer, Hash)>] AirbnbListing data, response status code and response headers
301
- def get_airbnb_listing_with_http_info(id, opts = {})
1377
+ # @return [Array<(GetAirbnbThread200Response, Integer, Hash)>] GetAirbnbThread200Response data, response status code and response headers
1378
+ def get_airbnb_thread_with_http_info(thread_id, opts = {})
302
1379
  if @api_client.config.debugging
303
- @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing ...'
1380
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_thread ...'
304
1381
  end
305
- # verify the required parameter 'id' is set
306
- if @api_client.config.client_side_validation && id.nil?
307
- fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing"
1382
+ # verify the required parameter 'thread_id' is set
1383
+ if @api_client.config.client_side_validation && thread_id.nil?
1384
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.get_airbnb_thread"
308
1385
  end
309
1386
  # resource path
310
- local_var_path = '/v1/channels/airbnb/listings/{id}'.sub('{id}', CGI.escape(id.to_s))
1387
+ local_var_path = '/v1/channels/airbnb/messaging/{threadId}'.sub('{threadId}', CGI.escape(thread_id.to_s))
311
1388
 
312
1389
  # query parameters
313
1390
  query_params = opts[:query_params] || {}
314
- query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
315
1391
 
316
1392
  # header parameters
317
1393
  header_params = opts[:header_params] || {}
@@ -325,13 +1401,13 @@ module Repull
325
1401
  post_body = opts[:debug_body]
326
1402
 
327
1403
  # return_type
328
- return_type = opts[:debug_return_type] || 'AirbnbListing'
1404
+ return_type = opts[:debug_return_type] || 'GetAirbnbThread200Response'
329
1405
 
330
1406
  # auth_names
331
1407
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
332
1408
 
333
1409
  new_options = opts.merge(
334
- :operation => :"AirbnbApi.get_airbnb_listing",
1410
+ :operation => :"AirbnbApi.get_airbnb_thread",
335
1411
  :header_params => header_params,
336
1412
  :query_params => query_params,
337
1413
  :form_params => form_params,
@@ -342,42 +1418,48 @@ module Repull
342
1418
 
343
1419
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
344
1420
  if @api_client.config.debugging
345
- @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1421
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
346
1422
  end
347
1423
  return data, status_code, headers
348
1424
  end
349
1425
 
350
- # Get Airbnb availability
351
- # Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.
352
- # @param id [String]
1426
+ # List Airbnb alterations
1427
+ # 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 `dataFreshness` envelope. Alterations of reservations on inactive listings are left out. Filtering by a reservation on an inactive listing (`reservation_code`) returns `403 listing_inactive`.
353
1428
  # @param [Hash] opts the optional parameters
354
- # @return [nil]
355
- def get_airbnb_listing_availability(id, opts = {})
356
- get_airbnb_listing_availability_with_http_info(id, opts)
357
- nil
1429
+ # @option opts [String] :type Scope: &#x60;pending&#x60; (default) returns only alterations awaiting a decision; &#x60;all&#x60; returns every alteration. (default to 'pending')
1430
+ # @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.
1431
+ # @return [ListAirbnbAlterations200Response]
1432
+ def list_airbnb_alterations(opts = {})
1433
+ data, _status_code, _headers = list_airbnb_alterations_with_http_info(opts)
1434
+ data
358
1435
  end
359
1436
 
360
- # Get Airbnb availability
361
- # Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.
362
- # @param id [String]
1437
+ # List Airbnb alterations
1438
+ # 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;dataFreshness&#x60; envelope. Alterations of reservations on inactive listings are left out. Filtering by a reservation on an inactive listing (&#x60;reservation_code&#x60;) returns &#x60;403 listing_inactive&#x60;.
363
1439
  # @param [Hash] opts the optional parameters
364
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
365
- def get_airbnb_listing_availability_with_http_info(id, opts = {})
1440
+ # @option opts [String] :type Scope: &#x60;pending&#x60; (default) returns only alterations awaiting a decision; &#x60;all&#x60; returns every alteration. (default to 'pending')
1441
+ # @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.
1442
+ # @return [Array<(ListAirbnbAlterations200Response, Integer, Hash)>] ListAirbnbAlterations200Response data, response status code and response headers
1443
+ def list_airbnb_alterations_with_http_info(opts = {})
366
1444
  if @api_client.config.debugging
367
- @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_availability ...'
1445
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_alterations ...'
368
1446
  end
369
- # verify the required parameter 'id' is set
370
- if @api_client.config.client_side_validation && id.nil?
371
- fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_availability"
1447
+ allowable_values = ["pending", "all"]
1448
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
1449
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
372
1450
  end
373
1451
  # resource path
374
- local_var_path = '/v1/channels/airbnb/listings/{id}/availability'.sub('{id}', CGI.escape(id.to_s))
1452
+ local_var_path = '/v1/channels/airbnb/alterations'
375
1453
 
376
1454
  # query parameters
377
1455
  query_params = opts[:query_params] || {}
1456
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
1457
+ query_params[:'reservation_code'] = opts[:'reservation_code'] if !opts[:'reservation_code'].nil?
378
1458
 
379
1459
  # header parameters
380
1460
  header_params = opts[:header_params] || {}
1461
+ # HTTP header 'Accept' (if needed)
1462
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
381
1463
 
382
1464
  # form parameters
383
1465
  form_params = opts[:form_params] || {}
@@ -386,13 +1468,13 @@ module Repull
386
1468
  post_body = opts[:debug_body]
387
1469
 
388
1470
  # return_type
389
- return_type = opts[:debug_return_type]
1471
+ return_type = opts[:debug_return_type] || 'ListAirbnbAlterations200Response'
390
1472
 
391
1473
  # auth_names
392
1474
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
393
1475
 
394
1476
  new_options = opts.merge(
395
- :operation => :"AirbnbApi.get_airbnb_listing_availability",
1477
+ :operation => :"AirbnbApi.list_airbnb_alterations",
396
1478
  :header_params => header_params,
397
1479
  :query_params => query_params,
398
1480
  :form_params => form_params,
@@ -403,42 +1485,44 @@ module Repull
403
1485
 
404
1486
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
405
1487
  if @api_client.config.debugging
406
- @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1488
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_alterations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
407
1489
  end
408
1490
  return data, status_code, headers
409
1491
  end
410
1492
 
411
- # Get Airbnb pricing
412
- # Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing.
413
- # @param id [String]
1493
+ # List Airbnb amenities
1494
+ # 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 `dataFreshness` to disambiguate \"never synced\" from \"fresh and genuinely empty\". Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1495
+ # @param id [String] Repull listing id (numeric string).
414
1496
  # @param [Hash] opts the optional parameters
415
- # @return [nil]
416
- def get_airbnb_listing_pricing(id, opts = {})
417
- get_airbnb_listing_pricing_with_http_info(id, opts)
418
- nil
1497
+ # @return [ListAirbnbListingAmenities200Response]
1498
+ def list_airbnb_listing_amenities(id, opts = {})
1499
+ data, _status_code, _headers = list_airbnb_listing_amenities_with_http_info(id, opts)
1500
+ data
419
1501
  end
420
1502
 
421
- # Get Airbnb pricing
422
- # Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing.
423
- # @param id [String]
1503
+ # List Airbnb amenities
1504
+ # 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;dataFreshness&#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. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1505
+ # @param id [String] Repull listing id (numeric string).
424
1506
  # @param [Hash] opts the optional parameters
425
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
426
- def get_airbnb_listing_pricing_with_http_info(id, opts = {})
1507
+ # @return [Array<(ListAirbnbListingAmenities200Response, Integer, Hash)>] ListAirbnbListingAmenities200Response data, response status code and response headers
1508
+ def list_airbnb_listing_amenities_with_http_info(id, opts = {})
427
1509
  if @api_client.config.debugging
428
- @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_pricing ...'
1510
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_amenities ...'
429
1511
  end
430
1512
  # verify the required parameter 'id' is set
431
1513
  if @api_client.config.client_side_validation && id.nil?
432
- fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_pricing"
1514
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_amenities"
433
1515
  end
434
1516
  # resource path
435
- local_var_path = '/v1/channels/airbnb/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))
1517
+ local_var_path = '/v1/channels/airbnb/listings/{id}/amenities'.sub('{id}', CGI.escape(id.to_s))
436
1518
 
437
1519
  # query parameters
438
1520
  query_params = opts[:query_params] || {}
439
1521
 
440
1522
  # header parameters
441
1523
  header_params = opts[:header_params] || {}
1524
+ # HTTP header 'Accept' (if needed)
1525
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
442
1526
 
443
1527
  # form parameters
444
1528
  form_params = opts[:form_params] || {}
@@ -447,13 +1531,13 @@ module Repull
447
1531
  post_body = opts[:debug_body]
448
1532
 
449
1533
  # return_type
450
- return_type = opts[:debug_return_type]
1534
+ return_type = opts[:debug_return_type] || 'ListAirbnbListingAmenities200Response'
451
1535
 
452
1536
  # auth_names
453
1537
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
454
1538
 
455
1539
  new_options = opts.merge(
456
- :operation => :"AirbnbApi.get_airbnb_listing_pricing",
1540
+ :operation => :"AirbnbApi.list_airbnb_listing_amenities",
457
1541
  :header_params => header_params,
458
1542
  :query_params => query_params,
459
1543
  :form_params => form_params,
@@ -464,39 +1548,45 @@ module Repull
464
1548
 
465
1549
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
466
1550
  if @api_client.config.debugging
467
- @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1551
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_amenities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
468
1552
  end
469
1553
  return data, status_code, headers
470
1554
  end
471
1555
 
472
- # Get Airbnb reservation
473
- # Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. `HMABCDEF12`).
474
- # @param code [String]
1556
+ # List Airbnb descriptions
1557
+ # 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. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1558
+ # @param id [String] Repull listing id (numeric string).
475
1559
  # @param [Hash] opts the optional parameters
476
- # @return [AirbnbReservation]
477
- def get_airbnb_reservation(code, opts = {})
478
- data, _status_code, _headers = get_airbnb_reservation_with_http_info(code, opts)
1560
+ # @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
1561
+ # @option opts [String] :country Legacy alias for &#x60;locale&#x60;. Prefer &#x60;locale&#x60;.
1562
+ # @return [GetAirbnbCheckinGuide200Response]
1563
+ def list_airbnb_listing_descriptions(id, opts = {})
1564
+ data, _status_code, _headers = list_airbnb_listing_descriptions_with_http_info(id, opts)
479
1565
  data
480
1566
  end
481
1567
 
482
- # Get Airbnb reservation
483
- # Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. &#x60;HMABCDEF12&#x60;).
484
- # @param code [String]
1568
+ # List Airbnb descriptions
1569
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1570
+ # @param id [String] Repull listing id (numeric string).
485
1571
  # @param [Hash] opts the optional parameters
486
- # @return [Array<(AirbnbReservation, Integer, Hash)>] AirbnbReservation data, response status code and response headers
487
- def get_airbnb_reservation_with_http_info(code, opts = {})
1572
+ # @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
1573
+ # @option opts [String] :country Legacy alias for &#x60;locale&#x60;. Prefer &#x60;locale&#x60;.
1574
+ # @return [Array<(GetAirbnbCheckinGuide200Response, Integer, Hash)>] GetAirbnbCheckinGuide200Response data, response status code and response headers
1575
+ def list_airbnb_listing_descriptions_with_http_info(id, opts = {})
488
1576
  if @api_client.config.debugging
489
- @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_reservation ...'
1577
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_descriptions ...'
490
1578
  end
491
- # verify the required parameter 'code' is set
492
- if @api_client.config.client_side_validation && code.nil?
493
- fail ArgumentError, "Missing the required parameter 'code' when calling AirbnbApi.get_airbnb_reservation"
1579
+ # verify the required parameter 'id' is set
1580
+ if @api_client.config.client_side_validation && id.nil?
1581
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_descriptions"
494
1582
  end
495
1583
  # resource path
496
- local_var_path = '/v1/channels/airbnb/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
1584
+ local_var_path = '/v1/channels/airbnb/listings/{id}/descriptions'.sub('{id}', CGI.escape(id.to_s))
497
1585
 
498
1586
  # query parameters
499
1587
  query_params = opts[:query_params] || {}
1588
+ query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
1589
+ query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
500
1590
 
501
1591
  # header parameters
502
1592
  header_params = opts[:header_params] || {}
@@ -510,13 +1600,13 @@ module Repull
510
1600
  post_body = opts[:debug_body]
511
1601
 
512
1602
  # return_type
513
- return_type = opts[:debug_return_type] || 'AirbnbReservation'
1603
+ return_type = opts[:debug_return_type] || 'GetAirbnbCheckinGuide200Response'
514
1604
 
515
1605
  # auth_names
516
1606
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
517
1607
 
518
1608
  new_options = opts.merge(
519
- :operation => :"AirbnbApi.get_airbnb_reservation",
1609
+ :operation => :"AirbnbApi.list_airbnb_listing_descriptions",
520
1610
  :header_params => header_params,
521
1611
  :query_params => query_params,
522
1612
  :form_params => form_params,
@@ -527,13 +1617,13 @@ module Repull
527
1617
 
528
1618
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
529
1619
  if @api_client.config.debugging
530
- @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1620
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_descriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
531
1621
  end
532
1622
  return data, status_code, headers
533
1623
  end
534
1624
 
535
1625
  # List Airbnb photos
536
- # List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room).
1626
+ # List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room). Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
537
1627
  # @param id [String]
538
1628
  # @param [Hash] opts the optional parameters
539
1629
  # @return [nil]
@@ -543,7 +1633,7 @@ module Repull
543
1633
  end
544
1634
 
545
1635
  # List Airbnb photos
546
- # List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room).
1636
+ # List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room). Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
547
1637
  # @param id [String]
548
1638
  # @param [Hash] opts the optional parameters
549
1639
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -563,6 +1653,8 @@ module Repull
563
1653
 
564
1654
  # header parameters
565
1655
  header_params = opts[:header_params] || {}
1656
+ # HTTP header 'Accept' (if needed)
1657
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
566
1658
 
567
1659
  # form parameters
568
1660
  form_params = opts[:form_params] || {}
@@ -593,8 +1685,71 @@ module Repull
593
1685
  return data, status_code, headers
594
1686
  end
595
1687
 
1688
+ # List Airbnb rooms
1689
+ # 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. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1690
+ # @param id [String] Repull listing id (numeric string).
1691
+ # @param [Hash] opts the optional parameters
1692
+ # @return [GetAirbnbCheckinGuide200Response]
1693
+ def list_airbnb_listing_rooms(id, opts = {})
1694
+ data, _status_code, _headers = list_airbnb_listing_rooms_with_http_info(id, opts)
1695
+ data
1696
+ end
1697
+
1698
+ # List Airbnb rooms
1699
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1700
+ # @param id [String] Repull listing id (numeric string).
1701
+ # @param [Hash] opts the optional parameters
1702
+ # @return [Array<(GetAirbnbCheckinGuide200Response, Integer, Hash)>] GetAirbnbCheckinGuide200Response data, response status code and response headers
1703
+ def list_airbnb_listing_rooms_with_http_info(id, opts = {})
1704
+ if @api_client.config.debugging
1705
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_rooms ...'
1706
+ end
1707
+ # verify the required parameter 'id' is set
1708
+ if @api_client.config.client_side_validation && id.nil?
1709
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_rooms"
1710
+ end
1711
+ # resource path
1712
+ local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))
1713
+
1714
+ # query parameters
1715
+ query_params = opts[:query_params] || {}
1716
+
1717
+ # header parameters
1718
+ header_params = opts[:header_params] || {}
1719
+ # HTTP header 'Accept' (if needed)
1720
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1721
+
1722
+ # form parameters
1723
+ form_params = opts[:form_params] || {}
1724
+
1725
+ # http body (model)
1726
+ post_body = opts[:debug_body]
1727
+
1728
+ # return_type
1729
+ return_type = opts[:debug_return_type] || 'GetAirbnbCheckinGuide200Response'
1730
+
1731
+ # auth_names
1732
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1733
+
1734
+ new_options = opts.merge(
1735
+ :operation => :"AirbnbApi.list_airbnb_listing_rooms",
1736
+ :header_params => header_params,
1737
+ :query_params => query_params,
1738
+ :form_params => form_params,
1739
+ :body => post_body,
1740
+ :auth_names => auth_names,
1741
+ :return_type => return_type
1742
+ )
1743
+
1744
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1745
+ if @api_client.config.debugging
1746
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_rooms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1747
+ end
1748
+ return data, status_code, headers
1749
+ end
1750
+
596
1751
  # List Airbnb listings
597
- # List every Airbnb listing this workspace has access to via the connected Airbnb account. **Pure DB read — never calls Airbnb upstream.** The connect flow is what populates the local cache; the API serves what's already there. Customers with a disconnected host still see their last-synced data, with the top-level `data_freshness` envelope flagging the staleness and pointing at the reconnect URL. Pass `?include=amenities` to enrich each connection with its locally-cached amenity set. Returns `null` per connection when the cache is empty.
1752
+ # List every Airbnb listing this workspace has access to via the connected Airbnb account. **Pure DB read — never calls Airbnb upstream.** The connect flow is what populates the local cache; the API serves what's already there. Customers with a disconnected host still see their last-synced data, with the top-level `dataFreshness` envelope flagging the staleness and pointing at the reconnect URL. Pass `?include=amenities` to enrich each connection with its locally-cached amenity set. Returns `null` per connection when the cache is empty. Inactive listings are left out; they keep syncing and reappear once activated. Use `GET /v1/listings?status=inactive` to find them.
598
1753
  # @param [Hash] opts the optional parameters
599
1754
  # @option opts [String] :include Comma-separated expansions. Currently supported: &#x60;amenities&#x60; (adds &#x60;amenities&#x60; and &#x60;accessibility_amenities&#x60; arrays to each connection, sourced from the local &#x60;listings_airbnb_amenities&#x60; cache).
600
1755
  # @return [AirbnbListingListResponse]
@@ -604,7 +1759,7 @@ module Repull
604
1759
  end
605
1760
 
606
1761
  # List Airbnb listings
607
- # List every Airbnb listing this workspace has access to via the connected Airbnb account. **Pure DB read — never calls Airbnb upstream.** The connect flow is what populates the local cache; the API serves what&#39;s already there. Customers with a disconnected host still see their last-synced data, with the top-level &#x60;data_freshness&#x60; envelope flagging the staleness and pointing at the reconnect URL. Pass &#x60;?include&#x3D;amenities&#x60; to enrich each connection with its locally-cached amenity set. Returns &#x60;null&#x60; per connection when the cache is empty.
1762
+ # List every Airbnb listing this workspace has access to via the connected Airbnb account. **Pure DB read — never calls Airbnb upstream.** The connect flow is what populates the local cache; the API serves what&#39;s already there. Customers with a disconnected host still see their last-synced data, with the top-level &#x60;dataFreshness&#x60; envelope flagging the staleness and pointing at the reconnect URL. Pass &#x60;?include&#x3D;amenities&#x60; to enrich each connection with its locally-cached amenity set. Returns &#x60;null&#x60; per connection when the cache is empty. Inactive listings are left out; they keep syncing and reappear once activated. Use &#x60;GET /v1/listings?status&#x3D;inactive&#x60; to find them.
608
1763
  # @param [Hash] opts the optional parameters
609
1764
  # @option opts [String] :include Comma-separated expansions. Currently supported: &#x60;amenities&#x60; (adds &#x60;amenities&#x60; and &#x60;accessibility_amenities&#x60; arrays to each connection, sourced from the local &#x60;listings_airbnb_amenities&#x60; cache).
610
1765
  # @return [Array<(AirbnbListingListResponse, Integer, Hash)>] AirbnbListingListResponse data, response status code and response headers
@@ -654,10 +1809,10 @@ module Repull
654
1809
  end
655
1810
 
656
1811
  # List Airbnb reservations
657
- # Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified `/v1/reservations` endpoint flattens away. Walk pages with `?cursor=<pagination.next_cursor>` until `pagination.has_more` is `false`. The cursor is opaque — never construct or parse it client-side. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Internally this walks upstream Airbnb cursor pages to skip rows, so deep offsets cost N/limit upstream round-trips; cursor remains the better choice for deep pagination. When `status` is omitted, all statuses are returned (Airbnb defaults to `accepted` only on its own surface, but this endpoint normalises to \"all\"). Pass `?status=accepted` to scope.
1812
+ # Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified `/v1/reservations` endpoint flattens away. Walk pages with `?cursor=<pagination.nextCursor>` until `pagination.hasMore` is `false`. The cursor is opaque — never construct or parse it client-side. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Internally this walks upstream Airbnb cursor pages to skip rows, so deep offsets cost N/limit upstream round-trips; cursor remains the better choice for deep pagination. When `status` is omitted, all statuses are returned (Airbnb defaults to `accepted` only on its own surface, but this endpoint normalises to \"all\"). Pass `?status=accepted` to scope. Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`.
658
1813
  # @param [Hash] opts the optional parameters
659
- # @option opts [String] :cursor Opaque cursor returned by the previous response&#39;s &#x60;pagination.next_cursor&#x60;. Omit to fetch the first page.
660
- # @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with &#x60;cursor&#x60; — passing both returns 422. Accepts integers in &#x60;[0, 10000]&#x60;; deeper walks must use &#x60;cursor&#x60; (constant per-page cost). The response always includes &#x60;pagination.next_cursor&#x60; so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
1814
+ # @option opts [String] :cursor Opaque cursor returned by the previous response&#39;s &#x60;pagination.nextCursor&#x60;. Omit to fetch the first page.
1815
+ # @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with &#x60;cursor&#x60; — passing both returns 422. Accepts integers in &#x60;[0, 10000]&#x60;; deeper walks must use &#x60;cursor&#x60; (constant per-page cost). The response always includes &#x60;pagination.nextCursor&#x60; so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
661
1816
  # @option opts [Integer] :limit Max items per page. Hard cap is 100. (default to 50)
662
1817
  # @option opts [String] :listing_id Filter to one Airbnb listing id (numeric string).
663
1818
  # @option opts [String] :status Filter by reservation status. Omit to receive all statuses.
@@ -671,10 +1826,10 @@ module Repull
671
1826
  end
672
1827
 
673
1828
  # List Airbnb reservations
674
- # Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified &#x60;/v1/reservations&#x60; endpoint flattens away. Walk pages with &#x60;?cursor&#x3D;&lt;pagination.next_cursor&gt;&#x60; until &#x60;pagination.has_more&#x60; is &#x60;false&#x60;. The cursor is opaque — never construct or parse it client-side. &#x60;?offset&#x3D;&#x60; is also accepted as a first-class alias for shallow paging (0..10000) — see the &#x60;offset&#x60; parameter below. Mutually exclusive with &#x60;cursor&#x60;. Internally this walks upstream Airbnb cursor pages to skip rows, so deep offsets cost N/limit upstream round-trips; cursor remains the better choice for deep pagination. When &#x60;status&#x60; is omitted, all statuses are returned (Airbnb defaults to &#x60;accepted&#x60; only on its own surface, but this endpoint normalises to \&quot;all\&quot;). Pass &#x60;?status&#x3D;accepted&#x60; to scope.
1829
+ # Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified &#x60;/v1/reservations&#x60; endpoint flattens away. Walk pages with &#x60;?cursor&#x3D;&lt;pagination.nextCursor&gt;&#x60; until &#x60;pagination.hasMore&#x60; is &#x60;false&#x60;. The cursor is opaque — never construct or parse it client-side. &#x60;?offset&#x3D;&#x60; is also accepted as a first-class alias for shallow paging (0..10000) — see the &#x60;offset&#x60; parameter below. Mutually exclusive with &#x60;cursor&#x60;. Internally this walks upstream Airbnb cursor pages to skip rows, so deep offsets cost N/limit upstream round-trips; cursor remains the better choice for deep pagination. When &#x60;status&#x60; is omitted, all statuses are returned (Airbnb defaults to &#x60;accepted&#x60; only on its own surface, but this endpoint normalises to \&quot;all\&quot;). Pass &#x60;?status&#x3D;accepted&#x60; to scope. Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (&#x60;listing_id&#x60;) returns &#x60;403 listing_inactive&#x60;.
675
1830
  # @param [Hash] opts the optional parameters
676
- # @option opts [String] :cursor Opaque cursor returned by the previous response&#39;s &#x60;pagination.next_cursor&#x60;. Omit to fetch the first page.
677
- # @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with &#x60;cursor&#x60; — passing both returns 422. Accepts integers in &#x60;[0, 10000]&#x60;; deeper walks must use &#x60;cursor&#x60; (constant per-page cost). The response always includes &#x60;pagination.next_cursor&#x60; so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
1831
+ # @option opts [String] :cursor Opaque cursor returned by the previous response&#39;s &#x60;pagination.nextCursor&#x60;. Omit to fetch the first page.
1832
+ # @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with &#x60;cursor&#x60; — passing both returns 422. Accepts integers in &#x60;[0, 10000]&#x60;; deeper walks must use &#x60;cursor&#x60; (constant per-page cost). The response always includes &#x60;pagination.nextCursor&#x60; so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
678
1833
  # @option opts [Integer] :limit Max items per page. Hard cap is 100. (default to 50)
679
1834
  # @option opts [String] :listing_id Filter to one Airbnb listing id (numeric string).
680
1835
  # @option opts [String] :status Filter by reservation status. Omit to receive all statuses.
@@ -755,7 +1910,7 @@ module Repull
755
1910
  end
756
1911
 
757
1912
  # List Airbnb reviews
758
- # List reviews left by guests on Airbnb listings in this workspace. Includes both reviews of the host and reviews of the guest (where the host has not yet submitted theirs).
1913
+ # List reviews left by guests on Airbnb listings in this workspace. Includes both reviews of the host and reviews of the guest (where the host has not yet submitted theirs). Reviews of inactive listings are left out; they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`.
759
1914
  # @param [Hash] opts the optional parameters
760
1915
  # @return [AirbnbReviewListResponse]
761
1916
  def list_airbnb_reviews(opts = {})
@@ -764,7 +1919,7 @@ module Repull
764
1919
  end
765
1920
 
766
1921
  # List Airbnb reviews
767
- # List reviews left by guests on Airbnb listings in this workspace. Includes both reviews of the host and reviews of the guest (where the host has not yet submitted theirs).
1922
+ # List reviews left by guests on Airbnb listings in this workspace. Includes both reviews of the host and reviews of the guest (where the host has not yet submitted theirs). Reviews of inactive listings are left out; they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (&#x60;listing_id&#x60;) returns &#x60;403 listing_inactive&#x60;.
768
1923
  # @param [Hash] opts the optional parameters
769
1924
  # @return [Array<(AirbnbReviewListResponse, Integer, Hash)>] AirbnbReviewListResponse data, response status code and response headers
770
1925
  def list_airbnb_reviews_with_http_info(opts = {})
@@ -812,30 +1967,87 @@ module Repull
812
1967
  end
813
1968
 
814
1969
  # Get Airbnb messages
815
- # Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with `?cursor=` until `pagination.hasMore` is `false`.
1970
+ # Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with `?cursor=` until `pagination.hasMore` is `false`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1971
+ # @param thread_id [String]
1972
+ # @param [Hash] opts the optional parameters
1973
+ # @return [MessageListResponse]
1974
+ def list_airbnb_thread_messages(thread_id, opts = {})
1975
+ data, _status_code, _headers = list_airbnb_thread_messages_with_http_info(thread_id, opts)
1976
+ data
1977
+ end
1978
+
1979
+ # Get Airbnb messages
1980
+ # Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with &#x60;?cursor&#x3D;&#x60; until &#x60;pagination.hasMore&#x60; is &#x60;false&#x60;. Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
816
1981
  # @param thread_id [String]
817
1982
  # @param [Hash] opts the optional parameters
818
- # @return [MessageListResponse]
819
- def list_airbnb_thread_messages(thread_id, opts = {})
820
- data, _status_code, _headers = list_airbnb_thread_messages_with_http_info(thread_id, opts)
1983
+ # @return [Array<(MessageListResponse, Integer, Hash)>] MessageListResponse data, response status code and response headers
1984
+ def list_airbnb_thread_messages_with_http_info(thread_id, opts = {})
1985
+ if @api_client.config.debugging
1986
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_thread_messages ...'
1987
+ end
1988
+ # verify the required parameter 'thread_id' is set
1989
+ if @api_client.config.client_side_validation && thread_id.nil?
1990
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.list_airbnb_thread_messages"
1991
+ end
1992
+ # resource path
1993
+ local_var_path = '/v1/channels/airbnb/messaging/{threadId}/messages'.sub('{threadId}', CGI.escape(thread_id.to_s))
1994
+
1995
+ # query parameters
1996
+ query_params = opts[:query_params] || {}
1997
+
1998
+ # header parameters
1999
+ header_params = opts[:header_params] || {}
2000
+ # HTTP header 'Accept' (if needed)
2001
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2002
+
2003
+ # form parameters
2004
+ form_params = opts[:form_params] || {}
2005
+
2006
+ # http body (model)
2007
+ post_body = opts[:debug_body]
2008
+
2009
+ # return_type
2010
+ return_type = opts[:debug_return_type] || 'MessageListResponse'
2011
+
2012
+ # auth_names
2013
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2014
+
2015
+ new_options = opts.merge(
2016
+ :operation => :"AirbnbApi.list_airbnb_thread_messages",
2017
+ :header_params => header_params,
2018
+ :query_params => query_params,
2019
+ :form_params => form_params,
2020
+ :body => post_body,
2021
+ :auth_names => auth_names,
2022
+ :return_type => return_type
2023
+ )
2024
+
2025
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2026
+ if @api_client.config.debugging
2027
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_thread_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2028
+ end
2029
+ return data, status_code, headers
2030
+ end
2031
+
2032
+ # List Airbnb message threads
2033
+ # List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message. Threads on inactive listings are left out; they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`.
2034
+ # @param [Hash] opts the optional parameters
2035
+ # @return [AirbnbThreadListResponse]
2036
+ def list_airbnb_threads(opts = {})
2037
+ data, _status_code, _headers = list_airbnb_threads_with_http_info(opts)
821
2038
  data
822
2039
  end
823
2040
 
824
- # Get Airbnb messages
825
- # Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with &#x60;?cursor&#x3D;&#x60; until &#x60;pagination.hasMore&#x60; is &#x60;false&#x60;.
826
- # @param thread_id [String]
2041
+ # List Airbnb message threads
2042
+ # List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message. Threads on inactive listings are left out; they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (&#x60;listing_id&#x60;) returns &#x60;403 listing_inactive&#x60;.
827
2043
  # @param [Hash] opts the optional parameters
828
- # @return [Array<(MessageListResponse, Integer, Hash)>] MessageListResponse data, response status code and response headers
829
- def list_airbnb_thread_messages_with_http_info(thread_id, opts = {})
2044
+ # @return [Array<(AirbnbThreadListResponse, Integer, Hash)>] AirbnbThreadListResponse data, response status code and response headers
2045
+ def list_airbnb_threads_with_http_info(opts = {})
830
2046
  if @api_client.config.debugging
831
- @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_thread_messages ...'
832
- end
833
- # verify the required parameter 'thread_id' is set
834
- if @api_client.config.client_side_validation && thread_id.nil?
835
- fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.list_airbnb_thread_messages"
2047
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_threads ...'
836
2048
  end
837
2049
  # resource path
838
- local_var_path = '/v1/channels/airbnb/messaging/{threadId}/messages'.sub('{threadId}', CGI.escape(thread_id.to_s))
2050
+ local_var_path = '/v1/channels/airbnb/messaging'
839
2051
 
840
2052
  # query parameters
841
2053
  query_params = opts[:query_params] || {}
@@ -852,13 +2064,13 @@ module Repull
852
2064
  post_body = opts[:debug_body]
853
2065
 
854
2066
  # return_type
855
- return_type = opts[:debug_return_type] || 'MessageListResponse'
2067
+ return_type = opts[:debug_return_type] || 'AirbnbThreadListResponse'
856
2068
 
857
2069
  # auth_names
858
2070
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
859
2071
 
860
2072
  new_options = opts.merge(
861
- :operation => :"AirbnbApi.list_airbnb_thread_messages",
2073
+ :operation => :"AirbnbApi.list_airbnb_threads",
862
2074
  :header_params => header_params,
863
2075
  :query_params => query_params,
864
2076
  :form_params => form_params,
@@ -869,30 +2081,30 @@ module Repull
869
2081
 
870
2082
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
871
2083
  if @api_client.config.debugging
872
- @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_thread_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2084
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
873
2085
  end
874
2086
  return data, status_code, headers
875
2087
  end
876
2088
 
877
- # List Airbnb message threads
878
- # List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message.
2089
+ # List Airbnb transactions
2090
+ # List Airbnb host transactions (reservation earnings, payouts, resolution adjustments) for this workspace, newest first. **Pure DB read** — customer-facing reads never call Airbnb upstream; they serve the `airbnb_transactions` mirror. Each row carries the genuine host- and guest-side financial breakdown (accommodation subtotal, cleaning fee, host + guest service fees split base/VAT, tax buckets, expected/actual host payout with settlement status). Trigger a refresh with `POST` on this path. When the mirror is empty or the host disconnected, `dataFreshness.stale = true` with a `reason` (`never_synced`, `host_disconnected_<iso>`, `sync_lag_>_24h`). Transactions of reservations on inactive listings are left out; payout rows, which belong to no listing, are always included.
879
2091
  # @param [Hash] opts the optional parameters
880
- # @return [AirbnbThreadListResponse]
881
- def list_airbnb_threads(opts = {})
882
- data, _status_code, _headers = list_airbnb_threads_with_http_info(opts)
2092
+ # @return [ListAirbnbTransactions200Response]
2093
+ def list_airbnb_transactions(opts = {})
2094
+ data, _status_code, _headers = list_airbnb_transactions_with_http_info(opts)
883
2095
  data
884
2096
  end
885
2097
 
886
- # List Airbnb message threads
887
- # List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message.
2098
+ # List Airbnb transactions
2099
+ # List Airbnb host transactions (reservation earnings, payouts, resolution adjustments) for this workspace, newest first. **Pure DB read** — customer-facing reads never call Airbnb upstream; they serve the &#x60;airbnb_transactions&#x60; mirror. Each row carries the genuine host- and guest-side financial breakdown (accommodation subtotal, cleaning fee, host + guest service fees split base/VAT, tax buckets, expected/actual host payout with settlement status). Trigger a refresh with &#x60;POST&#x60; on this path. When the mirror is empty or the host disconnected, &#x60;dataFreshness.stale &#x3D; true&#x60; with a &#x60;reason&#x60; (&#x60;never_synced&#x60;, &#x60;host_disconnected_&lt;iso&gt;&#x60;, &#x60;sync_lag_&gt;_24h&#x60;). Transactions of reservations on inactive listings are left out; payout rows, which belong to no listing, are always included.
888
2100
  # @param [Hash] opts the optional parameters
889
- # @return [Array<(AirbnbThreadListResponse, Integer, Hash)>] AirbnbThreadListResponse data, response status code and response headers
890
- def list_airbnb_threads_with_http_info(opts = {})
2101
+ # @return [Array<(ListAirbnbTransactions200Response, Integer, Hash)>] ListAirbnbTransactions200Response data, response status code and response headers
2102
+ def list_airbnb_transactions_with_http_info(opts = {})
891
2103
  if @api_client.config.debugging
892
- @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_threads ...'
2104
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_transactions ...'
893
2105
  end
894
2106
  # resource path
895
- local_var_path = '/v1/channels/airbnb/messaging'
2107
+ local_var_path = '/v1/channels/airbnb/transactions'
896
2108
 
897
2109
  # query parameters
898
2110
  query_params = opts[:query_params] || {}
@@ -909,13 +2121,13 @@ module Repull
909
2121
  post_body = opts[:debug_body]
910
2122
 
911
2123
  # return_type
912
- return_type = opts[:debug_return_type] || 'AirbnbThreadListResponse'
2124
+ return_type = opts[:debug_return_type] || 'ListAirbnbTransactions200Response'
913
2125
 
914
2126
  # auth_names
915
2127
  auth_names = opts[:debug_auth_names] || ['bearerAuth']
916
2128
 
917
2129
  new_options = opts.merge(
918
- :operation => :"AirbnbApi.list_airbnb_threads",
2130
+ :operation => :"AirbnbApi.list_airbnb_transactions",
919
2131
  :header_params => header_params,
920
2132
  :query_params => query_params,
921
2133
  :form_params => form_params,
@@ -926,13 +2138,13 @@ module Repull
926
2138
 
927
2139
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
928
2140
  if @api_client.config.debugging
929
- @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2141
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
930
2142
  end
931
2143
  return data, status_code, headers
932
2144
  end
933
2145
 
934
2146
  # Map an Airbnb listing to a Repull listing
935
- # 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.
2147
+ # 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. Returns `403 listing_inactive` when the target listing, or the listing the Airbnb listing is mapped to now, is inactive; nothing is changed.
936
2148
  # @param map_airbnb_listing_request [MapAirbnbListingRequest]
937
2149
  # @param [Hash] opts the optional parameters
938
2150
  # @return [MapAirbnbListingResponse]
@@ -942,7 +2154,7 @@ module Repull
942
2154
  end
943
2155
 
944
2156
  # Map an Airbnb listing to a Repull listing
945
- # 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.
2157
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the target listing, or the listing the Airbnb listing is mapped to now, is inactive; nothing is changed.
946
2158
  # @param map_airbnb_listing_request [MapAirbnbListingRequest]
947
2159
  # @param [Hash] opts the optional parameters
948
2160
  # @return [Array<(MapAirbnbListingResponse, Integer, Hash)>] MapAirbnbListingResponse data, response status code and response headers
@@ -1000,7 +2212,7 @@ module Repull
1000
2212
  end
1001
2213
 
1002
2214
  # Respond to Airbnb review
1003
- # 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.
2215
+ # 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. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1004
2216
  # @param id [String] Airbnb review id.
1005
2217
  # @param respond_airbnb_review_request [RespondAirbnbReviewRequest]
1006
2218
  # @param [Hash] opts the optional parameters
@@ -1011,7 +2223,7 @@ module Repull
1011
2223
  end
1012
2224
 
1013
2225
  # Respond to Airbnb review
1014
- # 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.
2226
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1015
2227
  # @param id [String] Airbnb review id.
1016
2228
  # @param respond_airbnb_review_request [RespondAirbnbReviewRequest]
1017
2229
  # @param [Hash] opts the optional parameters
@@ -1074,7 +2286,7 @@ module Repull
1074
2286
  end
1075
2287
 
1076
2288
  # Respond to / submit Airbnb review (legacy)
1077
- # Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility — prefer `PUT /v1/channels/airbnb/reviews/{id}` (edit) and `POST /v1/channels/airbnb/reviews/{id}/respond` (reply) for new integrations.
2289
+ # Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility — prefer `PUT /v1/channels/airbnb/reviews/{id}` (edit) and `POST /v1/channels/airbnb/reviews/{id}/respond` (reply) for new integrations. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1078
2290
  # @param [Hash] opts the optional parameters
1079
2291
  # @return [nil]
1080
2292
  def respond_airbnb_review_legacy(opts = {})
@@ -1083,7 +2295,7 @@ module Repull
1083
2295
  end
1084
2296
 
1085
2297
  # Respond to / submit Airbnb review (legacy)
1086
- # Legacy action-based shape. Body &#x60;{ action: \&quot;respond\&quot;|\&quot;submit\&quot;, reviewId, response?, review? }&#x60;. Kept for backwards compatibility — prefer &#x60;PUT /v1/channels/airbnb/reviews/{id}&#x60; (edit) and &#x60;POST /v1/channels/airbnb/reviews/{id}/respond&#x60; (reply) for new integrations.
2298
+ # Legacy action-based shape. Body &#x60;{ action: \&quot;respond\&quot;|\&quot;submit\&quot;, reviewId, response?, review? }&#x60;. Kept for backwards compatibility — prefer &#x60;PUT /v1/channels/airbnb/reviews/{id}&#x60; (edit) and &#x60;POST /v1/channels/airbnb/reviews/{id}/respond&#x60; (reply) for new integrations. Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1087
2299
  # @param [Hash] opts the optional parameters
1088
2300
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1089
2301
  def respond_airbnb_review_legacy_with_http_info(opts = {})
@@ -1098,6 +2310,8 @@ module Repull
1098
2310
 
1099
2311
  # header parameters
1100
2312
  header_params = opts[:header_params] || {}
2313
+ # HTTP header 'Accept' (if needed)
2314
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1101
2315
 
1102
2316
  # form parameters
1103
2317
  form_params = opts[:form_params] || {}
@@ -1129,21 +2343,23 @@ module Repull
1129
2343
  end
1130
2344
 
1131
2345
  # Send Airbnb message
1132
- # Send a message in an Airbnb thread as the host. Airbnb enforces content rules (no off-platform contact info, no external URLs) — violating messages are rejected upstream and surface as `airbnb_error`.
1133
- # @param thread_id [String]
2346
+ # Send a message in an Airbnb thread as the host. Airbnb enforces content rules (no off-platform contact info, no external URLs) — violating messages are rejected upstream and surface as `airbnb_error`. The `{threadId}` is the Airbnb thread id — the `externalThreadId` field on a unified `Conversation` (`GET /v1/conversations`). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2347
+ # @param thread_id [String] Airbnb thread id (the &#x60;externalThreadId&#x60; on a unified &#x60;Conversation&#x60;).
2348
+ # @param send_airbnb_message_request [SendAirbnbMessageRequest]
1134
2349
  # @param [Hash] opts the optional parameters
1135
2350
  # @return [nil]
1136
- def send_airbnb_message(thread_id, opts = {})
1137
- send_airbnb_message_with_http_info(thread_id, opts)
2351
+ def send_airbnb_message(thread_id, send_airbnb_message_request, opts = {})
2352
+ send_airbnb_message_with_http_info(thread_id, send_airbnb_message_request, opts)
1138
2353
  nil
1139
2354
  end
1140
2355
 
1141
2356
  # Send Airbnb message
1142
- # Send a message in an Airbnb thread as the host. Airbnb enforces content rules (no off-platform contact info, no external URLs) — violating messages are rejected upstream and surface as &#x60;airbnb_error&#x60;.
1143
- # @param thread_id [String]
2357
+ # Send a message in an Airbnb thread as the host. Airbnb enforces content rules (no off-platform contact info, no external URLs) — violating messages are rejected upstream and surface as &#x60;airbnb_error&#x60;. The &#x60;{threadId}&#x60; is the Airbnb thread id — the &#x60;externalThreadId&#x60; field on a unified &#x60;Conversation&#x60; (&#x60;GET /v1/conversations&#x60;). Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2358
+ # @param thread_id [String] Airbnb thread id (the &#x60;externalThreadId&#x60; on a unified &#x60;Conversation&#x60;).
2359
+ # @param send_airbnb_message_request [SendAirbnbMessageRequest]
1144
2360
  # @param [Hash] opts the optional parameters
1145
2361
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1146
- def send_airbnb_message_with_http_info(thread_id, opts = {})
2362
+ def send_airbnb_message_with_http_info(thread_id, send_airbnb_message_request, opts = {})
1147
2363
  if @api_client.config.debugging
1148
2364
  @api_client.config.logger.debug 'Calling API: AirbnbApi.send_airbnb_message ...'
1149
2365
  end
@@ -1151,6 +2367,10 @@ module Repull
1151
2367
  if @api_client.config.client_side_validation && thread_id.nil?
1152
2368
  fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.send_airbnb_message"
1153
2369
  end
2370
+ # verify the required parameter 'send_airbnb_message_request' is set
2371
+ if @api_client.config.client_side_validation && send_airbnb_message_request.nil?
2372
+ fail ArgumentError, "Missing the required parameter 'send_airbnb_message_request' when calling AirbnbApi.send_airbnb_message"
2373
+ end
1154
2374
  # resource path
1155
2375
  local_var_path = '/v1/channels/airbnb/messaging/{threadId}/messages'.sub('{threadId}', CGI.escape(thread_id.to_s))
1156
2376
 
@@ -1159,12 +2379,19 @@ module Repull
1159
2379
 
1160
2380
  # header parameters
1161
2381
  header_params = opts[:header_params] || {}
2382
+ # HTTP header 'Accept' (if needed)
2383
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2384
+ # HTTP header 'Content-Type'
2385
+ content_type = @api_client.select_header_content_type(['application/json'])
2386
+ if !content_type.nil?
2387
+ header_params['Content-Type'] = content_type
2388
+ end
1162
2389
 
1163
2390
  # form parameters
1164
2391
  form_params = opts[:form_params] || {}
1165
2392
 
1166
2393
  # http body (model)
1167
- post_body = opts[:debug_body]
2394
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(send_airbnb_message_request)
1168
2395
 
1169
2396
  # return_type
1170
2397
  return_type = opts[:debug_return_type]
@@ -1189,8 +2416,138 @@ module Repull
1189
2416
  return data, status_code, headers
1190
2417
  end
1191
2418
 
2419
+ # Sync Airbnb transactions
2420
+ # Refresh the Airbnb transactions mirror for this workspace by pulling from Airbnb upstream and upserting the breakdown that `GET` serves. Optional JSON body `{ start_date, end_date, transaction_type }` (`transaction_type` is `COMPLETED` or `UPCOMING`; both are synced when omitted). Returns `{ synced, count }`.
2421
+ # @param [Hash] opts the optional parameters
2422
+ # @option opts [SyncAirbnbTransactionsRequest] :sync_airbnb_transactions_request
2423
+ # @return [SyncAirbnbTransactions200Response]
2424
+ def sync_airbnb_transactions(opts = {})
2425
+ data, _status_code, _headers = sync_airbnb_transactions_with_http_info(opts)
2426
+ data
2427
+ end
2428
+
2429
+ # Sync Airbnb transactions
2430
+ # Refresh the Airbnb transactions mirror for this workspace by pulling from Airbnb upstream and upserting the breakdown that &#x60;GET&#x60; serves. Optional JSON body &#x60;{ start_date, end_date, transaction_type }&#x60; (&#x60;transaction_type&#x60; is &#x60;COMPLETED&#x60; or &#x60;UPCOMING&#x60;; both are synced when omitted). Returns &#x60;{ synced, count }&#x60;.
2431
+ # @param [Hash] opts the optional parameters
2432
+ # @option opts [SyncAirbnbTransactionsRequest] :sync_airbnb_transactions_request
2433
+ # @return [Array<(SyncAirbnbTransactions200Response, Integer, Hash)>] SyncAirbnbTransactions200Response data, response status code and response headers
2434
+ def sync_airbnb_transactions_with_http_info(opts = {})
2435
+ if @api_client.config.debugging
2436
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.sync_airbnb_transactions ...'
2437
+ end
2438
+ # resource path
2439
+ local_var_path = '/v1/channels/airbnb/transactions'
2440
+
2441
+ # query parameters
2442
+ query_params = opts[:query_params] || {}
2443
+
2444
+ # header parameters
2445
+ header_params = opts[:header_params] || {}
2446
+ # HTTP header 'Accept' (if needed)
2447
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2448
+ # HTTP header 'Content-Type'
2449
+ content_type = @api_client.select_header_content_type(['application/json'])
2450
+ if !content_type.nil?
2451
+ header_params['Content-Type'] = content_type
2452
+ end
2453
+
2454
+ # form parameters
2455
+ form_params = opts[:form_params] || {}
2456
+
2457
+ # http body (model)
2458
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'sync_airbnb_transactions_request'])
2459
+
2460
+ # return_type
2461
+ return_type = opts[:debug_return_type] || 'SyncAirbnbTransactions200Response'
2462
+
2463
+ # auth_names
2464
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2465
+
2466
+ new_options = opts.merge(
2467
+ :operation => :"AirbnbApi.sync_airbnb_transactions",
2468
+ :header_params => header_params,
2469
+ :query_params => query_params,
2470
+ :form_params => form_params,
2471
+ :body => post_body,
2472
+ :auth_names => auth_names,
2473
+ :return_type => return_type
2474
+ )
2475
+
2476
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2477
+ if @api_client.config.debugging
2478
+ @api_client.config.logger.debug "API called: AirbnbApi#sync_airbnb_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2479
+ end
2480
+ return data, status_code, headers
2481
+ end
2482
+
2483
+ # Upsert Airbnb check-in guide
2484
+ # 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`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2485
+ # @param id [String] Repull listing id (numeric string).
2486
+ # @param [Hash] opts the optional parameters
2487
+ # @option opts [String] :locale Locale to upsert. Defaults to &#x60;en&#x60;. (default to 'en')
2488
+ # @return [nil]
2489
+ def update_airbnb_checkin_guide(id, opts = {})
2490
+ update_airbnb_checkin_guide_with_http_info(id, opts)
2491
+ nil
2492
+ end
2493
+
2494
+ # Upsert Airbnb check-in guide
2495
+ # 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;. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2496
+ # @param id [String] Repull listing id (numeric string).
2497
+ # @param [Hash] opts the optional parameters
2498
+ # @option opts [String] :locale Locale to upsert. Defaults to &#x60;en&#x60;. (default to 'en')
2499
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2500
+ def update_airbnb_checkin_guide_with_http_info(id, opts = {})
2501
+ if @api_client.config.debugging
2502
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_checkin_guide ...'
2503
+ end
2504
+ # verify the required parameter 'id' is set
2505
+ if @api_client.config.client_side_validation && id.nil?
2506
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_checkin_guide"
2507
+ end
2508
+ # resource path
2509
+ local_var_path = '/v1/channels/airbnb/listings/{id}/checkin-guide'.sub('{id}', CGI.escape(id.to_s))
2510
+
2511
+ # query parameters
2512
+ query_params = opts[:query_params] || {}
2513
+ query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
2514
+
2515
+ # header parameters
2516
+ header_params = opts[:header_params] || {}
2517
+ # HTTP header 'Accept' (if needed)
2518
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2519
+
2520
+ # form parameters
2521
+ form_params = opts[:form_params] || {}
2522
+
2523
+ # http body (model)
2524
+ post_body = opts[:debug_body]
2525
+
2526
+ # return_type
2527
+ return_type = opts[:debug_return_type]
2528
+
2529
+ # auth_names
2530
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2531
+
2532
+ new_options = opts.merge(
2533
+ :operation => :"AirbnbApi.update_airbnb_checkin_guide",
2534
+ :header_params => header_params,
2535
+ :query_params => query_params,
2536
+ :form_params => form_params,
2537
+ :body => post_body,
2538
+ :auth_names => auth_names,
2539
+ :return_type => return_type
2540
+ )
2541
+
2542
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2543
+ if @api_client.config.debugging
2544
+ @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_checkin_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2545
+ end
2546
+ return data, status_code, headers
2547
+ end
2548
+
1192
2549
  # Update Airbnb availability
1193
- # 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.
2550
+ # 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. `{id}` is the **Repull listing id** (from `GET /v1/properties` or `GET /v1/channels/airbnb/listings`), not the Airbnb listing id — Repull translates it before calling Airbnb. The body is validated before anything reaches Airbnb: a malformed body is `422 invalid_params` naming the `field`. Calendar operations accept only the documented fields. **Blocking dates:** Airbnb requires a `busy_subtype` whenever `availability` is `\"unavailable\"`. If an operation leaves it out, Repull sends `busy_subtype: \"BLOCKED_BY_HOST\"`; send `\"OUTSIDE_RESERVATION\"` for dates held by a booking made on another channel. **Errors:** `403 connection_reauth_required` — Airbnb no longer accepts the connection for this listing (reconnect; retrying won't help). `403 listing_inactive` — the listing is inactive. `404 not_found` — no Airbnb-connected listing with this id in the workspace. `422 airbnb_rejected` — Airbnb refused the change; `message` carries its reason. `429 airbnb_rate_limited` — back off. `502 airbnb_error` — Airbnb outage or timeout; retry.
1194
2551
  # @param id [String]
1195
2552
  # @param airbnb_availability_write_request [AirbnbAvailabilityWriteRequest]
1196
2553
  # @param [Hash] opts the optional parameters
@@ -1201,7 +2558,7 @@ module Repull
1201
2558
  end
1202
2559
 
1203
2560
  # Update Airbnb availability
1204
- # 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.
2561
+ # 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. &#x60;{id}&#x60; is the **Repull listing id** (from &#x60;GET /v1/properties&#x60; or &#x60;GET /v1/channels/airbnb/listings&#x60;), not the Airbnb listing id — Repull translates it before calling Airbnb. The body is validated before anything reaches Airbnb: a malformed body is &#x60;422 invalid_params&#x60; naming the &#x60;field&#x60;. Calendar operations accept only the documented fields. **Blocking dates:** Airbnb requires a &#x60;busy_subtype&#x60; whenever &#x60;availability&#x60; is &#x60;\&quot;unavailable\&quot;&#x60;. If an operation leaves it out, Repull sends &#x60;busy_subtype: \&quot;BLOCKED_BY_HOST\&quot;&#x60;; send &#x60;\&quot;OUTSIDE_RESERVATION\&quot;&#x60; for dates held by a booking made on another channel. **Errors:** &#x60;403 connection_reauth_required&#x60; — Airbnb no longer accepts the connection for this listing (reconnect; retrying won&#39;t help). &#x60;403 listing_inactive&#x60; — the listing is inactive. &#x60;404 not_found&#x60; — no Airbnb-connected listing with this id in the workspace. &#x60;422 airbnb_rejected&#x60; — Airbnb refused the change; &#x60;message&#x60; carries its reason. &#x60;429 airbnb_rate_limited&#x60; — back off. &#x60;502 airbnb_error&#x60; — Airbnb outage or timeout; retry.
1205
2562
  # @param id [String]
1206
2563
  # @param airbnb_availability_write_request [AirbnbAvailabilityWriteRequest]
1207
2564
  # @param [Hash] opts the optional parameters
@@ -1226,6 +2583,8 @@ module Repull
1226
2583
 
1227
2584
  # header parameters
1228
2585
  header_params = opts[:header_params] || {}
2586
+ # HTTP header 'Accept' (if needed)
2587
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1229
2588
  # HTTP header 'Content-Type'
1230
2589
  content_type = @api_client.select_header_content_type(['application/json'])
1231
2590
  if !content_type.nil?
@@ -1262,7 +2621,7 @@ module Repull
1262
2621
  end
1263
2622
 
1264
2623
  # Update Airbnb pricing
1265
- # Push pricing changes to Airbnb. The `type` discriminator selects the sub-resource (model, standard settings, LOS, rate-plan, fees, currency, rule, or per-date `calendar`). `type: \"calendar\"` carries the full per-date restriction set — nightly price, min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`). For settings sub-resources the full object is replaced — GET first, mutate locally, then PUT the whole object.
2624
+ # Push pricing changes to Airbnb. The `type` discriminator selects the sub-resource (model, standard settings, LOS, rate-plan, fees, currency, rule, or per-date `calendar`). `type: \"calendar\"` carries the full per-date restriction set — nightly price, min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`). For settings sub-resources the full object is replaced — GET first, mutate locally, then PUT the whole object. `{id}` is the **Repull listing id** (from `GET /v1/properties` or `GET /v1/channels/airbnb/listings`), not the Airbnb listing id — Repull translates it before calling Airbnb. The body is validated before anything reaches Airbnb: a malformed body is `422 invalid_params` naming the `field`. Calendar operations accept only the documented fields. **Blocking dates:** Airbnb requires a `busy_subtype` whenever `availability` is `\"unavailable\"`. If an operation leaves it out, Repull sends `busy_subtype: \"BLOCKED_BY_HOST\"`; send `\"OUTSIDE_RESERVATION\"` for dates held by a booking made on another channel. **Errors:** `403 connection_reauth_required` — Airbnb no longer accepts the connection for this listing (reconnect; retrying won't help). `403 listing_inactive` — the listing is inactive. `404 not_found` — no Airbnb-connected listing with this id in the workspace. `422 airbnb_rejected` — Airbnb refused the change; `message` carries its reason. `429 airbnb_rate_limited` — back off. `502 airbnb_error` — Airbnb outage or timeout; retry.
1266
2625
  # @param id [String]
1267
2626
  # @param airbnb_pricing_write_request [AirbnbPricingWriteRequest]
1268
2627
  # @param [Hash] opts the optional parameters
@@ -1273,7 +2632,7 @@ module Repull
1273
2632
  end
1274
2633
 
1275
2634
  # Update Airbnb pricing
1276
- # 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 set — nightly 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.
2635
+ # 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 set — nightly 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. &#x60;{id}&#x60; is the **Repull listing id** (from &#x60;GET /v1/properties&#x60; or &#x60;GET /v1/channels/airbnb/listings&#x60;), not the Airbnb listing id — Repull translates it before calling Airbnb. The body is validated before anything reaches Airbnb: a malformed body is &#x60;422 invalid_params&#x60; naming the &#x60;field&#x60;. Calendar operations accept only the documented fields. **Blocking dates:** Airbnb requires a &#x60;busy_subtype&#x60; whenever &#x60;availability&#x60; is &#x60;\&quot;unavailable\&quot;&#x60;. If an operation leaves it out, Repull sends &#x60;busy_subtype: \&quot;BLOCKED_BY_HOST\&quot;&#x60;; send &#x60;\&quot;OUTSIDE_RESERVATION\&quot;&#x60; for dates held by a booking made on another channel. **Errors:** &#x60;403 connection_reauth_required&#x60; — Airbnb no longer accepts the connection for this listing (reconnect; retrying won&#39;t help). &#x60;403 listing_inactive&#x60; — the listing is inactive. &#x60;404 not_found&#x60; — no Airbnb-connected listing with this id in the workspace. &#x60;422 airbnb_rejected&#x60; — Airbnb refused the change; &#x60;message&#x60; carries its reason. &#x60;429 airbnb_rate_limited&#x60; — back off. &#x60;502 airbnb_error&#x60; — Airbnb outage or timeout; retry.
1277
2636
  # @param id [String]
1278
2637
  # @param airbnb_pricing_write_request [AirbnbPricingWriteRequest]
1279
2638
  # @param [Hash] opts the optional parameters
@@ -1298,6 +2657,8 @@ module Repull
1298
2657
 
1299
2658
  # header parameters
1300
2659
  header_params = opts[:header_params] || {}
2660
+ # HTTP header 'Accept' (if needed)
2661
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1301
2662
  # HTTP header 'Content-Type'
1302
2663
  content_type = @api_client.select_header_content_type(['application/json'])
1303
2664
  if !content_type.nil?
@@ -1333,8 +2694,88 @@ module Repull
1333
2694
  return data, status_code, headers
1334
2695
  end
1335
2696
 
2697
+ # Edit / react to / mark an Airbnb message
2698
+ # 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`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2699
+ # @param thread_id [String] Airbnb thread id.
2700
+ # @param message_id [String] Airbnb message id within the thread.
2701
+ # @param update_airbnb_message_request [UpdateAirbnbMessageRequest]
2702
+ # @param [Hash] opts the optional parameters
2703
+ # @return [nil]
2704
+ def update_airbnb_message(thread_id, message_id, update_airbnb_message_request, opts = {})
2705
+ update_airbnb_message_with_http_info(thread_id, message_id, update_airbnb_message_request, opts)
2706
+ nil
2707
+ end
2708
+
2709
+ # Edit / react to / mark an Airbnb message
2710
+ # 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;. Returns &#x60;403 listing_inactive&#x60; when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
2711
+ # @param thread_id [String] Airbnb thread id.
2712
+ # @param message_id [String] Airbnb message id within the thread.
2713
+ # @param update_airbnb_message_request [UpdateAirbnbMessageRequest]
2714
+ # @param [Hash] opts the optional parameters
2715
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2716
+ def update_airbnb_message_with_http_info(thread_id, message_id, update_airbnb_message_request, opts = {})
2717
+ if @api_client.config.debugging
2718
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_message ...'
2719
+ end
2720
+ # verify the required parameter 'thread_id' is set
2721
+ if @api_client.config.client_side_validation && thread_id.nil?
2722
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.update_airbnb_message"
2723
+ end
2724
+ # verify the required parameter 'message_id' is set
2725
+ if @api_client.config.client_side_validation && message_id.nil?
2726
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling AirbnbApi.update_airbnb_message"
2727
+ end
2728
+ # verify the required parameter 'update_airbnb_message_request' is set
2729
+ if @api_client.config.client_side_validation && update_airbnb_message_request.nil?
2730
+ fail ArgumentError, "Missing the required parameter 'update_airbnb_message_request' when calling AirbnbApi.update_airbnb_message"
2731
+ end
2732
+ # resource path
2733
+ 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))
2734
+
2735
+ # query parameters
2736
+ query_params = opts[:query_params] || {}
2737
+
2738
+ # header parameters
2739
+ header_params = opts[:header_params] || {}
2740
+ # HTTP header 'Accept' (if needed)
2741
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2742
+ # HTTP header 'Content-Type'
2743
+ content_type = @api_client.select_header_content_type(['application/json'])
2744
+ if !content_type.nil?
2745
+ header_params['Content-Type'] = content_type
2746
+ end
2747
+
2748
+ # form parameters
2749
+ form_params = opts[:form_params] || {}
2750
+
2751
+ # http body (model)
2752
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_airbnb_message_request)
2753
+
2754
+ # return_type
2755
+ return_type = opts[:debug_return_type]
2756
+
2757
+ # auth_names
2758
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2759
+
2760
+ new_options = opts.merge(
2761
+ :operation => :"AirbnbApi.update_airbnb_message",
2762
+ :header_params => header_params,
2763
+ :query_params => query_params,
2764
+ :form_params => form_params,
2765
+ :body => post_body,
2766
+ :auth_names => auth_names,
2767
+ :return_type => return_type
2768
+ )
2769
+
2770
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
2771
+ if @api_client.config.debugging
2772
+ @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2773
+ end
2774
+ return data, status_code, headers
2775
+ end
2776
+
1336
2777
  # Upload photos to Airbnb
1337
- # 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.
2778
+ # 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. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1338
2779
  # @param id [String]
1339
2780
  # @param [Hash] opts the optional parameters
1340
2781
  # @return [nil]
@@ -1344,7 +2785,7 @@ module Repull
1344
2785
  end
1345
2786
 
1346
2787
  # Upload photos to Airbnb
1347
- # 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.
2788
+ # 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. Returns &#x60;403 listing_inactive&#x60; when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
1348
2789
  # @param id [String]
1349
2790
  # @param [Hash] opts the optional parameters
1350
2791
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -1364,6 +2805,8 @@ module Repull
1364
2805
 
1365
2806
  # header parameters
1366
2807
  header_params = opts[:header_params] || {}
2808
+ # HTTP header 'Accept' (if needed)
2809
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1367
2810
 
1368
2811
  # form parameters
1369
2812
  form_params = opts[:form_params] || {}
@@ -1393,5 +2836,69 @@ module Repull
1393
2836
  end
1394
2837
  return data, status_code, headers
1395
2838
  end
2839
+
2840
+ # Withdraw Airbnb special offer
2841
+ # 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`.
2842
+ # @param offer_id [String] Airbnb special-offer id to withdraw.
2843
+ # @param [Hash] opts the optional parameters
2844
+ # @return [nil]
2845
+ def withdraw_airbnb_offer(offer_id, opts = {})
2846
+ withdraw_airbnb_offer_with_http_info(offer_id, opts)
2847
+ nil
2848
+ end
2849
+
2850
+ # Withdraw Airbnb special offer
2851
+ # 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;.
2852
+ # @param offer_id [String] Airbnb special-offer id to withdraw.
2853
+ # @param [Hash] opts the optional parameters
2854
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2855
+ def withdraw_airbnb_offer_with_http_info(offer_id, opts = {})
2856
+ if @api_client.config.debugging
2857
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.withdraw_airbnb_offer ...'
2858
+ end
2859
+ # verify the required parameter 'offer_id' is set
2860
+ if @api_client.config.client_side_validation && offer_id.nil?
2861
+ fail ArgumentError, "Missing the required parameter 'offer_id' when calling AirbnbApi.withdraw_airbnb_offer"
2862
+ end
2863
+ # resource path
2864
+ local_var_path = '/v1/channels/airbnb/offers'
2865
+
2866
+ # query parameters
2867
+ query_params = opts[:query_params] || {}
2868
+ query_params[:'offerId'] = offer_id
2869
+
2870
+ # header parameters
2871
+ header_params = opts[:header_params] || {}
2872
+ # HTTP header 'Accept' (if needed)
2873
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2874
+
2875
+ # form parameters
2876
+ form_params = opts[:form_params] || {}
2877
+
2878
+ # http body (model)
2879
+ post_body = opts[:debug_body]
2880
+
2881
+ # return_type
2882
+ return_type = opts[:debug_return_type]
2883
+
2884
+ # auth_names
2885
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2886
+
2887
+ new_options = opts.merge(
2888
+ :operation => :"AirbnbApi.withdraw_airbnb_offer",
2889
+ :header_params => header_params,
2890
+ :query_params => query_params,
2891
+ :form_params => form_params,
2892
+ :body => post_body,
2893
+ :auth_names => auth_names,
2894
+ :return_type => return_type
2895
+ )
2896
+
2897
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2898
+ if @api_client.config.debugging
2899
+ @api_client.config.logger.debug "API called: AirbnbApi#withdraw_airbnb_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2900
+ end
2901
+ return data, status_code, headers
2902
+ end
1396
2903
  end
1397
2904
  end