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
|
@@ -659,5 +659,79 @@ module Repull
|
|
|
659
659
|
end
|
|
660
660
|
return data, status_code, headers
|
|
661
661
|
end
|
|
662
|
+
|
|
663
|
+
# Update canonical listing content
|
|
664
|
+
# Write your PMS's canonical listing content — title, description, amenities, address, occupancy, and policies — into a Repull listing, making it the source of truth. This is the flagship \"the PMS owns listing content, Repull distributes it\" enabler. **Partial update:** every field is optional. Only the fields you send are written; absent fields are left untouched. `amenities` is a FULL replacement of the amenity set (omit to leave untouched, send `[]` to clear). **Local write only — NOT a channel publish.** This mutates Repull's own copy of the content. It does NOT push to Airbnb / Booking.com; it marks the channels dirty so a later publish knows what changed. Distribution stays a separate explicit step. **Photos are deferred:** a provided `photos` array is echoed back in the `deferred` field and NOT persisted (media ingestion is a follow-up). Cross-tenant access (a listing that belongs to a different workspace) returns 404 — never 403. This endpoint is served even when the account is over the plan-listings cap, since editing content on a listing you already own never grows the portfolio.
|
|
665
|
+
# @param id [Integer] Repull listing id
|
|
666
|
+
# @param listing_content_update_request [ListingContentUpdateRequest]
|
|
667
|
+
# @param [Hash] opts the optional parameters
|
|
668
|
+
# @return [ListingContentUpdateResponse]
|
|
669
|
+
def update_listing_content(id, listing_content_update_request, opts = {})
|
|
670
|
+
data, _status_code, _headers = update_listing_content_with_http_info(id, listing_content_update_request, opts)
|
|
671
|
+
data
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
# Update canonical listing content
|
|
675
|
+
# Write your PMS's canonical listing content — title, description, amenities, address, occupancy, and policies — into a Repull listing, making it the source of truth. This is the flagship \"the PMS owns listing content, Repull distributes it\" enabler. **Partial update:** every field is optional. Only the fields you send are written; absent fields are left untouched. `amenities` is a FULL replacement of the amenity set (omit to leave untouched, send `[]` to clear). **Local write only — NOT a channel publish.** This mutates Repull's own copy of the content. It does NOT push to Airbnb / Booking.com; it marks the channels dirty so a later publish knows what changed. Distribution stays a separate explicit step. **Photos are deferred:** a provided `photos` array is echoed back in the `deferred` field and NOT persisted (media ingestion is a follow-up). Cross-tenant access (a listing that belongs to a different workspace) returns 404 — never 403. This endpoint is served even when the account is over the plan-listings cap, since editing content on a listing you already own never grows the portfolio.
|
|
676
|
+
# @param id [Integer] Repull listing id
|
|
677
|
+
# @param listing_content_update_request [ListingContentUpdateRequest]
|
|
678
|
+
# @param [Hash] opts the optional parameters
|
|
679
|
+
# @return [Array<(ListingContentUpdateResponse, Integer, Hash)>] ListingContentUpdateResponse data, response status code and response headers
|
|
680
|
+
def update_listing_content_with_http_info(id, listing_content_update_request, opts = {})
|
|
681
|
+
if @api_client.config.debugging
|
|
682
|
+
@api_client.config.logger.debug 'Calling API: ListingsApi.update_listing_content ...'
|
|
683
|
+
end
|
|
684
|
+
# verify the required parameter 'id' is set
|
|
685
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
686
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListingsApi.update_listing_content"
|
|
687
|
+
end
|
|
688
|
+
# verify the required parameter 'listing_content_update_request' is set
|
|
689
|
+
if @api_client.config.client_side_validation && listing_content_update_request.nil?
|
|
690
|
+
fail ArgumentError, "Missing the required parameter 'listing_content_update_request' when calling ListingsApi.update_listing_content"
|
|
691
|
+
end
|
|
692
|
+
# resource path
|
|
693
|
+
local_var_path = '/v1/listings/{id}/content'.sub('{id}', CGI.escape(id.to_s))
|
|
694
|
+
|
|
695
|
+
# query parameters
|
|
696
|
+
query_params = opts[:query_params] || {}
|
|
697
|
+
|
|
698
|
+
# header parameters
|
|
699
|
+
header_params = opts[:header_params] || {}
|
|
700
|
+
# HTTP header 'Accept' (if needed)
|
|
701
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
702
|
+
# HTTP header 'Content-Type'
|
|
703
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
704
|
+
if !content_type.nil?
|
|
705
|
+
header_params['Content-Type'] = content_type
|
|
706
|
+
end
|
|
707
|
+
|
|
708
|
+
# form parameters
|
|
709
|
+
form_params = opts[:form_params] || {}
|
|
710
|
+
|
|
711
|
+
# http body (model)
|
|
712
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(listing_content_update_request)
|
|
713
|
+
|
|
714
|
+
# return_type
|
|
715
|
+
return_type = opts[:debug_return_type] || 'ListingContentUpdateResponse'
|
|
716
|
+
|
|
717
|
+
# auth_names
|
|
718
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
719
|
+
|
|
720
|
+
new_options = opts.merge(
|
|
721
|
+
:operation => :"ListingsApi.update_listing_content",
|
|
722
|
+
:header_params => header_params,
|
|
723
|
+
:query_params => query_params,
|
|
724
|
+
:form_params => form_params,
|
|
725
|
+
:body => post_body,
|
|
726
|
+
:auth_names => auth_names,
|
|
727
|
+
:return_type => return_type
|
|
728
|
+
)
|
|
729
|
+
|
|
730
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
731
|
+
if @api_client.config.debugging
|
|
732
|
+
@api_client.config.logger.debug "API called: ListingsApi#update_listing_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
733
|
+
end
|
|
734
|
+
return data, status_code, headers
|
|
735
|
+
end
|
|
662
736
|
end
|
|
663
737
|
end
|
|
@@ -19,135 +19,6 @@ module Repull
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Cancel reservation
|
|
23
|
-
# Cancel an existing reservation. Cancellation rules vary by provider — Airbnb host-cancellations carry penalties; Booking.com cancellations apply the per-rate-plan policy. Once 200 is returned, the upstream PMS state is committed.
|
|
24
|
-
# @param id [Integer]
|
|
25
|
-
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @return [nil]
|
|
27
|
-
def cancel_reservation(id, opts = {})
|
|
28
|
-
cancel_reservation_with_http_info(id, opts)
|
|
29
|
-
nil
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Cancel reservation
|
|
33
|
-
# Cancel an existing reservation. Cancellation rules vary by provider — Airbnb host-cancellations carry penalties; Booking.com cancellations apply the per-rate-plan policy. Once 200 is returned, the upstream PMS state is committed.
|
|
34
|
-
# @param id [Integer]
|
|
35
|
-
# @param [Hash] opts the optional parameters
|
|
36
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
|
-
def cancel_reservation_with_http_info(id, opts = {})
|
|
38
|
-
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: ReservationsApi.cancel_reservation ...'
|
|
40
|
-
end
|
|
41
|
-
# verify the required parameter 'id' is set
|
|
42
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling ReservationsApi.cancel_reservation"
|
|
44
|
-
end
|
|
45
|
-
# resource path
|
|
46
|
-
local_var_path = '/v1/reservations/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
47
|
-
|
|
48
|
-
# query parameters
|
|
49
|
-
query_params = opts[:query_params] || {}
|
|
50
|
-
|
|
51
|
-
# header parameters
|
|
52
|
-
header_params = opts[:header_params] || {}
|
|
53
|
-
|
|
54
|
-
# form parameters
|
|
55
|
-
form_params = opts[:form_params] || {}
|
|
56
|
-
|
|
57
|
-
# http body (model)
|
|
58
|
-
post_body = opts[:debug_body]
|
|
59
|
-
|
|
60
|
-
# return_type
|
|
61
|
-
return_type = opts[:debug_return_type]
|
|
62
|
-
|
|
63
|
-
# auth_names
|
|
64
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
65
|
-
|
|
66
|
-
new_options = opts.merge(
|
|
67
|
-
:operation => :"ReservationsApi.cancel_reservation",
|
|
68
|
-
:header_params => header_params,
|
|
69
|
-
:query_params => query_params,
|
|
70
|
-
:form_params => form_params,
|
|
71
|
-
:body => post_body,
|
|
72
|
-
:auth_names => auth_names,
|
|
73
|
-
:return_type => return_type
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
77
|
-
if @api_client.config.debugging
|
|
78
|
-
@api_client.config.logger.debug "API called: ReservationsApi#cancel_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
-
end
|
|
80
|
-
return data, status_code, headers
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Create a reservation
|
|
84
|
-
# Create a reservation in the source PMS. Required fields depend on the connected provider (e.g. Airbnb requires guest email; Booking.com requires hotel id). Validation errors return 422 with the offending `field` populated.
|
|
85
|
-
# @param create_reservation_request [CreateReservationRequest]
|
|
86
|
-
# @param [Hash] opts the optional parameters
|
|
87
|
-
# @return [Reservation]
|
|
88
|
-
def create_reservation(create_reservation_request, opts = {})
|
|
89
|
-
data, _status_code, _headers = create_reservation_with_http_info(create_reservation_request, opts)
|
|
90
|
-
data
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
# Create a reservation
|
|
94
|
-
# Create a reservation in the source PMS. Required fields depend on the connected provider (e.g. Airbnb requires guest email; Booking.com requires hotel id). Validation errors return 422 with the offending `field` populated.
|
|
95
|
-
# @param create_reservation_request [CreateReservationRequest]
|
|
96
|
-
# @param [Hash] opts the optional parameters
|
|
97
|
-
# @return [Array<(Reservation, Integer, Hash)>] Reservation data, response status code and response headers
|
|
98
|
-
def create_reservation_with_http_info(create_reservation_request, opts = {})
|
|
99
|
-
if @api_client.config.debugging
|
|
100
|
-
@api_client.config.logger.debug 'Calling API: ReservationsApi.create_reservation ...'
|
|
101
|
-
end
|
|
102
|
-
# verify the required parameter 'create_reservation_request' is set
|
|
103
|
-
if @api_client.config.client_side_validation && create_reservation_request.nil?
|
|
104
|
-
fail ArgumentError, "Missing the required parameter 'create_reservation_request' when calling ReservationsApi.create_reservation"
|
|
105
|
-
end
|
|
106
|
-
# resource path
|
|
107
|
-
local_var_path = '/v1/reservations'
|
|
108
|
-
|
|
109
|
-
# query parameters
|
|
110
|
-
query_params = opts[:query_params] || {}
|
|
111
|
-
|
|
112
|
-
# header parameters
|
|
113
|
-
header_params = opts[:header_params] || {}
|
|
114
|
-
# HTTP header 'Accept' (if needed)
|
|
115
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
116
|
-
# HTTP header 'Content-Type'
|
|
117
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
118
|
-
if !content_type.nil?
|
|
119
|
-
header_params['Content-Type'] = content_type
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
# form parameters
|
|
123
|
-
form_params = opts[:form_params] || {}
|
|
124
|
-
|
|
125
|
-
# http body (model)
|
|
126
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_reservation_request)
|
|
127
|
-
|
|
128
|
-
# return_type
|
|
129
|
-
return_type = opts[:debug_return_type] || 'Reservation'
|
|
130
|
-
|
|
131
|
-
# auth_names
|
|
132
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
133
|
-
|
|
134
|
-
new_options = opts.merge(
|
|
135
|
-
:operation => :"ReservationsApi.create_reservation",
|
|
136
|
-
:header_params => header_params,
|
|
137
|
-
:query_params => query_params,
|
|
138
|
-
:form_params => form_params,
|
|
139
|
-
:body => post_body,
|
|
140
|
-
:auth_names => auth_names,
|
|
141
|
-
:return_type => return_type
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
145
|
-
if @api_client.config.debugging
|
|
146
|
-
@api_client.config.logger.debug "API called: ReservationsApi#create_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
147
|
-
end
|
|
148
|
-
return data, status_code, headers
|
|
149
|
-
end
|
|
150
|
-
|
|
151
22
|
# Get reservation details
|
|
152
23
|
# Returns the full record for a single reservation, scoped to the authenticated workspace. Response shape is identical to a single row in `GET /v1/reservations` so SDK consumers can use the same type for both. Returns **404** if the id does not exist OR belongs to a different workspace — the API never differentiates the two so caller can't enumerate other workspaces' ids.
|
|
153
24
|
# @param id [Integer] Internal Repull reservation ID.
|
|
@@ -344,73 +215,5 @@ module Repull
|
|
|
344
215
|
end
|
|
345
216
|
return data, status_code, headers
|
|
346
217
|
end
|
|
347
|
-
|
|
348
|
-
# Update reservation
|
|
349
|
-
# Patch reservation fields (dates, status, special requests). Only fields included in the body are modified. Use the cancel endpoint for cancellations — DELETE handles cancellation but not partial updates.
|
|
350
|
-
# @param id [Integer]
|
|
351
|
-
# @param [Hash] opts the optional parameters
|
|
352
|
-
# @option opts [UpdateReservationRequest] :update_reservation_request
|
|
353
|
-
# @return [nil]
|
|
354
|
-
def update_reservation(id, opts = {})
|
|
355
|
-
update_reservation_with_http_info(id, opts)
|
|
356
|
-
nil
|
|
357
|
-
end
|
|
358
|
-
|
|
359
|
-
# Update reservation
|
|
360
|
-
# Patch reservation fields (dates, status, special requests). Only fields included in the body are modified. Use the cancel endpoint for cancellations — DELETE handles cancellation but not partial updates.
|
|
361
|
-
# @param id [Integer]
|
|
362
|
-
# @param [Hash] opts the optional parameters
|
|
363
|
-
# @option opts [UpdateReservationRequest] :update_reservation_request
|
|
364
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
365
|
-
def update_reservation_with_http_info(id, opts = {})
|
|
366
|
-
if @api_client.config.debugging
|
|
367
|
-
@api_client.config.logger.debug 'Calling API: ReservationsApi.update_reservation ...'
|
|
368
|
-
end
|
|
369
|
-
# verify the required parameter 'id' is set
|
|
370
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
371
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling ReservationsApi.update_reservation"
|
|
372
|
-
end
|
|
373
|
-
# resource path
|
|
374
|
-
local_var_path = '/v1/reservations/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
375
|
-
|
|
376
|
-
# query parameters
|
|
377
|
-
query_params = opts[:query_params] || {}
|
|
378
|
-
|
|
379
|
-
# header parameters
|
|
380
|
-
header_params = opts[:header_params] || {}
|
|
381
|
-
# HTTP header 'Content-Type'
|
|
382
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
383
|
-
if !content_type.nil?
|
|
384
|
-
header_params['Content-Type'] = content_type
|
|
385
|
-
end
|
|
386
|
-
|
|
387
|
-
# form parameters
|
|
388
|
-
form_params = opts[:form_params] || {}
|
|
389
|
-
|
|
390
|
-
# http body (model)
|
|
391
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_reservation_request'])
|
|
392
|
-
|
|
393
|
-
# return_type
|
|
394
|
-
return_type = opts[:debug_return_type]
|
|
395
|
-
|
|
396
|
-
# auth_names
|
|
397
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
398
|
-
|
|
399
|
-
new_options = opts.merge(
|
|
400
|
-
:operation => :"ReservationsApi.update_reservation",
|
|
401
|
-
:header_params => header_params,
|
|
402
|
-
:query_params => query_params,
|
|
403
|
-
:form_params => form_params,
|
|
404
|
-
:body => post_body,
|
|
405
|
-
:auth_names => auth_names,
|
|
406
|
-
:return_type => return_type
|
|
407
|
-
)
|
|
408
|
-
|
|
409
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
410
|
-
if @api_client.config.debugging
|
|
411
|
-
@api_client.config.logger.debug "API called: ReservationsApi#update_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
412
|
-
end
|
|
413
|
-
return data, status_code, headers
|
|
414
|
-
end
|
|
415
218
|
end
|
|
416
219
|
end
|
|
@@ -13,54 +13,34 @@ Generator version: 7.22.0
|
|
|
13
13
|
require 'cgi'
|
|
14
14
|
|
|
15
15
|
module Repull
|
|
16
|
-
class
|
|
16
|
+
class SandboxApi
|
|
17
17
|
attr_accessor :api_client
|
|
18
18
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
# @param property_id [Integer]
|
|
25
|
-
# @param start_date [Date]
|
|
26
|
-
# @param end_date [Date]
|
|
22
|
+
# Reset sandbox fixtures
|
|
23
|
+
# Clear the authenticated test customer's sandbox fixtures. **Requires a test key (`sk_test_*`)** — live or legacy keys are rejected with 403. Deletes ONLY the customer's rows in the isolated sandbox data space — it can never touch real inventory (`listings`, `reservations`, connections). Idempotent: resetting an empty sandbox returns zero counts (still 200). Returns per-resource deletion counts.
|
|
27
24
|
# @param [Hash] opts the optional parameters
|
|
28
|
-
# @return [
|
|
29
|
-
def
|
|
30
|
-
data, _status_code, _headers =
|
|
25
|
+
# @return [SandboxResetResult]
|
|
26
|
+
def reset_sandbox(opts = {})
|
|
27
|
+
data, _status_code, _headers = reset_sandbox_with_http_info(opts)
|
|
31
28
|
data
|
|
32
29
|
end
|
|
33
30
|
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
# @param property_id [Integer]
|
|
37
|
-
# @param start_date [Date]
|
|
38
|
-
# @param end_date [Date]
|
|
31
|
+
# Reset sandbox fixtures
|
|
32
|
+
# Clear the authenticated test customer's sandbox fixtures. **Requires a test key (`sk_test_*`)** — live or legacy keys are rejected with 403. Deletes ONLY the customer's rows in the isolated sandbox data space — it can never touch real inventory (`listings`, `reservations`, connections). Idempotent: resetting an empty sandbox returns zero counts (still 200). Returns per-resource deletion counts.
|
|
39
33
|
# @param [Hash] opts the optional parameters
|
|
40
|
-
# @return [Array<(
|
|
41
|
-
def
|
|
34
|
+
# @return [Array<(SandboxResetResult, Integer, Hash)>] SandboxResetResult data, response status code and response headers
|
|
35
|
+
def reset_sandbox_with_http_info(opts = {})
|
|
42
36
|
if @api_client.config.debugging
|
|
43
|
-
@api_client.config.logger.debug 'Calling API:
|
|
44
|
-
end
|
|
45
|
-
# verify the required parameter 'property_id' is set
|
|
46
|
-
if @api_client.config.client_side_validation && property_id.nil?
|
|
47
|
-
fail ArgumentError, "Missing the required parameter 'property_id' when calling AvailabilityApi.get_availability"
|
|
48
|
-
end
|
|
49
|
-
# verify the required parameter 'start_date' is set
|
|
50
|
-
if @api_client.config.client_side_validation && start_date.nil?
|
|
51
|
-
fail ArgumentError, "Missing the required parameter 'start_date' when calling AvailabilityApi.get_availability"
|
|
52
|
-
end
|
|
53
|
-
# verify the required parameter 'end_date' is set
|
|
54
|
-
if @api_client.config.client_side_validation && end_date.nil?
|
|
55
|
-
fail ArgumentError, "Missing the required parameter 'end_date' when calling AvailabilityApi.get_availability"
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.reset_sandbox ...'
|
|
56
38
|
end
|
|
57
39
|
# resource path
|
|
58
|
-
local_var_path = '/v1/
|
|
40
|
+
local_var_path = '/v1/sandbox/reset'
|
|
59
41
|
|
|
60
42
|
# query parameters
|
|
61
43
|
query_params = opts[:query_params] || {}
|
|
62
|
-
query_params[:'startDate'] = start_date
|
|
63
|
-
query_params[:'endDate'] = end_date
|
|
64
44
|
|
|
65
45
|
# header parameters
|
|
66
46
|
header_params = opts[:header_params] || {}
|
|
@@ -74,13 +54,13 @@ module Repull
|
|
|
74
54
|
post_body = opts[:debug_body]
|
|
75
55
|
|
|
76
56
|
# return_type
|
|
77
|
-
return_type = opts[:debug_return_type] || '
|
|
57
|
+
return_type = opts[:debug_return_type] || 'SandboxResetResult'
|
|
78
58
|
|
|
79
59
|
# auth_names
|
|
80
60
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
81
61
|
|
|
82
62
|
new_options = opts.merge(
|
|
83
|
-
:operation => :"
|
|
63
|
+
:operation => :"SandboxApi.reset_sandbox",
|
|
84
64
|
:header_params => header_params,
|
|
85
65
|
:query_params => query_params,
|
|
86
66
|
:form_params => form_params,
|
|
@@ -89,66 +69,55 @@ module Repull
|
|
|
89
69
|
:return_type => return_type
|
|
90
70
|
)
|
|
91
71
|
|
|
92
|
-
data, status_code, headers = @api_client.call_api(:
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
93
73
|
if @api_client.config.debugging
|
|
94
|
-
@api_client.config.logger.debug "API called:
|
|
74
|
+
@api_client.config.logger.debug "API called: SandboxApi#reset_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
95
75
|
end
|
|
96
76
|
return data, status_code, headers
|
|
97
77
|
end
|
|
98
78
|
|
|
99
|
-
#
|
|
100
|
-
#
|
|
101
|
-
# @param property_id [Integer]
|
|
79
|
+
# Seed sandbox fixtures
|
|
80
|
+
# Provision a deterministic set of test fixtures for contract testing WITHOUT live provider accounts. **Requires a test key (`sk_test_*`)** — live or legacy keys are rejected with 403. Seeds, scoped to the authenticated test customer: 3 sample listings, 5 reservations across the lifecycle (created / modified / cancelled / date-changed / pending), and 2 fake connected provider accounts (Airbnb + Booking.com) so the pairing + connection-status flows are testable without real OAuth. Idempotent — re-seeding upserts the same rows and returns the same ids. The seeded rows are visible ONLY under a test key, via the normal read endpoints (`GET /v1/listings`, `/v1/reservations`, `/v1/connect`, `/v1/channels/airbnb/listings`, `/v1/channels/airbnb/connection`). They live in a data space fully isolated from live inventory.
|
|
102
81
|
# @param [Hash] opts the optional parameters
|
|
103
|
-
# @
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
nil
|
|
82
|
+
# @return [SandboxSeedResult]
|
|
83
|
+
def seed_sandbox(opts = {})
|
|
84
|
+
data, _status_code, _headers = seed_sandbox_with_http_info(opts)
|
|
85
|
+
data
|
|
108
86
|
end
|
|
109
87
|
|
|
110
|
-
#
|
|
111
|
-
#
|
|
112
|
-
# @param property_id [Integer]
|
|
88
|
+
# Seed sandbox fixtures
|
|
89
|
+
# Provision a deterministic set of test fixtures for contract testing WITHOUT live provider accounts. **Requires a test key (`sk_test_*`)** — live or legacy keys are rejected with 403. Seeds, scoped to the authenticated test customer: 3 sample listings, 5 reservations across the lifecycle (created / modified / cancelled / date-changed / pending), and 2 fake connected provider accounts (Airbnb + Booking.com) so the pairing + connection-status flows are testable without real OAuth. Idempotent — re-seeding upserts the same rows and returns the same ids. The seeded rows are visible ONLY under a test key, via the normal read endpoints (`GET /v1/listings`, `/v1/reservations`, `/v1/connect`, `/v1/channels/airbnb/listings`, `/v1/channels/airbnb/connection`). They live in a data space fully isolated from live inventory.
|
|
113
90
|
# @param [Hash] opts the optional parameters
|
|
114
|
-
# @
|
|
115
|
-
|
|
116
|
-
def update_availability_with_http_info(property_id, opts = {})
|
|
91
|
+
# @return [Array<(SandboxSeedResult, Integer, Hash)>] SandboxSeedResult data, response status code and response headers
|
|
92
|
+
def seed_sandbox_with_http_info(opts = {})
|
|
117
93
|
if @api_client.config.debugging
|
|
118
|
-
@api_client.config.logger.debug 'Calling API:
|
|
119
|
-
end
|
|
120
|
-
# verify the required parameter 'property_id' is set
|
|
121
|
-
if @api_client.config.client_side_validation && property_id.nil?
|
|
122
|
-
fail ArgumentError, "Missing the required parameter 'property_id' when calling AvailabilityApi.update_availability"
|
|
94
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.seed_sandbox ...'
|
|
123
95
|
end
|
|
124
96
|
# resource path
|
|
125
|
-
local_var_path = '/v1/
|
|
97
|
+
local_var_path = '/v1/sandbox/seed'
|
|
126
98
|
|
|
127
99
|
# query parameters
|
|
128
100
|
query_params = opts[:query_params] || {}
|
|
129
101
|
|
|
130
102
|
# header parameters
|
|
131
103
|
header_params = opts[:header_params] || {}
|
|
132
|
-
# HTTP header '
|
|
133
|
-
|
|
134
|
-
if !content_type.nil?
|
|
135
|
-
header_params['Content-Type'] = content_type
|
|
136
|
-
end
|
|
104
|
+
# HTTP header 'Accept' (if needed)
|
|
105
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
137
106
|
|
|
138
107
|
# form parameters
|
|
139
108
|
form_params = opts[:form_params] || {}
|
|
140
109
|
|
|
141
110
|
# http body (model)
|
|
142
|
-
post_body = opts[:debug_body]
|
|
111
|
+
post_body = opts[:debug_body]
|
|
143
112
|
|
|
144
113
|
# return_type
|
|
145
|
-
return_type = opts[:debug_return_type]
|
|
114
|
+
return_type = opts[:debug_return_type] || 'SandboxSeedResult'
|
|
146
115
|
|
|
147
116
|
# auth_names
|
|
148
117
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
149
118
|
|
|
150
119
|
new_options = opts.merge(
|
|
151
|
-
:operation => :"
|
|
120
|
+
:operation => :"SandboxApi.seed_sandbox",
|
|
152
121
|
:header_params => header_params,
|
|
153
122
|
:query_params => query_params,
|
|
154
123
|
:form_params => form_params,
|
|
@@ -157,9 +126,9 @@ module Repull
|
|
|
157
126
|
:return_type => return_type
|
|
158
127
|
)
|
|
159
128
|
|
|
160
|
-
data, status_code, headers = @api_client.call_api(:
|
|
129
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
161
130
|
if @api_client.config.debugging
|
|
162
|
-
@api_client.config.logger.debug "API called:
|
|
131
|
+
@api_client.config.logger.debug "API called: SandboxApi#seed_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
163
132
|
end
|
|
164
133
|
return data, status_code, headers
|
|
165
134
|
end
|
data/lib/repull/api/vrbo_api.rb
CHANGED
|
@@ -19,69 +19,6 @@ module Repull
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Get VRBO pricing (501 — agency model)
|
|
23
|
-
# VRBO uses the agency model — VRBO PULLS rates from `/api/webhooks/vrbo/listings-xml/rates/{listing}/{unit}` rather than accepting a push API. This endpoint is declared for symmetry with the other channel-pricing routes but currently returns **501 Not Implemented** with a pointer at the public rate URL VRBO consumes. Use `GET /v1/listings/{id}/calendar` (once wired) to inspect the underlying source-of-truth. When the listings-XML rate-builder is ported into this repo, this endpoint will return the parsed rates VRBO sees.
|
|
24
|
-
# @param id [Integer] Vanio listing ID — resolved to a VRBO listing/unit via the workspace mapping.
|
|
25
|
-
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @return [nil]
|
|
27
|
-
def get_vrbo_listing_pricing(id, opts = {})
|
|
28
|
-
get_vrbo_listing_pricing_with_http_info(id, opts)
|
|
29
|
-
nil
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Get VRBO pricing (501 — agency model)
|
|
33
|
-
# VRBO uses the agency model — VRBO PULLS rates from `/api/webhooks/vrbo/listings-xml/rates/{listing}/{unit}` rather than accepting a push API. This endpoint is declared for symmetry with the other channel-pricing routes but currently returns **501 Not Implemented** with a pointer at the public rate URL VRBO consumes. Use `GET /v1/listings/{id}/calendar` (once wired) to inspect the underlying source-of-truth. When the listings-XML rate-builder is ported into this repo, this endpoint will return the parsed rates VRBO sees.
|
|
34
|
-
# @param id [Integer] Vanio listing ID — resolved to a VRBO listing/unit via the workspace mapping.
|
|
35
|
-
# @param [Hash] opts the optional parameters
|
|
36
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
|
-
def get_vrbo_listing_pricing_with_http_info(id, opts = {})
|
|
38
|
-
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: VRBOApi.get_vrbo_listing_pricing ...'
|
|
40
|
-
end
|
|
41
|
-
# verify the required parameter 'id' is set
|
|
42
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling VRBOApi.get_vrbo_listing_pricing"
|
|
44
|
-
end
|
|
45
|
-
# resource path
|
|
46
|
-
local_var_path = '/v1/channels/vrbo/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))
|
|
47
|
-
|
|
48
|
-
# query parameters
|
|
49
|
-
query_params = opts[:query_params] || {}
|
|
50
|
-
|
|
51
|
-
# header parameters
|
|
52
|
-
header_params = opts[:header_params] || {}
|
|
53
|
-
# HTTP header 'Accept' (if needed)
|
|
54
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
-
|
|
56
|
-
# form parameters
|
|
57
|
-
form_params = opts[:form_params] || {}
|
|
58
|
-
|
|
59
|
-
# http body (model)
|
|
60
|
-
post_body = opts[:debug_body]
|
|
61
|
-
|
|
62
|
-
# return_type
|
|
63
|
-
return_type = opts[:debug_return_type]
|
|
64
|
-
|
|
65
|
-
# auth_names
|
|
66
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
67
|
-
|
|
68
|
-
new_options = opts.merge(
|
|
69
|
-
:operation => :"VRBOApi.get_vrbo_listing_pricing",
|
|
70
|
-
:header_params => header_params,
|
|
71
|
-
:query_params => query_params,
|
|
72
|
-
:form_params => form_params,
|
|
73
|
-
:body => post_body,
|
|
74
|
-
:auth_names => auth_names,
|
|
75
|
-
:return_type => return_type
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
79
|
-
if @api_client.config.debugging
|
|
80
|
-
@api_client.config.logger.debug "API called: VRBOApi#get_vrbo_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
-
end
|
|
82
|
-
return data, status_code, headers
|
|
83
|
-
end
|
|
84
|
-
|
|
85
22
|
# List VRBO listings
|
|
86
23
|
# List VRBO listings this workspace owns. VRBO is agency-model — Repull reads listings via the public iCal/HTTP feeds.
|
|
87
24
|
# @param [Hash] opts the optional parameters
|
|
@@ -223,68 +160,5 @@ module Repull
|
|
|
223
160
|
end
|
|
224
161
|
return data, status_code, headers
|
|
225
162
|
end
|
|
226
|
-
|
|
227
|
-
# Update VRBO pricing (501 — no push API exists)
|
|
228
|
-
# VRBO has no rate-push API. To change what VRBO sees, update the underlying Vanio calendar/pricing-settings (e.g. `PUT /v1/listings/{id}/calendar` once wired) — VRBO will pick up the change on its next pull. This endpoint always returns **501** rather than fake-stubbing a successful push the SDK would silently swallow.
|
|
229
|
-
# @param id [Integer]
|
|
230
|
-
# @param [Hash] opts the optional parameters
|
|
231
|
-
# @return [nil]
|
|
232
|
-
def update_vrbo_listing_pricing(id, opts = {})
|
|
233
|
-
update_vrbo_listing_pricing_with_http_info(id, opts)
|
|
234
|
-
nil
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
# Update VRBO pricing (501 — no push API exists)
|
|
238
|
-
# VRBO has no rate-push API. To change what VRBO sees, update the underlying Vanio calendar/pricing-settings (e.g. `PUT /v1/listings/{id}/calendar` once wired) — VRBO will pick up the change on its next pull. This endpoint always returns **501** rather than fake-stubbing a successful push the SDK would silently swallow.
|
|
239
|
-
# @param id [Integer]
|
|
240
|
-
# @param [Hash] opts the optional parameters
|
|
241
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
242
|
-
def update_vrbo_listing_pricing_with_http_info(id, opts = {})
|
|
243
|
-
if @api_client.config.debugging
|
|
244
|
-
@api_client.config.logger.debug 'Calling API: VRBOApi.update_vrbo_listing_pricing ...'
|
|
245
|
-
end
|
|
246
|
-
# verify the required parameter 'id' is set
|
|
247
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
248
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling VRBOApi.update_vrbo_listing_pricing"
|
|
249
|
-
end
|
|
250
|
-
# resource path
|
|
251
|
-
local_var_path = '/v1/channels/vrbo/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))
|
|
252
|
-
|
|
253
|
-
# query parameters
|
|
254
|
-
query_params = opts[:query_params] || {}
|
|
255
|
-
|
|
256
|
-
# header parameters
|
|
257
|
-
header_params = opts[:header_params] || {}
|
|
258
|
-
# HTTP header 'Accept' (if needed)
|
|
259
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
260
|
-
|
|
261
|
-
# form parameters
|
|
262
|
-
form_params = opts[:form_params] || {}
|
|
263
|
-
|
|
264
|
-
# http body (model)
|
|
265
|
-
post_body = opts[:debug_body]
|
|
266
|
-
|
|
267
|
-
# return_type
|
|
268
|
-
return_type = opts[:debug_return_type]
|
|
269
|
-
|
|
270
|
-
# auth_names
|
|
271
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
272
|
-
|
|
273
|
-
new_options = opts.merge(
|
|
274
|
-
:operation => :"VRBOApi.update_vrbo_listing_pricing",
|
|
275
|
-
:header_params => header_params,
|
|
276
|
-
:query_params => query_params,
|
|
277
|
-
:form_params => form_params,
|
|
278
|
-
:body => post_body,
|
|
279
|
-
:auth_names => auth_names,
|
|
280
|
-
:return_type => return_type
|
|
281
|
-
)
|
|
282
|
-
|
|
283
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
284
|
-
if @api_client.config.debugging
|
|
285
|
-
@api_client.config.logger.debug "API called: VRBOApi#update_vrbo_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
286
|
-
end
|
|
287
|
-
return data, status_code, headers
|
|
288
|
-
end
|
|
289
163
|
end
|
|
290
164
|
end
|