repull 0.2.56 → 0.2.58
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.
- checksums.yaml +4 -4
- data/lib/repull/api/airbnb_api.rb +539 -2
- data/lib/repull/api/connect_api.rb +139 -8
- data/lib/repull/api/listings_api.rb +70 -0
- data/lib/repull/api/vrbo_api.rb +706 -0
- data/lib/repull/models/app_connection_health.rb +301 -0
- data/lib/repull/models/app_connection_health_recent_errors_inner.rb +184 -0
- data/lib/repull/models/app_connection_health_writes_per_day_inner.rb +156 -0
- data/lib/repull/models/connect_provider.rb +2 -2
- data/lib/repull/models/connect_status.rb +1 -1
- data/lib/repull/models/connection.rb +81 -5
- data/lib/repull/models/create_connection_request.rb +10 -1
- data/lib/repull/models/create_connection_request_workspace.rb +203 -0
- data/lib/repull/models/create_price_labs_key201_response.rb +399 -0
- data/lib/repull/models/create_price_labs_key201_response_all_of_instructions.rb +159 -0
- data/lib/repull/models/create_price_labs_key_request.rb +207 -0
- data/lib/repull/models/create_vrbo_offer201_response.rb +104 -0
- data/lib/repull/models/create_vrbo_offer201_response_one_of.rb +175 -0
- data/lib/repull/models/create_vrbo_offer_request.rb +320 -0
- data/lib/repull/models/create_vrbo_offer_request_fees_inner.rb +199 -0
- data/lib/repull/models/create_vrbo_offer_request_guest_details.rb +278 -0
- data/lib/repull/models/get_airbnb_house_rules200_response.rb +190 -0
- data/lib/repull/models/get_airbnb_house_rules200_response_data.rb +247 -0
- data/lib/repull/models/get_airbnb_house_rules200_response_data_children.rb +148 -0
- data/lib/repull/models/get_airbnb_house_rules200_response_data_house_rules_inner.rb +168 -0
- data/lib/repull/models/get_airbnb_listing_cancellation200_response.rb +190 -0
- data/lib/repull/models/get_airbnb_listing_cancellation200_response_data.rb +203 -0
- data/lib/repull/models/get_airbnb_listing_cancellation200_response_data_non_refundable.rb +192 -0
- data/lib/repull/models/get_airbnb_listing_fees200_response.rb +192 -0
- data/lib/repull/models/get_airbnb_listing_fees200_response_data_inner.rb +251 -0
- data/lib/repull/models/get_airbnb_listing_taxes200_response.rb +192 -0
- data/lib/repull/models/get_airbnb_listing_taxes200_response_data_inner.rb +181 -0
- data/lib/repull/models/get_airbnb_location200_response.rb +190 -0
- data/lib/repull/models/get_airbnb_location200_response_data.rb +197 -0
- data/lib/repull/models/get_airbnb_location200_response_data_address.rb +198 -0
- data/lib/repull/models/get_price_labs_session_status200_response.rb +192 -0
- data/lib/repull/models/get_vrbo_listing200_response_data_inner.rb +1 -1
- data/lib/repull/models/get_vrbo_listing_settings200_response.rb +217 -0
- data/lib/repull/models/get_vrbo_listing_settings200_response_data.rb +106 -0
- data/lib/repull/models/get_vrbo_listing_settings200_response_data_one_of.rb +149 -0
- data/lib/repull/models/get_vrbo_offer200_response.rb +290 -0
- data/lib/repull/models/get_vrbo_offer200_response_fees_inner.rb +166 -0
- data/lib/repull/models/get_vrbo_thread200_response.rb +159 -0
- data/lib/repull/models/list_vrbo_thread_messages200_response.rb +170 -0
- data/lib/repull/models/list_vrbo_thread_messages200_response_data_inner.rb +240 -0
- data/lib/repull/models/list_vrbo_threads200_response.rb +172 -0
- data/lib/repull/models/list_vrbo_threads200_response_data_inner.rb +219 -0
- data/lib/repull/models/map_vrbo_listing_request.rb +1 -1
- data/lib/repull/models/pull_listing_from_vrbo200_response.rb +273 -0
- data/lib/repull/models/pull_listing_from_vrbo_request.rb +149 -0
- data/lib/repull/models/send_vrbo_message_request.rb +186 -0
- data/lib/repull/models/submit_vrbo_guest_review200_response.rb +176 -0
- data/lib/repull/models/submit_vrbo_guest_review_request.rb +195 -0
- data/lib/repull/models/submit_vrbo_guest_review_request_category_ratings_inner.rb +218 -0
- data/lib/repull/models/update_airbnb_house_rules200_response.rb +187 -0
- data/lib/repull/models/update_airbnb_house_rules_request.rb +191 -0
- data/lib/repull/models/update_airbnb_listing_cancellation200_response.rb +147 -0
- data/lib/repull/models/update_airbnb_listing_cancellation200_response_data.rb +158 -0
- data/lib/repull/models/update_airbnb_listing_cancellation_request.rb +201 -0
- data/lib/repull/models/update_airbnb_listing_cancellation_request_non_refundable.rb +182 -0
- data/lib/repull/models/update_airbnb_listing_fees200_response.rb +150 -0
- data/lib/repull/models/update_airbnb_listing_fees_request.rb +175 -0
- data/lib/repull/models/vrbo_login200_response.rb +2 -2
- data/lib/repull/models/vrbo_login_request.rb +13 -3
- data/lib/repull/models/withdraw_vrbo_offer200_response.rb +165 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +52 -0
- data/openapi/v1.json +3348 -201
- metadata +54 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 51f868d8a2397d51c596535c39c69c72ccfe941fd3e8ea5918771b9b2d694d87
|
|
4
|
+
data.tar.gz: aff8905b78d11073fb4280b224b6d021ae4fefb7f6ab36e9821d1893a2ab83ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00001265004ef575a17f126bd7354ebc9b52dc662578efd03d1a62fe647300cdca6f95c4bf4f0e108e5a655a5ae54463fdf2e53c6a06ec72639ddf1098cc5417
|
|
7
|
+
data.tar.gz: 9349b5d24c13864a6824c0f23ae97583aa2fc8883c8a5f470c3f1a0d21e0faff384f97f858c7a926e7dba890d5197b4e61bc3e15b8bf22e8a8ffdb0b2e94d816
|
|
@@ -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 `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.
|
|
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'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.
|
|
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'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.
|
|
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'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.
|
|
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 `id` 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)
|
|
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 `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` 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)
|
|
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 (`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.
|
|
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 `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` 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 `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.
|
|
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 `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.
|
|
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 `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.
|
|
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).
|