repull 0.2.0

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 (222) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +10 -0
  3. data/LICENSE +21 -0
  4. data/README.md +121 -0
  5. data/Rakefile +10 -0
  6. data/examples/connect_airbnb.rb +33 -0
  7. data/examples/quickstart.rb +22 -0
  8. data/lib/repull/api/ai_api.rb +86 -0
  9. data/lib/repull/api/airbnb_api.rb +1155 -0
  10. data/lib/repull/api/atlas_api.rb +194 -0
  11. data/lib/repull/api/availability_api.rb +167 -0
  12. data/lib/repull/api/billing_api.rb +139 -0
  13. data/lib/repull/api/booking_com_api.rb +617 -0
  14. data/lib/repull/api/connect_api.rb +672 -0
  15. data/lib/repull/api/conversations_api.rb +263 -0
  16. data/lib/repull/api/guests_api.rb +171 -0
  17. data/lib/repull/api/listings_api.rb +509 -0
  18. data/lib/repull/api/markets_api.rb +320 -0
  19. data/lib/repull/api/plumguide_api.rb +299 -0
  20. data/lib/repull/api/pricing_api.rb +453 -0
  21. data/lib/repull/api/properties_api.rb +166 -0
  22. data/lib/repull/api/reservations_api.rb +387 -0
  23. data/lib/repull/api/reviews_api.rb +208 -0
  24. data/lib/repull/api/schema_api.rb +347 -0
  25. data/lib/repull/api/system_api.rb +79 -0
  26. data/lib/repull/api/vrbo_api.rb +262 -0
  27. data/lib/repull/api/webhooks_api.rb +867 -0
  28. data/lib/repull/api_client.rb +397 -0
  29. data/lib/repull/api_error.rb +58 -0
  30. data/lib/repull/api_model_base.rb +88 -0
  31. data/lib/repull/configuration.rb +313 -0
  32. data/lib/repull/models/ai_operation.rb +158 -0
  33. data/lib/repull/models/airbnb_listing.rb +229 -0
  34. data/lib/repull/models/airbnb_listing_list_response.rb +158 -0
  35. data/lib/repull/models/airbnb_reservation.rb +224 -0
  36. data/lib/repull/models/airbnb_reservation_list_response.rb +158 -0
  37. data/lib/repull/models/airbnb_review.rb +222 -0
  38. data/lib/repull/models/airbnb_review_list_response.rb +158 -0
  39. data/lib/repull/models/airbnb_thread.rb +188 -0
  40. data/lib/repull/models/airbnb_thread_list_response.rb +158 -0
  41. data/lib/repull/models/booking_connect_listing_option.rb +201 -0
  42. data/lib/repull/models/booking_connect_room.rb +251 -0
  43. data/lib/repull/models/booking_connect_rooms_response.rb +274 -0
  44. data/lib/repull/models/booking_conversation.rb +178 -0
  45. data/lib/repull/models/booking_conversation_list_response.rb +158 -0
  46. data/lib/repull/models/booking_pricing_rate_update.rb +310 -0
  47. data/lib/repull/models/booking_pricing_rate_update_date_range.rb +190 -0
  48. data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +179 -0
  49. data/lib/repull/models/booking_pricing_response.rb +157 -0
  50. data/lib/repull/models/booking_pricing_update_request.rb +176 -0
  51. data/lib/repull/models/booking_pricing_update_response.rb +199 -0
  52. data/lib/repull/models/booking_property.rb +188 -0
  53. data/lib/repull/models/booking_property_list_response.rb +158 -0
  54. data/lib/repull/models/booking_room_mapping.rb +177 -0
  55. data/lib/repull/models/booking_verify_hotel_request.rb +193 -0
  56. data/lib/repull/models/booking_verify_hotel_response.rb +285 -0
  57. data/lib/repull/models/bulk_pricing_failure.rb +177 -0
  58. data/lib/repull/models/bulk_pricing_item.rb +202 -0
  59. data/lib/repull/models/bulk_pricing_request.rb +212 -0
  60. data/lib/repull/models/bulk_pricing_response.rb +170 -0
  61. data/lib/repull/models/calendar_day.rb +174 -0
  62. data/lib/repull/models/calendar_response.rb +149 -0
  63. data/lib/repull/models/connect_host.rb +194 -0
  64. data/lib/repull/models/connect_provider.rb +365 -0
  65. data/lib/repull/models/connect_provider_list_response.rb +149 -0
  66. data/lib/repull/models/connect_session.rb +228 -0
  67. data/lib/repull/models/connect_status.rb +207 -0
  68. data/lib/repull/models/connection.rb +195 -0
  69. data/lib/repull/models/connection_list_response.rb +158 -0
  70. data/lib/repull/models/conversation.rb +257 -0
  71. data/lib/repull/models/conversation_detail.rb +284 -0
  72. data/lib/repull/models/conversation_guest.rb +178 -0
  73. data/lib/repull/models/conversation_guest_contact.rb +174 -0
  74. data/lib/repull/models/conversation_host.rb +186 -0
  75. data/lib/repull/models/conversation_list_response.rb +159 -0
  76. data/lib/repull/models/conversation_message_attachment.rb +174 -0
  77. data/lib/repull/models/create_ai_operation200_response.rb +156 -0
  78. data/lib/repull/models/create_billing_checkout_request.rb +181 -0
  79. data/lib/repull/models/create_connect_session_request.rb +189 -0
  80. data/lib/repull/models/create_connection_request.rb +225 -0
  81. data/lib/repull/models/create_reservation_request.rb +313 -0
  82. data/lib/repull/models/create_webhook_request.rb +211 -0
  83. data/lib/repull/models/custom_schema.rb +303 -0
  84. data/lib/repull/models/custom_schema_create.rb +253 -0
  85. data/lib/repull/models/custom_schema_create_response.rb +300 -0
  86. data/lib/repull/models/custom_schema_delete_response.rb +164 -0
  87. data/lib/repull/models/custom_schema_list_response.rb +159 -0
  88. data/lib/repull/models/custom_schema_summary.rb +300 -0
  89. data/lib/repull/models/custom_schema_update.rb +199 -0
  90. data/lib/repull/models/error.rb +165 -0
  91. data/lib/repull/models/error_error.rb +357 -0
  92. data/lib/repull/models/error_error_support.rb +167 -0
  93. data/lib/repull/models/get_health200_response.rb +156 -0
  94. data/lib/repull/models/guest.rb +271 -0
  95. data/lib/repull/models/guest_contact.rb +186 -0
  96. data/lib/repull/models/guest_flag.rb +179 -0
  97. data/lib/repull/models/guest_list_response.rb +159 -0
  98. data/lib/repull/models/guest_note.rb +187 -0
  99. data/lib/repull/models/guest_profile.rb +337 -0
  100. data/lib/repull/models/guest_reservations_summary.rb +175 -0
  101. data/lib/repull/models/listing.rb +216 -0
  102. data/lib/repull/models/listing_address.rb +158 -0
  103. data/lib/repull/models/listing_channel.rb +176 -0
  104. data/lib/repull/models/listing_comp.rb +272 -0
  105. data/lib/repull/models/listing_comp_nightly.rb +166 -0
  106. data/lib/repull/models/listing_comp_ratings.rb +157 -0
  107. data/lib/repull/models/listing_comps_response.rb +197 -0
  108. data/lib/repull/models/listing_content.rb +249 -0
  109. data/lib/repull/models/listing_create_request.rb +364 -0
  110. data/lib/repull/models/listing_create_response.rb +148 -0
  111. data/lib/repull/models/listing_generate_content_request.rb +192 -0
  112. data/lib/repull/models/listing_generate_content_response.rb +165 -0
  113. data/lib/repull/models/listing_list_response.rb +158 -0
  114. data/lib/repull/models/listing_pricing_apply_request.rb +193 -0
  115. data/lib/repull/models/listing_pricing_apply_response.rb +169 -0
  116. data/lib/repull/models/listing_pricing_history_entry.rb +212 -0
  117. data/lib/repull/models/listing_pricing_history_response.rb +159 -0
  118. data/lib/repull/models/listing_pricing_recommendation.rb +269 -0
  119. data/lib/repull/models/listing_pricing_response.rb +187 -0
  120. data/lib/repull/models/listing_pricing_response_comp_summary.rb +178 -0
  121. data/lib/repull/models/listing_pricing_response_date_range.rb +156 -0
  122. data/lib/repull/models/listing_pricing_response_listing.rb +191 -0
  123. data/lib/repull/models/listing_pricing_strategy.rb +317 -0
  124. data/lib/repull/models/listing_pricing_strategy_input.rb +264 -0
  125. data/lib/repull/models/listing_publish_airbnb_request.rb +171 -0
  126. data/lib/repull/models/listing_publish_response.rb +166 -0
  127. data/lib/repull/models/listing_publish_status_channel.rb +197 -0
  128. data/lib/repull/models/listing_publish_status_response.rb +158 -0
  129. data/lib/repull/models/listing_quality_tier.rb +175 -0
  130. data/lib/repull/models/listing_segment.rb +229 -0
  131. data/lib/repull/models/listing_segment_recommendation.rb +170 -0
  132. data/lib/repull/models/listing_segments_response.rb +230 -0
  133. data/lib/repull/models/listing_segments_response_scope.rb +159 -0
  134. data/lib/repull/models/map_connect_booking_rooms_request.rb +202 -0
  135. data/lib/repull/models/map_connect_booking_rooms_response.rb +243 -0
  136. data/lib/repull/models/market_browse_category.rb +158 -0
  137. data/lib/repull/models/market_browse_entry.rb +197 -0
  138. data/lib/repull/models/market_browse_featured.rb +188 -0
  139. data/lib/repull/models/market_browse_response.rb +158 -0
  140. data/lib/repull/models/market_calendar_day.rb +257 -0
  141. data/lib/repull/models/market_calendar_day_events_inner.rb +177 -0
  142. data/lib/repull/models/market_calendar_response.rb +178 -0
  143. data/lib/repull/models/market_detail_response.rb +269 -0
  144. data/lib/repull/models/market_detail_response_price_distribution_inner.rb +186 -0
  145. data/lib/repull/models/market_detail_response_property_type_mix_inner.rb +166 -0
  146. data/lib/repull/models/market_detail_response_supply_trend_inner.rb +156 -0
  147. data/lib/repull/models/market_detail_response_top_comps.rb +187 -0
  148. data/lib/repull/models/market_event.rb +257 -0
  149. data/lib/repull/models/market_my_listing.rb +242 -0
  150. data/lib/repull/models/market_summary.rb +259 -0
  151. data/lib/repull/models/market_top_comp.rb +275 -0
  152. data/lib/repull/models/markets_overview_response.rb +219 -0
  153. data/lib/repull/models/markets_overview_response_browse.rb +173 -0
  154. data/lib/repull/models/markets_overview_response_subscriptions.rb +157 -0
  155. data/lib/repull/models/markets_overview_response_totals.rb +165 -0
  156. data/lib/repull/models/message.rb +289 -0
  157. data/lib/repull/models/message_list_response.rb +159 -0
  158. data/lib/repull/models/pagination.rb +188 -0
  159. data/lib/repull/models/plumguide_listing.rb +167 -0
  160. data/lib/repull/models/plumguide_listing_list_response.rb +158 -0
  161. data/lib/repull/models/property.rb +271 -0
  162. data/lib/repull/models/property_list_response.rb +158 -0
  163. data/lib/repull/models/reservation.rb +457 -0
  164. data/lib/repull/models/reservation_list_response.rb +159 -0
  165. data/lib/repull/models/review.rb +357 -0
  166. data/lib/repull/models/review_category.rb +169 -0
  167. data/lib/repull/models/review_list_response.rb +159 -0
  168. data/lib/repull/models/review_response.rb +158 -0
  169. data/lib/repull/models/rotate_webhook_secret200_response.rb +165 -0
  170. data/lib/repull/models/select_connect_provider_request.rb +165 -0
  171. data/lib/repull/models/select_provider_response.rb +176 -0
  172. data/lib/repull/models/test_webhook_request.rb +165 -0
  173. data/lib/repull/models/update_availability_request.rb +149 -0
  174. data/lib/repull/models/update_listing_pricing_strategy200_response.rb +147 -0
  175. data/lib/repull/models/update_reservation_request.rb +174 -0
  176. data/lib/repull/models/update_webhook_request.rb +211 -0
  177. data/lib/repull/models/vrbo_listing.rb +167 -0
  178. data/lib/repull/models/vrbo_listing_list_response.rb +158 -0
  179. data/lib/repull/models/vrbo_reservation.rb +185 -0
  180. data/lib/repull/models/vrbo_reservation_list_response.rb +158 -0
  181. data/lib/repull/models/webhook_delivery.rb +243 -0
  182. data/lib/repull/models/webhook_delivery_detail.rb +261 -0
  183. data/lib/repull/models/webhook_delivery_list_response.rb +158 -0
  184. data/lib/repull/models/webhook_event_catalog.rb +149 -0
  185. data/lib/repull/models/webhook_event_catalog_domains_inner.rb +167 -0
  186. data/lib/repull/models/webhook_event_catalog_domains_inner_events_inner.rb +183 -0
  187. data/lib/repull/models/webhook_list_response.rb +158 -0
  188. data/lib/repull/models/webhook_subscription.rb +294 -0
  189. data/lib/repull/version.rb +15 -0
  190. data/lib/repull.rb +217 -0
  191. data/openapi/v1.json +8923 -0
  192. data/repull.gemspec +43 -0
  193. data/scripts/regen.sh +55 -0
  194. data/spec/api/ai_api_spec.rb +47 -0
  195. data/spec/api/airbnb_api_spec.rb +238 -0
  196. data/spec/api/availability_api_spec.rb +62 -0
  197. data/spec/api/billing_api_spec.rb +57 -0
  198. data/spec/api/booking_com_api_spec.rb +115 -0
  199. data/spec/api/connect_api_spec.rb +82 -0
  200. data/spec/api/conversations_api_spec.rb +68 -0
  201. data/spec/api/guests_api_spec.rb +59 -0
  202. data/spec/api/plumguide_api_spec.rb +85 -0
  203. data/spec/api/properties_api_spec.rb +60 -0
  204. data/spec/api/reservations_api_spec.rb +97 -0
  205. data/spec/api/system_api_spec.rb +45 -0
  206. data/spec/api/vrbo_api_spec.rb +55 -0
  207. data/spec/api/webhooks_api_spec.rb +69 -0
  208. data/spec/models/ai_operation_spec.rb +46 -0
  209. data/spec/models/calendar_day_spec.rb +54 -0
  210. data/spec/models/connect_host_spec.rb +60 -0
  211. data/spec/models/connect_status_spec.rb +76 -0
  212. data/spec/models/connection_spec.rb +70 -0
  213. data/spec/models/conversation_spec.rb +66 -0
  214. data/spec/models/error_error_spec.rb +54 -0
  215. data/spec/models/error_spec.rb +36 -0
  216. data/spec/models/guest_spec.rb +72 -0
  217. data/spec/models/message_spec.rb +70 -0
  218. data/spec/models/property_spec.rb +114 -0
  219. data/spec/models/reservation_spec.rb +128 -0
  220. data/spec/models/webhook_subscription_spec.rb +60 -0
  221. data/spec/spec_helper.rb +111 -0
  222. metadata +337 -0
@@ -0,0 +1,1155 @@
1
+ =begin
2
+ #Repull API
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`, `pro`, `enterprise`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: ivan@vanio.ai
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Repull
16
+ class AirbnbApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Listing action (push/publish/unlist/delete)
23
+ # Apply a state action to an Airbnb listing — `push` (sync local changes upstream), `publish` (make publicly bookable), `unlist` (hide), or `delete` (permanent). Each action has different reversibility — see docs.
24
+ # @param id [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def airbnb_listing_action(id, opts = {})
28
+ airbnb_listing_action_with_http_info(id, opts)
29
+ nil
30
+ end
31
+
32
+ # Listing action (push/publish/unlist/delete)
33
+ # Apply a state action to an Airbnb listing — `push` (sync local changes upstream), `publish` (make publicly bookable), `unlist` (hide), or `delete` (permanent). Each action has different reversibility — see docs.
34
+ # @param id [String]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def airbnb_listing_action_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.airbnb_listing_action ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.airbnb_listing_action"
44
+ end
45
+ # resource path
46
+ local_var_path = '/v1/channels/airbnb/listings/{id}'.sub('{id}', CGI.escape(id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type]
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"AirbnbApi.airbnb_listing_action",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: AirbnbApi#airbnb_listing_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Accept/decline/cancel Airbnb reservation
84
+ # Apply a state action to an Airbnb reservation — `accept` / `decline` (for inquiries and reservation requests), `cancel` (host cancellation, carries penalties), `pre-approve` (for inquiries).
85
+ # @param code [String]
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [nil]
88
+ def airbnb_reservation_action(code, opts = {})
89
+ airbnb_reservation_action_with_http_info(code, opts)
90
+ nil
91
+ end
92
+
93
+ # Accept/decline/cancel Airbnb reservation
94
+ # 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).
95
+ # @param code [String]
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
98
+ def airbnb_reservation_action_with_http_info(code, opts = {})
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.airbnb_reservation_action ...'
101
+ end
102
+ # verify the required parameter 'code' is set
103
+ if @api_client.config.client_side_validation && code.nil?
104
+ fail ArgumentError, "Missing the required parameter 'code' when calling AirbnbApi.airbnb_reservation_action"
105
+ end
106
+ # resource path
107
+ local_var_path = '/v1/channels/airbnb/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
108
+
109
+ # query parameters
110
+ query_params = opts[:query_params] || {}
111
+
112
+ # header parameters
113
+ header_params = opts[:header_params] || {}
114
+
115
+ # form parameters
116
+ form_params = opts[:form_params] || {}
117
+
118
+ # http body (model)
119
+ post_body = opts[:debug_body]
120
+
121
+ # return_type
122
+ return_type = opts[:debug_return_type]
123
+
124
+ # auth_names
125
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
126
+
127
+ new_options = opts.merge(
128
+ :operation => :"AirbnbApi.airbnb_reservation_action",
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => return_type
135
+ )
136
+
137
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: AirbnbApi#airbnb_reservation_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+
144
+ # Create/push Airbnb listing
145
+ # Create a new Airbnb listing or push an existing Repull listing to Airbnb. Requires a connected Airbnb account. Returns the created listing id; publishing happens via the listing-action endpoint.
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [AirbnbListing]
148
+ def create_airbnb_listing(opts = {})
149
+ data, _status_code, _headers = create_airbnb_listing_with_http_info(opts)
150
+ data
151
+ end
152
+
153
+ # Create/push Airbnb listing
154
+ # Create a new Airbnb listing or push an existing Repull listing to Airbnb. Requires a connected Airbnb account. Returns the created listing id; publishing happens via the listing-action endpoint.
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [Array<(AirbnbListing, Integer, Hash)>] AirbnbListing data, response status code and response headers
157
+ def create_airbnb_listing_with_http_info(opts = {})
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_listing ...'
160
+ end
161
+ # resource path
162
+ local_var_path = '/v1/channels/airbnb/listings'
163
+
164
+ # query parameters
165
+ query_params = opts[:query_params] || {}
166
+
167
+ # header parameters
168
+ header_params = opts[:header_params] || {}
169
+ # HTTP header 'Accept' (if needed)
170
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
171
+
172
+ # form parameters
173
+ form_params = opts[:form_params] || {}
174
+
175
+ # http body (model)
176
+ post_body = opts[:debug_body]
177
+
178
+ # return_type
179
+ return_type = opts[:debug_return_type] || 'AirbnbListing'
180
+
181
+ # auth_names
182
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
183
+
184
+ new_options = opts.merge(
185
+ :operation => :"AirbnbApi.create_airbnb_listing",
186
+ :header_params => header_params,
187
+ :query_params => query_params,
188
+ :form_params => form_params,
189
+ :body => post_body,
190
+ :auth_names => auth_names,
191
+ :return_type => return_type
192
+ )
193
+
194
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
200
+
201
+ # Get Airbnb listing
202
+ # Fetch a single Airbnb listing by id with full pricing, availability, and content. Listing ids are Airbnb-side ids (numeric strings).
203
+ # @param id [String]
204
+ # @param [Hash] opts the optional parameters
205
+ # @return [AirbnbListing]
206
+ def get_airbnb_listing(id, opts = {})
207
+ data, _status_code, _headers = get_airbnb_listing_with_http_info(id, opts)
208
+ data
209
+ end
210
+
211
+ # Get Airbnb listing
212
+ # Fetch a single Airbnb listing by id with full pricing, availability, and content. Listing ids are Airbnb-side ids (numeric strings).
213
+ # @param id [String]
214
+ # @param [Hash] opts the optional parameters
215
+ # @return [Array<(AirbnbListing, Integer, Hash)>] AirbnbListing data, response status code and response headers
216
+ def get_airbnb_listing_with_http_info(id, opts = {})
217
+ if @api_client.config.debugging
218
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing ...'
219
+ end
220
+ # verify the required parameter 'id' is set
221
+ if @api_client.config.client_side_validation && id.nil?
222
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing"
223
+ end
224
+ # resource path
225
+ local_var_path = '/v1/channels/airbnb/listings/{id}'.sub('{id}', CGI.escape(id.to_s))
226
+
227
+ # query parameters
228
+ query_params = opts[:query_params] || {}
229
+
230
+ # header parameters
231
+ header_params = opts[:header_params] || {}
232
+ # HTTP header 'Accept' (if needed)
233
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
234
+
235
+ # form parameters
236
+ form_params = opts[:form_params] || {}
237
+
238
+ # http body (model)
239
+ post_body = opts[:debug_body]
240
+
241
+ # return_type
242
+ return_type = opts[:debug_return_type] || 'AirbnbListing'
243
+
244
+ # auth_names
245
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
246
+
247
+ new_options = opts.merge(
248
+ :operation => :"AirbnbApi.get_airbnb_listing",
249
+ :header_params => header_params,
250
+ :query_params => query_params,
251
+ :form_params => form_params,
252
+ :body => post_body,
253
+ :auth_names => auth_names,
254
+ :return_type => return_type
255
+ )
256
+
257
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
258
+ if @api_client.config.debugging
259
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
260
+ end
261
+ return data, status_code, headers
262
+ end
263
+
264
+ # Get Airbnb availability
265
+ # Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.
266
+ # @param id [String]
267
+ # @param [Hash] opts the optional parameters
268
+ # @return [nil]
269
+ def get_airbnb_listing_availability(id, opts = {})
270
+ get_airbnb_listing_availability_with_http_info(id, opts)
271
+ nil
272
+ end
273
+
274
+ # Get Airbnb availability
275
+ # Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.
276
+ # @param id [String]
277
+ # @param [Hash] opts the optional parameters
278
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
279
+ def get_airbnb_listing_availability_with_http_info(id, opts = {})
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_availability ...'
282
+ end
283
+ # verify the required parameter 'id' is set
284
+ if @api_client.config.client_side_validation && id.nil?
285
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_availability"
286
+ end
287
+ # resource path
288
+ local_var_path = '/v1/channels/airbnb/listings/{id}/availability'.sub('{id}', CGI.escape(id.to_s))
289
+
290
+ # query parameters
291
+ query_params = opts[:query_params] || {}
292
+
293
+ # header parameters
294
+ header_params = opts[:header_params] || {}
295
+
296
+ # form parameters
297
+ form_params = opts[:form_params] || {}
298
+
299
+ # http body (model)
300
+ post_body = opts[:debug_body]
301
+
302
+ # return_type
303
+ return_type = opts[:debug_return_type]
304
+
305
+ # auth_names
306
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
307
+
308
+ new_options = opts.merge(
309
+ :operation => :"AirbnbApi.get_airbnb_listing_availability",
310
+ :header_params => header_params,
311
+ :query_params => query_params,
312
+ :form_params => form_params,
313
+ :body => post_body,
314
+ :auth_names => auth_names,
315
+ :return_type => return_type
316
+ )
317
+
318
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
319
+ if @api_client.config.debugging
320
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
321
+ end
322
+ return data, status_code, headers
323
+ end
324
+
325
+ # Get Airbnb pricing
326
+ # Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing.
327
+ # @param id [String]
328
+ # @param [Hash] opts the optional parameters
329
+ # @return [nil]
330
+ def get_airbnb_listing_pricing(id, opts = {})
331
+ get_airbnb_listing_pricing_with_http_info(id, opts)
332
+ nil
333
+ end
334
+
335
+ # Get Airbnb pricing
336
+ # Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing.
337
+ # @param id [String]
338
+ # @param [Hash] opts the optional parameters
339
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
340
+ def get_airbnb_listing_pricing_with_http_info(id, opts = {})
341
+ if @api_client.config.debugging
342
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_pricing ...'
343
+ end
344
+ # verify the required parameter 'id' is set
345
+ if @api_client.config.client_side_validation && id.nil?
346
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_pricing"
347
+ end
348
+ # resource path
349
+ local_var_path = '/v1/channels/airbnb/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))
350
+
351
+ # query parameters
352
+ query_params = opts[:query_params] || {}
353
+
354
+ # header parameters
355
+ header_params = opts[:header_params] || {}
356
+
357
+ # form parameters
358
+ form_params = opts[:form_params] || {}
359
+
360
+ # http body (model)
361
+ post_body = opts[:debug_body]
362
+
363
+ # return_type
364
+ return_type = opts[:debug_return_type]
365
+
366
+ # auth_names
367
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
368
+
369
+ new_options = opts.merge(
370
+ :operation => :"AirbnbApi.get_airbnb_listing_pricing",
371
+ :header_params => header_params,
372
+ :query_params => query_params,
373
+ :form_params => form_params,
374
+ :body => post_body,
375
+ :auth_names => auth_names,
376
+ :return_type => return_type
377
+ )
378
+
379
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
380
+ if @api_client.config.debugging
381
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
382
+ end
383
+ return data, status_code, headers
384
+ end
385
+
386
+ # Get Airbnb reservation
387
+ # Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. `HMABCDEF12`).
388
+ # @param code [String]
389
+ # @param [Hash] opts the optional parameters
390
+ # @return [AirbnbReservation]
391
+ def get_airbnb_reservation(code, opts = {})
392
+ data, _status_code, _headers = get_airbnb_reservation_with_http_info(code, opts)
393
+ data
394
+ end
395
+
396
+ # Get Airbnb reservation
397
+ # Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. &#x60;HMABCDEF12&#x60;).
398
+ # @param code [String]
399
+ # @param [Hash] opts the optional parameters
400
+ # @return [Array<(AirbnbReservation, Integer, Hash)>] AirbnbReservation data, response status code and response headers
401
+ def get_airbnb_reservation_with_http_info(code, opts = {})
402
+ if @api_client.config.debugging
403
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_reservation ...'
404
+ end
405
+ # verify the required parameter 'code' is set
406
+ if @api_client.config.client_side_validation && code.nil?
407
+ fail ArgumentError, "Missing the required parameter 'code' when calling AirbnbApi.get_airbnb_reservation"
408
+ end
409
+ # resource path
410
+ local_var_path = '/v1/channels/airbnb/reservations/{code}'.sub('{code}', CGI.escape(code.to_s))
411
+
412
+ # query parameters
413
+ query_params = opts[:query_params] || {}
414
+
415
+ # header parameters
416
+ header_params = opts[:header_params] || {}
417
+ # HTTP header 'Accept' (if needed)
418
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
419
+
420
+ # form parameters
421
+ form_params = opts[:form_params] || {}
422
+
423
+ # http body (model)
424
+ post_body = opts[:debug_body]
425
+
426
+ # return_type
427
+ return_type = opts[:debug_return_type] || 'AirbnbReservation'
428
+
429
+ # auth_names
430
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
431
+
432
+ new_options = opts.merge(
433
+ :operation => :"AirbnbApi.get_airbnb_reservation",
434
+ :header_params => header_params,
435
+ :query_params => query_params,
436
+ :form_params => form_params,
437
+ :body => post_body,
438
+ :auth_names => auth_names,
439
+ :return_type => return_type
440
+ )
441
+
442
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
443
+ if @api_client.config.debugging
444
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
445
+ end
446
+ return data, status_code, headers
447
+ end
448
+
449
+ # List Airbnb photos
450
+ # List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room).
451
+ # @param id [String]
452
+ # @param [Hash] opts the optional parameters
453
+ # @return [nil]
454
+ def list_airbnb_listing_photos(id, opts = {})
455
+ list_airbnb_listing_photos_with_http_info(id, opts)
456
+ nil
457
+ end
458
+
459
+ # List Airbnb photos
460
+ # List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room).
461
+ # @param id [String]
462
+ # @param [Hash] opts the optional parameters
463
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
464
+ def list_airbnb_listing_photos_with_http_info(id, opts = {})
465
+ if @api_client.config.debugging
466
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_photos ...'
467
+ end
468
+ # verify the required parameter 'id' is set
469
+ if @api_client.config.client_side_validation && id.nil?
470
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_photos"
471
+ end
472
+ # resource path
473
+ local_var_path = '/v1/channels/airbnb/listings/{id}/photos'.sub('{id}', CGI.escape(id.to_s))
474
+
475
+ # query parameters
476
+ query_params = opts[:query_params] || {}
477
+
478
+ # header parameters
479
+ header_params = opts[:header_params] || {}
480
+
481
+ # form parameters
482
+ form_params = opts[:form_params] || {}
483
+
484
+ # http body (model)
485
+ post_body = opts[:debug_body]
486
+
487
+ # return_type
488
+ return_type = opts[:debug_return_type]
489
+
490
+ # auth_names
491
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
492
+
493
+ new_options = opts.merge(
494
+ :operation => :"AirbnbApi.list_airbnb_listing_photos",
495
+ :header_params => header_params,
496
+ :query_params => query_params,
497
+ :form_params => form_params,
498
+ :body => post_body,
499
+ :auth_names => auth_names,
500
+ :return_type => return_type
501
+ )
502
+
503
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
504
+ if @api_client.config.debugging
505
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_photos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
506
+ end
507
+ return data, status_code, headers
508
+ end
509
+
510
+ # List Airbnb listings
511
+ # List every Airbnb listing this workspace has access to via the connected Airbnb account. Sourced from the Airbnb Listing API. Listings sync automatically every few minutes — pass `?refresh=true` to force a fresh upstream pull.
512
+ # @param [Hash] opts the optional parameters
513
+ # @return [AirbnbListingListResponse]
514
+ def list_airbnb_listings(opts = {})
515
+ data, _status_code, _headers = list_airbnb_listings_with_http_info(opts)
516
+ data
517
+ end
518
+
519
+ # List Airbnb listings
520
+ # List every Airbnb listing this workspace has access to via the connected Airbnb account. Sourced from the Airbnb Listing API. Listings sync automatically every few minutes — pass &#x60;?refresh&#x3D;true&#x60; to force a fresh upstream pull.
521
+ # @param [Hash] opts the optional parameters
522
+ # @return [Array<(AirbnbListingListResponse, Integer, Hash)>] AirbnbListingListResponse data, response status code and response headers
523
+ def list_airbnb_listings_with_http_info(opts = {})
524
+ if @api_client.config.debugging
525
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listings ...'
526
+ end
527
+ # resource path
528
+ local_var_path = '/v1/channels/airbnb/listings'
529
+
530
+ # query parameters
531
+ query_params = opts[:query_params] || {}
532
+
533
+ # header parameters
534
+ header_params = opts[:header_params] || {}
535
+ # HTTP header 'Accept' (if needed)
536
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
537
+
538
+ # form parameters
539
+ form_params = opts[:form_params] || {}
540
+
541
+ # http body (model)
542
+ post_body = opts[:debug_body]
543
+
544
+ # return_type
545
+ return_type = opts[:debug_return_type] || 'AirbnbListingListResponse'
546
+
547
+ # auth_names
548
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
549
+
550
+ new_options = opts.merge(
551
+ :operation => :"AirbnbApi.list_airbnb_listings",
552
+ :header_params => header_params,
553
+ :query_params => query_params,
554
+ :form_params => form_params,
555
+ :body => post_body,
556
+ :auth_names => auth_names,
557
+ :return_type => return_type
558
+ )
559
+
560
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
561
+ if @api_client.config.debugging
562
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
563
+ end
564
+ return data, status_code, headers
565
+ end
566
+
567
+ # List Airbnb reservations
568
+ # List 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.
569
+ # @param [Hash] opts the optional parameters
570
+ # @return [AirbnbReservationListResponse]
571
+ def list_airbnb_reservations(opts = {})
572
+ data, _status_code, _headers = list_airbnb_reservations_with_http_info(opts)
573
+ data
574
+ end
575
+
576
+ # List Airbnb reservations
577
+ # List 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.
578
+ # @param [Hash] opts the optional parameters
579
+ # @return [Array<(AirbnbReservationListResponse, Integer, Hash)>] AirbnbReservationListResponse data, response status code and response headers
580
+ def list_airbnb_reservations_with_http_info(opts = {})
581
+ if @api_client.config.debugging
582
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_reservations ...'
583
+ end
584
+ # resource path
585
+ local_var_path = '/v1/channels/airbnb/reservations'
586
+
587
+ # query parameters
588
+ query_params = opts[:query_params] || {}
589
+
590
+ # header parameters
591
+ header_params = opts[:header_params] || {}
592
+ # HTTP header 'Accept' (if needed)
593
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
594
+
595
+ # form parameters
596
+ form_params = opts[:form_params] || {}
597
+
598
+ # http body (model)
599
+ post_body = opts[:debug_body]
600
+
601
+ # return_type
602
+ return_type = opts[:debug_return_type] || 'AirbnbReservationListResponse'
603
+
604
+ # auth_names
605
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
606
+
607
+ new_options = opts.merge(
608
+ :operation => :"AirbnbApi.list_airbnb_reservations",
609
+ :header_params => header_params,
610
+ :query_params => query_params,
611
+ :form_params => form_params,
612
+ :body => post_body,
613
+ :auth_names => auth_names,
614
+ :return_type => return_type
615
+ )
616
+
617
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
618
+ if @api_client.config.debugging
619
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_reservations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
620
+ end
621
+ return data, status_code, headers
622
+ end
623
+
624
+ # List Airbnb reviews
625
+ # 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).
626
+ # @param [Hash] opts the optional parameters
627
+ # @return [AirbnbReviewListResponse]
628
+ def list_airbnb_reviews(opts = {})
629
+ data, _status_code, _headers = list_airbnb_reviews_with_http_info(opts)
630
+ data
631
+ end
632
+
633
+ # List Airbnb reviews
634
+ # 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).
635
+ # @param [Hash] opts the optional parameters
636
+ # @return [Array<(AirbnbReviewListResponse, Integer, Hash)>] AirbnbReviewListResponse data, response status code and response headers
637
+ def list_airbnb_reviews_with_http_info(opts = {})
638
+ if @api_client.config.debugging
639
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_reviews ...'
640
+ end
641
+ # resource path
642
+ local_var_path = '/v1/channels/airbnb/reviews'
643
+
644
+ # query parameters
645
+ query_params = opts[:query_params] || {}
646
+
647
+ # header parameters
648
+ header_params = opts[:header_params] || {}
649
+ # HTTP header 'Accept' (if needed)
650
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
651
+
652
+ # form parameters
653
+ form_params = opts[:form_params] || {}
654
+
655
+ # http body (model)
656
+ post_body = opts[:debug_body]
657
+
658
+ # return_type
659
+ return_type = opts[:debug_return_type] || 'AirbnbReviewListResponse'
660
+
661
+ # auth_names
662
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
663
+
664
+ new_options = opts.merge(
665
+ :operation => :"AirbnbApi.list_airbnb_reviews",
666
+ :header_params => header_params,
667
+ :query_params => query_params,
668
+ :form_params => form_params,
669
+ :body => post_body,
670
+ :auth_names => auth_names,
671
+ :return_type => return_type
672
+ )
673
+
674
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
675
+ if @api_client.config.debugging
676
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_reviews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
677
+ end
678
+ return data, status_code, headers
679
+ end
680
+
681
+ # Get Airbnb messages
682
+ # Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with `?cursor=` until `pagination.hasMore` is `false`.
683
+ # @param thread_id [String]
684
+ # @param [Hash] opts the optional parameters
685
+ # @return [MessageListResponse]
686
+ def list_airbnb_thread_messages(thread_id, opts = {})
687
+ data, _status_code, _headers = list_airbnb_thread_messages_with_http_info(thread_id, opts)
688
+ data
689
+ end
690
+
691
+ # Get Airbnb messages
692
+ # 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;.
693
+ # @param thread_id [String]
694
+ # @param [Hash] opts the optional parameters
695
+ # @return [Array<(MessageListResponse, Integer, Hash)>] MessageListResponse data, response status code and response headers
696
+ def list_airbnb_thread_messages_with_http_info(thread_id, opts = {})
697
+ if @api_client.config.debugging
698
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_thread_messages ...'
699
+ end
700
+ # verify the required parameter 'thread_id' is set
701
+ if @api_client.config.client_side_validation && thread_id.nil?
702
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.list_airbnb_thread_messages"
703
+ end
704
+ # resource path
705
+ local_var_path = '/v1/channels/airbnb/messaging/{threadId}/messages'.sub('{threadId}', CGI.escape(thread_id.to_s))
706
+
707
+ # query parameters
708
+ query_params = opts[:query_params] || {}
709
+
710
+ # header parameters
711
+ header_params = opts[:header_params] || {}
712
+ # HTTP header 'Accept' (if needed)
713
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
714
+
715
+ # form parameters
716
+ form_params = opts[:form_params] || {}
717
+
718
+ # http body (model)
719
+ post_body = opts[:debug_body]
720
+
721
+ # return_type
722
+ return_type = opts[:debug_return_type] || 'MessageListResponse'
723
+
724
+ # auth_names
725
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
726
+
727
+ new_options = opts.merge(
728
+ :operation => :"AirbnbApi.list_airbnb_thread_messages",
729
+ :header_params => header_params,
730
+ :query_params => query_params,
731
+ :form_params => form_params,
732
+ :body => post_body,
733
+ :auth_names => auth_names,
734
+ :return_type => return_type
735
+ )
736
+
737
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
738
+ if @api_client.config.debugging
739
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_thread_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
740
+ end
741
+ return data, status_code, headers
742
+ end
743
+
744
+ # List Airbnb message threads
745
+ # List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message.
746
+ # @param [Hash] opts the optional parameters
747
+ # @return [AirbnbThreadListResponse]
748
+ def list_airbnb_threads(opts = {})
749
+ data, _status_code, _headers = list_airbnb_threads_with_http_info(opts)
750
+ data
751
+ end
752
+
753
+ # List Airbnb message threads
754
+ # List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message.
755
+ # @param [Hash] opts the optional parameters
756
+ # @return [Array<(AirbnbThreadListResponse, Integer, Hash)>] AirbnbThreadListResponse data, response status code and response headers
757
+ def list_airbnb_threads_with_http_info(opts = {})
758
+ if @api_client.config.debugging
759
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_threads ...'
760
+ end
761
+ # resource path
762
+ local_var_path = '/v1/channels/airbnb/messaging'
763
+
764
+ # query parameters
765
+ query_params = opts[:query_params] || {}
766
+
767
+ # header parameters
768
+ header_params = opts[:header_params] || {}
769
+ # HTTP header 'Accept' (if needed)
770
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
771
+
772
+ # form parameters
773
+ form_params = opts[:form_params] || {}
774
+
775
+ # http body (model)
776
+ post_body = opts[:debug_body]
777
+
778
+ # return_type
779
+ return_type = opts[:debug_return_type] || 'AirbnbThreadListResponse'
780
+
781
+ # auth_names
782
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
783
+
784
+ new_options = opts.merge(
785
+ :operation => :"AirbnbApi.list_airbnb_threads",
786
+ :header_params => header_params,
787
+ :query_params => query_params,
788
+ :form_params => form_params,
789
+ :body => post_body,
790
+ :auth_names => auth_names,
791
+ :return_type => return_type
792
+ )
793
+
794
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
795
+ if @api_client.config.debugging
796
+ @api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
797
+ end
798
+ return data, status_code, headers
799
+ end
800
+
801
+ # Respond to Airbnb review
802
+ # Post a public response to a guest review. Airbnb allows one response per review — repeated POSTs return 409.
803
+ # @param [Hash] opts the optional parameters
804
+ # @return [nil]
805
+ def respond_airbnb_review(opts = {})
806
+ respond_airbnb_review_with_http_info(opts)
807
+ nil
808
+ end
809
+
810
+ # Respond to Airbnb review
811
+ # Post a public response to a guest review. Airbnb allows one response per review — repeated POSTs return 409.
812
+ # @param [Hash] opts the optional parameters
813
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
814
+ def respond_airbnb_review_with_http_info(opts = {})
815
+ if @api_client.config.debugging
816
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.respond_airbnb_review ...'
817
+ end
818
+ # resource path
819
+ local_var_path = '/v1/channels/airbnb/reviews'
820
+
821
+ # query parameters
822
+ query_params = opts[:query_params] || {}
823
+
824
+ # header parameters
825
+ header_params = opts[:header_params] || {}
826
+
827
+ # form parameters
828
+ form_params = opts[:form_params] || {}
829
+
830
+ # http body (model)
831
+ post_body = opts[:debug_body]
832
+
833
+ # return_type
834
+ return_type = opts[:debug_return_type]
835
+
836
+ # auth_names
837
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
838
+
839
+ new_options = opts.merge(
840
+ :operation => :"AirbnbApi.respond_airbnb_review",
841
+ :header_params => header_params,
842
+ :query_params => query_params,
843
+ :form_params => form_params,
844
+ :body => post_body,
845
+ :auth_names => auth_names,
846
+ :return_type => return_type
847
+ )
848
+
849
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
850
+ if @api_client.config.debugging
851
+ @api_client.config.logger.debug "API called: AirbnbApi#respond_airbnb_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
852
+ end
853
+ return data, status_code, headers
854
+ end
855
+
856
+ # Send Airbnb message
857
+ # 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`.
858
+ # @param thread_id [String]
859
+ # @param [Hash] opts the optional parameters
860
+ # @return [nil]
861
+ def send_airbnb_message(thread_id, opts = {})
862
+ send_airbnb_message_with_http_info(thread_id, opts)
863
+ nil
864
+ end
865
+
866
+ # Send Airbnb message
867
+ # 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;.
868
+ # @param thread_id [String]
869
+ # @param [Hash] opts the optional parameters
870
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
871
+ def send_airbnb_message_with_http_info(thread_id, opts = {})
872
+ if @api_client.config.debugging
873
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.send_airbnb_message ...'
874
+ end
875
+ # verify the required parameter 'thread_id' is set
876
+ if @api_client.config.client_side_validation && thread_id.nil?
877
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.send_airbnb_message"
878
+ end
879
+ # resource path
880
+ local_var_path = '/v1/channels/airbnb/messaging/{threadId}/messages'.sub('{threadId}', CGI.escape(thread_id.to_s))
881
+
882
+ # query parameters
883
+ query_params = opts[:query_params] || {}
884
+
885
+ # header parameters
886
+ header_params = opts[:header_params] || {}
887
+
888
+ # form parameters
889
+ form_params = opts[:form_params] || {}
890
+
891
+ # http body (model)
892
+ post_body = opts[:debug_body]
893
+
894
+ # return_type
895
+ return_type = opts[:debug_return_type]
896
+
897
+ # auth_names
898
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
899
+
900
+ new_options = opts.merge(
901
+ :operation => :"AirbnbApi.send_airbnb_message",
902
+ :header_params => header_params,
903
+ :query_params => query_params,
904
+ :form_params => form_params,
905
+ :body => post_body,
906
+ :auth_names => auth_names,
907
+ :return_type => return_type
908
+ )
909
+
910
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
911
+ if @api_client.config.debugging
912
+ @api_client.config.logger.debug "API called: AirbnbApi#send_airbnb_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
913
+ end
914
+ return data, status_code, headers
915
+ end
916
+
917
+ # Bulk sync to Airbnb
918
+ # Push all property data to Airbnb in one call.
919
+ # @param [Hash] opts the optional parameters
920
+ # @return [nil]
921
+ def sync_airbnb(opts = {})
922
+ sync_airbnb_with_http_info(opts)
923
+ nil
924
+ end
925
+
926
+ # Bulk sync to Airbnb
927
+ # Push all property data to Airbnb in one call.
928
+ # @param [Hash] opts the optional parameters
929
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
930
+ def sync_airbnb_with_http_info(opts = {})
931
+ if @api_client.config.debugging
932
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.sync_airbnb ...'
933
+ end
934
+ # resource path
935
+ local_var_path = '/v1/channels/airbnb/sync'
936
+
937
+ # query parameters
938
+ query_params = opts[:query_params] || {}
939
+
940
+ # header parameters
941
+ header_params = opts[:header_params] || {}
942
+
943
+ # form parameters
944
+ form_params = opts[:form_params] || {}
945
+
946
+ # http body (model)
947
+ post_body = opts[:debug_body]
948
+
949
+ # return_type
950
+ return_type = opts[:debug_return_type]
951
+
952
+ # auth_names
953
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
954
+
955
+ new_options = opts.merge(
956
+ :operation => :"AirbnbApi.sync_airbnb",
957
+ :header_params => header_params,
958
+ :query_params => query_params,
959
+ :form_params => form_params,
960
+ :body => post_body,
961
+ :auth_names => auth_names,
962
+ :return_type => return_type
963
+ )
964
+
965
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
966
+ if @api_client.config.debugging
967
+ @api_client.config.logger.debug "API called: AirbnbApi#sync_airbnb\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
968
+ end
969
+ return data, status_code, headers
970
+ end
971
+
972
+ # Update Airbnb availability
973
+ # Push per-day availability + pricing overrides to Airbnb. Accepts a sparse map (date → fields) — only included dates are updated.
974
+ # @param id [String]
975
+ # @param [Hash] opts the optional parameters
976
+ # @return [nil]
977
+ def update_airbnb_listing_availability(id, opts = {})
978
+ update_airbnb_listing_availability_with_http_info(id, opts)
979
+ nil
980
+ end
981
+
982
+ # Update Airbnb availability
983
+ # Push per-day availability + pricing overrides to Airbnb. Accepts a sparse map (date → fields) — only included dates are updated.
984
+ # @param id [String]
985
+ # @param [Hash] opts the optional parameters
986
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
987
+ def update_airbnb_listing_availability_with_http_info(id, opts = {})
988
+ if @api_client.config.debugging
989
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_availability ...'
990
+ end
991
+ # verify the required parameter 'id' is set
992
+ if @api_client.config.client_side_validation && id.nil?
993
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_availability"
994
+ end
995
+ # resource path
996
+ local_var_path = '/v1/channels/airbnb/listings/{id}/availability'.sub('{id}', CGI.escape(id.to_s))
997
+
998
+ # query parameters
999
+ query_params = opts[:query_params] || {}
1000
+
1001
+ # header parameters
1002
+ header_params = opts[:header_params] || {}
1003
+
1004
+ # form parameters
1005
+ form_params = opts[:form_params] || {}
1006
+
1007
+ # http body (model)
1008
+ post_body = opts[:debug_body]
1009
+
1010
+ # return_type
1011
+ return_type = opts[:debug_return_type]
1012
+
1013
+ # auth_names
1014
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1015
+
1016
+ new_options = opts.merge(
1017
+ :operation => :"AirbnbApi.update_airbnb_listing_availability",
1018
+ :header_params => header_params,
1019
+ :query_params => query_params,
1020
+ :form_params => form_params,
1021
+ :body => post_body,
1022
+ :auth_names => auth_names,
1023
+ :return_type => return_type
1024
+ )
1025
+
1026
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1027
+ if @api_client.config.debugging
1028
+ @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1029
+ end
1030
+ return data, status_code, headers
1031
+ end
1032
+
1033
+ # Update Airbnb pricing
1034
+ # Push pricing changes to Airbnb. The full pricing object is replaced — to patch a single field, GET first, mutate locally, then PUT the whole object.
1035
+ # @param id [String]
1036
+ # @param [Hash] opts the optional parameters
1037
+ # @return [nil]
1038
+ def update_airbnb_listing_pricing(id, opts = {})
1039
+ update_airbnb_listing_pricing_with_http_info(id, opts)
1040
+ nil
1041
+ end
1042
+
1043
+ # Update Airbnb pricing
1044
+ # Push pricing changes to Airbnb. The full pricing object is replaced — to patch a single field, GET first, mutate locally, then PUT the whole object.
1045
+ # @param id [String]
1046
+ # @param [Hash] opts the optional parameters
1047
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1048
+ def update_airbnb_listing_pricing_with_http_info(id, opts = {})
1049
+ if @api_client.config.debugging
1050
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_pricing ...'
1051
+ end
1052
+ # verify the required parameter 'id' is set
1053
+ if @api_client.config.client_side_validation && id.nil?
1054
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_pricing"
1055
+ end
1056
+ # resource path
1057
+ local_var_path = '/v1/channels/airbnb/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))
1058
+
1059
+ # query parameters
1060
+ query_params = opts[:query_params] || {}
1061
+
1062
+ # header parameters
1063
+ header_params = opts[:header_params] || {}
1064
+
1065
+ # form parameters
1066
+ form_params = opts[:form_params] || {}
1067
+
1068
+ # http body (model)
1069
+ post_body = opts[:debug_body]
1070
+
1071
+ # return_type
1072
+ return_type = opts[:debug_return_type]
1073
+
1074
+ # auth_names
1075
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1076
+
1077
+ new_options = opts.merge(
1078
+ :operation => :"AirbnbApi.update_airbnb_listing_pricing",
1079
+ :header_params => header_params,
1080
+ :query_params => query_params,
1081
+ :form_params => form_params,
1082
+ :body => post_body,
1083
+ :auth_names => auth_names,
1084
+ :return_type => return_type
1085
+ )
1086
+
1087
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1088
+ if @api_client.config.debugging
1089
+ @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1090
+ end
1091
+ return data, status_code, headers
1092
+ end
1093
+
1094
+ # Upload photos to Airbnb
1095
+ # 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.
1096
+ # @param id [String]
1097
+ # @param [Hash] opts the optional parameters
1098
+ # @return [nil]
1099
+ def upload_airbnb_listing_photos(id, opts = {})
1100
+ upload_airbnb_listing_photos_with_http_info(id, opts)
1101
+ nil
1102
+ end
1103
+
1104
+ # Upload photos to Airbnb
1105
+ # 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.
1106
+ # @param id [String]
1107
+ # @param [Hash] opts the optional parameters
1108
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1109
+ def upload_airbnb_listing_photos_with_http_info(id, opts = {})
1110
+ if @api_client.config.debugging
1111
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.upload_airbnb_listing_photos ...'
1112
+ end
1113
+ # verify the required parameter 'id' is set
1114
+ if @api_client.config.client_side_validation && id.nil?
1115
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.upload_airbnb_listing_photos"
1116
+ end
1117
+ # resource path
1118
+ local_var_path = '/v1/channels/airbnb/listings/{id}/photos'.sub('{id}', CGI.escape(id.to_s))
1119
+
1120
+ # query parameters
1121
+ query_params = opts[:query_params] || {}
1122
+
1123
+ # header parameters
1124
+ header_params = opts[:header_params] || {}
1125
+
1126
+ # form parameters
1127
+ form_params = opts[:form_params] || {}
1128
+
1129
+ # http body (model)
1130
+ post_body = opts[:debug_body]
1131
+
1132
+ # return_type
1133
+ return_type = opts[:debug_return_type]
1134
+
1135
+ # auth_names
1136
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1137
+
1138
+ new_options = opts.merge(
1139
+ :operation => :"AirbnbApi.upload_airbnb_listing_photos",
1140
+ :header_params => header_params,
1141
+ :query_params => query_params,
1142
+ :form_params => form_params,
1143
+ :body => post_body,
1144
+ :auth_names => auth_names,
1145
+ :return_type => return_type
1146
+ )
1147
+
1148
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1149
+ if @api_client.config.debugging
1150
+ @api_client.config.logger.debug "API called: AirbnbApi#upload_airbnb_listing_photos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1151
+ end
1152
+ return data, status_code, headers
1153
+ end
1154
+ end
1155
+ end