repull 0.2.56 → 0.2.57

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +539 -2
  3. data/lib/repull/api/connect_api.rb +2 -2
  4. data/lib/repull/api/listings_api.rb +70 -0
  5. data/lib/repull/api/vrbo_api.rb +706 -0
  6. data/lib/repull/models/create_vrbo_offer201_response.rb +104 -0
  7. data/lib/repull/models/create_vrbo_offer201_response_one_of.rb +175 -0
  8. data/lib/repull/models/create_vrbo_offer_request.rb +320 -0
  9. data/lib/repull/models/create_vrbo_offer_request_fees_inner.rb +199 -0
  10. data/lib/repull/models/create_vrbo_offer_request_guest_details.rb +278 -0
  11. data/lib/repull/models/get_airbnb_house_rules200_response.rb +190 -0
  12. data/lib/repull/models/get_airbnb_house_rules200_response_data.rb +247 -0
  13. data/lib/repull/models/get_airbnb_house_rules200_response_data_children.rb +148 -0
  14. data/lib/repull/models/get_airbnb_house_rules200_response_data_house_rules_inner.rb +168 -0
  15. data/lib/repull/models/get_airbnb_listing_cancellation200_response.rb +190 -0
  16. data/lib/repull/models/get_airbnb_listing_cancellation200_response_data.rb +203 -0
  17. data/lib/repull/models/get_airbnb_listing_cancellation200_response_data_non_refundable.rb +192 -0
  18. data/lib/repull/models/get_airbnb_listing_fees200_response.rb +192 -0
  19. data/lib/repull/models/get_airbnb_listing_fees200_response_data_inner.rb +251 -0
  20. data/lib/repull/models/get_airbnb_listing_taxes200_response.rb +192 -0
  21. data/lib/repull/models/get_airbnb_listing_taxes200_response_data_inner.rb +181 -0
  22. data/lib/repull/models/get_airbnb_location200_response.rb +190 -0
  23. data/lib/repull/models/get_airbnb_location200_response_data.rb +197 -0
  24. data/lib/repull/models/get_airbnb_location200_response_data_address.rb +198 -0
  25. data/lib/repull/models/get_vrbo_listing200_response_data_inner.rb +1 -1
  26. data/lib/repull/models/get_vrbo_listing_settings200_response.rb +217 -0
  27. data/lib/repull/models/get_vrbo_listing_settings200_response_data.rb +106 -0
  28. data/lib/repull/models/get_vrbo_listing_settings200_response_data_one_of.rb +149 -0
  29. data/lib/repull/models/get_vrbo_offer200_response.rb +290 -0
  30. data/lib/repull/models/get_vrbo_offer200_response_fees_inner.rb +166 -0
  31. data/lib/repull/models/get_vrbo_thread200_response.rb +159 -0
  32. data/lib/repull/models/list_vrbo_thread_messages200_response.rb +170 -0
  33. data/lib/repull/models/list_vrbo_thread_messages200_response_data_inner.rb +240 -0
  34. data/lib/repull/models/list_vrbo_threads200_response.rb +172 -0
  35. data/lib/repull/models/list_vrbo_threads200_response_data_inner.rb +219 -0
  36. data/lib/repull/models/map_vrbo_listing_request.rb +1 -1
  37. data/lib/repull/models/pull_listing_from_vrbo200_response.rb +273 -0
  38. data/lib/repull/models/pull_listing_from_vrbo_request.rb +149 -0
  39. data/lib/repull/models/send_vrbo_message_request.rb +186 -0
  40. data/lib/repull/models/submit_vrbo_guest_review200_response.rb +176 -0
  41. data/lib/repull/models/submit_vrbo_guest_review_request.rb +195 -0
  42. data/lib/repull/models/submit_vrbo_guest_review_request_category_ratings_inner.rb +218 -0
  43. data/lib/repull/models/update_airbnb_house_rules200_response.rb +187 -0
  44. data/lib/repull/models/update_airbnb_house_rules_request.rb +191 -0
  45. data/lib/repull/models/update_airbnb_listing_cancellation200_response.rb +147 -0
  46. data/lib/repull/models/update_airbnb_listing_cancellation200_response_data.rb +158 -0
  47. data/lib/repull/models/update_airbnb_listing_cancellation_request.rb +201 -0
  48. data/lib/repull/models/update_airbnb_listing_cancellation_request_non_refundable.rb +182 -0
  49. data/lib/repull/models/update_airbnb_listing_fees200_response.rb +150 -0
  50. data/lib/repull/models/update_airbnb_listing_fees_request.rb +175 -0
  51. data/lib/repull/models/vrbo_login200_response.rb +2 -2
  52. data/lib/repull/models/vrbo_login_request.rb +13 -3
  53. data/lib/repull/models/withdraw_vrbo_offer200_response.rb +165 -0
  54. data/lib/repull/version.rb +1 -1
  55. data/lib/repull.rb +44 -0
  56. data/openapi/v1.json +2994 -195
  57. metadata +46 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf03ecc7cb195158373bf4de2cd41f9dc84180561164418ade71aa76abfc926d
4
- data.tar.gz: c41eef0abb2a251a6a8e0fd3e2c05b6f5604bd08ca5496869142056956213214
3
+ metadata.gz: 6d3fe8068106c74b9c9ddbb4d2d79ed0eb011013266f0fe32abe76c7fbafe298
4
+ data.tar.gz: 966a42fbee6db5f66ade25015063eab4676e6cf24787e9d5560ce061d71ad20d
5
5
  SHA512:
6
- metadata.gz: 8b721a00c0c3a86990a9ad23674587e87707be21393a45aaf9bfeea467fc484639570bc7481cd6db65f72ed50120aeef7a082ba78d9d500368a75d84917c3804
7
- data.tar.gz: 98c39c4dbfb1fe89e4a55addc3c7febbbf99f63790702f1d3053d9185a06a10b1a9ae4cabb52a9946608bb2aba333c85c3db6445dfcef0b088b929dd1513503a
6
+ metadata.gz: 85dcd2b8f452a04528ab090154ba1fd7e6f8601655bdde7969d6e3abe110b7e96a84f61a59bf51e10143fb19a8e36ec725496ecb5bd8d13b9a05978c670551f8
7
+ data.tar.gz: 1bba3b2729163830e92e0b7e990b47fe3deb4865a4833639e6521de99b2eea711a750259ac551f64fa337637148414e1e19f7547f35491672aaf0edccfcbc341
@@ -1130,6 +1130,69 @@ module Repull
1130
1130
  return data, status_code, headers
1131
1131
  end
1132
1132
 
1133
+ # Get Airbnb house rules
1134
+ # The listing's house rules under the names Vrbo's `GET /v1/channels/vrbo/listings/{id}/house-rules` uses: check-in and check-out times, guest capacity, whether children, infants, pets, smoking and events are allowed, Airbnb's \"things to know\" (`expectations`), and the written rules per language. **Repull's stored copy**, like every Airbnb read: check `dataFreshness` before treating a value as current. `POST /v1/listings/{id}/pull/airbnb` refreshes it from Airbnb. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
1135
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
1136
+ # @param [Hash] opts the optional parameters
1137
+ # @return [GetAirbnbHouseRules200Response]
1138
+ def get_airbnb_house_rules(id, opts = {})
1139
+ data, _status_code, _headers = get_airbnb_house_rules_with_http_info(id, opts)
1140
+ data
1141
+ end
1142
+
1143
+ # Get Airbnb house rules
1144
+ # The listing's house rules under the names Vrbo's `GET /v1/channels/vrbo/listings/{id}/house-rules` uses: check-in and check-out times, guest capacity, whether children, infants, pets, smoking and events are allowed, Airbnb's \"things to know\" (`expectations`), and the written rules per language. **Repull's stored copy**, like every Airbnb read: check `dataFreshness` before treating a value as current. `POST /v1/listings/{id}/pull/airbnb` refreshes it from Airbnb. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
1145
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
1146
+ # @param [Hash] opts the optional parameters
1147
+ # @return [Array<(GetAirbnbHouseRules200Response, Integer, Hash)>] GetAirbnbHouseRules200Response data, response status code and response headers
1148
+ def get_airbnb_house_rules_with_http_info(id, opts = {})
1149
+ if @api_client.config.debugging
1150
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_house_rules ...'
1151
+ end
1152
+ # verify the required parameter 'id' is set
1153
+ if @api_client.config.client_side_validation && id.nil?
1154
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_house_rules"
1155
+ end
1156
+ # resource path
1157
+ local_var_path = '/v1/channels/airbnb/listings/{id}/house-rules'.sub('{id}', CGI.escape(id.to_s))
1158
+
1159
+ # query parameters
1160
+ query_params = opts[:query_params] || {}
1161
+
1162
+ # header parameters
1163
+ header_params = opts[:header_params] || {}
1164
+ # HTTP header 'Accept' (if needed)
1165
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1166
+
1167
+ # form parameters
1168
+ form_params = opts[:form_params] || {}
1169
+
1170
+ # http body (model)
1171
+ post_body = opts[:debug_body]
1172
+
1173
+ # return_type
1174
+ return_type = opts[:debug_return_type] || 'GetAirbnbHouseRules200Response'
1175
+
1176
+ # auth_names
1177
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1178
+
1179
+ new_options = opts.merge(
1180
+ :operation => :"AirbnbApi.get_airbnb_house_rules",
1181
+ :header_params => header_params,
1182
+ :query_params => query_params,
1183
+ :form_params => form_params,
1184
+ :body => post_body,
1185
+ :auth_names => auth_names,
1186
+ :return_type => return_type
1187
+ )
1188
+
1189
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1190
+ if @api_client.config.debugging
1191
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_house_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1192
+ end
1193
+ return data, status_code, headers
1194
+ end
1195
+
1133
1196
  # Get Airbnb listing
1134
1197
  # Fetch all Airbnb connection rows for a single Repull 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. Each row carries `syncCategory` — Airbnb's own per-listing API sync decision (`sync_all`, `sync_rates_and_availability`, or `none`) — and `writable`, which is `false` exactly when that category is `none`, meaning Airbnb refuses every write to the listing and Repull returns `403 listing_not_api_connected` without sending anything. `GET /v1/channels/airbnb/listings` reports both fields for the whole portfolio in one call. 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.
1135
1198
  # @param id [String]
@@ -1259,6 +1322,69 @@ module Repull
1259
1322
  return data, status_code, headers
1260
1323
  end
1261
1324
 
1325
+ # Get the Airbnb cancellation policy
1326
+ # The short-stay and long-stay cancellation policies and the non-refundable option — the same section as `GET /v1/channels/vrbo/listings/{id}/cancellation`, and the `cancellation` of `GET …/booking-settings`. **Repull's stored copy**, like every Airbnb read: check `dataFreshness` before treating a value as current. `POST /v1/listings/{id}/pull/airbnb` refreshes it from Airbnb. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
1327
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
1328
+ # @param [Hash] opts the optional parameters
1329
+ # @return [GetAirbnbListingCancellation200Response]
1330
+ def get_airbnb_listing_cancellation(id, opts = {})
1331
+ data, _status_code, _headers = get_airbnb_listing_cancellation_with_http_info(id, opts)
1332
+ data
1333
+ end
1334
+
1335
+ # Get the Airbnb cancellation policy
1336
+ # The short-stay and long-stay cancellation policies and the non-refundable option — the same section as &#x60;GET /v1/channels/vrbo/listings/{id}/cancellation&#x60;, and the &#x60;cancellation&#x60; of &#x60;GET …/booking-settings&#x60;. **Repull&#39;s stored copy**, like every Airbnb read: check &#x60;dataFreshness&#x60; before treating a value as current. &#x60;POST /v1/listings/{id}/pull/airbnb&#x60; refreshes it from Airbnb. Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace, and &#x60;403 listing_inactive&#x60; when the listing is inactive.
1337
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
1338
+ # @param [Hash] opts the optional parameters
1339
+ # @return [Array<(GetAirbnbListingCancellation200Response, Integer, Hash)>] GetAirbnbListingCancellation200Response data, response status code and response headers
1340
+ def get_airbnb_listing_cancellation_with_http_info(id, opts = {})
1341
+ if @api_client.config.debugging
1342
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_cancellation ...'
1343
+ end
1344
+ # verify the required parameter 'id' is set
1345
+ if @api_client.config.client_side_validation && id.nil?
1346
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_cancellation"
1347
+ end
1348
+ # resource path
1349
+ local_var_path = '/v1/channels/airbnb/listings/{id}/cancellation'.sub('{id}', CGI.escape(id.to_s))
1350
+
1351
+ # query parameters
1352
+ query_params = opts[:query_params] || {}
1353
+
1354
+ # header parameters
1355
+ header_params = opts[:header_params] || {}
1356
+ # HTTP header 'Accept' (if needed)
1357
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1358
+
1359
+ # form parameters
1360
+ form_params = opts[:form_params] || {}
1361
+
1362
+ # http body (model)
1363
+ post_body = opts[:debug_body]
1364
+
1365
+ # return_type
1366
+ return_type = opts[:debug_return_type] || 'GetAirbnbListingCancellation200Response'
1367
+
1368
+ # auth_names
1369
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1370
+
1371
+ new_options = opts.merge(
1372
+ :operation => :"AirbnbApi.get_airbnb_listing_cancellation",
1373
+ :header_params => header_params,
1374
+ :query_params => query_params,
1375
+ :form_params => form_params,
1376
+ :body => post_body,
1377
+ :auth_names => auth_names,
1378
+ :return_type => return_type
1379
+ )
1380
+
1381
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1382
+ if @api_client.config.debugging
1383
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_cancellation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1384
+ end
1385
+ return data, status_code, headers
1386
+ end
1387
+
1262
1388
  # Get Airbnb listing details
1263
1389
  # What kind of property Airbnb thinks this is — property type group and category, room type, capacity — plus the check-in method (`checkInOption`), whether the listing is live (`hasAvailability`), and **`lockedFields`: the attributes Airbnb refuses to change on this listing**. **Pure DB read** from the local mirror, one entry per Airbnb connection. Read `lockedFields` before a content write. Airbnb does not refuse a write to a locked attribute: it returns 200, reports the attribute as locked, and applies nothing — which is why a write can look successful and change nothing. 1,180 of 5,917 synced listings carry at least one locked attribute. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
1264
1390
  # @param id [String] Repull listing id (numeric string).
@@ -1322,6 +1448,69 @@ module Repull
1322
1448
  return data, status_code, headers
1323
1449
  end
1324
1450
 
1451
+ # Get Airbnb fees
1452
+ # The listing's Airbnb fees (cleaning, pets, extra guests, management, linens, …) — the same section as `GET /v1/channels/vrbo/listings/{id}/fees`, and the `fees` of `GET …/pricing`. **Repull's stored copy**, like every Airbnb read: check `dataFreshness` before treating a value as current. `POST /v1/listings/{id}/pull/airbnb` refreshes it from Airbnb. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
1453
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
1454
+ # @param [Hash] opts the optional parameters
1455
+ # @return [GetAirbnbListingFees200Response]
1456
+ def get_airbnb_listing_fees(id, opts = {})
1457
+ data, _status_code, _headers = get_airbnb_listing_fees_with_http_info(id, opts)
1458
+ data
1459
+ end
1460
+
1461
+ # Get Airbnb fees
1462
+ # The listing&#39;s Airbnb fees (cleaning, pets, extra guests, management, linens, …) — the same section as &#x60;GET /v1/channels/vrbo/listings/{id}/fees&#x60;, and the &#x60;fees&#x60; of &#x60;GET …/pricing&#x60;. **Repull&#39;s stored copy**, like every Airbnb read: check &#x60;dataFreshness&#x60; before treating a value as current. &#x60;POST /v1/listings/{id}/pull/airbnb&#x60; refreshes it from Airbnb. Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace, and &#x60;403 listing_inactive&#x60; when the listing is inactive.
1463
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
1464
+ # @param [Hash] opts the optional parameters
1465
+ # @return [Array<(GetAirbnbListingFees200Response, Integer, Hash)>] GetAirbnbListingFees200Response data, response status code and response headers
1466
+ def get_airbnb_listing_fees_with_http_info(id, opts = {})
1467
+ if @api_client.config.debugging
1468
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_fees ...'
1469
+ end
1470
+ # verify the required parameter 'id' is set
1471
+ if @api_client.config.client_side_validation && id.nil?
1472
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_fees"
1473
+ end
1474
+ # resource path
1475
+ local_var_path = '/v1/channels/airbnb/listings/{id}/fees'.sub('{id}', CGI.escape(id.to_s))
1476
+
1477
+ # query parameters
1478
+ query_params = opts[:query_params] || {}
1479
+
1480
+ # header parameters
1481
+ header_params = opts[:header_params] || {}
1482
+ # HTTP header 'Accept' (if needed)
1483
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1484
+
1485
+ # form parameters
1486
+ form_params = opts[:form_params] || {}
1487
+
1488
+ # http body (model)
1489
+ post_body = opts[:debug_body]
1490
+
1491
+ # return_type
1492
+ return_type = opts[:debug_return_type] || 'GetAirbnbListingFees200Response'
1493
+
1494
+ # auth_names
1495
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1496
+
1497
+ new_options = opts.merge(
1498
+ :operation => :"AirbnbApi.get_airbnb_listing_fees",
1499
+ :header_params => header_params,
1500
+ :query_params => query_params,
1501
+ :form_params => form_params,
1502
+ :body => post_body,
1503
+ :auth_names => auth_names,
1504
+ :return_type => return_type
1505
+ )
1506
+
1507
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1508
+ if @api_client.config.debugging
1509
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_fees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1510
+ end
1511
+ return data, status_code, headers
1512
+ end
1513
+
1325
1514
  # Get Airbnb pricing
1326
1515
  # 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.
1327
1516
  # @param id [String]
@@ -1525,6 +1714,132 @@ module Repull
1525
1714
  return data, status_code, headers
1526
1715
  end
1527
1716
 
1717
+ # Get Airbnb taxes
1718
+ # The listing's taxes — host-remitted pass-through taxes and the taxes Airbnb collects itself, each with `source` (`pass_through` | `airbnb_collected`) — the same section as `GET /v1/channels/vrbo/listings/{id}/taxes`, and the `taxes` of `GET …/pricing`. Read-only here: Airbnb's pass-through taxes are part of its pricing settings (`PUT …/pricing` `{ \"type\": \"standard\" }`). **Repull's stored copy**, like every Airbnb read: check `dataFreshness` before treating a value as current. `POST /v1/listings/{id}/pull/airbnb` refreshes it from Airbnb. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
1719
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
1720
+ # @param [Hash] opts the optional parameters
1721
+ # @return [GetAirbnbListingTaxes200Response]
1722
+ def get_airbnb_listing_taxes(id, opts = {})
1723
+ data, _status_code, _headers = get_airbnb_listing_taxes_with_http_info(id, opts)
1724
+ data
1725
+ end
1726
+
1727
+ # Get Airbnb taxes
1728
+ # The listing&#39;s taxes — host-remitted pass-through taxes and the taxes Airbnb collects itself, each with &#x60;source&#x60; (&#x60;pass_through&#x60; | &#x60;airbnb_collected&#x60;) — the same section as &#x60;GET /v1/channels/vrbo/listings/{id}/taxes&#x60;, and the &#x60;taxes&#x60; of &#x60;GET …/pricing&#x60;. Read-only here: Airbnb&#39;s pass-through taxes are part of its pricing settings (&#x60;PUT …/pricing&#x60; &#x60;{ \&quot;type\&quot;: \&quot;standard\&quot; }&#x60;). **Repull&#39;s stored copy**, like every Airbnb read: check &#x60;dataFreshness&#x60; before treating a value as current. &#x60;POST /v1/listings/{id}/pull/airbnb&#x60; refreshes it from Airbnb. Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace, and &#x60;403 listing_inactive&#x60; when the listing is inactive.
1729
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
1730
+ # @param [Hash] opts the optional parameters
1731
+ # @return [Array<(GetAirbnbListingTaxes200Response, Integer, Hash)>] GetAirbnbListingTaxes200Response data, response status code and response headers
1732
+ def get_airbnb_listing_taxes_with_http_info(id, opts = {})
1733
+ if @api_client.config.debugging
1734
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_taxes ...'
1735
+ end
1736
+ # verify the required parameter 'id' is set
1737
+ if @api_client.config.client_side_validation && id.nil?
1738
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_taxes"
1739
+ end
1740
+ # resource path
1741
+ local_var_path = '/v1/channels/airbnb/listings/{id}/taxes'.sub('{id}', CGI.escape(id.to_s))
1742
+
1743
+ # query parameters
1744
+ query_params = opts[:query_params] || {}
1745
+
1746
+ # header parameters
1747
+ header_params = opts[:header_params] || {}
1748
+ # HTTP header 'Accept' (if needed)
1749
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1750
+
1751
+ # form parameters
1752
+ form_params = opts[:form_params] || {}
1753
+
1754
+ # http body (model)
1755
+ post_body = opts[:debug_body]
1756
+
1757
+ # return_type
1758
+ return_type = opts[:debug_return_type] || 'GetAirbnbListingTaxes200Response'
1759
+
1760
+ # auth_names
1761
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1762
+
1763
+ new_options = opts.merge(
1764
+ :operation => :"AirbnbApi.get_airbnb_listing_taxes",
1765
+ :header_params => header_params,
1766
+ :query_params => query_params,
1767
+ :form_params => form_params,
1768
+ :body => post_body,
1769
+ :auth_names => auth_names,
1770
+ :return_type => return_type
1771
+ )
1772
+
1773
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1774
+ if @api_client.config.debugging
1775
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_taxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1776
+ end
1777
+ return data, status_code, headers
1778
+ end
1779
+
1780
+ # Get the Airbnb location
1781
+ # The listing's address, map pin, directions and whether guests see the exact location — the same section as `GET /v1/channels/vrbo/listings/{id}/location`. Read-only: Airbnb changes a listed address only in its own flow in the host app (`addressEditable: false`). **Repull's stored copy**, like every Airbnb read: check `dataFreshness` before treating a value as current. `POST /v1/listings/{id}/pull/airbnb` refreshes it from Airbnb. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
1782
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
1783
+ # @param [Hash] opts the optional parameters
1784
+ # @return [GetAirbnbLocation200Response]
1785
+ def get_airbnb_location(id, opts = {})
1786
+ data, _status_code, _headers = get_airbnb_location_with_http_info(id, opts)
1787
+ data
1788
+ end
1789
+
1790
+ # Get the Airbnb location
1791
+ # The listing&#39;s address, map pin, directions and whether guests see the exact location — the same section as &#x60;GET /v1/channels/vrbo/listings/{id}/location&#x60;. Read-only: Airbnb changes a listed address only in its own flow in the host app (&#x60;addressEditable: false&#x60;). **Repull&#39;s stored copy**, like every Airbnb read: check &#x60;dataFreshness&#x60; before treating a value as current. &#x60;POST /v1/listings/{id}/pull/airbnb&#x60; refreshes it from Airbnb. Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace, and &#x60;403 listing_inactive&#x60; when the listing is inactive.
1792
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
1793
+ # @param [Hash] opts the optional parameters
1794
+ # @return [Array<(GetAirbnbLocation200Response, Integer, Hash)>] GetAirbnbLocation200Response data, response status code and response headers
1795
+ def get_airbnb_location_with_http_info(id, opts = {})
1796
+ if @api_client.config.debugging
1797
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_location ...'
1798
+ end
1799
+ # verify the required parameter 'id' is set
1800
+ if @api_client.config.client_side_validation && id.nil?
1801
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_location"
1802
+ end
1803
+ # resource path
1804
+ local_var_path = '/v1/channels/airbnb/listings/{id}/location'.sub('{id}', CGI.escape(id.to_s))
1805
+
1806
+ # query parameters
1807
+ query_params = opts[:query_params] || {}
1808
+
1809
+ # header parameters
1810
+ header_params = opts[:header_params] || {}
1811
+ # HTTP header 'Accept' (if needed)
1812
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1813
+
1814
+ # form parameters
1815
+ form_params = opts[:form_params] || {}
1816
+
1817
+ # http body (model)
1818
+ post_body = opts[:debug_body]
1819
+
1820
+ # return_type
1821
+ return_type = opts[:debug_return_type] || 'GetAirbnbLocation200Response'
1822
+
1823
+ # auth_names
1824
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1825
+
1826
+ new_options = opts.merge(
1827
+ :operation => :"AirbnbApi.get_airbnb_location",
1828
+ :header_params => header_params,
1829
+ :query_params => query_params,
1830
+ :form_params => form_params,
1831
+ :body => post_body,
1832
+ :auth_names => auth_names,
1833
+ :return_type => return_type
1834
+ )
1835
+
1836
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1837
+ if @api_client.config.debugging
1838
+ @api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1839
+ end
1840
+ return data, status_code, headers
1841
+ end
1842
+
1528
1843
  # Get Airbnb special offer
1529
1844
  # Read a pre-approval or special offer from Airbnb by its Airbnb id. **Live read** — calls Airbnb upstream. Pass the id as `?offerId=`. The Repull-id equivalent is `GET /v1/conversations/{id}/special-offers/{offerId}`, which also confirms the offer belongs to that conversation.
1530
1845
  # @param offer_id [String] Airbnb special-offer id (the &#x60;id&#x60; Airbnb returned when the offer was created).
@@ -2480,7 +2795,7 @@ module Repull
2480
2795
  end
2481
2796
 
2482
2797
  # List Airbnb message threads
2483
- # 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`. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
2798
+ # List Airbnb message threads (one per guest conversation), newest activity first (up to 200). Only Airbnb threads: conversations from other channels are on their own channel routes (`GET /v1/channels/vrbo/messaging`) or `GET /v1/conversations`. 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`. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
2484
2799
  # @param [Hash] opts the optional parameters
2485
2800
  # @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same &#x60;accounts[].externalAccountId&#x60; that &#x60;GET /v1/connect/airbnb&#x60; returns and &#x60;DELETE /v1/connect/airbnb?accountId&#x3D;&#x60; accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account&#39;s rows (the default, unchanged). Every row carries &#x60;accountId&#x60; + &#x60;accountName&#x60; either way, so you can group without a second call. An id that is not connected to THIS workspace returns &#x60;404 not_found&#x60; with your own ids in &#x60;valid_values&#x60; — we do not distinguish \&quot;no such host\&quot; from \&quot;someone else&#39;s host\&quot;, because confirming the latter would leak another workspace&#39;s account. Note this is NOT the &#x60;X-Account-Id&#x60; header, which carries a connection id and cannot tell two Airbnb hosts apart.
2486
2801
  # @return [AirbnbThreadListResponse]
@@ -2490,7 +2805,7 @@ module Repull
2490
2805
  end
2491
2806
 
2492
2807
  # List Airbnb message threads
2493
- # 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;. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account&#39;s rows; pass &#x60;?account_id&#x3D;&lt;airbnb host id&gt;&#x60; to scope to one. Every row carries &#x60;accountId&#x60; + &#x60;accountName&#x60; either way, and &#x60;dataFreshness.accounts[]&#x60; reports each account&#39;s freshness separately, so one disconnected host no longer marks the whole response stale.
2808
+ # List Airbnb message threads (one per guest conversation), newest activity first (up to 200). Only Airbnb threads: conversations from other channels are on their own channel routes (&#x60;GET /v1/channels/vrbo/messaging&#x60;) or &#x60;GET /v1/conversations&#x60;. 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;. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account&#39;s rows; pass &#x60;?account_id&#x3D;&lt;airbnb host id&gt;&#x60; to scope to one. Every row carries &#x60;accountId&#x60; + &#x60;accountName&#x60; either way, and &#x60;dataFreshness.accounts[]&#x60; reports each account&#39;s freshness separately, so one disconnected host no longer marks the whole response stale.
2494
2809
  # @param [Hash] opts the optional parameters
2495
2810
  # @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same &#x60;accounts[].externalAccountId&#x60; that &#x60;GET /v1/connect/airbnb&#x60; returns and &#x60;DELETE /v1/connect/airbnb?accountId&#x3D;&#x60; accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account&#39;s rows (the default, unchanged). Every row carries &#x60;accountId&#x60; + &#x60;accountName&#x60; either way, so you can group without a second call. An id that is not connected to THIS workspace returns &#x60;404 not_found&#x60; with your own ids in &#x60;valid_values&#x60; — we do not distinguish \&quot;no such host\&quot; from \&quot;someone else&#39;s host\&quot;, because confirming the latter would leak another workspace&#39;s account. Note this is NOT the &#x60;X-Account-Id&#x60; header, which carries a connection id and cannot tell two Airbnb hosts apart.
2496
2811
  # @return [Array<(AirbnbThreadListResponse, Integer, Hash)>] AirbnbThreadListResponse data, response status code and response headers
@@ -3271,6 +3586,80 @@ module Repull
3271
3586
  return data, status_code, headers
3272
3587
  end
3273
3588
 
3589
+ # Update Airbnb house rules
3590
+ # Write the house rules text for one language — the same write as `PUT …/descriptions` `{ locale, description: { house_rules } }`, with the same answer (`written`, `blockedFields`). On Airbnb the check-in and check-out times are booking settings: set them with `PUT …/booking-settings`. Whether pets, smoking, events or children are allowed is set in the Airbnb app. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
3591
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
3592
+ # @param update_airbnb_house_rules_request [UpdateAirbnbHouseRulesRequest]
3593
+ # @param [Hash] opts the optional parameters
3594
+ # @return [UpdateAirbnbHouseRules200Response]
3595
+ def update_airbnb_house_rules(id, update_airbnb_house_rules_request, opts = {})
3596
+ data, _status_code, _headers = update_airbnb_house_rules_with_http_info(id, update_airbnb_house_rules_request, opts)
3597
+ data
3598
+ end
3599
+
3600
+ # Update Airbnb house rules
3601
+ # Write the house rules text for one language — the same write as &#x60;PUT …/descriptions&#x60; &#x60;{ locale, description: { house_rules } }&#x60;, with the same answer (&#x60;written&#x60;, &#x60;blockedFields&#x60;). On Airbnb the check-in and check-out times are booking settings: set them with &#x60;PUT …/booking-settings&#x60;. Whether pets, smoking, events or children are allowed is set in the Airbnb app. Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace, and &#x60;403 listing_inactive&#x60; when the listing is inactive.
3602
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
3603
+ # @param update_airbnb_house_rules_request [UpdateAirbnbHouseRulesRequest]
3604
+ # @param [Hash] opts the optional parameters
3605
+ # @return [Array<(UpdateAirbnbHouseRules200Response, Integer, Hash)>] UpdateAirbnbHouseRules200Response data, response status code and response headers
3606
+ def update_airbnb_house_rules_with_http_info(id, update_airbnb_house_rules_request, opts = {})
3607
+ if @api_client.config.debugging
3608
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_house_rules ...'
3609
+ end
3610
+ # verify the required parameter 'id' is set
3611
+ if @api_client.config.client_side_validation && id.nil?
3612
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_house_rules"
3613
+ end
3614
+ # verify the required parameter 'update_airbnb_house_rules_request' is set
3615
+ if @api_client.config.client_side_validation && update_airbnb_house_rules_request.nil?
3616
+ fail ArgumentError, "Missing the required parameter 'update_airbnb_house_rules_request' when calling AirbnbApi.update_airbnb_house_rules"
3617
+ end
3618
+ # resource path
3619
+ local_var_path = '/v1/channels/airbnb/listings/{id}/house-rules'.sub('{id}', CGI.escape(id.to_s))
3620
+
3621
+ # query parameters
3622
+ query_params = opts[:query_params] || {}
3623
+
3624
+ # header parameters
3625
+ header_params = opts[:header_params] || {}
3626
+ # HTTP header 'Accept' (if needed)
3627
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3628
+ # HTTP header 'Content-Type'
3629
+ content_type = @api_client.select_header_content_type(['application/json'])
3630
+ if !content_type.nil?
3631
+ header_params['Content-Type'] = content_type
3632
+ end
3633
+
3634
+ # form parameters
3635
+ form_params = opts[:form_params] || {}
3636
+
3637
+ # http body (model)
3638
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_airbnb_house_rules_request)
3639
+
3640
+ # return_type
3641
+ return_type = opts[:debug_return_type] || 'UpdateAirbnbHouseRules200Response'
3642
+
3643
+ # auth_names
3644
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3645
+
3646
+ new_options = opts.merge(
3647
+ :operation => :"AirbnbApi.update_airbnb_house_rules",
3648
+ :header_params => header_params,
3649
+ :query_params => query_params,
3650
+ :form_params => form_params,
3651
+ :body => post_body,
3652
+ :auth_names => auth_names,
3653
+ :return_type => return_type
3654
+ )
3655
+
3656
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3657
+ if @api_client.config.debugging
3658
+ @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_house_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3659
+ end
3660
+ return data, status_code, headers
3661
+ end
3662
+
3274
3663
  # Update Airbnb amenities
3275
3664
  # Set amenities on an Airbnb listing. **Write-side** — calls Airbnb upstream. **Partial by design**: only the amenities you name change, so turning one off is a one-line body and nothing else on the listing moves. Ids are the `id` values `GET /amenities` returns (e.g. `wireless_internet`, `ac`, `kitchen`); case is ignored. Airbnb refuses ids outside its vocabulary — that comes back as `422 airbnb_rejected` carrying Airbnb's own message. `accessibility_amenities` go to Airbnb's separate accessibility resource, which has **no read side at all** — Airbnb offers no endpoint to fetch them back, and the combined amenities GET 404s on production listings. What you can read back is our own copy: this endpoint updates it on success, and `GET /amenities` returns it under `accessibilityAmenities`. Airbnb may also hold an accessibility claim for review until photo evidence is attached; pass `photo_ids` to supply it. Our Airbnb copy is updated on success so a read straight after this write returns the new values. The platform-neutral copy behind `GET /v1/listings/{id}?include=amenities` uses a different amenity vocabulary and is refreshed by the next sync, except where an id happens to be identical in both. 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.
3276
3665
  # @param id [String] Repull listing id (numeric string).
@@ -3419,6 +3808,80 @@ module Repull
3419
3808
  return data, status_code, headers
3420
3809
  end
3421
3810
 
3811
+ # Update the Airbnb cancellation policy
3812
+ # Set any of `shortStayPolicy`, `longStayPolicy`, `nonRefundable` (`{ enabled, discountPercent }`, 0–30%). The same write as `PUT …/booking-settings` `{ \"cancellation\": … }`; the answer is the policy Airbnb holds after it. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
3813
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
3814
+ # @param update_airbnb_listing_cancellation_request [UpdateAirbnbListingCancellationRequest]
3815
+ # @param [Hash] opts the optional parameters
3816
+ # @return [UpdateAirbnbListingCancellation200Response]
3817
+ def update_airbnb_listing_cancellation(id, update_airbnb_listing_cancellation_request, opts = {})
3818
+ data, _status_code, _headers = update_airbnb_listing_cancellation_with_http_info(id, update_airbnb_listing_cancellation_request, opts)
3819
+ data
3820
+ end
3821
+
3822
+ # Update the Airbnb cancellation policy
3823
+ # Set any of &#x60;shortStayPolicy&#x60;, &#x60;longStayPolicy&#x60;, &#x60;nonRefundable&#x60; (&#x60;{ enabled, discountPercent }&#x60;, 0–30%). The same write as &#x60;PUT …/booking-settings&#x60; &#x60;{ \&quot;cancellation\&quot;: … }&#x60;; the answer is the policy Airbnb holds after it. Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace, and &#x60;403 listing_inactive&#x60; when the listing is inactive.
3824
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
3825
+ # @param update_airbnb_listing_cancellation_request [UpdateAirbnbListingCancellationRequest]
3826
+ # @param [Hash] opts the optional parameters
3827
+ # @return [Array<(UpdateAirbnbListingCancellation200Response, Integer, Hash)>] UpdateAirbnbListingCancellation200Response data, response status code and response headers
3828
+ def update_airbnb_listing_cancellation_with_http_info(id, update_airbnb_listing_cancellation_request, opts = {})
3829
+ if @api_client.config.debugging
3830
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_cancellation ...'
3831
+ end
3832
+ # verify the required parameter 'id' is set
3833
+ if @api_client.config.client_side_validation && id.nil?
3834
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_cancellation"
3835
+ end
3836
+ # verify the required parameter 'update_airbnb_listing_cancellation_request' is set
3837
+ if @api_client.config.client_side_validation && update_airbnb_listing_cancellation_request.nil?
3838
+ fail ArgumentError, "Missing the required parameter 'update_airbnb_listing_cancellation_request' when calling AirbnbApi.update_airbnb_listing_cancellation"
3839
+ end
3840
+ # resource path
3841
+ local_var_path = '/v1/channels/airbnb/listings/{id}/cancellation'.sub('{id}', CGI.escape(id.to_s))
3842
+
3843
+ # query parameters
3844
+ query_params = opts[:query_params] || {}
3845
+
3846
+ # header parameters
3847
+ header_params = opts[:header_params] || {}
3848
+ # HTTP header 'Accept' (if needed)
3849
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3850
+ # HTTP header 'Content-Type'
3851
+ content_type = @api_client.select_header_content_type(['application/json'])
3852
+ if !content_type.nil?
3853
+ header_params['Content-Type'] = content_type
3854
+ end
3855
+
3856
+ # form parameters
3857
+ form_params = opts[:form_params] || {}
3858
+
3859
+ # http body (model)
3860
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_airbnb_listing_cancellation_request)
3861
+
3862
+ # return_type
3863
+ return_type = opts[:debug_return_type] || 'UpdateAirbnbListingCancellation200Response'
3864
+
3865
+ # auth_names
3866
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3867
+
3868
+ new_options = opts.merge(
3869
+ :operation => :"AirbnbApi.update_airbnb_listing_cancellation",
3870
+ :header_params => header_params,
3871
+ :query_params => query_params,
3872
+ :form_params => form_params,
3873
+ :body => post_body,
3874
+ :auth_names => auth_names,
3875
+ :return_type => return_type
3876
+ )
3877
+
3878
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3879
+ if @api_client.config.debugging
3880
+ @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_cancellation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3881
+ end
3882
+ return data, status_code, headers
3883
+ end
3884
+
3422
3885
  # Update an Airbnb description for one locale
3423
3886
  # Write one locale's copy to the live Airbnb listing. Airbnb keeps a SEPARATE description per locale (`PUT /v2/listing_descriptions/{listingId}/{locale}`), which is why `locale` is part of the request and not a guess: a listing can carry twelve of them, and writing Italian copy into the English row is how a translation gets lost. Only the fields you send are written; Airbnb keeps the rest. `GET /v1/channels/airbnb/listings/{id}/settings?type=locales` lists the locales already synced for the listing. `description` is not an accepted field: Airbnb composes the public description from the sections (`summary`, `space`, `access`, …) and ignores a directly-supplied one. **A 200 does not by itself mean the change was applied.** On an established listing Airbnb LOCKS host-managed description fields — the write returns 200, reports them as locked, and applies nothing for them. The response reports `blockedFields`: the fields YOU sent that Airbnb dropped. `blockedFields: []` is what a landed write looks like; a non-empty list is still a 200 (the other fields really were written) with a `message` naming what was not. Reporting that as a clean success is the bug behind \"the description does not push to Airbnb\". This writes to AIRBNB. To write Repull's own canonical copy — the content a later publish distributes — use `PUT /v1/listings/{id}/content` with `locale`. Send `Idempotency-Key` to make a retry safe. Returns `403 listing_inactive` when the listing is inactive.
3424
3887
  # @param id [String] Repull listing id (numeric string).
@@ -3581,6 +4044,80 @@ module Repull
3581
4044
  return data, status_code, headers
3582
4045
  end
3583
4046
 
4047
+ # Update Airbnb fees
4048
+ # Set Airbnb fees by type: each fee you send replaces that type, the others are kept. The same write as `PUT …/pricing` `{ \"type\": \"fees\", \"fees\": […] }`; `amount: null` removes a fee. `fee_type` is Airbnb's (`PASS_THROUGH_CLEANING_FEE`, `PASS_THROUGH_PET_FEE`, `PASS_THROUGH_SHORT_TERM_CLEANING_FEE`, …). Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
4049
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
4050
+ # @param update_airbnb_listing_fees_request [UpdateAirbnbListingFeesRequest]
4051
+ # @param [Hash] opts the optional parameters
4052
+ # @return [UpdateAirbnbListingFees200Response]
4053
+ def update_airbnb_listing_fees(id, update_airbnb_listing_fees_request, opts = {})
4054
+ data, _status_code, _headers = update_airbnb_listing_fees_with_http_info(id, update_airbnb_listing_fees_request, opts)
4055
+ data
4056
+ end
4057
+
4058
+ # Update Airbnb fees
4059
+ # Set Airbnb fees by type: each fee you send replaces that type, the others are kept. The same write as &#x60;PUT …/pricing&#x60; &#x60;{ \&quot;type\&quot;: \&quot;fees\&quot;, \&quot;fees\&quot;: […] }&#x60;; &#x60;amount: null&#x60; removes a fee. &#x60;fee_type&#x60; is Airbnb&#39;s (&#x60;PASS_THROUGH_CLEANING_FEE&#x60;, &#x60;PASS_THROUGH_PET_FEE&#x60;, &#x60;PASS_THROUGH_SHORT_TERM_CLEANING_FEE&#x60;, …). Returns &#x60;404&#x60; when the listing has no Airbnb connection in this workspace, and &#x60;403 listing_inactive&#x60; when the listing is inactive.
4060
+ # @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
4061
+ # @param update_airbnb_listing_fees_request [UpdateAirbnbListingFeesRequest]
4062
+ # @param [Hash] opts the optional parameters
4063
+ # @return [Array<(UpdateAirbnbListingFees200Response, Integer, Hash)>] UpdateAirbnbListingFees200Response data, response status code and response headers
4064
+ def update_airbnb_listing_fees_with_http_info(id, update_airbnb_listing_fees_request, opts = {})
4065
+ if @api_client.config.debugging
4066
+ @api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_fees ...'
4067
+ end
4068
+ # verify the required parameter 'id' is set
4069
+ if @api_client.config.client_side_validation && id.nil?
4070
+ fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_fees"
4071
+ end
4072
+ # verify the required parameter 'update_airbnb_listing_fees_request' is set
4073
+ if @api_client.config.client_side_validation && update_airbnb_listing_fees_request.nil?
4074
+ fail ArgumentError, "Missing the required parameter 'update_airbnb_listing_fees_request' when calling AirbnbApi.update_airbnb_listing_fees"
4075
+ end
4076
+ # resource path
4077
+ local_var_path = '/v1/channels/airbnb/listings/{id}/fees'.sub('{id}', CGI.escape(id.to_s))
4078
+
4079
+ # query parameters
4080
+ query_params = opts[:query_params] || {}
4081
+
4082
+ # header parameters
4083
+ header_params = opts[:header_params] || {}
4084
+ # HTTP header 'Accept' (if needed)
4085
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
4086
+ # HTTP header 'Content-Type'
4087
+ content_type = @api_client.select_header_content_type(['application/json'])
4088
+ if !content_type.nil?
4089
+ header_params['Content-Type'] = content_type
4090
+ end
4091
+
4092
+ # form parameters
4093
+ form_params = opts[:form_params] || {}
4094
+
4095
+ # http body (model)
4096
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_airbnb_listing_fees_request)
4097
+
4098
+ # return_type
4099
+ return_type = opts[:debug_return_type] || 'UpdateAirbnbListingFees200Response'
4100
+
4101
+ # auth_names
4102
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
4103
+
4104
+ new_options = opts.merge(
4105
+ :operation => :"AirbnbApi.update_airbnb_listing_fees",
4106
+ :header_params => header_params,
4107
+ :query_params => query_params,
4108
+ :form_params => form_params,
4109
+ :body => post_body,
4110
+ :auth_names => auth_names,
4111
+ :return_type => return_type
4112
+ )
4113
+
4114
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
4115
+ if @api_client.config.debugging
4116
+ @api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_fees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4117
+ end
4118
+ return data, status_code, headers
4119
+ end
4120
+
3584
4121
  # Answer Airbnb permit questions
3585
4122
  # Answer the regulatory permit questions for a listing — the licence or registration number a city requires to keep the listing up. Read the questions first with `GET …/permits?source=live`. For each permit, pick one of its `flows[]` and send its `slug` as `flow_slug`; key every answer by the question's `answer_key`, and let the question's `type` decide the value field — `<type>_value`: `text_value`, `attestation_value`, `radio_value`, `dropdown_value`, `email_value`, `future_date_value`, `file_upload_value`, and so on. Answers are forwarded verbatim — nothing is defaulted or inferred, because a wrong licence number can take a listing down in a regulated city. Send `Idempotency-Key`: a timeout here leaves you unable to tell \"never arrived\" from \"arrived, response lost\", and this is a compliance filing. Airbnb refusing the answers (an unknown `answer_key`, a malformed licence number) is `422 airbnb_rejected` carrying Airbnb's own reason. An expired or revoked Airbnb connection is `403 connection_reauth_required`. **Changing and removing answers.** Airbnb has no call that deletes or withdraws a submitted registration, so neither does Repull, and at least one permit is required. To change an answer Airbnb marks `answer_editable`, submit the flow again with the new answers — the latest submission replaces the previous one. When a submission fails with status `failed_recoverable`, fix it and submit again; `failed` cannot be resubmitted. Hosts can also manage this at airbnb.com/verify-listing/{listing_id}.
3586
4123
  # @param id [String] Repull listing id (numeric string).