repull 0.2.8 → 0.2.9
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 +116 -129
- data/lib/repull/api/billing_api.rb +0 -55
- data/lib/repull/api/booking_com_api.rb +19 -118
- data/lib/repull/api/listings_api.rb +74 -0
- data/lib/repull/api/reservations_api.rb +0 -197
- data/lib/repull/api/{availability_api.rb → sandbox_api.rb} +35 -66
- data/lib/repull/api/vrbo_api.rb +0 -126
- data/lib/repull/models/{create_studio_project_request.rb → airbnb_availability_write_request.rb} +38 -52
- data/lib/repull/models/{create_studio_deployment201_response_data.rb → airbnb_calendar_operation.rb} +108 -57
- data/lib/repull/models/{update_studio_project_request.rb → airbnb_listing_action_request.rb} +55 -47
- data/lib/repull/models/{update_availability_request.rb → airbnb_pricing_write_request.rb} +100 -11
- data/lib/repull/models/{update_reservation_request.rb → booking_availability_update.rb} +124 -22
- data/lib/repull/models/{list_studio_deployments200_response.rb → booking_availability_update_request.rb} +90 -18
- data/lib/repull/models/{generate_studio_completion_request_project_id.rb → booking_availability_update_request_property_id.rb} +2 -2
- data/lib/repull/models/{get_studio_deployment200_response.rb → booking_availability_update_request_updates_inner.rb} +74 -117
- data/lib/repull/models/booking_pricing_rate_update.rb +1 -0
- data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +65 -6
- data/lib/repull/models/{get_studio_project200_response.rb → listing_content_update_request.rb} +106 -10
- data/lib/repull/models/{upsert_studio_project_file200_response.rb → listing_content_update_request_address.rb} +53 -10
- data/lib/repull/models/listing_content_update_request_amenities.rb +105 -0
- data/lib/repull/models/{create_studio_deployment_request.rb → listing_content_update_request_amenities_one_of_inner.rb} +51 -20
- data/lib/repull/models/{create_studio_project_generation_request.rb → listing_content_update_request_occupancy.rb} +42 -28
- data/lib/repull/{api/ai_api.rb → models/listing_content_update_request_photos_inner.rb} +77 -59
- data/lib/repull/models/{generate_studio_completion200_response_data.rb → listing_content_update_request_photos_inner_one_of.rb} +81 -66
- data/lib/repull/models/{generate_studio_completion200_response.rb → listing_content_update_request_policies.rb} +116 -10
- data/lib/repull/models/{delete_studio_project200_response_data.rb → listing_content_update_response.rb} +26 -10
- data/lib/repull/models/map_airbnb_listing_request.rb +215 -0
- data/lib/repull/models/{create_reservation_request.rb → map_airbnb_listing_response.rb} +137 -116
- data/lib/repull/models/property.rb +42 -69
- data/lib/repull/models/reservation.rb +28 -1
- data/lib/repull/models/{upsert_studio_project_file_request.rb → sandbox_fixture_ref.rb} +48 -20
- data/lib/repull/models/{delete_studio_deployment200_response_data.rb → sandbox_reset_result.rb} +72 -11
- data/lib/repull/models/sandbox_reset_result_deleted.rb +216 -0
- data/lib/repull/models/sandbox_seed_result.rb +278 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +24 -35
- data/openapi/v1.json +1167 -2030
- metadata +26 -37
- data/lib/repull/api/studio_api.rb +0 -1094
- data/lib/repull/models/create_ai_operation200_response.rb +0 -156
- data/lib/repull/models/create_studio_deployment201_response.rb +0 -147
- data/lib/repull/models/create_studio_project201_response.rb +0 -147
- data/lib/repull/models/create_studio_project201_response_data.rb +0 -199
- data/lib/repull/models/create_studio_project_generation201_response.rb +0 -147
- data/lib/repull/models/create_studio_project_generation201_response_data.rb +0 -165
- data/lib/repull/models/delete_studio_deployment200_response.rb +0 -147
- data/lib/repull/models/delete_studio_project200_response.rb +0 -147
- data/lib/repull/models/delete_studio_project_file200_response.rb +0 -147
- data/lib/repull/models/delete_studio_project_file200_response_data.rb +0 -156
- data/lib/repull/models/generate_studio_completion_request.rb +0 -305
- data/lib/repull/models/list_studio_project_files200_response.rb +0 -149
- data/lib/repull/models/list_studio_projects200_response.rb +0 -149
- data/lib/repull/models/upsert_studio_project_file200_response_data.rb +0 -147
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5a9c9093f7135eb3837ed3df58d351a65a81d6514335bf0bf8aaad034f7a1bd
|
|
4
|
+
data.tar.gz: b21581271dc40c44f0c0634120b9fd4494ccad184b6892119c9219a426095181
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d0587b8990f6170058fb1143b0171798cee901a84f98223fd83676c9c20a877649c2685c85cd384a6428edee0c763d4f2b6441cffde79e0b48d681a7e0741a3
|
|
7
|
+
data.tar.gz: '09c9692f5218ef24bae4009c4eac92f1c7e5853c531093dffa516b7861fbcf160c7c35e1a7bea01c9ae9b1141e053b167b4cec3a0fb007ba3b400b552b875ca0'
|
|
@@ -19,20 +19,22 @@ module Repull
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Listing action (delete/push/publish
|
|
23
|
-
# Apply a state action to a listing by id. `delete` is
|
|
22
|
+
# Listing action (delete/push/publish)
|
|
23
|
+
# Apply a state action to a listing by id. The path `id` is the canonical Repull listing id. `delete` is a **deactivate of the Repull record only** — it sets the listing inactive and KEEPS the row; it does NOT touch the upstream Airbnb listing (Repull never deletes or deactivates on Airbnb's side). Use it to exclude a listing / trim back under the plan-listings cap; reactivate via `PATCH /v1/listings/{id}` with `{ \"active\": true }`. Idempotent. `push` / `publish` push the listing's content to Airbnb via the same host-side sync orchestrator as `POST /v1/listings/{id}/publish/airbnb` — pass `airbnbConnectionId` to update an already-mapped Airbnb listing, or `hostId` to create + publish a new one under that host. `force` re-pushes every field, ignoring dirty-field tracking. Any other action (e.g. `pull`, `unlist`) returns a structured 422 naming the supported actions.
|
|
24
24
|
# @param id [String]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [AirbnbListingActionRequest] :airbnb_listing_action_request
|
|
26
27
|
# @return [nil]
|
|
27
28
|
def airbnb_listing_action(id, opts = {})
|
|
28
29
|
airbnb_listing_action_with_http_info(id, opts)
|
|
29
30
|
nil
|
|
30
31
|
end
|
|
31
32
|
|
|
32
|
-
# Listing action (delete/push/publish
|
|
33
|
-
# Apply a state action to a listing by id. `delete` is
|
|
33
|
+
# Listing action (delete/push/publish)
|
|
34
|
+
# Apply a state action to a listing by id. The path `id` is the canonical Repull listing id. `delete` is a **deactivate of the Repull record only** — it sets the listing inactive and KEEPS the row; it does NOT touch the upstream Airbnb listing (Repull never deletes or deactivates on Airbnb's side). Use it to exclude a listing / trim back under the plan-listings cap; reactivate via `PATCH /v1/listings/{id}` with `{ \"active\": true }`. Idempotent. `push` / `publish` push the listing's content to Airbnb via the same host-side sync orchestrator as `POST /v1/listings/{id}/publish/airbnb` — pass `airbnbConnectionId` to update an already-mapped Airbnb listing, or `hostId` to create + publish a new one under that host. `force` re-pushes every field, ignoring dirty-field tracking. Any other action (e.g. `pull`, `unlist`) returns a structured 422 naming the supported actions.
|
|
34
35
|
# @param id [String]
|
|
35
36
|
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [AirbnbListingActionRequest] :airbnb_listing_action_request
|
|
36
38
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
39
|
def airbnb_listing_action_with_http_info(id, opts = {})
|
|
38
40
|
if @api_client.config.debugging
|
|
@@ -50,12 +52,19 @@ module Repull
|
|
|
50
52
|
|
|
51
53
|
# header parameters
|
|
52
54
|
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
57
|
+
# HTTP header 'Content-Type'
|
|
58
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
59
|
+
if !content_type.nil?
|
|
60
|
+
header_params['Content-Type'] = content_type
|
|
61
|
+
end
|
|
53
62
|
|
|
54
63
|
# form parameters
|
|
55
64
|
form_params = opts[:form_params] || {}
|
|
56
65
|
|
|
57
66
|
# http body (model)
|
|
58
|
-
post_body = opts[:debug_body]
|
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'airbnb_listing_action_request'])
|
|
59
68
|
|
|
60
69
|
# return_type
|
|
61
70
|
return_type = opts[:debug_return_type]
|
|
@@ -141,63 +150,6 @@ module Repull
|
|
|
141
150
|
return data, status_code, headers
|
|
142
151
|
end
|
|
143
152
|
|
|
144
|
-
# Create/push Airbnb listing
|
|
145
|
-
# Create a new Airbnb listing or push an existing Repull listing to Airbnb. Requires a connected Airbnb account. Returns the created listing id; publishing happens via the listing-action endpoint.
|
|
146
|
-
# @param [Hash] opts the optional parameters
|
|
147
|
-
# @return [AirbnbListing]
|
|
148
|
-
def create_airbnb_listing(opts = {})
|
|
149
|
-
data, _status_code, _headers = create_airbnb_listing_with_http_info(opts)
|
|
150
|
-
data
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
# Create/push Airbnb listing
|
|
154
|
-
# Create a new Airbnb listing or push an existing Repull listing to Airbnb. Requires a connected Airbnb account. Returns the created listing id; publishing happens via the listing-action endpoint.
|
|
155
|
-
# @param [Hash] opts the optional parameters
|
|
156
|
-
# @return [Array<(AirbnbListing, Integer, Hash)>] AirbnbListing data, response status code and response headers
|
|
157
|
-
def create_airbnb_listing_with_http_info(opts = {})
|
|
158
|
-
if @api_client.config.debugging
|
|
159
|
-
@api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_listing ...'
|
|
160
|
-
end
|
|
161
|
-
# resource path
|
|
162
|
-
local_var_path = '/v1/channels/airbnb/listings'
|
|
163
|
-
|
|
164
|
-
# query parameters
|
|
165
|
-
query_params = opts[:query_params] || {}
|
|
166
|
-
|
|
167
|
-
# header parameters
|
|
168
|
-
header_params = opts[:header_params] || {}
|
|
169
|
-
# HTTP header 'Accept' (if needed)
|
|
170
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
171
|
-
|
|
172
|
-
# form parameters
|
|
173
|
-
form_params = opts[:form_params] || {}
|
|
174
|
-
|
|
175
|
-
# http body (model)
|
|
176
|
-
post_body = opts[:debug_body]
|
|
177
|
-
|
|
178
|
-
# return_type
|
|
179
|
-
return_type = opts[:debug_return_type] || 'AirbnbListing'
|
|
180
|
-
|
|
181
|
-
# auth_names
|
|
182
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
183
|
-
|
|
184
|
-
new_options = opts.merge(
|
|
185
|
-
:operation => :"AirbnbApi.create_airbnb_listing",
|
|
186
|
-
:header_params => header_params,
|
|
187
|
-
:query_params => query_params,
|
|
188
|
-
:form_params => form_params,
|
|
189
|
-
:body => post_body,
|
|
190
|
-
:auth_names => auth_names,
|
|
191
|
-
:return_type => return_type
|
|
192
|
-
)
|
|
193
|
-
|
|
194
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
195
|
-
if @api_client.config.debugging
|
|
196
|
-
@api_client.config.logger.debug "API called: AirbnbApi#create_airbnb_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
197
|
-
end
|
|
198
|
-
return data, status_code, headers
|
|
199
|
-
end
|
|
200
|
-
|
|
201
153
|
# Edit Airbnb host review
|
|
202
154
|
# Edit a host-side review for an Airbnb stay. Airbnb collapses POST + PUT into the same upstream call (`PUT /v2/listing_reviews/{id}`), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial `AirbnbReview` — pass the fields you want to change (rating, public review, private feedback, category ratings).
|
|
203
155
|
# @param id [String] Airbnb review id (`HRabc123` style).
|
|
@@ -979,6 +931,74 @@ module Repull
|
|
|
979
931
|
return data, status_code, headers
|
|
980
932
|
end
|
|
981
933
|
|
|
934
|
+
# Map an Airbnb listing to a Repull listing
|
|
935
|
+
# Link an existing Airbnb listing to a canonical Repull listing/property. **API-key-scoped** (unlike the Booking room mapping, which is Connect-session-scoped). Discover the `airbnbId` (+ `hostId`) via `GET /v1/channels/airbnb/listings`, then re-point it at the `listingId` of your choice — the dedup / consolidation case where the Airbnb sync auto-created its own listing but you want the inventory under an existing property. Repoints both the Airbnb record and its platform link to the target listing in one transaction. Idempotent — re-mapping to the same listing is a 200 no-op (`alreadyMapped: true`). Scope is enforced against your workspace on both the target listing and the existing Airbnb record; a listing that already links a different Airbnb listing returns 409.
|
|
936
|
+
# @param map_airbnb_listing_request [MapAirbnbListingRequest]
|
|
937
|
+
# @param [Hash] opts the optional parameters
|
|
938
|
+
# @return [MapAirbnbListingResponse]
|
|
939
|
+
def map_airbnb_listing(map_airbnb_listing_request, opts = {})
|
|
940
|
+
data, _status_code, _headers = map_airbnb_listing_with_http_info(map_airbnb_listing_request, opts)
|
|
941
|
+
data
|
|
942
|
+
end
|
|
943
|
+
|
|
944
|
+
# Map an Airbnb listing to a Repull listing
|
|
945
|
+
# Link an existing Airbnb listing to a canonical Repull listing/property. **API-key-scoped** (unlike the Booking room mapping, which is Connect-session-scoped). Discover the `airbnbId` (+ `hostId`) via `GET /v1/channels/airbnb/listings`, then re-point it at the `listingId` of your choice — the dedup / consolidation case where the Airbnb sync auto-created its own listing but you want the inventory under an existing property. Repoints both the Airbnb record and its platform link to the target listing in one transaction. Idempotent — re-mapping to the same listing is a 200 no-op (`alreadyMapped: true`). Scope is enforced against your workspace on both the target listing and the existing Airbnb record; a listing that already links a different Airbnb listing returns 409.
|
|
946
|
+
# @param map_airbnb_listing_request [MapAirbnbListingRequest]
|
|
947
|
+
# @param [Hash] opts the optional parameters
|
|
948
|
+
# @return [Array<(MapAirbnbListingResponse, Integer, Hash)>] MapAirbnbListingResponse data, response status code and response headers
|
|
949
|
+
def map_airbnb_listing_with_http_info(map_airbnb_listing_request, opts = {})
|
|
950
|
+
if @api_client.config.debugging
|
|
951
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.map_airbnb_listing ...'
|
|
952
|
+
end
|
|
953
|
+
# verify the required parameter 'map_airbnb_listing_request' is set
|
|
954
|
+
if @api_client.config.client_side_validation && map_airbnb_listing_request.nil?
|
|
955
|
+
fail ArgumentError, "Missing the required parameter 'map_airbnb_listing_request' when calling AirbnbApi.map_airbnb_listing"
|
|
956
|
+
end
|
|
957
|
+
# resource path
|
|
958
|
+
local_var_path = '/v1/channels/airbnb/listings/map'
|
|
959
|
+
|
|
960
|
+
# query parameters
|
|
961
|
+
query_params = opts[:query_params] || {}
|
|
962
|
+
|
|
963
|
+
# header parameters
|
|
964
|
+
header_params = opts[:header_params] || {}
|
|
965
|
+
# HTTP header 'Accept' (if needed)
|
|
966
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
967
|
+
# HTTP header 'Content-Type'
|
|
968
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
969
|
+
if !content_type.nil?
|
|
970
|
+
header_params['Content-Type'] = content_type
|
|
971
|
+
end
|
|
972
|
+
|
|
973
|
+
# form parameters
|
|
974
|
+
form_params = opts[:form_params] || {}
|
|
975
|
+
|
|
976
|
+
# http body (model)
|
|
977
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(map_airbnb_listing_request)
|
|
978
|
+
|
|
979
|
+
# return_type
|
|
980
|
+
return_type = opts[:debug_return_type] || 'MapAirbnbListingResponse'
|
|
981
|
+
|
|
982
|
+
# auth_names
|
|
983
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
984
|
+
|
|
985
|
+
new_options = opts.merge(
|
|
986
|
+
:operation => :"AirbnbApi.map_airbnb_listing",
|
|
987
|
+
:header_params => header_params,
|
|
988
|
+
:query_params => query_params,
|
|
989
|
+
:form_params => form_params,
|
|
990
|
+
:body => post_body,
|
|
991
|
+
:auth_names => auth_names,
|
|
992
|
+
:return_type => return_type
|
|
993
|
+
)
|
|
994
|
+
|
|
995
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
996
|
+
if @api_client.config.debugging
|
|
997
|
+
@api_client.config.logger.debug "API called: AirbnbApi#map_airbnb_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
998
|
+
end
|
|
999
|
+
return data, status_code, headers
|
|
1000
|
+
end
|
|
1001
|
+
|
|
982
1002
|
# Respond to Airbnb review
|
|
983
1003
|
# Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters.
|
|
984
1004
|
# @param id [String] Airbnb review id.
|
|
@@ -1169,77 +1189,24 @@ module Repull
|
|
|
1169
1189
|
return data, status_code, headers
|
|
1170
1190
|
end
|
|
1171
1191
|
|
|
1172
|
-
# Bulk sync to Airbnb
|
|
1173
|
-
# Push all property data to Airbnb in one call.
|
|
1174
|
-
# @param [Hash] opts the optional parameters
|
|
1175
|
-
# @return [nil]
|
|
1176
|
-
def sync_airbnb(opts = {})
|
|
1177
|
-
sync_airbnb_with_http_info(opts)
|
|
1178
|
-
nil
|
|
1179
|
-
end
|
|
1180
|
-
|
|
1181
|
-
# Bulk sync to Airbnb
|
|
1182
|
-
# Push all property data to Airbnb in one call.
|
|
1183
|
-
# @param [Hash] opts the optional parameters
|
|
1184
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1185
|
-
def sync_airbnb_with_http_info(opts = {})
|
|
1186
|
-
if @api_client.config.debugging
|
|
1187
|
-
@api_client.config.logger.debug 'Calling API: AirbnbApi.sync_airbnb ...'
|
|
1188
|
-
end
|
|
1189
|
-
# resource path
|
|
1190
|
-
local_var_path = '/v1/channels/airbnb/sync'
|
|
1191
|
-
|
|
1192
|
-
# query parameters
|
|
1193
|
-
query_params = opts[:query_params] || {}
|
|
1194
|
-
|
|
1195
|
-
# header parameters
|
|
1196
|
-
header_params = opts[:header_params] || {}
|
|
1197
|
-
|
|
1198
|
-
# form parameters
|
|
1199
|
-
form_params = opts[:form_params] || {}
|
|
1200
|
-
|
|
1201
|
-
# http body (model)
|
|
1202
|
-
post_body = opts[:debug_body]
|
|
1203
|
-
|
|
1204
|
-
# return_type
|
|
1205
|
-
return_type = opts[:debug_return_type]
|
|
1206
|
-
|
|
1207
|
-
# auth_names
|
|
1208
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1209
|
-
|
|
1210
|
-
new_options = opts.merge(
|
|
1211
|
-
:operation => :"AirbnbApi.sync_airbnb",
|
|
1212
|
-
:header_params => header_params,
|
|
1213
|
-
:query_params => query_params,
|
|
1214
|
-
:form_params => form_params,
|
|
1215
|
-
:body => post_body,
|
|
1216
|
-
:auth_names => auth_names,
|
|
1217
|
-
:return_type => return_type
|
|
1218
|
-
)
|
|
1219
|
-
|
|
1220
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1221
|
-
if @api_client.config.debugging
|
|
1222
|
-
@api_client.config.logger.debug "API called: AirbnbApi#sync_airbnb\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1223
|
-
end
|
|
1224
|
-
return data, status_code, headers
|
|
1225
|
-
end
|
|
1226
|
-
|
|
1227
1192
|
# Update Airbnb availability
|
|
1228
|
-
# Push
|
|
1193
|
+
# Push availability + restrictions to Airbnb. `type: \"calendar\"` writes per-date restrictions — min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`) — via a batch of operations that each target either a date range or an explicit date list. `type: \"rules\"` writes listing-level availability rules (default min/max nights, booking lead time, turnover days, seasonal/day-of-week min nights). Restrictions never leak across channels — this endpoint writes only to Airbnb.
|
|
1229
1194
|
# @param id [String]
|
|
1195
|
+
# @param airbnb_availability_write_request [AirbnbAvailabilityWriteRequest]
|
|
1230
1196
|
# @param [Hash] opts the optional parameters
|
|
1231
1197
|
# @return [nil]
|
|
1232
|
-
def update_airbnb_listing_availability(id, opts = {})
|
|
1233
|
-
update_airbnb_listing_availability_with_http_info(id, opts)
|
|
1198
|
+
def update_airbnb_listing_availability(id, airbnb_availability_write_request, opts = {})
|
|
1199
|
+
update_airbnb_listing_availability_with_http_info(id, airbnb_availability_write_request, opts)
|
|
1234
1200
|
nil
|
|
1235
1201
|
end
|
|
1236
1202
|
|
|
1237
1203
|
# Update Airbnb availability
|
|
1238
|
-
# Push
|
|
1204
|
+
# Push availability + restrictions to Airbnb. `type: \"calendar\"` writes per-date restrictions — min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`) — via a batch of operations that each target either a date range or an explicit date list. `type: \"rules\"` writes listing-level availability rules (default min/max nights, booking lead time, turnover days, seasonal/day-of-week min nights). Restrictions never leak across channels — this endpoint writes only to Airbnb.
|
|
1239
1205
|
# @param id [String]
|
|
1206
|
+
# @param airbnb_availability_write_request [AirbnbAvailabilityWriteRequest]
|
|
1240
1207
|
# @param [Hash] opts the optional parameters
|
|
1241
1208
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1242
|
-
def update_airbnb_listing_availability_with_http_info(id, opts = {})
|
|
1209
|
+
def update_airbnb_listing_availability_with_http_info(id, airbnb_availability_write_request, opts = {})
|
|
1243
1210
|
if @api_client.config.debugging
|
|
1244
1211
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_availability ...'
|
|
1245
1212
|
end
|
|
@@ -1247,6 +1214,10 @@ module Repull
|
|
|
1247
1214
|
if @api_client.config.client_side_validation && id.nil?
|
|
1248
1215
|
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_availability"
|
|
1249
1216
|
end
|
|
1217
|
+
# verify the required parameter 'airbnb_availability_write_request' is set
|
|
1218
|
+
if @api_client.config.client_side_validation && airbnb_availability_write_request.nil?
|
|
1219
|
+
fail ArgumentError, "Missing the required parameter 'airbnb_availability_write_request' when calling AirbnbApi.update_airbnb_listing_availability"
|
|
1220
|
+
end
|
|
1250
1221
|
# resource path
|
|
1251
1222
|
local_var_path = '/v1/channels/airbnb/listings/{id}/availability'.sub('{id}', CGI.escape(id.to_s))
|
|
1252
1223
|
|
|
@@ -1255,12 +1226,17 @@ module Repull
|
|
|
1255
1226
|
|
|
1256
1227
|
# header parameters
|
|
1257
1228
|
header_params = opts[:header_params] || {}
|
|
1229
|
+
# HTTP header 'Content-Type'
|
|
1230
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1231
|
+
if !content_type.nil?
|
|
1232
|
+
header_params['Content-Type'] = content_type
|
|
1233
|
+
end
|
|
1258
1234
|
|
|
1259
1235
|
# form parameters
|
|
1260
1236
|
form_params = opts[:form_params] || {}
|
|
1261
1237
|
|
|
1262
1238
|
# http body (model)
|
|
1263
|
-
post_body = opts[:debug_body]
|
|
1239
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_availability_write_request)
|
|
1264
1240
|
|
|
1265
1241
|
# return_type
|
|
1266
1242
|
return_type = opts[:debug_return_type]
|
|
@@ -1286,21 +1262,23 @@ module Repull
|
|
|
1286
1262
|
end
|
|
1287
1263
|
|
|
1288
1264
|
# Update Airbnb pricing
|
|
1289
|
-
# Push pricing changes to Airbnb. The full
|
|
1265
|
+
# Push pricing changes to Airbnb. The `type` discriminator selects the sub-resource (model, standard settings, LOS, rate-plan, fees, currency, rule, or per-date `calendar`). `type: \"calendar\"` carries the full per-date restriction set — nightly price, min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`). For settings sub-resources the full object is replaced — GET first, mutate locally, then PUT the whole object.
|
|
1290
1266
|
# @param id [String]
|
|
1267
|
+
# @param airbnb_pricing_write_request [AirbnbPricingWriteRequest]
|
|
1291
1268
|
# @param [Hash] opts the optional parameters
|
|
1292
1269
|
# @return [nil]
|
|
1293
|
-
def update_airbnb_listing_pricing(id, opts = {})
|
|
1294
|
-
update_airbnb_listing_pricing_with_http_info(id, opts)
|
|
1270
|
+
def update_airbnb_listing_pricing(id, airbnb_pricing_write_request, opts = {})
|
|
1271
|
+
update_airbnb_listing_pricing_with_http_info(id, airbnb_pricing_write_request, opts)
|
|
1295
1272
|
nil
|
|
1296
1273
|
end
|
|
1297
1274
|
|
|
1298
1275
|
# Update Airbnb pricing
|
|
1299
|
-
# Push pricing changes to Airbnb. The full
|
|
1276
|
+
# Push pricing changes to Airbnb. The `type` discriminator selects the sub-resource (model, standard settings, LOS, rate-plan, fees, currency, rule, or per-date `calendar`). `type: \"calendar\"` carries the full per-date restriction set — nightly price, min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`). For settings sub-resources the full object is replaced — GET first, mutate locally, then PUT the whole object.
|
|
1300
1277
|
# @param id [String]
|
|
1278
|
+
# @param airbnb_pricing_write_request [AirbnbPricingWriteRequest]
|
|
1301
1279
|
# @param [Hash] opts the optional parameters
|
|
1302
1280
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1303
|
-
def update_airbnb_listing_pricing_with_http_info(id, opts = {})
|
|
1281
|
+
def update_airbnb_listing_pricing_with_http_info(id, airbnb_pricing_write_request, opts = {})
|
|
1304
1282
|
if @api_client.config.debugging
|
|
1305
1283
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_pricing ...'
|
|
1306
1284
|
end
|
|
@@ -1308,6 +1286,10 @@ module Repull
|
|
|
1308
1286
|
if @api_client.config.client_side_validation && id.nil?
|
|
1309
1287
|
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_pricing"
|
|
1310
1288
|
end
|
|
1289
|
+
# verify the required parameter 'airbnb_pricing_write_request' is set
|
|
1290
|
+
if @api_client.config.client_side_validation && airbnb_pricing_write_request.nil?
|
|
1291
|
+
fail ArgumentError, "Missing the required parameter 'airbnb_pricing_write_request' when calling AirbnbApi.update_airbnb_listing_pricing"
|
|
1292
|
+
end
|
|
1311
1293
|
# resource path
|
|
1312
1294
|
local_var_path = '/v1/channels/airbnb/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))
|
|
1313
1295
|
|
|
@@ -1316,12 +1298,17 @@ module Repull
|
|
|
1316
1298
|
|
|
1317
1299
|
# header parameters
|
|
1318
1300
|
header_params = opts[:header_params] || {}
|
|
1301
|
+
# HTTP header 'Content-Type'
|
|
1302
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1303
|
+
if !content_type.nil?
|
|
1304
|
+
header_params['Content-Type'] = content_type
|
|
1305
|
+
end
|
|
1319
1306
|
|
|
1320
1307
|
# form parameters
|
|
1321
1308
|
form_params = opts[:form_params] || {}
|
|
1322
1309
|
|
|
1323
1310
|
# http body (model)
|
|
1324
|
-
post_body = opts[:debug_body]
|
|
1311
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_pricing_write_request)
|
|
1325
1312
|
|
|
1326
1313
|
# return_type
|
|
1327
1314
|
return_type = opts[:debug_return_type]
|
|
@@ -80,60 +80,5 @@ module Repull
|
|
|
80
80
|
end
|
|
81
81
|
return data, status_code, headers
|
|
82
82
|
end
|
|
83
|
-
|
|
84
|
-
# Get plan and usage
|
|
85
|
-
# Fetch the current plan, usage counters, and billing-cycle reset date for this workspace. Use this to surface a \"you have used X / Y\" indicator in your dashboard.
|
|
86
|
-
# @param [Hash] opts the optional parameters
|
|
87
|
-
# @return [nil]
|
|
88
|
-
def get_billing(opts = {})
|
|
89
|
-
get_billing_with_http_info(opts)
|
|
90
|
-
nil
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
# Get plan and usage
|
|
94
|
-
# Fetch the current plan, usage counters, and billing-cycle reset date for this workspace. Use this to surface a \"you have used X / Y\" indicator in your dashboard.
|
|
95
|
-
# @param [Hash] opts the optional parameters
|
|
96
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
97
|
-
def get_billing_with_http_info(opts = {})
|
|
98
|
-
if @api_client.config.debugging
|
|
99
|
-
@api_client.config.logger.debug 'Calling API: BillingApi.get_billing ...'
|
|
100
|
-
end
|
|
101
|
-
# resource path
|
|
102
|
-
local_var_path = '/v1/billing'
|
|
103
|
-
|
|
104
|
-
# query parameters
|
|
105
|
-
query_params = opts[:query_params] || {}
|
|
106
|
-
|
|
107
|
-
# header parameters
|
|
108
|
-
header_params = opts[:header_params] || {}
|
|
109
|
-
|
|
110
|
-
# form parameters
|
|
111
|
-
form_params = opts[:form_params] || {}
|
|
112
|
-
|
|
113
|
-
# http body (model)
|
|
114
|
-
post_body = opts[:debug_body]
|
|
115
|
-
|
|
116
|
-
# return_type
|
|
117
|
-
return_type = opts[:debug_return_type]
|
|
118
|
-
|
|
119
|
-
# auth_names
|
|
120
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
121
|
-
|
|
122
|
-
new_options = opts.merge(
|
|
123
|
-
:operation => :"BillingApi.get_billing",
|
|
124
|
-
:header_params => header_params,
|
|
125
|
-
:query_params => query_params,
|
|
126
|
-
:form_params => form_params,
|
|
127
|
-
:body => post_body,
|
|
128
|
-
:auth_names => auth_names,
|
|
129
|
-
:return_type => return_type
|
|
130
|
-
)
|
|
131
|
-
|
|
132
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
133
|
-
if @api_client.config.debugging
|
|
134
|
-
@api_client.config.logger.debug "API called: BillingApi#get_billing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
135
|
-
end
|
|
136
|
-
return data, status_code, headers
|
|
137
|
-
end
|
|
138
83
|
end
|
|
139
84
|
end
|
|
@@ -19,63 +19,6 @@ module Repull
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Create Booking.com property
|
|
23
|
-
# Onboard a new Booking.com hotel via the OAuth Connect flow. Returns the hotel id once Stage-1 designation completes in the Extranet.
|
|
24
|
-
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [BookingProperty]
|
|
26
|
-
def create_booking_property(opts = {})
|
|
27
|
-
data, _status_code, _headers = create_booking_property_with_http_info(opts)
|
|
28
|
-
data
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Create Booking.com property
|
|
32
|
-
# Onboard a new Booking.com hotel via the OAuth Connect flow. Returns the hotel id once Stage-1 designation completes in the Extranet.
|
|
33
|
-
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(BookingProperty, Integer, Hash)>] BookingProperty data, response status code and response headers
|
|
35
|
-
def create_booking_property_with_http_info(opts = {})
|
|
36
|
-
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: BookingComApi.create_booking_property ...'
|
|
38
|
-
end
|
|
39
|
-
# resource path
|
|
40
|
-
local_var_path = '/v1/channels/booking/properties'
|
|
41
|
-
|
|
42
|
-
# query parameters
|
|
43
|
-
query_params = opts[:query_params] || {}
|
|
44
|
-
|
|
45
|
-
# header parameters
|
|
46
|
-
header_params = opts[:header_params] || {}
|
|
47
|
-
# HTTP header 'Accept' (if needed)
|
|
48
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
|
-
|
|
50
|
-
# form parameters
|
|
51
|
-
form_params = opts[:form_params] || {}
|
|
52
|
-
|
|
53
|
-
# http body (model)
|
|
54
|
-
post_body = opts[:debug_body]
|
|
55
|
-
|
|
56
|
-
# return_type
|
|
57
|
-
return_type = opts[:debug_return_type] || 'BookingProperty'
|
|
58
|
-
|
|
59
|
-
# auth_names
|
|
60
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
61
|
-
|
|
62
|
-
new_options = opts.merge(
|
|
63
|
-
:operation => :"BookingComApi.create_booking_property",
|
|
64
|
-
:header_params => header_params,
|
|
65
|
-
:query_params => query_params,
|
|
66
|
-
:form_params => form_params,
|
|
67
|
-
:body => post_body,
|
|
68
|
-
:auth_names => auth_names,
|
|
69
|
-
:return_type => return_type
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
73
|
-
if @api_client.config.debugging
|
|
74
|
-
@api_client.config.logger.debug "API called: BookingComApi#create_booking_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
-
end
|
|
76
|
-
return data, status_code, headers
|
|
77
|
-
end
|
|
78
|
-
|
|
79
22
|
# Get Booking.com content
|
|
80
23
|
# Fetch the current content (descriptions, amenities, photos) for a Booking.com property. Used to round-trip edits through Repull.
|
|
81
24
|
# @param [Hash] opts the optional parameters
|
|
@@ -507,78 +450,29 @@ module Repull
|
|
|
507
450
|
return data, status_code, headers
|
|
508
451
|
end
|
|
509
452
|
|
|
510
|
-
# Bulk sync to Booking.com
|
|
511
|
-
# Trigger a full bulk sync of properties + availability + rates to Booking.com. Runs async — returns 202 with a job id; poll `/v1/sync/jobs/{id}` for status.
|
|
512
|
-
# @param [Hash] opts the optional parameters
|
|
513
|
-
# @return [nil]
|
|
514
|
-
def sync_booking(opts = {})
|
|
515
|
-
sync_booking_with_http_info(opts)
|
|
516
|
-
nil
|
|
517
|
-
end
|
|
518
|
-
|
|
519
|
-
# Bulk sync to Booking.com
|
|
520
|
-
# Trigger a full bulk sync of properties + availability + rates to Booking.com. Runs async — returns 202 with a job id; poll `/v1/sync/jobs/{id}` for status.
|
|
521
|
-
# @param [Hash] opts the optional parameters
|
|
522
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
523
|
-
def sync_booking_with_http_info(opts = {})
|
|
524
|
-
if @api_client.config.debugging
|
|
525
|
-
@api_client.config.logger.debug 'Calling API: BookingComApi.sync_booking ...'
|
|
526
|
-
end
|
|
527
|
-
# resource path
|
|
528
|
-
local_var_path = '/v1/channels/booking/sync'
|
|
529
|
-
|
|
530
|
-
# query parameters
|
|
531
|
-
query_params = opts[:query_params] || {}
|
|
532
|
-
|
|
533
|
-
# header parameters
|
|
534
|
-
header_params = opts[:header_params] || {}
|
|
535
|
-
|
|
536
|
-
# form parameters
|
|
537
|
-
form_params = opts[:form_params] || {}
|
|
538
|
-
|
|
539
|
-
# http body (model)
|
|
540
|
-
post_body = opts[:debug_body]
|
|
541
|
-
|
|
542
|
-
# return_type
|
|
543
|
-
return_type = opts[:debug_return_type]
|
|
544
|
-
|
|
545
|
-
# auth_names
|
|
546
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
547
|
-
|
|
548
|
-
new_options = opts.merge(
|
|
549
|
-
:operation => :"BookingComApi.sync_booking",
|
|
550
|
-
:header_params => header_params,
|
|
551
|
-
:query_params => query_params,
|
|
552
|
-
:form_params => form_params,
|
|
553
|
-
:body => post_body,
|
|
554
|
-
:auth_names => auth_names,
|
|
555
|
-
:return_type => return_type
|
|
556
|
-
)
|
|
557
|
-
|
|
558
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
559
|
-
if @api_client.config.debugging
|
|
560
|
-
@api_client.config.logger.debug "API called: BookingComApi#sync_booking\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
561
|
-
end
|
|
562
|
-
return data, status_code, headers
|
|
563
|
-
end
|
|
564
|
-
|
|
565
453
|
# Update Booking.com rates/availability
|
|
566
|
-
# Push availability
|
|
454
|
+
# Push availability, rates, and the full restriction set to Booking.com. `type` selects the write path: - `rates` — nightly price + length-of-stay / arrival restrictions (min/max stay, closed-to-arrival, closed-to-departure, advance-reservation window). - `availability` — inventory (`availableRooms`), the dedicated stop-sell flag (`closed`), and the same restriction set. - `derived-pricing` — occupancy-derived pricing rules. Restrictions never leak across channels — this endpoint writes only to Booking.com. Errors from upstream surface as `booking_error`.
|
|
455
|
+
# @param booking_availability_update_request [BookingAvailabilityUpdateRequest]
|
|
567
456
|
# @param [Hash] opts the optional parameters
|
|
568
457
|
# @return [nil]
|
|
569
|
-
def update_booking_availability(opts = {})
|
|
570
|
-
update_booking_availability_with_http_info(opts)
|
|
458
|
+
def update_booking_availability(booking_availability_update_request, opts = {})
|
|
459
|
+
update_booking_availability_with_http_info(booking_availability_update_request, opts)
|
|
571
460
|
nil
|
|
572
461
|
end
|
|
573
462
|
|
|
574
463
|
# Update Booking.com rates/availability
|
|
575
|
-
# Push availability
|
|
464
|
+
# Push availability, rates, and the full restriction set to Booking.com. `type` selects the write path: - `rates` — nightly price + length-of-stay / arrival restrictions (min/max stay, closed-to-arrival, closed-to-departure, advance-reservation window). - `availability` — inventory (`availableRooms`), the dedicated stop-sell flag (`closed`), and the same restriction set. - `derived-pricing` — occupancy-derived pricing rules. Restrictions never leak across channels — this endpoint writes only to Booking.com. Errors from upstream surface as `booking_error`.
|
|
465
|
+
# @param booking_availability_update_request [BookingAvailabilityUpdateRequest]
|
|
576
466
|
# @param [Hash] opts the optional parameters
|
|
577
467
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
578
|
-
def update_booking_availability_with_http_info(opts = {})
|
|
468
|
+
def update_booking_availability_with_http_info(booking_availability_update_request, opts = {})
|
|
579
469
|
if @api_client.config.debugging
|
|
580
470
|
@api_client.config.logger.debug 'Calling API: BookingComApi.update_booking_availability ...'
|
|
581
471
|
end
|
|
472
|
+
# verify the required parameter 'booking_availability_update_request' is set
|
|
473
|
+
if @api_client.config.client_side_validation && booking_availability_update_request.nil?
|
|
474
|
+
fail ArgumentError, "Missing the required parameter 'booking_availability_update_request' when calling BookingComApi.update_booking_availability"
|
|
475
|
+
end
|
|
582
476
|
# resource path
|
|
583
477
|
local_var_path = '/v1/channels/booking/availability'
|
|
584
478
|
|
|
@@ -587,12 +481,19 @@ module Repull
|
|
|
587
481
|
|
|
588
482
|
# header parameters
|
|
589
483
|
header_params = opts[:header_params] || {}
|
|
484
|
+
# HTTP header 'Accept' (if needed)
|
|
485
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
486
|
+
# HTTP header 'Content-Type'
|
|
487
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
488
|
+
if !content_type.nil?
|
|
489
|
+
header_params['Content-Type'] = content_type
|
|
490
|
+
end
|
|
590
491
|
|
|
591
492
|
# form parameters
|
|
592
493
|
form_params = opts[:form_params] || {}
|
|
593
494
|
|
|
594
495
|
# http body (model)
|
|
595
|
-
post_body = opts[:debug_body]
|
|
496
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(booking_availability_update_request)
|
|
596
497
|
|
|
597
498
|
# return_type
|
|
598
499
|
return_type = opts[:debug_return_type]
|